Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

I can't send anything over 1024 bytes by using visa via TCPIP

I am trying to use NI-VISA talk to instruments visa TCPIP. The problem is I can not send anything over 1024 bytes using viPrintf or viBufWrite call. A time out will be returned. I tried to use MAX to open a VISA session for my TCPIP device. If I put a string less than 1024 bytes in write buffer, it is fine. Anything longer than that will cause time out and some time the whole MAX crash.
0 Kudos
Message 1 of 3
(3,523 Views)
Hi Johnma,

I suggest you check the specs on TCP/IP. I seem to remember a limit on the packet size. TCP is just the transport layer. Higher layers should handle the work of breaking packets into smaller sizes and tracking packet sequencing.

I am relying on memory hear so please verify. (maybe the limit was 4096 and I am full of it).

I also believe there was some discusion of a related topic recently on info-labview where Rolf did a good job explaining what was happening.

Search for "Rolf" and "TCP" on Brian Renkins search engine.

http://infolv.brianrenken.com/

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(3,523 Views)
John:

I don't have a good answer but I do have a couple of questions/possibilities. First, are you using NI-VISA 2.5.0 or 2.5.2? If 2.5.0, then you should get the patch from:
ftp://ftp.ni.com/support/visa/drivers/win32/2.5/patch/NiViEnet.dll

Also, have you tried using viSetBuf with VI_IO_OUT_BUF? That will let you set the transmission buffer size to the max you plan to send. Sometimes that can help the local system buffer the data correctly.

Good luck.

Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
0 Kudos
Message 3 of 3
(3,523 Views)