Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP communication slower than RS-232 using NI VISA

Hello,
I'm using NI VISA 2.6 controlled by a C++ATL component.
I'm trying to debug why command-response type communication
takes apparently so much longer under TCPIP than RS-232 using the NI VISA driver.

From my application program standpoint, there is no difference between
TCPIP and RS-232 once the port is opened. I put a timer around the communication calls and and it takes 60-70 system ticks to complete using RS-232 at 38.4 kbaud. Approx 148 characters are recieved.
NISpy reports the last line in the response comes back 70-80ms after the initiating command.

Using TCPIP, the same thing takes 360-400 ticks to complete.
But using the NI spy program, it generally reports that the response comes back
in about 10ms.

Anyone have any hints on this?
0 Kudos
Message 1 of 2
(2,975 Views)
Hey Kent,

That is an insteresting problem. What VISA API are you using? The activex control, C dll, or the C++ classes.

In addition, it would really help if you could post the serial and ethernet SPY captures. It's best if both captures are doing the exact same functions.

-JoshuaP
0 Kudos
Message 2 of 2
(2,975 Views)