2

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:

this is the error i recive

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

Toto
  • 89,455
  • 62
  • 89
  • 125
neural_krobus
  • 73
  • 2
  • 6
  • Could add the console output that you get. Which version of open opc do you have, from where? – renzop Nov 18 '21 at 10:42

0 Answers0