NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Array does not work properly between LabView and TestStand

Solved!
Go to solution

I'm trying to make a TestStand program that reads data out of a LabView VI.

If I run the VI within LabView, it works perfectly fine and produces an array with 18 items in length, the first 3 being numbers between 0 and 10, and the rest being -1 like I intended. Re-running the VI causes it to re-initialize properly and I get a new array which also meets my specifications.

 

When I run the VI from TestStand, it works okay once, producing an array with 18 items, the first 3 being numbers between 0 and 10, and the rest being -1.

If I run the VI within TestStand again it increases the array length by 18 every time. While doing so it fails to write the 3 new numbers and just adds -1 to the array 18 times. If I restart TestStand it will work okay once again, but will repeat the error if I re-run the VI. I do not understand why this happens.

 

I have re-produced the error in a seperate VI and sequence, and I've attached the example to this message. The VI contains all necessary information (if not, please say so and I will fix that), and the TestStand sequence is set up to put all results I would find useful into the report (as additional results).

0 Kudos
Message 1 of 3
(3,728 Views)
Solution
Accepted by topic author DWandernoth

Your problem is your VI.   More specifically the Feedback Nodes.  They initialize on the first call.  TestStand keeps the VI in memory.  So when the VI is called again, the Feedback Nodes still have their last value.  You will get the same results if you have a VI call your ArrayBuild.vi twice.

 

The way that you are using the Feedback Nodes, they really should be replaced with Shift Registers.  I like Feedback Nodes, but since you are passing the value of the node out of the loop, Shift Registers are a lot more appropriate.  Just make sure you initialize your Shift Registers.


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
Message 2 of 3
(3,714 Views)

I replaced the feedback nodes with shift registers, and the VI works flawlessly with TestStand now.

Problem solved. Thanks! Smiley Happy

0 Kudos
Message 3 of 3
(3,699 Views)