Hello Guest it is July 05, 2020, 09:38:56 AM

Author Topic: Auto run soft limits when Mach starts ?  (Read 3976 times)

0 Members and 1 Guest are viewing this topic.

Auto run soft limits when Mach starts ?
« on: September 13, 2008, 04:27:39 AM »
Is there a way to auto enable soft limits when Mach starts?

Thank You

Jeff...

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Auto run soft limits when Mach starts ?
« Reply #1 on: September 13, 2008, 04:40:15 AM »
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.
Not me driving the engine - I'm better looking.
Re: Auto run soft limits when Mach starts ?
« Reply #2 on: September 13, 2008, 05:30:22 AM »
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...

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Auto run soft limits when Mach starts ?
« Reply #3 on: September 13, 2008, 06:01:22 AM »
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
Re: Auto run soft limits when Mach starts ?
« Reply #4 on: September 13, 2008, 12:35:57 PM »
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...

Offline ger21

*
  • *
  •  6,280 6,280
    • View Profile
    • The CNC Woodworker
Re: Auto run soft limits when Mach starts ?
« Reply #5 on: September 13, 2008, 02:16:54 PM »
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??
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Auto run soft limits when Mach starts ?
« Reply #6 on: September 13, 2008, 03:53:39 PM »
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
« Last Edit: September 14, 2008, 04:55:16 AM by Hood »
Re: Auto run soft limits when Mach starts ?
« Reply #7 on: September 13, 2008, 08:50:54 PM »
Ger21,

Thank you for the quick reply and answer.

We will try it and see which solution is best for our operation.

Jeff...
Re: Auto run soft limits when Mach starts ?
« Reply #8 on: September 13, 2008, 08:52:18 PM »
Hood,

Thank you for the quick reply and answer.

We will try it and see which solution is best for our operation.

Jeff...