LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hardware Triggered Event

All of the event cases I see are triggered by controls on the user interface. Can I trigger an event based on a hardware event. Here are some hardware events I'd like to serve as interrupts:
1. Byte received at serial port
2. CAN frame received
3. Telnet activity etc.

Currently I'm using the timeout event to check for messages, bytes, etc. For large applications this is cumbersome and inefficient.
0 Kudos
Message 1 of 5
(3,348 Views)
Sure you can trigger a hardware event. Use a function that is connected to your port of interest and attach it to a comparison icon. So your event will trigger when the statement is true.
0 Kudos
Message 2 of 5
(3,348 Views)
Unless I misunderstand, I think you missed my question. I'm using the Event Structure to execute cases of code based on user interface events. I'd like a hardware trigger (ex. serial byte received) to initiate a case in the Event Structure. I don't see any way to link Event Structure cases to hardware events without scanning the hardware continually in another loop.
0 Kudos
Message 3 of 5
(3,348 Views)
In that case you need a interupt type of set-up. If you use the "dynamic event" capabilities, you can have you main program running until the interupt is triggered in memory.
0 Kudos
Message 4 of 5
(3,348 Views)
Do you know of any examples as to how to set up a dynamic event for hardware interrupts? Registering a dynamic event for 'byte received at serial port' would be the best example.
0 Kudos
Message 5 of 5
(3,348 Views)