BTR NETCOM GmbH
Im Tal 2
78176 Blumberg
Germany
Phone +49 7702 533-0
Fax +49 7702 533-189
Mounting instruction see
www.metz-connect.com
Continuation Software description
“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 0x09
Object Value “MR-DIO4/2”
Object ID 0x02
Object Length 0x04
Object Value “V1.0”
Continuation Software description
9.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 oder 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
RResponse: Quantity of errors encountered by the remote
device since its last restart, clear counters operation,
or power–up. (CRC, Length <3, Parity, Frame)
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.
Continuation Software description
9.2 Bit rate setting with Modbus command
Parity and bit rate have the same value as when setting them by
address switch.
If Parity or Bit has the value 0, no setting or storage is carried out.
The register content is stored in the EEPROM.
“06 (0x06) Write Single Register”
Request
Valid Register Address 0x41 ( 65 )
Valid Register Value 2 Bytes
Bit 15-8: Magic-Number 0x53 = 83 as protection against
accidental writing.
The command will be further analysed only with this
number.
Response
Echo of Request
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 ans-
wer can get lost if the bus is disturbed.
When all devices are switched; it is advised to check communicati-
on. Any function of the device providing a feedback is suitable. If
a single function is to be used being independent from the pro-
cess 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 combinati-
ons first. Try the lower bit rates last as they take longer.
15 14 13 12 11 10 9
8
7
6
5
4
3
2
1
0
0x53
Parity
Bit rate
Bit 3-0
1
2
3
4
5
6
7
8
Bit rate 1200 2400 4800 9600 19200 38400 57600 115200
Bit 7-4
1
2
3
Parity even odd none