HELP! Read Input or Hold Input function code?

S

Thread Starter

Stew

USING MODBUS RTU PROTOCOL MODE:

The Master Modbus wants HOURS, Minutes, and SECONDS from lets say . . . slave address 07hex.

Can I access HOURS, MINUTES, AND SECONDS with function 03 and function 04 interchangeably?

Will this work?

Read Input Register: 07 03 0067 0003 XXXX
Read Holding Register: 07 04 0067 0003 XXXX

note: 108 decimal = 67hex

Modbus Map database from Relay:
<pre>
Register# Description
100 Month
101 Day of Month
102 Year
103 Hours
104 Minutes
105 Seconds
. .
. .
. .

(THIS IS ALL THE DATA I AM GIVEN!)</pre>
 
L

Lynn August Linse

>Can I access HOURS, MINUTES, AND SECONDS with function 03 and function 04 interchangeably?

This is strictly a vendor-by-vendor issue.

Some vendors enable 03 and 04 to be perfect mirrors of each other (that is what I would do), while others have completely separate data and both must be used.

The problem with function code #4 (Input Registers) is things like the old Modicon I/O scanner cannot access that data, so mirroring it in the #3/holding register space was the only option to sell to the maximum number of customers. Therefore, if all #4/Input space data must exist in the #3/Holding space, might as well just treat them the same.

But as I said, this is strictly a vendor-specific issue.
 
Top