Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

tcp/ip comm error help

Hey Kevin,

I agree that you should try to dig a little deeper into the termination characters in your messages. The first error code you were getting is due to a timeout which is most likely caused by not having a termination character. There needs to be a linefeed or carriage return. Hopefully this can solve the problem.

 

Here is an article about the second error code you were getting. 

 

Hope this helps!

 

Joe S

Applications Engineer

National Instruments

0 Kudos
Message 11 of 13
(917 Views)

Thanks all for the replies.  Somehow the comms are working now!  I was able to start communicating with the device using VISA test panel and using my VISA comm vi that was attached earlier in this thread.

 

The problem that I am having now is knowing how many bytes are available at the port during VISA read operations.  Since I am communicating over TCP/IP the "bytes at port" serial option didn't work.  My vi executed without error when I knew how many bytes to expect and add this to the VISA read block.  If I requested more bytes than were available the system read the write values but then timed out waiting for the bytes that weren't ever going to come.

 

Is there a good way to dynamically specify how many bytes the VISA read command should use?

 

Thanks,

Kevin

0 Kudos
Message 12 of 13
(914 Views)

The majority of the time you have no idea how much data is coming back that is why we set a termChar and enable it. Generally the termchar is linefeed and that is the VISA default but in your case you have this Lantronix LAN-to-Rs232 converter in between so no idea what the termchar maybe. Run NI-Spy or Wirshark and see what the last char that is read.

 

0 Kudos
Message 13 of 13
(896 Views)