Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2167

Digital I/O Event Driven Programming?

$
0
0

Dear forums,

 

I want to move a pneumatic cylinder, until a digital input pin detects the final state(proximity sensor). From then, the cylinder should stop moving immediately.
My first attempt is checking the state of the Input pin in a while loop. When TRUE is detected, the cylinder will be stopped.
But thats not a nice solution(polling). I think an event will be much better.

 

However, I cant really connect my "ReadDigitalPin"-Vi with an event loop. So I dont know how detect a change on a certain Input Pin as an event. (How) Is that possible?

Any help will be highly appreciated.

 

Best regards,

Arvel


Viewing all articles
Browse latest Browse all 2167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>