Hi, thank you for the reply. Yes I'm able to see all the tree of client in datalayer page. The type of node that I'm trying to read is a struct of 1024 bool like the image above (image taken from uaexpert tree). So would like to read the struct instead of all single bool. I tried some method to get the value of node: get_data, get_flatbuffers.. but any of them work. Infact the nearest type of struct is complex-data-type but it doesn't works. Sometimes get_data returns me a bytearray, but it's complex to manage when the struct form is different from this one.
... View more
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:
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