Contemporary Control Systems Modbus Cube I/O MR-AI8 User Manual
Page 4
Continuation Software Description
Example for a frame:
Slave address
0x12 Setting of rotary switch (18)
Function
0x06 Write Single Register
Register address Hi
0x00
Register address Lo
0x41 Bit rate and parity (65)
Register contents Hi 0x53 Magic-Number
Register contents Lo 0x15 Parity Even, 19200 Baud
All devices can be switched simultaneously with a Broadcast com-
mand (Slave address 0x00) However, it is advised not to do so as
this can cause problems:
- Devices from other manufacturers may have under this
address a register for a different purpose that will then be
operated in the wrong way.
- There is no feedback from the individual devices.
Consequently the control cannot immediately recognize if
the command was correctly received.
It is safer to address and switch each device individually.
The device will then answer with the old settings of parity and
bit rate. Switching will take place only afterwards. However, the
answer can get lost if the bus is disturbed.
When all devices are switched; it is advised to check communica-
tion. Any function of the device providing a feedback is suitable.
If a single function is to be used being independent from the
process periphery then the function „Diagnostic“ sub-function
„Return Query Data“ is suitable, it returns the transferred data.
If bit rate and parity setting of a device are unknown it is possible
to address the device successively with all combinations of bit
rate and parity until the device answers. Try the most likely
combinations first. Try the lower bit rates last as they take longer.
10.3 General Commands
“08 (0x08) Diagnostics”
Subfunction “0 ( 0x0000) Return Query Data”
Data Field Any
Response: Echo of Request
Subfunction “1 (0x0001) Restart Communication Option”
Data Field 0x0000 or 0xFF00
Response: Echo of Request
Action: Clears all Error Counters, Restarts node
Subfunction “4 (0x0004) Force Listen Only Mode”
Data Field 0x0000
No Response
Action: No response until Node Reset or Function
Code 08 Subcode 01
Subfunction “10 ( 0x000A) Clear Counters”
Data Field 0x0000
Response: Echo of Request
Action: Clears all Error Counters
Subfunction “11 ( 0x000B) Return Bus Message Count”
Data Field 0x0000
Response: Quantity of messages that the remote device has
detected on the communications system since its last restart,
clear counters operation, or power–up.
Subfunction “12 ( 0x000C) Return Bus Communication Error
Count”
Data Field 0x0000
Response: Quantity of errors encountered by the remote
device since its last restart, clear counters operation,
or power–up. (CRC, Length <3, Parity, Frame)
Continuation Software Description
Subfunction “13 ( 0x000D) Return Bus Exception Error Count”
Data Field 0x0000
Response: Quantity of MODBUS exception responses returned
by the remote device since its last restart, clear counters
operation, or power–up.
Subfunction “14 (0x000E) Return Slave Message Count”
Data Field 0x0000
Response: quantity of messages addressed to the remote
device, or broadcast, that the remote device has processed
since its last restart, clear counters operation, or power–up.
Subfunction “15 (0x000F) Return Slave No Response Count”
Data Field 0x0000
Response: Quantity of messages addressed to the remote
device for which it has returned no response (neither a normal
response nor an exception response), since its last restart, clear
counters operation, or power–up.
“43 /14 (0x2B / 0x0E) Read Device Identification”
Request
Read Device ID code: 0x01
Object ID 0x00
Response
Device ID code 0x01
Conformity level 0x01
More follows 0x00
Next object ID 0x00
Number of objects
0x03
Object ID 0x00
Object Length 0x03
Object Value “BTR”
Object ID 0x01
Object Length 0x06
Object Value “MR-AI8”
Object ID 0x02
Object Length 0x04
Object Value “V1.0”
METZ CONNECT | Im Tal 2 | 78176 Blumberg | Germany | Phone +49 7702 533-0 | Fax +49 7702 533-433
Distributed by RIA CONNECT GmbH and BTR NETCOM GmbH
Mounting instruction see www.metz-connect.com