03-07-2008 05:35 AM
03-28-2008 11:12 AM
03-28-2008 12:45 PM
03-28-2008 01:23 PM
03-30-2008 01:17 PM - edited 03-30-2008 01:17 PM
03-31-2008 07:50 AM
Maybe this will help.
http://forums.mrplc.com/index.php?showtopic=30
http://www.simplymodbus.ca/FAQ.htm#Types
What are data types?
The example for FC03 shows that register 40108 contains AE41
which converts to the 16 bits 1010 1110 0100 0001
Great! But what does it mean? Well, it could mean a few things.
Register 40108 could be defined as any of these 16-bit data types:
A 16-bit unsigned integer (a whole number between 0 and 65535)
register 40108 contains AE41 = 44,609 (hex to decimal conversion)
A 16-bit signed integer (a whole number between -32768 and 32767)
AE41 = -20,927
(hex to decimal conversion that wraps, if its over 32767 then subtract 65536)
A two character ASCII string (2 typed letters)
AE41 = ® A
A discrete on/off value (this works the same as 16-bit integers with a value of 0 or 1.
The hex data would be 0000 or 0001)
Register 40108 could also be combined with 40109 to form any of these 32-bit data types:
A 32-bit unsigned integer (a number between 0 and 4,294,967,295)
40108,40109 = AE41 5652 = 2,923,517,522
A 32-bit signed integer (a number between -2,147,483,648 and 2,147,483,647)
AE41 5652 = -1,371,449,774
A 32-bit double precision IEEE floating point number.
This is a mathematical formula that allows any real number (a number with decimal
points) to represented by 32 bits with an accuracy of about seven digits.
AE41 5652 = -4.395978 E-11
Here is a spreadsheet IEEE float calculator for inputs of 4 bytes or 2 words.
To download a copy, right click and select Save Target As...
A four character ASCII string (4 typed letters)
AE41 5652 = ® A V R
More registers can be combined to form longer ASCII strings. Each register being used to store two ASCII characters (two bytes).
03-31-2008 01:25 PM - edited 03-31-2008 01:27 PM
Dear UncleBump
Thanks for the advice and information. We got back some extra details from the manufacturer today and we are just testing it. I think the problem we were having, was that the format for writing (function code 3) and reading (function code 6) data are completely different in our application, in which we thought were the same. This included differences in the starting address for reading and writing to the same register and also the data types for writing is different from the form it comes back in, through "read single register".
Thank you very much anyway
Regards