From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure help

Hello,
 
The program I'm working on is supposed to test two switches. It uses fieldpoint to send a signal to the switches then read the data.  At all times one switch should be open and the other should be closed. The program runs as it is.  The problem is that I want the program to stop at certain cases.
 
1.  If both switches are either opened or closed
2.  If the close switch does not respond to the signal
3. if the open switch does not respond to the signal
 
I've attached a copy of the program.  Any help on this would be greatly appreciated.
Message 1 of 6
(6,689 Views)
I attached a picture of an easy way to test if both are open or both are closed.

For the seitch fails to open, you can wire the time stamp of the write signal (in your state 1) to the time stamp of the valve opened and if they are different by say 10 secs (I am not sure how long it takes to open the valve) return a true and have that go into another Or statement to your stop function.

Kenny
Kenny

0 Kudos
Message 2 of 6
(6,672 Views)


@Kenny K wrote:
I attached a picture of an easy way to test if both are open or both are closed.

Here is an even easier way 😄

Message Edited by altenbach on 08-03-2006 06:59 AM

Message 3 of 6
(6,665 Views)

ok, you win...Smiley Very Happy

 

Kenny

0 Kudos
Message 4 of 6
(6,665 Views)
Don't get me wrong, I just love Rube Goldberg code. Many times I write some myself. 😄

Message Edited by altenbach on 08-03-2006 07:12 AM

0 Kudos
Message 5 of 6
(6,661 Views)
Consider that real, mechanical switches may have a state lasting a few milliseconds where both contacts are open simultaneously. And they may bounce: close, then open for a short time, close again, repeating multiple times before staying closed. If your DAQ hardware and software is faster than the switch bounce time, you need to provide debounce (filtering) before making any decisions.

Lynn
Message 6 of 6
(6,649 Views)