Hello all, I'm Marco. I'm facing an issue reading a structure of bool in a siemens DB. I created an opcua client in ctrlX witch connect to opcua server of siemens 1500 and I'm trying to read this structure from datalayer. I'm using python 3.9 with package ctrlx-datalayer=2.2.0. Below a snippet of the code I'm using, the response is at right of the print. with ctrlxdatalayer.system.System('') as dlsystem:
dlsystem.start(False)
client: ctrlxdatalayer.client.Client
client, conn_string = get_client(dlsystem, '192.168.1.1')
res, var = client.read_sync(f'opcuaclient/siemens1/i=85/ns=3;s=PLC/ns=3;s=DataBlocksGlobal/ns=3;s="DB_test2"/ns=3;s="DB_test2"."a0"')
r = var.get_data()
print(res, r) # Result.FAILED bytearray(b'\x10\x00\x00\x00\x00\x00\n\x00\x10\x00\x0c\x00\x08\x00\x04\x00\n\x00\x00\x00\x0c\x00\x00\x00\x00\x00\r\x80\x01\x02\n\rS\x00\x00\x00The operation could not complete because the client is not connected to the server.\x00') Here the structure. I have no issue when I read simpler data types. I encountered the same problem using node-red. Thank you, I remain available for any clarification.
... View more