9/6/2011 3:12 PM | |
Joined: 10/10/2008 Last visit: 3/6/2024 Posts: 24 Rating:
|
Hi every one, I use CP341 for to communicate conzerv make energy meters data on MODBUS protocol. After completion of programming, all data are read by system. But energy consumption reading is not matched with meters displayed data. Function block used for send data: - FB8 function block used for read data:-FB7 in send data db address type on partner CPU: - "x" extended data block starting address:-F3C (hex) length: - 64(dec.). Energy reading is available on address: - 3960(dec.) also I attached MODBUS address list of energy meter. What exactly problem is possible?????? AttachmentEM6400_RegisterMapDetails.tmp.pdf (723 Downloads) |
9/12/2011 11:21 AM | |
Joined: 1/17/2007 Last visit: 8/21/2024 Posts: 1545 Rating:
|
Well it does not look as if the words are reversed as:- -261.14956 is C3829325Hex and -2.61176eE+08 is CD7913C5 Hex, but this is not for certain, as the value may be changing by very large ammount (see below). Is the value in the DB fluctuating by very large ammounts? This could be indicative of word reversal as the smaller half of the number varies a lot, and if reversed this becomes the larger half of the number, hence the large variations. So if reversed, a very small change in the Bently number would result if a very large changed to the converted number. It is possible that you might have got the address misplaced by one register such that you have the second half of one float number and the first half of the next float number. For example take the 2 numbers 10.123 and 100.456 in sucessive values in the Bently. This would equate to 4 modbus registers:- 4121 Hex, F7CF Hex, 42C8 Hex and E979 Hex (4121F7CF = 10.123 and 42C8E979 = 100.456). Now if they were reversed you would get:- F7CF4121 = -8.407237663049294e+33 and E97942C8 = -1.8833618413795425e+25. If you are misplaced by one register you would get:- F7CF42C8 = -8.407499487367603e+33 You can convert real numbers to their hexadecimal equivalents and vice versa using these on-line calculators. That way you might be able to spot what is going on by looking comparing the number you are decoding and the number in the Bently. |
Programming today is the race between software engineers building bigger and better idiot proof programs, and the universe producing bigger and better idiots. |
|
11/21/2011 2:35 PM | |
Posts: 691 Rating:
|
Please check with your Vendor whether you have to divide the Read Value with 250/256 in the program . |
Follow us on