Greetings All,
So i have come accross a challenge here where i need some assistance. I need to exchange 32bit Real data between a PLC (Siemens S7) and DCS (DeltaV 11.3.1) via Modbus. However modbus is designed as a 16 bit protocol, so the 32bit data received from the PLC is actually split in 2 registers. Ive used modbus before, so i have managed to setup the network and pull the data in, (i created a dataset with 16 bit registers, so every 2 registers is for 1 32bit real data from the PLC).
So currently using 2 x BFO blocks i see 0100000110100001 Upper Byte and 1000010100011111 Lowe Byte, which if i do a binary32 conversion to equals 20.190000534057617 which i what i want.
The question is how can i do this conversion in DeltaV? I was wonedring if there is an easy way to covert this data to a Floating point value in DeltaV?
Once done, i need to the converse as well, and convert a Floating point back to binary and write it out as a 2x16bit integers for the PLC.
Thanks in advance,
Regards
In reply to Steve Linehan:
That does the first part, but then you need to do some maths to convert back to a real. Search on the exchange for IEEE 754
But try this module, claims to do exactly what you want
Hi,
why would you turn the value into bits?
The S7 have DD registers in Datablocks, just read them and they will work.. only thing that can mess things up are big/small endiands, you might have to swap the words beffore moving to double word..
Make a Modbus recive block like this one:
Niklas Flykt
Klinkmann Oy
Key Account Manager safety products
nikfly@gmail.com
In reply to Niklas Flykt:
In reply to IntuitiveNeil:
In reply to AqAmra: