How do I set a UInt32 type for inputs on call_method? #628
Unanswered
Rindustrial
asked this question in
Q&A
Replies: 1 comment
-
Think I found it - |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am writing client code to access an OPC server written by another vendor.
I have other client programs successfully calling methods on their server using strings and enums - but this is the first client I am writing where the input data I am sending is required to be UInt32. also - one of the inputs requires an array of 100 UInt32 values.
I don't think I am doing this right. Shouldn't there be a UInt32 standard data type that is not a ua.variant?
Thanks for the help!
Here are the console out errors -
python3 /var/www/html/OpcSetMagazineData.py
Traceback (most recent call last):
File "/var/www/html/OpcSetMagazineData.py", line 98, in
asyncio.run(SetMagazineData())
File "/usr/lib/python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/var/www/html/OpcSetMagazineData.py", line 84, in SetMagazineData
WCSoutputs = await WCSnode.call_method("2:SetMagazineData", *WCSinputs)
File "/usr/local/lib/python3.8/dist-packages/asyncua/common/node.py", line 697, in call_method
return await call_method(self, methodid, *args)
File "/usr/local/lib/python3.8/dist-packages/asyncua/common/methods.py", line 19, in call_method
result = await call_method_full(parent, methodid, *args)
File "/usr/local/lib/python3.8/dist-packages/asyncua/common/methods.py", line 43, in call_method_full
result = await _call_method(parent.server, parent.nodeid, methodid, to_variant(*args))
File "/usr/local/lib/python3.8/dist-packages/asyncua/common/methods.py", line 64, in _call_method
results = await server.call(methodstocall)
File "/usr/local/lib/python3.8/dist-packages/asyncua/client/ua_client.py", line 613, in call
data = await self.protocol.send_request(request)
File "/usr/local/lib/python3.8/dist-packages/asyncua/client/ua_client.py", line 155, in send_request
self.check_answer(data, f" in response to {request.class.name}")
File "/usr/local/lib/python3.8/dist-packages/asyncua/client/ua_client.py", line 164, in check_answer
hdr.ServiceResult.check()
File "/usr/local/lib/python3.8/dist-packages/asyncua/ua/uatypes.py", line 220, in check
raise UaStatusCodeError(self.value)
asyncua.ua.uaerrors._auto.BadInternalError: "An internal error occurred as a result of a programming or configuration error."(BadInternalError)
Beta Was this translation helpful? Give feedback.
All reactions