Hello Guest it is May 06, 2024, 12:27:09 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - smurph

761
Mach4 General Discussion / Re: Mach4 M6 Macro problem
« on: April 29, 2017, 08:34:06 PM »
I want my tool to be the last one I used at startup.  So your version of "correct" doesn't match mine.  :)  Luckily, we wrote Mach 4 in a manner so that it will work any way you want it to.

Read the API manual and see what all is there.  You can make it work the way you want with a single line of code in your Screen Load script. 

Code: [Select]
mc.mcToolSetCurrent(inst, 0) -- if tool zero is the desired startup tool. 

Steve

762
Mach4 General Discussion / Re: Problem in front or behind the screen?
« on: April 29, 2017, 08:14:09 PM »
Mach 4 is not Mach 3.  There really isn't anything that directly correlates between the two as far as screen design goes.  So the first mistake is to think what/how/why things work in Mach 3 vs. Mach 4.  Just force yourself to not do this!  You life will get easier.  :)

Most of what you want can be done with custom scripting.  For example, you can get the cycle time with the API and format it any way you want it with LUA.
Code: [Select]
if (machEnabled == 1) then
    local cycletime = mc.mcCntlGetRunTime(inst)
    if (machState ~= mc.MC_STATE_IDLE and mc.MC_STATE_JOG and mc.MC_STATE_HOME) then
        scr.SetProperty("CycleTime", "Label", SecondsToClock(cycletime))
    end
end
That code is in the PLC script on a screen I have.  The LUA function SecondsToClock() does the format.  This function is defined in the screen load script and is thus available to all screen scripts.

Code: [Select]
-- In screen load script.
function SecondsToClock(Seconds)
if Seconds == 0 then
return "00:00:00.00";
else
local Hours = string.format("%02.f", math.floor(Seconds/3600));
local Mins = string.format("%02.f", math.floor(Seconds/60 - (Hours*60)));
local Secs = string.format("%04.2f",(Seconds - Hours*3600 - Mins*60));
return Hours..":"..Mins..":"..Secs
end
end

As you can see, you can format the time in any manner you wish!  You can also solve your "feedrate overridden" this way as well.  

As to the flicker, all that you have to do is slow the rate at which the cycle time is updated.  In the example above, is is called every PLC script interval.  This interval is defined in the screen set.  Say it is fifty milliseconds.  Just put in a counter that is checked before calling the API to get the cycle time.  That way, you can slow the update down to every x * 50 milliseconds.  

I would suggest reading the API documentation and getting familiar with what all can be used.  You will soon be dreaming up all kinds of ways to do things!  LUA is the way to call these API functions in a screen, so reading up on it will help too.  

There is no way to inhibit the scaling.  We are using a cross platform framework with Mach 4 instead of MFC that was used in Mach 3.  The cross platform capabilities are nice but it comes at a cost sometimes.  i would suggest designing the screen at or near the resolution you wish instead.  

We will never make that demo timeout message evident at the time the demo times out.  The reason is that lets the hackers know what to look for to try and disable the timeout!  

763
Mach4 General Discussion / Re: About Serial Plugin
« on: April 29, 2017, 07:40:00 PM »
Short answer, no. 

Long answer:  The serial plugin can control serial devices.  Like a VFD or a text display.  But it cannot create I/O points.  It was the first thing done to control serial devices but now that we include the luars232 library in the modules directory, it is usually preferred.  The serial plugin remains for those who started off using it.

Steve

764
Tony,

Mach 4 and Mach 3 can co-exist. 
Mach 4 Demo runs on a variable timer (5 to 10 minutes) vs. Mach 3's line limit.
Unfortunately, there is no demo version of the Mach 4 plugin.  I will see if I can implement that.

Nice work on that variable J head!  You managed to get rid of all the noisy parts quite nicely.  :)  i have replaced so many of those bushings i lost count.  I much prefer a pulley J head because of the noise those things will start making.  And they will get noisy pretty damned fast.  Just watch the spindle bearings and make sure they don't heat too much at those speeds!

Steve

765
  People tend to use a Galil to drive analog servo motors in Mach 3 as it is one of a very few plugins that can do that.  If you don't want to drive analog servos, then there is really no reason to run a Galil

That is exactly why I got a Galil card.  I had a Bridgeport which had been fitted with an Anilam system from new.  I wanted to keep the servos, drivers and glass slides and the Galil and Mach3 was really about all I could find except for one ridiculously expensive system which had bad reviews in general.

I would tend to want to keep that good stuff too!  I know the cost of a newer Galil is an impediment.  Especially if you have a 21x3 at the moment.  But I can promise you that you will be MUCH happier with the 41x3.  It is simply a better controller than the 21x3 for a milling machine motion controller.  It will do the rest of the machine justice.  

Perhaps you can sell the 21x3 and put that towards a 41x3?  Then you could run Mach 4 or Mach 3 and choose the one you like best.  Just keep in mine that if you want to control the spindle from the Galil, you need to get one extra axis on the Galil.  I suggest a 4153 for milling machines if you EVER think you might want to run a rotary 4th axis.  

I have a 4080 on my machine running Mach 4.  It is poetry in motion!  It is a Matsuura that originally had a YASNAC control on it.  One of the I/O boards went out on it and I decided to retrofit it to Mach instead of just buying a replacement board for the YASNAC.  Best decision I every made!  Mach4/Galil blows that YASNAC away!  Now, it took a lot of work and I had to buy a Galil, but the costs were not that much more than buying the replacement board for the YASNAC on the surplus market.  My only regret is the purchase of the 4080 instead of a 4153.  The 4080 is so overkill it isn't even funny.  

Steve

766
Tony,

The Mach 4 Galil plugin is fully supported by ArtSoft, as opposed to the forum based support for the Mach 3 Galil plugin.  In order to do that, we have to charge a bit for the Mach 4 Galil plugin.  With that said, we also had to make a decision as to what controller we could support.  And that came down to basically the 41x3 and 40x0 controllers.  Because one thing we learned with the Mach 3 plugin (those of us that wrote it) was that it is VERY difficult to support each and every model available from Galil.  Also, Galil does a lot of custom controllers that are special ordered by companies that are configured to operated in their environment.  A lot of times these controllers find their way to auction sites and then someone "wins" them and tries to use them with Mach.  Most of these special controllers will never work with Mach be it version 3 or 4.  And the guy that "won" it ends up being VERY disappointed.    I cannot begin to explain the pain and grief that has cause.  So for Mach 4 we talked to Galil about all of this stuff and agreed that only the above non-special ordered controllers would be supported.  

So it is not a question of needing a tester for the 21x3 so that we can develop and support it.  It can only use the Linear interpolation mode.  And while there is code in the Mach 4 plugin to handle that, we can't say that it will forever work when the plugin is updated to take advantage of some new feature that is only available on the newer controllers.  It just costs too much to merge a change into the plugin and make it work for both Contour Mode And Linear Interpolation Mode.  

Steve

767

If it works for you then "Good luck!"

Once i needed help and i asked here at the time /year 2015/ still no answer. http://www.machsupport.com/forum/index.php/topic,30436.msg211370.html#msg211370

What money? The money a Galil  controller costs even second hand. And that for sth without official support, on a problematic Mach3...No thanks.

I am using now Chinese offline controller, no PC, No Mach3, No windows. Thanks God. At last all works 100%


Please don't take offense at this, as I'm just trying to explain why some posts go unanswered.  

None of your questions had any relation to the Galil plugin at all.  They were all questions about the Galil and how to hook it up.  I would assume most people that read that post, including myself, decided that if you didn't get the needed information from the Galil manual, no amount of our typing was going to clear it up.  I certainly can't think of a better way or words to answer them than what Galil had to say about it.  A lot of times, that is why posts go unanswered.  Just because people don't think they have anything to add.  Those type of questions would be better served if asked on Galil forum.  

Also, a lot of Galil users were also probably scratching their heads as to why you were using a Galil to drive a Step/Dir interface in the first place when, as you say, there are much better solutions for the money (ESS comes to mind).  People tend to use a Galil to drive analog servo motors in Mach 3 as it is one of a very few plugins that can do that.  If you don't want to drive analog servos, then there is really no reason to run a Galil other than just wanting to.  Most people are not going to post that for fear of offending the OP.  

Steve

768
Mach4 General Discussion / Re: lua script require() question
« on: April 20, 2017, 04:41:28 PM »
This is a path issue.  If lua can't "find" your module, it will ask you where it is via the file dialog.  Make sure the module's path is in the package.path.

Steve

769
Mach4 General Discussion / Re: Mach4 M6 Macro problem
« on: April 20, 2017, 04:33:06 PM »
Mach Config->Tools Tab.  Make sure "T on M6 line is tool to use" is selected.

Steve

770
Mach4 General Discussion / Re: Ignore M Calls While Loading
« on: April 20, 2017, 03:21:52 PM »
You could use mc.mcmcToolPathGetGenerating().

Steve