LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start NI Spy with Labview

Has any one written a LabView code module that programmatically opens NI Spy? And a module that closes it as well? I have a app that uses TestStand 3.1 and LabView 7.0. I've looked into using a call executable step type in TestStand but because of the custom process model and custom UI I would have NI Spy open for each UUT. I've seen the System Exec .vi but am not sure how to use it. Not sure what to put in the command line to open and close NI Spy when the sequence runs. Any help would be appreciated!
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 1 of 3
(3,237 Views)
You can certainly use System Exec.vi to launch NI Spy. To do that, wire the path to your NISpy.exe file into the command line input of System Exec.vi. For instance, on my machine (LV 7.1 installed), I wire "C:\Program Files\National Instruments\NI Spy\NISpy.exe" into the command line input and, when I run the VI, NI Spy opens. However, closing it programmatically is a different story. I can't find any way to do this. To make this possible, we would need one of two ways. First, if there were an ActiveX server for NI Spy, we could control it that way, but I searched for you and could not find anything like that registered on my machine. The second option is to close it via System Exec.vi which would require us to be able to do this through the command window "Start>>Run>>cmd". I've search and searched on Google but can't find a command that does this. Therefore, it may be that you can open it programmatically and the user can close it. I hope this helps you out.
0 Kudos
Message 2 of 3
(3,193 Views)
Thanks for the fast reply! The problem will still be that a seperate NISpy will be open for each UUT which will not be desirable since there is no way to programmatically close them. What I intend to do at this point is open up NISpy when XP starts. It will always be on and the operator will not have to think about it.
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 3 of 3
(3,170 Views)