LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structures with relay switches

I would like to have a program that watches for a relay switch to close and then executes a subvi. I was hoping to use an event structure that triggers off the relay switch...is that possible? I don't see any hardware showing up in the list of events. Otherwise, how do I go about monitoring the relay switch? BTW, the relay is in the same cPCI chassis as the computer running Labview.

Thanks.
0 Kudos
Message 1 of 4
(2,419 Views)
Hi

What you will most likely have to do is to define a USER event associated with your relay switch in order to launch the subvi.

here's an example on NI website;
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=E0CA7D39AD4B54DDE034080020E74861&p_node=DZ52054&p_submitted=N&p_rank=&p_answer=&p_source=External

Regards,
Cyril Bouton
Active LabVIEW Developper
0 Kudos
Message 2 of 4
(2,414 Views)
Thank you for the suggestion. I am not familiar with user events, but I looked at the example you suggested. However, I can't figure out how to associate a user event with a hardware trigger. Does anyone know how/if I can do this?

Thanks,
Kasey
0 Kudos
Message 3 of 4
(2,401 Views)
You need a digital input device to read the switch. You could use a cheap USB DIO (around $100), or you could possible use the parallel port. You would have to poll the DIO or the parallel port periodically (in a while loop, with a 100mSec timer). When the input value changes, you would wire the value to a Value(signaling) property node of some boolean. The event structure can contain an event of that boolean's value change. When the switch was made or opened, the event would fire.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 4
(2,394 Views)