Hi,
Currently using a MUL instruction (PLC-5) to convert a floating point to an integer to send up a SCADA system.
No float comms exist (and can't take the PLC down to create), so the easiest way was to multiply the pressure by 10 and then the SCADA system will divide by 10 to give us the pressure to 1 decimal place. i.e. MUL F8:18 10 N25:57
When the reading is processed by SCADA it will reset the N25:57 to -1 and await the next reading.
However, although this seems to work fine 99% of the time, I have on occasion seen the value -7 in the word rather than -1!
The SCADA team are convinced they can only set it to -1, so I'm just seeking a 2nd opinion that the above is coded correctly and if not, what the best way is!
Steve
Currently using a MUL instruction (PLC-5) to convert a floating point to an integer to send up a SCADA system.
No float comms exist (and can't take the PLC down to create), so the easiest way was to multiply the pressure by 10 and then the SCADA system will divide by 10 to give us the pressure to 1 decimal place. i.e. MUL F8:18 10 N25:57
When the reading is processed by SCADA it will reset the N25:57 to -1 and await the next reading.
However, although this seems to work fine 99% of the time, I have on occasion seen the value -7 in the word rather than -1!
The SCADA team are convinced they can only set it to -1, so I'm just seeking a 2nd opinion that the above is coded correctly and if not, what the best way is!
Steve