lawebster
Member
How do you convert 32 bit long integers into something that the AB PLC-5 can represent correctly?
My problem is that I am trying to get values from an OMNI flow computer which are signed 32 bit long integers and formatted as 2's compliment into a PLC-5/20 via serial.
According to the OMNI manual the 32 bit integer in this reg range are 32 bit signed formatted as 2's compliment. The order transmitted is MS byte of MS word, LS byte of MS word, MS byte of LS word, LS byte of LS word.
Is there a way to get this 32 bit value into 2 16 bit N regs?
Very confused and don't know where to begin.
Thanks
My problem is that I am trying to get values from an OMNI flow computer which are signed 32 bit long integers and formatted as 2's compliment into a PLC-5/20 via serial.
According to the OMNI manual the 32 bit integer in this reg range are 32 bit signed formatted as 2's compliment. The order transmitted is MS byte of MS word, LS byte of MS word, MS byte of LS word, LS byte of LS word.
Is there a way to get this 32 bit value into 2 16 bit N regs?
Very confused and don't know where to begin.
Thanks