Hello Guest it is March 29, 2024, 10:51:00 AM

Author Topic: Modify Button Output  (Read 4333 times)

0 Members and 1 Guest are viewing this topic.

Modify Button Output
« on: July 29, 2012, 07:48:49 PM »
I would like to modify the softlimits button to activate an output when pressed, then deactivate it when pressed again.

I can get it to activate with a VB script of ActivateOutput(7)......but I can't shut it off.  This is pretty new to me, so I'm making very slow progress....lol.

I though maybe using a toggle type button would work, but it hasn't so far.

I wonder if I need a conditional script.....but don't know.

Any help would be appreciated.

Thanks,

Mike

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Modify Button Output
« Reply #1 on: July 29, 2012, 08:33:03 PM »
Typically, you'd check the status of an LED to determine the status of the output, and turn it on or off based on the LED's status.
Like:
 If GetOEMLED(xx), then
deactivateoutput
else
activateoutput.
endif

I don't know the actual syntax off hand, so the above is just for reference. :)
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Modify Button Output
« Reply #2 on: July 29, 2012, 10:33:39 PM »
That did the job.....Thanks a bunch.

Mike