LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change "Switch Until Released" to "Latch When Released" type of trigger... ??

Solved!
Go to solution

I'm still pretty new to LV and I've searched around to try and find a way to change my event trigger, but with no results... maybe the wisdom of the board can educate me.

 

I've attached a VI that gives the basic idea of what I'm working with... the two buttons and LED's simulate the signal I'm getting from another process.  Basically, I have two relays that are opening or closing a valve to maintian a setpoint and I'm trying to count the number of times it goes from opening to closing so I can detect "hunting" (i.e. - my valve is reacting faster than it should and over shooting the set point) 

 

The signal from the relay loop is currently acting like I have the switches set to "Switch Unitl Released" which is sending a event "ping" each time the while-loop exectutes, but I need the signal to the counter to act as if I've changed the switches to "Latch When Released"... is there a simple way to do this?  Once again, I've looked through the forums and the knowledge database with no results... any pointers in the right direction would be much appreciated!

Thanks,

Chad

 

Using LabVIEW 2009 Pro and Windows XP Pro if that makes a difference...

0 Kudos
Message 1 of 4
(3,022 Views)
You need to store the state of the relays in shift registers, and then check for the case when the shift register is FALSE and the relay is TRUE; that's the case where the relay just turned on.
Message 2 of 4
(3,013 Views)

I'll give that a shot and see what I can come up with! 

Thanks!

Chad

0 Kudos
Message 3 of 4
(3,010 Views)
Solution
Accepted by topic author chuggins143

Ok, got it!  Thank you very much!  Feel free to take a look and critique this and if anyone sees an easier way to do this please let me know!

THX,

Chad

0 Kudos
Message 4 of 4
(3,003 Views)