LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open and Close a command line exec via OpenG.lib in seperate VIs

Solved!
Go to solution

Hi,

 

I'm aiming to perform tests on my UUT - over a command line based executable which established a USB connection, so - sendings commands and checking the return string. 

 

So far i'm reusing the pipeNight.vi which is shared in the following post.

http://forums.ni.com/t5/LabVIEW/How-to-pass-input-to-a-DOS-executable-that-is-running-in/m-p/1763182...

 

However i wish expand from LabVIEW and utilise NI-TestStand sequence files to ramp up the test coverage and perform the tests automatically.

The issue i've encountered - every time i call the pipeNight.vi from a TestStand sequence Step, the USB connection is build up and torn down.

Although i'm not encountering any performance issues to date, i would ultimately like to open a session (i.e.establish the usb connection) - at the beginning of a sequence file, send a bunch or commands and check return strings, before closing the session at the end of the sequence file. This is surely a more effecient and elegant solution.

 

Is it somehow possible to split the pipeNight.vi into several VIs to realise this objective?

- Open 

- Write/Read

- Close

 

i'd appreciate and help or alternatice solutions on this!

 

B.Regards

Kech

 

 

 

 

 

 

0 Kudos
Message 1 of 7
(3,508 Views)

Wouldn't you just use the subVI's that are already assemlbed together in the Pipenight main VI?

0 Kudos
Message 2 of 7
(3,503 Views)

If i split the pipeNight.vi - into 3 vi's - a) OGPIPE Open System Command, b) OGPIPE Write To Pipe & Read From Pipe, c) OGPIPE Kill Process. The process ID from OGPIPE Open System Command - i can reenter in the OGPIPE Kill Process. But i'm stuck with how to get the stdin & stdout pipe references from the OGPIPE Open System Command to the OGPIPE Write To Pipe & Read From Pipe functions..

 

 

0 Kudos
Message 3 of 7
(3,479 Views)

I don't understand what you are trying to do.  The reference you linked to isn't doing any of that unless it is already embedded in the Open Write, Close VI's and that data is transferred because the reference wire is passed between them.

 

Why not do what is shown in your linked to VI?

0 Kudos
Message 4 of 7
(3,469 Views)

I had tried to explain in my initial post, that if i call the pipeNight.vi from a TestStand sequence file step, then establishes a USB connection and tears it done - for every command that i send/ respectively every sequence step that i run in TestStand. As i envisage multiple (several hundred) test steps, i woul like to improve effeciency by establishing the ESB connection once instead of multiple times.

 

   

0 Kudos
Message 5 of 7
(3,462 Views)
Solution
Accepted by topic author kech
It sounds like you need to learn how to pass a reference back and forth in TestStand so you can call the subVIs. Thats a pretty basic task.
0 Kudos
Message 6 of 7
(3,451 Views)

Dennis - thanks... yip - i've got it - basic stuff.. I couldn't see the woods for the trees...

0 Kudos
Message 7 of 7
(3,427 Views)