M
I am getting fairly close to implementing MODBUS on a flow meter. Each meter will be a slave, and only have a few pieces of data. I am planning on implementing Function Codes 1 through 6 only. I thought about implementing functions 7, 8, 15, 16, and 17, but don't see the need. I probably will not implement any other functions. I have little (closer to none) actual hands on MODBUS experience. Would these be adaquate function codes for a very simple MODBUS slave, or should others be implemented? Attached are a list of all available functions. Thanks!
Definitely implemented
01 Read Coil Status
02 Read Input Status
03 Read Holding Registers
04 Read Input Registers
05 Force Single Coil
06 Preset Single Register
Pretty sure I will not implement but uncertain
07 Read Exception Status
08 Diagnostics
15 Force Multiple Coils
16 Preset Multiple Registers
17 Report Slave ID
Almost sure I will not implement
09 Program 484
10 Poll 484
11 Fetch Comm. Event Ctr
12 Fetch Comm. Event Log
13 Program Controller
14 Poll Controller
18 Program 884/M84
19 Reset Comm. Link
20 Read General Reference
21 Write General Reference
22 Mask Write 4X Register
23 Read/Write 4X Registers
24 Read FIFO Queue
Definitely implemented
01 Read Coil Status
02 Read Input Status
03 Read Holding Registers
04 Read Input Registers
05 Force Single Coil
06 Preset Single Register
Pretty sure I will not implement but uncertain
07 Read Exception Status
08 Diagnostics
15 Force Multiple Coils
16 Preset Multiple Registers
17 Report Slave ID
Almost sure I will not implement
09 Program 484
10 Poll 484
11 Fetch Comm. Event Ctr
12 Fetch Comm. Event Log
13 Program Controller
14 Poll Controller
18 Program 884/M84
19 Reset Comm. Link
20 Read General Reference
21 Write General Reference
22 Mask Write 4X Register
23 Read/Write 4X Registers
24 Read FIFO Queue