This is for:
- Ignition 8.1.2
- OPC UA module 9.1.2
- OPC UA connection to an Rx3i PLC
I have an array variable called TestArray in my PLC that is defined as a DINT array of 200 elements (DINT in Rx3i speak is a double word integer). In the PLC, TestArray is set to publish on OPC as “External Read/Write”. EG An external source can write to it
In a fresh install of 8.1.2, I created an OPC connection to the PLC, and in a new project I created an OPC tag pointing to the variable. Ignition reported this as an Integer Array, Read only was false and the array has 200 elements.
The project is set to Comm Read/Write
I can change the value of elements in the PLC and see the value change in Ignition.
However, when I try and write a new value from Ignition I get an error dialog box:
Error writing to TestArray.value: Bad(“Bad_WriteNotSupported: The server not does support writing the combination of value”)
And there’s no description. See this image:
When I perform this action nothing is appended to the wrapper.log file, and nothing appears in the logs on the GW status page.
Any ideas as to how to fix this? Is it fixable?
Bonus points for the language
The server not does support
We can verify this with Wireshark, but it probably means the server does not support writing with the
indexRange parameter specified, which is required if you are attempting to write to an element of an array in OPC UA and not the entire array itself.
If this is the case you’ll end up having to write the entire array at once via scripting.
I just tried using a 3rd arty OPC UA client (Matrikon) and I was able to write to the PLC.
I don’t know if how the OPC commands between Matrikon and Ignition differ
UaExpert will probably work too.
Both of those clients do a non-atomic read/modify/write of the entire array.
Perhaps our decision to lean on the indexRange parameter being supported has turned out to be the wrong one, but it’s a bit too late for that now.
So about the only thing I can try next is to see if there is a PLC firmware update that might fix the issue
Hmm … I’m at the end of a long day. can you give me a pointer on how to do that?
If you get the Wireshark capture of Ignition performing the write (with security disabled for the connection) we can verify there’s at least not some bug on the Ignition side and this is indeed the indexRange parameter being rejected.
I wouldn’t hold out for a firmware update fixing this… probably just figure out how to write the whole array from scripting.
v = system.tag.readBlocking(["Int32Array"])
av = v.value
av = av + 1
Can I do this in the script console? Because I just got an error there when I was just doing teh readBlocking:
Cannot coerce value ‘[Default]TestArray’ into type : interface java.util.list
The argument to read/write blocking calls are lists, looks like you didn’t include the brackets and just passed a single string argument.
That scripting worked perfectly. I’m leaving it at that for now, although I do have a PLC firmware update I can do