LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview TCP/IP read operation returns less content

Hi,everyone!So I have a problem about reading the device return value using labview's TCP tool.Device will return contents ends LF or CR+LF.When program catchs LF or CR+LF,it means PC receives complete content.For example, sending an IDN command, the device returns "device123".

However,Sometimes there will be an error in reading the content after sending the IDN command, LF or CR+LF is not matched, the content cannot be read and a timeout error occurs.Sending the IDN command again and then reading it will also read the content that was not read last time, resulting in the incorrect content read this time. Just like after sending the IDN command for the first time, it just returns ''device'', and after sending the IDN command for the second time, reading returns "123device123", polluting the second return value.

I have tried to use TCP or VISA to read, and this happens. The communication process is to send commands all the time after the connection is created, and the connection is not closed until the end of use, with a lot of control commands mixed in.

 

0 Kudos
Message 1 of 3
(972 Views)

Show us your vi in a snippet and link to the device manual or at least tell.us what it is.  Then we can help without guessing what you may have done wrong or how the device is bad.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 3
(963 Views)

@liyunlong wrote:

So I have a problem about reading the device return value using labview's TCP tool..


LabVIEW has a full TCP palette as well as TCP resources in VISA. You need to be much more specific!

 

Can you show us some simplified code?

 

I doubt that the termination character(s) change on its own and can differ between responses. What do you have configured?

 

 

0 Kudos
Message 3 of 3
(950 Views)