Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: jalessi on September 13, 2008, 04:27:39 AM
-
Is there a way to auto enable soft limits when Mach starts?
Thank You
Jeff...
-
Jeff - As far as I know - and I have just tried this on my "office" computer with Mach (but no machine attached) - if you set up your soft limits in the table, provided the soft limit button is lit when you close Mach down, it will be lit when you restart Mach the next time.
-
Jim,
Thank you for the reply.
I understand Mach3 remembers the last used screen when it is started however we need to make sure the soft limits are enabled and it would be awesome if there was a way to modify a .ini or startup file in order to gaurantee they are always enabled at startup.
If anyone has a solution please chime in :).
Jeff...
-
You could write a macropump that looks at the LED for SoftLimits and if its out it switches them back on. Only problem with that would be if for any reason you needed to switch them off then you would have to disable the macropump first.
Another option would be to modify your screenset so that the button to turn On/Off Soft limits was hidden, that way iy would be impossible for an operator to switch them off unless they knew where to find the button.
Hood
-
Hood,
Now all I have to do is figure out what a macropump is and learn how to implement it.
Is it possible to give me a little help writing one?
Thank You
Jeff...
-
Can't you create a macro, say M500, and in it put:
If not GetOEMLED(23) then
Call SetOEMLED(23)
End If
Not sure if the syntax is right, but just call M500 in the initialization string??
-
You could either put this in a macro like Ger suggested and have it in the initialisation screen or you could put it in a macropump. The difference would be the initialisation would make sure its on at startup but they could still be switched off by the operator and would only come back on again if the button was pressed, the m500 was called in code or MDI or you restarted Mach.
If you put it in a macropump it would be impossible for an operator to shut the softlimits off as everytime he turned them off the macropump would switch them back on. This of course has another drawback in that if for any reason you need to switch them off you will have to disable the macropump and restart mach.
The easiest option would probably be just to make the softlimits button invisible, you would know where it was but if positioned right it would be almost impossible for an operator to find it.
If going the M code route do like Ger suggested and save the below code in a text file as m500.m1s to your profiles macro folder, then go to Config then general config and type m500 into the initialisation string.
If the macropump route then save the code in a text file named as macropump.m1s and as above save in your profiles macro folder. You will then need to go to Config, General config and chek the Run Macropump box.
Both of the above will require a restart of mach to get them working for the first time.
If Not GetOEMLED(23) Then
DoOemButton (1029)
End If
Hood
-
Ger21,
Thank you for the quick reply and answer.
We will try it and see which solution is best for our operation.
Jeff...
-
Hood,
Thank you for the quick reply and answer.
We will try it and see which solution is best for our operation.
Jeff...