Hello Guest it is March 29, 2024, 05:14:15 AM

Author Topic: Momentary Outputs  (Read 3138 times)

0 Members and 1 Guest are viewing this topic.

Momentary Outputs
« on: April 13, 2007, 04:07:02 PM »
Does anybody know how to make an output button that is only on when you are clicking it?  Or, that will only be active for about 1 second.

I need a couple of buttons that activate outputs that connect to inputs on a PLC.  It would simplify PLC programming if the output is not maintained.
Re: Momentary Outputs
« Reply #1 on: April 14, 2007, 02:01:43 PM »
I would do something like this:

call ActivateSignal(SigNo)
code "G4 p1"
while IsMoving
Wend
call DeActivate Signal(SifNo)

The G4 value is in seconds. The While IsMoving is needed to make Mach wait until the code has completed before returning.