LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problen communication tcp/IP using port 23 but works well with putty and teraterm

Solved!
Go to solution

Hello,

I wont to communication with a GPS Instrument LABSAT, i must communication with it using TELNET, so when i try ti communicate with the instrument using putty or teraterm i dont have any problem, but when i try to use LabVIEW TCP/IP i can only sen the first command, and i get not normal characters like : "ÿýÿûÿü"ÿý" i tryed to see the equivalent in Hexa and try to convert in ASCII code but alwas the chain of characters dosen't mean any thing. you can see may programme in the pictures.

thanks for help.Capture.PNGTERATERM.PNG

termaterm 2.PNG


0 Kudos
Message 1 of 8
(3,394 Views)

Hey MED_88,

 

To understand why you are experiencing issues trying to talk to your instrument, its important to first identify the differences between TELNET and TCP.

 

TELNET is an application layer protocol, and TCP is a transport layer protocol as defined in the OSI Model, and the implication of this is that TELNET uses TCP to send messages, but is not equal to TCP.

 

This does mean you cannot use the TCP/IP functions to communicate using TELNET.

 

Unfortunately support for TELNET was dropped from LabVIEW 2014 onwards, and the current recommended way to use TELNET is by interacting with PuTTY using LabVIEW. The following Knowledgebase article contains more information on how to do this.

 

Archived:Using Telnet, SSH, RLOGIN, or RAW TCP Communications Protocol With NI Software

 

Hope this helps!

Mitch

 

0 Kudos
Message 2 of 8
(3,332 Views)

Noticed that there is a sequence of hex values "0D 0A" in your output string. 0D 0A  is a carriage return followed by a line feed (CRLF). I would assume that this could be the data termination characters. My first suggestion would be to change the MODE of the TCP Read to CRLF and set the bytes to read to something very large (like 1000).

ODOA.PNG

 

CRLF vi.png

0 Kudos
Message 3 of 8
(3,317 Views)

I've never looked into it before now, but I see there is a bit more to Telnet than just a raw TCP channel. Looking at the spec here, in the section on "Telnet command structure", we can see that the three-byte sequences such as "FFFD01", "FFFB03", and "FFFC22" are actually telnet commands. So at a minimum you'll need to filter these out to make sense of the received data.

0 Kudos
Message 4 of 8
(3,306 Views)
Solution
Accepted by topic author MED_88

To solve the problem i used the  LabVIEW Internet Toolkit

i know that this tollkit is obsolete, but when i used i solve the problem and i can communicate with the instrument using telnet.

0 Kudos
Message 5 of 8
(3,279 Views)

Hi MED_88,

I want to remote control the LabSat3 instrument by the LabVIEW Internet Toolkit.But the LabSat3 didn't have any message back when i send the message to it.i attached my VI,could you help me to look into it?

0 Kudos
Message 6 of 8
(2,523 Views)

Hello,

you must add a CR after you cmd.

MED_88_0-1610102393281.png

 

0 Kudos
Message 7 of 8
(2,518 Views)
Hi MED_88 Thanks very much,you are right,the problem have solved.
0 Kudos
Message 8 of 8
(2,484 Views)