LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create custom error based on timeout scenario

Solved!
Go to solution

I have an array of 10 switches that I send a command out to via digital output module NI9477, then I want to read if those output commands triggered a response with the LEDs that are controlled by those 10 switches within a pre-specified number of seconds. How can I throw an error or warning if the LEDs don't change state within the time limit?

 

Example:

command: turn on LED 2 and LED 4. turn off LED 5. timeout limit: 5 seconds

Remaining LEDs 1, 3, 6, 7, 8, 9 are not affected.

sent to digital output

reading digital input module NI9425

LED 2, 4 and 5 indication on front panel does not change state within 5 seconds. 

How can I create a pop up message that says "LED X did not turn on within X seconds" ?

 

I've attached an example VI (with unconfigured/non functional DAQ assistants) that captures the essence of what I'm trying to accomplish. Due to the nature of my actual project, I cannot post the vi. I also don't have NIMAX installed on the machine I'm currently on. 

 

*To be clear, my intent is how to generate error (not just display). How to time how long the input takes to respond to the command. 

0 Kudos
Message 1 of 4
(2,141 Views)
Solution
Accepted by topic author sam18

Look under the Dialog and User Interface palette and you'll see 1, 2, and 3 button dialogs there.

0 Kudos
Message 2 of 4
(2,123 Views)

How do I trigger the error though? I currently have a block that uses a selector if the input time exceeds the timeout value. But how do I measure the time in between the LED circuit receiving the command to the LED and when the LED actually changes state?

0 Kudos
Message 3 of 4
(2,087 Views)

You program it that way!

 

Are you familiar with shift registers?  Are you familiar with comparison statements and case structures?

 

If the answer is no, then I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
Learn LabVIEW

 

Write down a simple flow chart or some pseudo code that defines the logic you want, then you can search the palettes for the functions you will use to implement your logic.

0 Kudos
Message 4 of 4
(2,053 Views)