LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Better NI Spy filtering

Is there a way to hook into NI Spy?
Sometimes all I need is the strings sent back and forth to the several instruments, and/or filter by instrument, and it doesn't seem to be a way to do that with NI Spy.
Currently I manually export the whole things as text, as complete a dump as NI Spy options allow it, and then feed it to a 10 line Perl script to grab want I want.
I would like to automate that process but it doesn't seem possible.
0 Kudos
Message 1 of 6
(3,399 Views)

Hello Instrumento,

 

You can select what NI Spy logs via the View Selection tab in Spy>>Options in NI Spy.  However, there is no way to filter the way that you have described within NI Spy.

 

You can create a VI that completes the same functions as your Perl script.  Depending on how detailed you want to make this VI, you could have it call (and close when the capture is complete) NI Spy (use System Exec VI), open the log file, run your script on the log file, and save the output as a new file.

 

For NI Spy to capture on load, you will need to check the appropriate option in NI Spy.  Spy>>Options... "Start NI Spy with capture on"

 

If you plan to use tskill "NI SPY" with another System Exec VI, make sure that you Select "Write to file as soon as possible (slower)" in the Write Mode section of the Logging tab in Spy>>Options otherwise it is likely that you will not save all of the information that NI Spy captured.

 

Below is another forum thread about using NI Spy programmatically

 

Will NI Spy ever support Command Line options or have an API? 

     http://forums.ni.com/ni/board/message?board.id=140&message.id=28099&requireLogin=False

Message Edited by AE Charlie on 04-09-2009 01:48 PM
0 Kudos
Message 2 of 6
(3,366 Views)

I've been through all the NI Spy options and that's why I knew what I wanted wasn't there.

I can write the parsing routine in any language I want and did use Perl, but that's besides the point.

NI Spy capture on load only seems to capture in the (undocumented?) .spy format (that I guess one could reverse engineer) not in .txt format, thus getting at the info is a bit harder.

 

0 Kudos
Message 3 of 6
(3,357 Views)

Good Morning Instrumento,

 

Capture on load will start the capture into whatever log file type you have specified in the options.

0 Kudos
Message 4 of 6
(3,331 Views)
Can't see how to do it with NI Spy 2.5.2, which is what I have.
0 Kudos
Message 5 of 6
(3,328 Views)

Got latest VISA version 4.5 and that comes with NI Spy 2.6, which does offer an option of what format to use on save. Thanks!

Now, on Unix I would make that file a socket/pipe...

0 Kudos
Message 6 of 6
(3,319 Views)