From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I reset shift registers w/o restarting my program?

How can I reset shift register w/o restarting my program? This loop counts the number of failures during a test. Yet, when I run the program again it starts with the last number of failures from the completed test.
0 Kudos
Message 1 of 5
(3,859 Views)
I don't have LabView on this PC so I can't see your upload, but my guess is that you simply need to initialize the shift registers. To do this, place a constant outside the loop and wire it to the shift register.

Glenn
0 Kudos
Message 2 of 5
(3,850 Views)
Unfortunately think I have done what you stated. If you have time take a look look at it when you get to a PC with Labview. In the application "Failure Count" is wired to a global variable. Would that have any bearing on the ability to reset?
0 Kudos
Message 3 of 5
(3,834 Views)
The VI you posted will either display a 0 or 1. It will not increment at all with the false constant wired to the loop termination. Replacing the constant with a control, the fail count will increment and when I restart it, the fail count will start over from 0. If all that you're doing is writing to a global, that shouldn't make any difference. It seems like you tried to make an example similar to your actual application but I think you've missed something. Maybe you could post part of the real program so someone could try to see the difference.
0 Kudos
Message 4 of 5
(3,822 Views)
Just guessing here, but I think this will do what you intended:
Message 5 of 5
(3,804 Views)