Sub-Ring Diagnostics
Original instructions
Detecting a Sub-ring Break via DRS
This topic describes how to detect a cable break in a sub-ring on the remote I/O network by diagnosing a DRS.
Step
Action
1
Write an MSTR block to the DRS managing the sub-ring of interest.
NOTE: Use the 140CRP31200 remote I/O head module to send MSTR commands to diagnose the status of sub-rings. For other operations (get remote statistics, read data, etc.), we recommend that you send an MSTR command from a 140 NOC 78• 00 head module.
2
Read the states of ports 5 and 6 on the DRS. The possible port state values are:
1 
disabled
2 
blocking
3 
listening
4 
learning
5 
forwarding
6 
broken
3
  • If port 5 or 6 is in a blocking state (2), then the loop is present and healthy (no cable break.)
  • If port 5 or 6 is in any other state besides blocking state (2), then there is a cable break on the sub-ring.
NOTE:
  • When a loop exists, the port goes to block state (no traffic sent).
  • When a cable is broken, the port goes to forwarding state (traffic starts flowing).
  • If a cable connected to the port is broken, the port becomes disabled.
This graphic shows breaks in 2 sub-rings connected by DRSs on the main ring. The arrows point to the DRSs, which you monitor (ports 5 and 6) in your application using an MSTR block.
1 
140CRP31200 remote I/O head module on the local rack
2 
140NOC78000 distributed I/O head module interlinked with the head module
3 
main ring
4 
DRS connected to main ring and sub-ring
5 
remote I/O sub-ring
6 
remote I/O drops (including ••• CRA 312 00 adapter module)
7 
distributed I/O cloud connected to DRS (managed by the 140NOC78000 module)
NOTE: When you add or remove devices from your network configuration, modify the sub-ring cable break logic in your application.
Writing an MSTR Block to Diagnose a Sub-ring Break
This is an example of an MSTR block created in a Control Expert application to read the DRS ports 5 and 6 state.
In the Control Expert application, write an MSTR block to send an EIP explicit message to the DRS that is managing the sub-ring. This EIP explicit message can be sent via the 140CRP31200 module or other communication module that is managing devices in the device network.
NOTE: Use the 140CRP31200 module to send MSTR commands to diagnose the status of sub-rings. For other operations (get remote statistics, read data, etc.), we recommend that you send an MSTR command from a 140 NOC 78• 00 module.
To create the MSTR block, create and assign variables, and connect the block to an AND block. The logic continuously sends an explicit message when it receives notice of success or detected error.
The EIP explicit message should contain the following data.
class code
0x65 (hex)
instance
7 for port 6
attribute
9
service code
0x01 (hex) or 0x0E (hex)
Input Variables
Create variables and assign input pins. In this example, variables have been created — and named — as described below. (You can use different variable names in your explicit messaging configurations.)
Input Pin
Variable
Data Type
ENABLE
mstr_enable
BOOL
ABORT
mstr_abort
BOOL
Output Variables
Create variables and assign output pins. In this example, variables have been created — and named — as described below. (You can use different variable names in your explicit messaging configurations.)
Output Pin
Variable
Data Type
ACTIVE
mstr_active
EBOOL
ERROR
mstr_error
EBOOL
SUCCESS
mstr_success
EBOOL
CONTROL
mstr_control
ARRAY
DATABUF
mstr_buff
ARRAY
Control Array
The control array parameter (mstr_control) consists of 9 contiguous words. In this example, the control array defines the operation as an unconnected explicit message, and identifies the target device.
Register
Description
Setting (hex)
CONTROL[0]
Operation
16#000E
CONTROL[1]
Detected error code (read-only, written by operation)
16#0000
CONTROL[2]
Data buffer length (reserving 100 words)
16#0064
CONTROL[3]
Response offset in words for the beginning of the explicit message response in the data buffer
16#000A
CONTROL[4]
High byte = slot number of the 140CRP31200 remote I/O head module
Low byte = Unit ID number
16#0400
CONTROL[5]1
IP address of the Ethernet communication module
16#C0A8
CONTROL[6]1
IP address of the Ethernet communication module
16#0106
CONTROL[7]
CIP request length (in bytes)
16#0008
CONTROL[8]
CIP response length (read-only, written by operation)
16#0000
1 In this example, The control parameter handles the IP address 192.168.1.6 in the following order: byte 4 = 192, byte 3 = 168, byte 2 = 1, and byte 1 = 6.
Example
Below is an example of code to perform the operation that reads port 5 or 6 status, depending upon your configuration:
(*MSTR dual ring switch DRS diagnostic*)
mstr_control[0] := 16#000E; (*operation code*)
NOTE: mstr_control[1] contains the detected MSTR error code response.
mstr_control[2] := 16#0064; (*data length*)
mstr_control[3] := 10; (*start address*)
mstr_control[4] := 16#0400; (*slot# and MB unit ID#*)
mstr_control[5] := 16#C0A8; (*IP address*)
mstr_control[6] := 16#0106; (*IP address*)
mstr_control[7] := 8; (*CIP request length*)
mstr_control[8] := 0; (*used by response*)
mstr_buff[0] := 16#030E; (*high byte size 03*) (*low byte get_attributes_all*)
mstr_buff[1] := 16#6520; (*high byte class object value*) (*low byte class object*)
mstr_buff[2] := 16#0624; (*high byte port number + 1*) (*low byte instance object*)
mstr_buff[3] := 16#0930; (*high byte attribute value*) (*low byte attribute object*)
mstr_buff[4] := 16#008E
mstr_buff[5] := 0
mstr_buff[6] := 5
mstr_buff[7] = DRS_sts_value (1...6)
Example of the result returned in the MBP_MSTR buffer:
Refer to the explicit messaging topic in the Quantum EIO Remote I/O Modules Installation and Configuration Guide for details on the MSTR block.