LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why are separate subvi shift registers exchanging previous data between themselves


@RavensFan wrote:

Jeff,

 

He has it set up as an action engine with the False wired to a Continue? terminal.

 


 

Thanks RF-  The Unintialised Shift Register is still a potential issue.  I completely missed the condition terminal's stop conditionSmiley Embarassed  

 

Spoiler
If I can make mistakes-  well, there are others who might point them out!  OOPS!, Thanks! 

"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 14
(852 Views)

The original problem used the uninitialized shift register to store data, but caused the OP problems because he used it in two places for what was supposed to be distinct instance of data.

 

Crossrulz's suggestions in message 2 solved that problem.  But as always, scope creep came in and now the problem has grown from 2 instances to 7.  But I'm not sure if the OP is still having a problem with the VI's as originally stated or if the problem has morphed into a different question about formula nodes.

0 Kudos
Message 12 of 14
(841 Views)

I had to ponder some of what you said. Infinite loop? in the subvi where I do the comparison?

"F" wired to the stop condition terminal only lets the loop run once. It is continue if true. I am processing data outside the while loop.

 

I'm not using the abort button to stop execution. My code is running in a larger while loop with a button tied to it stop terminal. Actually I have an event structure with a stop event to handle the application ending.

 

Initializing the shift register would cause a comparison failure so I don't do it here. I've tried it again just to be sure and it always fails.

 

0 Kudos
Message 13 of 14
(830 Views)

Everything is working fine for what I'm doing. False on the continue terminal only runs the while loop once. The shift register's left terminal is actually initialized by previous data that comes in from the right register's terminal. At least that the way I understand it. I can't initialize the shift register the normal way as it willl cause the comparisons to fail.

I know you can do this with just the provided math function vi's. I've used formula nodes before just not for array processing. I was under the impression

that using the formula node would save me some time in my main loop. Shorten the duration. I could be wrong but it is was a good exercise I will know how to do later if needed.

Now I have compare boolean arrays next, from reading the DIO ports on my USB device.

The software is being written to monitor instrumentation panels being developed for an aircraft.

0 Kudos
Message 14 of 14
(825 Views)