Hello,
I have created a UDT that has several parameters by which the appropriate register for modbus addressing in Tag is calculated.
When the UDT is used and I create a manual instance, I can see in the path that the address is ok. I tried to generate several instances using wizard but noticed that for the same parameters the address is different. What I mean is that the ending ".0" appears in the path.
I have no idea what it is caused by. I have tried several times to create UDT from scratch and trestart the gateway and I don't know why it keeps appearing.
Formula;
[Driver]HR{TCU_Data_reg+18+TCU_regs_qty*(TCU_number-1)}
UDT:
{
"name": "UDT_Sample",
"parameters": {
"TCU_number": {
"dataType": "Integer"
},
"TCU_LastCom_reg": {
"dataType": "Integer",
"value": 29500
},
"TCU_Data_reg": {
"dataType": "Integer",
"value": 30500
},
"Modbus_ID": {
"dataType": "Integer",
"value": 1
},
"TCU_regs_qty": {
"dataType": "Integer",
"value": 22
}
},
"tagType": "UdtType",
"tags": [
{
"name": "AI",
"tagType": "Folder",
"tags": [
{
"opcItemPath": {
"bindType": "parameter",
"binding": "[Driver]HR{TCU_Data_reg+16+TCU_regs_qty*(TCU_number-1)}"
},
"valueSource": "opc",
"name": "BatteryVoltage",
"tagGroup": "Odczyt_10s",
"tagType": "AtomicTag",
"engUnit": "mV",
"opcServer": "Ignition OPC UA Server"
},
{
"opcItemPath": {
"bindType": "parameter",
"binding": "[Driver]HR{TCU_Data_reg+18+TCU_regs_qty*(TCU_number-1)}"
},
"valueSource": "opc",
"name": "BatteryCurrent",
"tagGroup": "Odczyt_10s",
"tagType": "AtomicTag",
"opcServer": "Ignition OPC UA Server"
}
]
}
]
}
Tag 1 instance created:
Tag 2 wizard created:
I noticed that in the parameters there is a difference involving the separation of thousands I also tried to enter it interchangeably and the result is different again, I do not know why?
Greetings
Michał