![Arkon MAGS1 User Manual Download Page 14](http://html.mh-extra.com/html/arkon/mags1/mags1_user-manual_2972761014.webp)
MAGS1 User Guide
13
V1.5 22-1-2016
4.7. Commissioning
Before communicating with the master, Baud rate, node ID and update rate must be selected.
Item
Value
Comments
Slave address
1-247
Device address [Factory setting: 1]
Baud rate
9600, 14400, 19200, 38400,
57600, 115200
Communication speed [Factory
setting: 9600]
Parity/framing
Even, 1 stopbit
Communication parameters
[Factory setting: None, 1 stopbit]
Odd, 1 stopbit
None, 2 stopbit
None, 1 stopbit
4.8. Modbus addressing module
The module allows R/W access to the following standard Modbus data register blocks:
• Holding registers
I.e. the module will not support the other standard data register blocks:
• Coils
• „Discrete input“
• „Input registers“
4.9. Modbus function codes
This device supports following function codes: 3, 16 and 17.
Function code 3 and 16 are used for accessing registers. Function code 17 (report slave ID) will return a
structure of identification information of the device. Below the different function code exceptions are
described.
Function code 3
(Read holding registers)
General exceptions:
• Requesting less than 1 or more than 125 registers
=> Exception 3 (Illegal data value)
• Requesting more than max. message size =>
Exception 2 (Illegal data address)
• Requesting data above/crossing limitation of max.
register address (0xFFFF) => Exception 2 (Illegal
data address)
• If the end address is only part of a mapped holding
register item (e.g. one half of a longint value) =>
Exception 2 (Illegal data address)
Application exceptions:
• Application errors => Exception 2 (Illegal data
address)
Holes/register alignment:
• The read command always returns data if no
exception is given,bad start/end alignment will result
in only parts of the data item being read.
• Holes in the holding register map return Exception
2 (Illegal data address)
Function code 16
(Write multiple registers)
General exceptions:
• Exceeding max. message size => Exception 2
(Illegal data address)
• Writing data above/crossing limitation of max.
register address (0xFFFF) => Exception
2(Illegal data address)
Application exceptions:
• Application errors => Exception 2 (Illegal data
address)
• Application errors include writing to read only
holding registers
Holes / register alignment:
• If start-address is not the start of a mapped
holding register => Exception 2 (Illegal data
address)
• Writing to holes is not allowed => Exception 2
(Illegal data address)
• If the end address is only part of a mapped
holding register item (e.g. one half of a longint
value), the action depends on the data type.
• If the end address is only part of a mapped
holding register item (e.g. one half of a longint
value) => Exception 2 (Illegal data address)