LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Logging VISA communication, possible or not ?

Hi,

 

since I could not find VISA discussion board I am putting my question here.

I am using LabWindows 2010 and I would like to log TCP/IP communication going over VISA layer in order to be able later to analyse communication to some instrument. There is option to do so by using NI I/O Trace(NI Spy) but I would need to activate and control logging on C language level and not by starting external application as NI I/O Trace. Is there any option to log all messages sent/received to some instruments over TCP/IP ?

 

Best regards,

Zoran

0 Kudos
Message 1 of 3
(2,914 Views)

I used VISA a long time ago but it was for USB. Since you want to log TCP/IP, why don't you use a standard tool for that, such as Wireshark ? What do you mean by 'C language level' ? You want your own app to receive the flow ? Well, you can save with wireshark and they replay the flow in your own app...

0 Kudos
Message 2 of 3
(2,854 Views)

Hi,

unfortunately there is no official documentation but you can extract information from the NI I/O Trace functions
available in LabView. Here are a few cues on how to use the library and particularly on how to get
the basic functions : Launch I/O trace, Close I/O trace, Start tracing, Stop tracing and log message
(for more information about the different parameters please find the attached screenshots):

* launchIO trace: you will use nispy_GetApplicationPath(). The length used in LabView is 256. This
function will return the path to NI Spy to let you execute the application. If you want to, you can launch
NI Spy in different modes (but you can also let the default mode) : /hidden, /maximized or /minimized.

* close IO trace: with nispy_CloseSpy()

* Start tracing: nispy_StartSpying(), The logFileSetting parameter can be set on 0(do not log to file), 1
(spy capture(.spy)),2 (plain text file (.txt)) or 3comma separated (.csv). The overwriteFile parameter
can be set on 0 (create), 1 (append or create) or 2(replace or create).

* Stop tracing: nispy_StopSpying()

* log message: nispy_WriteTextEntry().

Regards
Aurelie

Download All
0 Kudos
Message 3 of 3
(2,821 Views)