08-20-2015 02:20 PM
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.
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
Solved! Go to Solution.
08-21-2015 04:02 PM
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,
08-22-2015 04:47 AM
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.
08-25-2015 01:20 PM
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!