04-08-2009 06:38 PM
04-09-2009 01:47 PM - edited 04-09-2009 01:48 PM
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
04-09-2009 02:10 PM
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.
04-10-2009 10:08 AM
Good Morning Instrumento,
Capture on load will start the capture into whatever log file type you have specified in the options.
04-10-2009 10:19 AM
04-10-2009 11:16 AM
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...