07-18-2013 08:16 AM - edited 07-18-2013 08:18 AM
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).
Solved! Go to Solution.
07-18-2013 11:25 AM
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.
07-19-2013 02:42 AM
I replaced the feedback nodes with shift registers, and the VI works flawlessly with TestStand now.
Problem solved. Thanks!