NModbus with Danie/Enronl Modbus

122 views
Skip to first unread message

Zbych

unread,
May 10, 2011, 12:21:52 PM5/10/11
to NModbus
Hi All

I have a question about NModbus with Daniel/Enron Modbus extension. In
specification for this extension is e.g. registers from address 7001
to 7999 are 32 bits registers. I found that to read from this
registers I should use function with ID 3 and range 2 (the same for
write except function ID 16). I don't have any device yet to test this
with nmodbus, so I'm asking you does any one tried to use NModbus to
read 32 bits registers?

Regards
ZB

Huy Nguyen

unread,
May 10, 2011, 10:57:53 PM5/10/11
to nmodbus...@googlegroups.com
you can use customer function to read any registry you can. The readHoldingRegistris and readInputRegistris support 16bit registry

2011/5/10 Zbych <zbura...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "NModbus" group.
To post to this group, send email to nmodbus...@googlegroups.com.
To unsubscribe from this group, send email to nmodbus-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nmodbus-discuss?hl=en.




--
chao moi nguoi

Zbych

unread,
May 12, 2011, 2:56:43 AM5/12/11
to NModbus
Thanks for your answer but in normal modbus if you send request to
device for data from e.g. register 7010 you and range 2 you receive
data from 7010 and 7011. I need to know how it is when you use this
function with the same parameters to read from 32 bits register. I
will receive data from single register 7010 or from two registers 7010
and 7011?

Huy Nguyen

unread,
May 12, 2011, 2:07:44 PM5/12/11
to nmodbus...@googlegroups.com
you can't use this function. For example, if you get the value of registry 7010 using this function, the data of response message from device include 2 byte and NModbus automatic merge them into a ushort value (16bits). Similarly, if you request 2 registry, 4 byte wille be send from device, NModbus splits 4 byte and return 2 ushort value. If you want to get 32 bits registry, you should create a function, it will merge 4 byte received from your device into a 32 bits number.?

2011/5/12 Zbych <zbura...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "NModbus" group.
To post to this group, send email to nmodbus...@googlegroups.com.
To unsubscribe from this group, send email to nmodbus-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nmodbus-discuss?hl=en.




--
chao moi nguoi
Reply all
Reply to author
Forward
0 new messages