How do you continuously monitor a momentary input?

asked 2017-11-20 21:06:57 -0500

Tim G gravatar image

I have a UR10 and I am trying to use a Thread to monitor a momentary push button, which will then set certain variables when the push button it true/pressed. Nothing happens though when the button is pressed. I thought a thread could continuously monitor the input. But after some reading it appears this is not how it works. I think the input has to be true when the program sequence gets to the thread, not every scan like a PLC. Is there any way to continuously monitor a momentary input and have it set a variable as soon as it is true?

edit retag flag offensive close merge delete


Can you clarify how your question is related to ROS? This board is for ROS questions only, it is not a generic robotics forum.

gvdhoorn gravatar image gvdhoorn  ( 2017-11-21 02:37:35 -0500 )edit