Apr-24-2020, 09:52 AM
Hi guys,
I am relative new in python programming and I want to send some commands to cognex camera using telnet.
I already try with PUTTY software and camera receive command properly.
Now I want to try with python script and I am probably doing something wrong, because camera don't receive command that i want to send.
This is script that i try:
Thanks in advance
I am relative new in python programming and I want to send some commands to cognex camera using telnet.
I already try with PUTTY software and camera receive command properly.
Now I want to try with python script and I am probably doing something wrong, because camera don't receive command that i want to send.
This is script that i try:
import sys import telnetlib HOST = "172.20.1.34" PORT = "23" telnetObj=telnetlib.Telnet(HOST,PORT) message = (b"||>SET CAMERA.GAIN 3") telnetObj.write(message) output=telnetObj.read_all() print(output) telnetObj.close()Any ideas what I am doing wrong please?
Thanks in advance