Reputation: 91
I am making a python program to write variables to an opc DA server.
I have the connection and others, but when trying to write values for a variable, the program does not respond and a windows error message appears saying:
My code:
import OpenOPC import sys
opc = OpenOPC.client()
servers = opc.servers()
idServer = int(2)
print('connecting to opc server:', servers[idServer])
opc.connect(servers[idServer])
print('connection okey:', servers[idServer])
write = opc.write(('variableName', 1))
print('write:', write)
input('> ')
Does anyone know why the program crashes when it reaches that part? Thanks a lot
Upvotes: 2
Views: 168