NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected behavior when executing LabVIEW VIs when Teststand has launched LabVIEW

Solved!
Go to solution

Hi all,

 

I am seeing some weird behavior when I run a LabVIEW VI which calls the command line utility.  This happens ONLY when the LabVIEW process has been started by TestStand, and disappears if I close everything down and start LabVIEW alone.  Below are the example files and steps leading to the error:

 

(NOTE: Unzip all the files into a folder called "Labview")

 

1. Launch TestStand and open the ExampleSeq.seq

2. Click on the step and wait until TestStand launches LabVIEW.

3. Now open the Junction_Create.vi and run. - This fails with an error code 2 "Memory Full".

 

However, if I close both LabVIEW and TestStand, and then open only the Junction_Create.vi and run, everything works fine!

Anyone seen this before? I am forced to think this is issue with TestStand, but any idea why is this the case?

 

Thanks,

Vikas

0 Kudos
Message 1 of 5
(3,983 Views)

Two things with your Junction_Create.VI:

 

18637iF0CE31405E7BFA8F

 

1. You should always consider the use of the TestStand Termination Monitor.vi function within LabVIEW loops.

2. Your LabVIEW loop is CPU intensive in that there is no "wait" function to allow for other Windows programs like TestStand to share CPU time. I recommend adding a 100msec wait in the loop here.

 

There is a very informative video at the following link:

TestStand Advanced Architecture II

http://digital.ni.com/src.nsf/websearch/DC8B33134A561BCE862575970070F3D3?OpenDocument&node=203014_us

 

 

Hope this helps,

 

Eugene

0 Kudos
Message 2 of 5
(3,965 Views)

Thanks for your reply Eugene.

 

1. This VI will not be used within TestStand.  My issue is that, I have problem running the VI on its own when the LabVIEW process is launched by TestStand.  If I open LabVIEW on its own and run the VI, it runs fine.

2.  The While loop only iterates through the path hierarchy and should not take more than a few milliseconds to finish the loop.  I think that may not cause resource issues. Although, I agree there can be conditions when it could run endlessly, but that is an unhandled condition that needs to be fixed.

 

Regards,

Vikas

0 Kudos
Message 3 of 5
(3,942 Views)

Hi,

 

3. Now open the Junction_Create.vi and run. - This fails with an error code 2 "Memory Full".

 

 

Do you know where the error is originating from, you should be able to identify the final vi name from the error message?

 

Regards
Ray Farmer
0 Kudos
Message 4 of 5
(3,935 Views)
Solution
Accepted by topic author Vikas_K

Hi Ray,

 

It is the SystemExec.vi that is generating the error.  However, I have now found a solution to the problem.  I have added the "cmd /c" before the command string and this seems to solve the problem!

 

Reg,

Vikas

Message 5 of 5
(3,907 Views)