Slow Telnet

I have a bunch of temp/humidity loggers that I have in our facility. I generated a UDT and have a gateway script that finds all instances of the UDT and connects to each IP (a tag in the UDT) and collects the data over telnet and writes back the values to the UDT tags.

My issue is that the script is SLOW! For 7 devices the script takes 25-35 seconds to execute, however it is almost a 1/10th of the speed when I run the equiv in the python dev enviroment on my PC. I am using in my script:

import telnetlib import system

Any ideas on the slow response when executing via ignition?

Maybe initialization is expensive. You could probably do a few things

  1. Make a module and drive the values to OPC, then make SQLTags from there (Takes a while)
  2. Make a module to keep your instances of telnet. Then make a method like system.telnet.getInstance(“instancename”) to reuse your instances. This will cut your initialization time.

Thanks for the help, but I am no where near the level of being able to make my own module…

Can the TCP driver be used to simulate a telnet session? Ex, I need to connect to an ip:port send “READ?” then parse the result into 4 tags.

Maybe my approach right now is not the best?

BTW, I am connecting to 7 fluke 1620a dewk thermo hygrometers. Rather than using the internal logging I setup an ignition project for our plants to monitor the units and handle data logging and alarming.


Hostname and port of the telnet device
The prompt character. For most linux, defaults to $ or #

and the username and password.

Works for me reading free-m from my router.

If the device was called MyDevice, and you wanted to run the command “free -m”, you would have the following OPC address

[MyDevice]free -m

This is very rough, and needs more work, but its a start.