Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent a value in shift register being updated?

Solved!
Go to solution

Hi Fellow NI Users,

 

I'm new to LabView graphical programming and Hardware Acquisition. After reading through the basics of loops, data strcutures and data flow I'm still at lost of what I'm trying to achieve. 

 

I am using a DAQ to acquire digital signal from set of relays. When the relays turns on, it generates a 1, and when it turns off it genereates a 0.  I also have a counter to keep the edges of the relay flipping. The relays are flipping on and off every 4 mins. 

 

However, over the course of the night a relay may misfire and the count would not match up. I want to write a LabView program that would stop the test when the relay cont mismatches. 

 

This is what I have gotten so far. 

Relay_Count_Comp_01.JPG

 

The concent is easy, take the current 1-D array and compare with the previous array, if one of the element in current 1-D array is the same as the previous element, then I know there is a relay misfire. 

 

Problem is, the array from previous shift register is constantly being updated since the DAQ is continuously acquiring signals. 

 

How can I take the 1-D array of the counter from the previous read without being overwritten? 

 

Cheers,

Leon

0 Kudos
Message 1 of 4
(4,430 Views)
Solution
Accepted by topic author RUR

Hello 12inch,

 

Shift registers are always updated, but you can use stacked shift registers to read some data from previous iterations.  Take a look to the next information:

 

http://www.ni.com/getting-started/labview-basics/shift-registers

http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/using_shift_registers_to_r/

 

Regards,


Regards,
Daniel M.
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 4
(4,330 Views)
Solution
Accepted by topic author RUR

I assume you know when you want the shift register to update.  If that is the case, just use a Select function to choose which value you want to store in the shift register.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(4,307 Views)

Both were very helpful. I was able to get the previous value by slowing down the read rate and do the comparison before the next iternation comes in. 

 

Thanks!

0 Kudos
Message 4 of 4
(4,234 Views)