I'm struggling with getting a socket connection established in a client timer script. I keep getting the same error. Any idea what I'm doing wrong here?
('An error occurred:', NameError("global name 'socket' is not defined",))
Ignition 8.1.37
import socket
import sys
Function definition
def send_and_receive(ip, port, message, interval):
print('Config send_and_receive')
sock = None
try:
# try to create a socket using just the IP and port
sock = socket(ip, port)
print('Socket connected')