ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Telnet with Labview

Hey Everyone, 

Thanks in advance. 

 

I am trying to connect to a CAN-Ethernet gateway using Labview through Telnet. Basically, I want to change some settings on it while my main VI is running the tests. 

My main program gets the data from the gateway without any problems. I am using TCP/IP to get the data from the gateway in my program. Thats why I prefer to use Telnet to make changes to settings  on the gateway. 

I am Telnet support has been discontinued in Labview, but was wondering if there is a work around, Any sample snippet or example would be helpful. 

 

Thanks

0 Kudos
Message 1 of 7
(4,672 Views)

Have you considered using a .NET implementation of Telnet to see if that does what you want?

 

This is the first result on Google, not sure if it's actually good or not as I haven't used it myself.

0 Kudos
Message 2 of 7
(4,663 Views)

Hi Kyle,

 

I havent used .NET ever before. Does Labview have support for .Net?

0 Kudos
Message 3 of 7
(4,659 Views)

Yes

 

Here's a page with a bunch of links to help.  Start with the "Examples" section and go from there.

0 Kudos
Message 4 of 7
(4,653 Views)

As I state in another thread, you can just use the standard TCP functions to communicate with a Telnet interface.  This works just fine as long as the option characters are not used.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 7
(4,629 Views)

As suggested you can use a standard TCP connection rather than telnet.

 

Does the gateway host a web server for changing settings via a browser? If so you could embed a web browser and allow the user to change the settings here.

If it needs to be programmatic, you can use HTTP GET and POST requests to change the settings too. I have done this before on an ethernet/can gateway without any problem. Obviously it depends on the make and model, and what it actually supports.

 

Deceased

0 Kudos
Message 6 of 7
(4,581 Views)

Thanks Crossrulz,

 

I was able to communicate with it using TCP functions. Really appreciate your help

0 Kudos
Message 7 of 7
(4,549 Views)