I've made a template in Perspective, that allows me to monitor and configure a Phoenix Contact Caparoc Circuit Breaker. This template is connected to an according UDT that has a relatively complex structure. The connection between the tags in the PLC and Ignition Gateway works just fine, i can monitor and display all the tags in the UDT and the data is correct. The perspective template also displays all the data correctly.
To configure some values I am using a numeric entry field with a indirect bidirectional tag binding. These values are defined as a Byte-Array withing the Caparoc UDT. When I change these values in the PLC they are correctly displayed in the entry field. But as soon as I want to change the value via Ignition, i get the following error exception:
Error writing to tag '[default]Caparoc/slots/0/setup/setChannelCurrent': array element type mismatch.
Here a tag path to the value I want to manipulate:
[default]Caparoc/slots/3/setup/setChannelCurrent[0]
Did anyone esle have a similar problem? Are there any ideas, what causes the error exception?
Maybe if you post some screenshots of the tags and the props of the numeric entry field it will be a bit clearer.
Also your error listed is using a different path to the tag path you listed, so that indicates you are missing something, as a binding uses the same path for both read and write.
When you wish to write array types, you must use actual java arrays (from the jarray jython module). For most OPC types, you cannot manipulate individual elements--you have to write the whole array every time.
sorry for the very late reply, this month was fairly busy.
Thank you both for the recomendations! I am very new here and eiger to learn
Sadly I dont have the posibillity to connect to the plant anymore but I can send some screenshots from the designer with the explanations (hopefully, this can provide some of the missing information) whine simulating the values.
Here is a screenshot of a Caparoc slot UDT instance with the variables Byte[4] array I am trying to access:
The tagPath param has following value (explicitly for this slot): [default]Caparoc/slots/0
So as I described before, as soon as I try to change the value of the current setpoint I get following error:
Error writing to setChannelCurrent[0]: Error_Exception
Error writing to tag '[default]Caparoc/slots/0/setup/setChannelCurrent': array element type mismatch
At the same time I am using similar methode to enable/disable each channel via a Bool[4] array. The binding in the designer looks identically.
And in this case I can enable/disable every single channel without any problems. So I can reach to every single element of an array. Something goes wrong while writing the values into the numeric entry field...