LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I find some shift registers retaining their initialized value?

In LabVIEW 5.1 (on WinXP), I am writing a VI to run a feedback loop. The main part of this loop is a While loop. Into this While loop I have five values using shift registers. All of the shift registers are initialzed by values from indicators. All of the five values get used in Matlab script nodes (Maltab 6.1, and I have the dll patch to allow these to work together). Three (A, B and C, INT32 values) are input into the first Matlab node, and then are output with the same names. Then these three, together with the other two shift register values (D and E, DBL values), are input into a second Matalb script node. All five are then output from this node, again keeping the same names, and into the s
hift registers for reuse in the next loop cycle.

During the running of this particular VI, two of the five values (D and E) always retain their intialized values. This is very strange. One of these is changing in a very simple way (being multiplied by a constant) so there is no problem with the change being made. I have run tests with smaller, almost identical VIs doing very similar things, and there the shift registers act as described in the manuals. Are there any reasons why these two shift registers would keep reinitializing themselves?

There are no other loops or structures encompassing the While loop, it is stand-alone.
0 Kudos
Message 1 of 3
(2,535 Views)
It has been a long time since I used 5.1 so forgive me if I am off the mark.

I seem to recall that there was a strange bug in one version of LV that caused shift register to operate badly.

I think that the latest and greatest version of LV 5.X was LV 5.1.1. Check for an update.

Trying to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,535 Views)
Gah! Found the problem. The Matlab code had a very small error, which was skipping over the block of code where the values from the shift registers were being altered. As it never got into this part of the code, the values never changed.

So all my fault. Thanks for the answer though 🙂

Andrew
0 Kudos
Message 3 of 3
(2,535 Views)