Read a series of Modbus Registers into an Integer array?

Hey Guys,

I’m missing something here. I have comms to a PID controller working over RS485 serial, using Ignitions built in Serial module. Works well. But I know I’m missing something here
I have a table of Temperature setpoints. I followed the tutorial on manually addressing tags (which seems to have moved!) anyways. I can read individual temperatures and get feedback

If i switch to integer array, or any style array for that matter, using this syntax
image
All I get is what seems to be a binary array?
image
I was hoping to take registers 48193 to 48200 and pack them into array elements that lines up to Pattern_0_REF[0] = 48193
Pattern_0_REF[1] = 48194

So on and so fourth…

What am I missing guys?

Thanks!

It looks like you are extracting the individual bits of a word into an array. I don’t know how to do what you want, hopefully someone here does.

No, the driver does not support that. Make separate tags.

1 Like

Hi Phil, does your driver support data array via Modbus?

No, the basic OPC interface in my driver matches the IA driver, specifically to maximize driver swap compatibility. I'd have to invent some OPC Item Syntax to signal array treatment. If I do that, and IA later does it differently, I'll have unhappy users.

1 Like

It seems that the notation:
[{Device Name}]{Modbus Slave ID}.HR8753:10

is not useful for anyting? I have a really special modbus device. I need to read exactly 10 registers at once starting from exactly 8753 (tag1). I need to create a data type that reads these 10 registers as an array. Then I need another tag to extract element 2 of this tag:

tag2 = tag1[2]

I guess this is not possible?

You can make 10 tags, addressing the 10 contiguous registers, and the driver will read them in one request.

For ultimate control you could instead script it, and use system.opc.readValues asking for these 10 registers. Do what you want with the result - write to array tag, multiple tags, etc.

1 Like

Correct. The notation you are trying to use is not present in any documentation.

If you follow Kevin's advice, the driver will merge the requests for the ten registers (separate tags) into a single multi-register read.

1 Like