I am trying to concatenate 3 hex numbers into 1, and I am doing this as follows:
3 registers with 8 bit values in them need to be joined into 1 number
Least significant register: 99
2nd Register: 99
Most significant register: 9
9 x 10000 = 90000 +
99 x 100 = 9900
99 x 1 = 99
Ans = 99999
Doing these multiplcations on RSLogix 5000 using "16#" before the number for both that being multiplied and the multiplier produce the correct results, but adding these results is not working as expected.
Adding 9900 + 99 = 9899 on RSLogix
Adding 90000 + 9899 = 89899 on RSLogix
Anyone know what could be happening?
An important thing to point out is that the data is being received from a meter, and as decimals are showing up as "-103" which using the "Hex" style from the dropdown menu results in 0x99
Thank you
Patrick
3 registers with 8 bit values in them need to be joined into 1 number
Least significant register: 99
2nd Register: 99
Most significant register: 9
9 x 10000 = 90000 +
99 x 100 = 9900
99 x 1 = 99
Ans = 99999
Doing these multiplcations on RSLogix 5000 using "16#" before the number for both that being multiplied and the multiplier produce the correct results, but adding these results is not working as expected.
Adding 9900 + 99 = 9899 on RSLogix
Adding 90000 + 9899 = 89899 on RSLogix
Anyone know what could be happening?
An important thing to point out is that the data is being received from a meter, and as decimals are showing up as "-103" which using the "Hex" style from the dropdown menu results in 0x99
Thank you
Patrick