From Camsoft support.
Using the BUTTONSTATE command.
Do a search on BUTTONSTATE.
QUESTION 210
Using a touch screen for jogging, how do you know when a button is being
pressed down or let up?
There is a command called BUTTONSTATE that lets you know if a certain on-
screen button is being pressed down with a mouse or finger or when your
finger or mouse lets up off the button. For example, to jog the X axis
with a touch-screen button, the logic below begins the axis traveling to
a location that it cannot possibly reach. As soon as your finger hits
the button, the logic runs jogging the X axis with the POSITION command.
As long as your finger is holding the button down, the button state is 1.
As soon as you let go of the button, the state changes to 0 thus allowing
the logic to execute the STOP command.
POSITION 1;999
:LOOP
BUTTONSTATE 11;\55
IF \55<>0 THEN GOTO :LOOP
STOP
Al
__________________ CNC, Mechatronics Integration and Machine Design.
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E. |