dalporto
Lifetime Supporting Member
Hi all. Me again still learning Rockwell.
So I'll be polling an INT data array from a Modbus SE power meter with a L82 (with a Modbus ProSoft in between).
For the example, there is 112 registers of INT I'll be polling, let's call it TEST_ARRAY_INT[0...111].
[0] and [1] are in fact a REAL (Red phase current), so usually COP TEST_ARRAY_INT[0] GX_IA 2 would do the trick.
Problem here is that the INT's are reversed right from the Power Meter from whatever reason they had, and Reg High = Reg Low.
Using a Schneider PLC I just use a WORD_AS_REAL instruction and put the [0] on High side and the [1] on Low side, and that block has been used for years.
Now I don't know how to handle it on a Rockwell PLC without deconstructing and reconstructing the array. I tried with SWPB but it seems to only be able to swap the bytes inside 1 INT, not swap 2 words around from an array range.
Really, I don't know where to start, there are a lot of instructions I don't know here. Something with a Mask? BTD?
Thanks.
So I'll be polling an INT data array from a Modbus SE power meter with a L82 (with a Modbus ProSoft in between).
For the example, there is 112 registers of INT I'll be polling, let's call it TEST_ARRAY_INT[0...111].
[0] and [1] are in fact a REAL (Red phase current), so usually COP TEST_ARRAY_INT[0] GX_IA 2 would do the trick.
Problem here is that the INT's are reversed right from the Power Meter from whatever reason they had, and Reg High = Reg Low.
Using a Schneider PLC I just use a WORD_AS_REAL instruction and put the [0] on High side and the [1] on Low side, and that block has been used for years.
Now I don't know how to handle it on a Rockwell PLC without deconstructing and reconstructing the array. I tried with SWPB but it seems to only be able to swap the bytes inside 1 INT, not swap 2 words around from an array range.
Really, I don't know where to start, there are a lot of instructions I don't know here. Something with a Mask? BTD?
Thanks.