Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: Bill_O on April 28, 2010, 05:07:44 PM

Title: limits on off in vb code
Post by: Bill_O on April 28, 2010, 05:07:44 PM
I am sure it is somewhere but I can not find it. How do I turn the limit
switches on and off in a vb script?
Bill
Title: Re: limits on off in vb code
Post by: BR549 on April 29, 2010, 09:14:29 PM
While you cannot turn the switches on and off you can use a relay to shunt across the circuit so they are not seen by mach as tripped(;-)
Title: Re: limits on off in vb code
Post by: poppabear on April 30, 2010, 03:51:39 AM
Hey Bill,

   It's been a while.....  I could do it in a plugin for you, in where you could push a button that would send a "NotifyPlugins(*********xx)"    *********xx = your number code here.  for Enable Limits, and then another notifyplugins(yyyyy), that would disable the limits. OR, you could tell me what ULED you want to watch, or I could make it where you can pick/set the ULED to watch, so that when it is active the limits would disable, etc. BUT, the Notifyplugins might be safer, since you dont have to worry about someone accidently turning on that LED in a random VB script, etc....

Let me know,

scott
Title: Re: limits on off in vb code
Post by: Bill_O on April 30, 2010, 03:05:57 PM
Scott,
I just want to turn the Y off when I go for a tool change. I did not want to put 2 switches, one for homing and one for a limit. I wanted to use one switch. When I do a machine reference it would stop on the switch and it would also be a limit,  but when I go for a tool change it would pass the switch and continue to the tool change position. I can put 2 switches I just did not want to do it that way.
Bill
Title: Re: limits on off in vb code
Post by: poppabear on May 01, 2010, 02:22:55 AM
well I guess that would leave you with two choices then:
do the cut relay thing like the guy said above, or do a custom plug.

scott
Title: Re: limits on off in vb code
Post by: BR549 on May 01, 2010, 09:22:15 AM
Just out of curiousity WHY would you want to move beyond a limit switch to do a tool change. Limits are normally at the outer most travel of your machine to protect the machine and every thing takes place inside that envelope.

Title: Re: limits on off in vb code
Post by: ger21 on May 01, 2010, 11:59:26 AM
Just out of curiousity WHY would you want to move beyond a limit switch to do a tool change.



He already said why. He uses one switch for homing and limits, and his tool change position is behind his home position
Title: Re: limits on off in vb code
Post by: BR549 on May 02, 2010, 11:44:05 AM
Yea I read that part, but that does not explain the logic behind it. IF you never ask you never learn beyond your limited exposure to things.
Title: Re: limits on off in vb code
Post by: Bill_O on May 03, 2010, 10:29:34 AM
During the normal operation of the machine I want it to have the limit at the same location as the ref location. Only when I want to do a tool change will I go past this point. I will have a block for the limit to trigger at this location if the machine overruns the atc location. I will probably use an air cylinder to raise and lower the switch if I can not turn it on and off.
Bill
Title: Re: limits on off in vb code
Post by: BR549 on May 03, 2010, 10:24:58 PM
Thansk Bill (;-)