SilverShotBee
Member
Hi, I'm faced with a rather annoying issue. I'm using CoDeSys 2.3 on an IFM CR0401 PLC which is talking to a CR0451 HMI via a CANfox network. The network is only capable of transmitting BYTES, which is hindering my accuraccy of information. For example, I want to send a number higher than 255, or I want to send a number of 23.56.
In both of the above situations I end up with errors in the transmitted value. When converting a REAL to BYTE, if the REAL value is 256 then the BYTE value is 1... If I send 23.56 as the REAL value then the BYTE value is 24 as it is rounded up.
Is there anyway I can deconstruct the REAL value and reconstruct later to keep my accuracy?
Thanks
In both of the above situations I end up with errors in the transmitted value. When converting a REAL to BYTE, if the REAL value is 256 then the BYTE value is 1... If I send 23.56 as the REAL value then the BYTE value is 24 as it is rounded up.
Is there anyway I can deconstruct the REAL value and reconstruct later to keep my accuracy?
Thanks