Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Read block error 66 in LabView 2009

It sounds like we are able to write to the microcontroller- so that is good- but just not read. Let me know the results of the Simple Data Client.vi because that will tell us if we can get any data from the microcontroller using LabVIEW.

------------------------------
Bill E. | Applications Engineer | National Instruments
0 Kudos
Message 11 of 14
(1,578 Views)

It says to run first Simple Data Server.vi  then to run Simple Data Client.vi.  I run both of them as it says for port 2055 and 2056, and address was localhost. It runs no problem. I tried to enter for port the number from default of VI Server 3363 then it showed error:” The specified network address is currently in use.”

 

Also I had one error 66 in Labview 8.6 when I was running short test that gives ~10 rows of data.

 

I resolved this problem by changing the number of Bytes to Read for TCP Read block: it was 1024, I changed to 16. I understood that the Bytes to Read parameter is the minimum bytes to read. So if the file does not have this minimum the TCP Read block is showing the error.

 

I made same change on the computer with LabView2009. No errors at all. But the probe before TCP Read  block shows  warning 56 and the probe after this block shows warning 66, and still the data file is empty.

0 Kudos
Message 12 of 14
(1,574 Views)

Error 56 is a LabVIEW error and comes from LabVIEW not getting the data in the given timeout period and error 66 indicates that the connection was closed.

 

It sounds like the error might be occurring earlier in the program. Run the program with Highlight Execution enabled (or use probes), and see where the error is first occurring.

 

Also, if you are able, in the TCP Buffered Read.vi, (which is a SubVI of the URL Get HTTP Document.vi) change the number of bytes to read at the TCP Read.vi to 1 instead of 1024; as there was a Corrective Action Request (CAR) in 2009 for something similar and this was a workaround.

------------------------------
Bill E. | Applications Engineer | National Instruments
0 Kudos
Message 13 of 14
(1,552 Views)

I used probes to find where the error is occurring. It is after TCP read block in TCP Buffered Read.vi .

I changed the number of bytes to read to 1 – it did not help me: the content of the output data of the TCP Read block was empty.

 

But we found another solution: we copied the library of the URL Get HTTP Document.vi from LabView8.6 to LabView2009 and connected all our subVIs to these files.

Now everything is working.

My problem is resolved.

 

Thank you,

Lana

Message 14 of 14
(1,541 Views)