LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Basic TCP data communication

Hello, I am trying to build a VI that will run forever and constantly listen to a port and recieve integers and display them. i would like to make it so that a person on a different computer without labview can telnet to my PC at the port and send integers. I only want to listen to the numbers he sends, on reply is necessary. I'm trying to test my VI by running it and opening a puTTY window and telneting to 127.0.0.1 but it doesn't work. Im probably missing somehtign very simple here. any help would be appreciated. by the way im using labview 8.2 

0 Kudos
Message 1 of 10
(5,433 Views)

Hi F11Raven,

your vi is definitively missing some code to read or write data to/from ethernet. What have you done so far? Do you have the Internet Toolkit? It contains vi's to work with telnet.

 

Mike

0 Kudos
Message 2 of 10
(5,427 Views)

i dont think so, where can i get it?

0 Kudos
Message 3 of 10
(5,425 Views)

Hi F11Raven,

here is a link:

http://sine.ni.com/nips/cds/view/p/lang/de/nid/2501 

 

Mike

0 Kudos
Message 4 of 10
(5,417 Views)

is there no way i can do this wiht my current software?

0 Kudos
Message 5 of 10
(5,412 Views)

Hi F11Raven,

you can use the TCP/IP functions to realize the telnet protocol. Or maybe there is already a free library which you can download.

 

Mike

0 Kudos
Message 6 of 10
(5,407 Views)

but just using the TCP functions givien in labview (open, listen, read, write, wait on listener etc) can't i do this? im just not sure which ones to use but im sure you can do it with those.

0 Kudos
Message 7 of 10
(5,405 Views)

Hi F11Raven,

yes as i wrote, you can write your own vi's. First you can create a listener, the std port is 23. Wait for a connection. Then you can use read and write to send data. See the TCP IP Server example (in the example finder) to get a first step in the correct direction.

 

Mike

0 Kudos
Message 8 of 10
(5,400 Views)

i looked at the example and its pretty much what i have. i listen for connections on port 2305. then i assume the program blocks there until a connection is established. then it sends the connection id to the tcp read. then the TCP read blocks until it receives somehting and when it does it outputs it to the front panel. then repeats the reading. i dont know what im missing here

0 Kudos
Message 9 of 10
(5,397 Views)

Hi F11Raven,

do you speak about your vi posted earlier? I can't find something what looks like TCP/IP.

 

Mike

0 Kudos
Message 10 of 10
(5,389 Views)