Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect OPC UA Server with CS OPC 40451-1 for Tightening Systems #79

Open
mohitkumaragarwal opened this issue Apr 29, 2022 · 2 comments

Comments

@mohitkumaragarwal
Copy link

Hi,
We have a OPC UA Server which implements OPC 40451-1 Tightening Specification. It has a structured data type called ResultDataType which has a sub-structure as a field.

While connecting to the OPC UA Server, it throws the following error, but it works with other OPC UA clients like UA Expert and DotNet based UA Clients. Can you please suggest if there is any support issue for structured types?

uaclient.uaclient - INFO - Connecting to opc.tcp://10.46.19.106:40451 with parameters None, None, None, None')
asyncua.client.client - WARNING - Requested session timeout to be 3600000ms, got 120000ms instead')
uaclient.mainwindow - WARNING - showing error: %s')
uawidgets.utils - ERROR - Unknown datatype for field: StructureField(Name='Tags', Description=LocalizedText(Locale=None, Text='The optional Tags is a list of identifiers associated to the given result. Examples: {VIN, XYZ1234}, {PardId, E54YJH}, {SocketNumber, 5}, etc.'), DataType=NodeId(Identifier=3003, NamespaceIndex=4, NodeIdType=<NodeIdType.FourByte: 1>), ValueRank=1, ArrayDimensions=[0], MaxStringLength=0, IsOptional=True) in structure:ResultDataType, please report')
Traceback (most recent call last):
File "C:\Python310\lib\site-packages\uawidgets\utils.py", line 21, in wrapper
result = func(self, *args)
File "C:\Python310\lib\site-packages\uaclient\mainwindow.py", line 354, in connect
self.uaclient.connect(uri)
File "C:\Python310\lib\site-packages\uaclient\uaclient.py", line 126, in connect
self.client.load_data_type_definitions()
File "C:\Python310\lib\site-packages\asyncua\sync.py", line 94, in wrapper
result = self.tloop.post(aio_func(*args, **kwargs))
File "C:\Python310\lib\site-packages\asyncua\sync.py", line 52, in post
return futur.result()
File "C:\Python310\lib\concurrent\futures_base.py", line 446, in result
return self.__get_result()
File "C:\Python310\lib\concurrent\futures_base.py", line 391, in __get_result
raise self._exception
File "C:\Python310\lib\site-packages\asyncua\client\client.py", line 676, in load_data_type_definitions
return await load_data_type_definitions(self, node, overwrite_existing=overwrite_existing)
File "C:\Python310\lib\site-packages\asyncua\common\structures104.py", line 324, in load_data_type_definitions
env = await _generate_object(dts.name, dts.sdef, data_type=dts.data_type)
File "C:\Python310\lib\site-packages\asyncua\common\structures104.py", line 242, in _generate_object
code = make_structure_code(data_type, name, sdef)
File "C:\Python310\lib\site-packages\asyncua\common\structures104.py", line 192, in make_structure_code
raise RuntimeError(f"Unknown datatype for field: {sfield} in structure:{struct_name}, please report")
RuntimeError: Unknown datatype for field: StructureField(Name='Tags', Description=LocalizedText(Locale=None, Text='The optional Tags is a list of identifiers associated to the given result. Examples: {VIN, XYZ1234}, {PardId, E54YJH}, {SocketNumber, 5}, etc.'), DataType=NodeId(Identifier=3003, NamespaceIndex=4, NodeIdType=<NodeIdType.FourByte: 1>), ValueRank=1, ArrayDimensions=[0], MaxStringLength=0, IsOptional=True) in structure:ResultDataType, please report
uaclient.mainwindow - WARNING - showing error: %s')

@Magniveo
Copy link

Dont know how to reproduce, for the test i used the Freeopc client gui and example server milo-opc, everything worked perfectly.

@mohitkumaragarwal
Copy link
Author

This issue was reported in 20222 and it was fixed at that time. I am not sure why is it still open as it was already fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants