Page 1 of 1

Two Modbus Integers to Real in S7-300?

Posted: Mon May 23, 2016 9:10 am
by alansal
Hello everyone,

The question is simple but for me the answer is a little cloudy.

1) I have two registers i can read from a flowmeter to form a floating value. One is R2610 and other is R2611.I need to place them such that they need to form a floating value however siemens keeps converting (only the high value to a form of float so i do not have any decimal value for ex;
R2610 : 17457
R2611 : 4090

However my value is converted like; 708.0 in fact it should be; 708.24963 sth.

With which block/blocks can i see the actual value?(Btw i am connected with Modbus over TCP/IP)
(i checked/read the values with a modbus slave program)

Thanks for help

Re: Two Modbus Integers to Real in S7-300?

Posted: Mon May 23, 2016 11:45 am
by dehell
Hello,
Which sofware? TIA? Step7?

http://hpics.li/8e364e8

Re: Two Modbus Integers to Real in S7-300?

Posted: Mon May 23, 2016 3:12 pm
by alansal
dehell wrote:Hello,
Which sofware? TIA? Step7?

http://hpics.li/8e364e8
Step 7 it is... V5.5 SP3

Merging two integers and forming a floating number is my problem....

Thanks for your kind interest...

Re: Two Modbus Integers to Real in S7-300?

Posted: Mon May 23, 2016 8:37 pm
by dehell
In few word:
If your first register is for example DB10.DBW2 and your second register DB10.DBW4, in that case the real value is available into DB10.DBD2

If your register are not consecutive, copy them into two consecutive register...

Posted: Mon May 23, 2016 10:35 pm
by Schtiel
You don't need to merge anything, just access two words as floating point:
Image

Re:

Posted: Thu May 26, 2016 3:12 pm
by alansal
Schtiel wrote:You don't need to merge anything, just access two words as floating point:
Image
thank you.... this will surely work... will try asap....