Control intervals at the DP-master (class 1)

Một phần của tài liệu Iec 61158 6 3 2014 (Trang 96 - 101)

This monitoring time specifies the smallest allowed period of time between two Slave poll cycles. This ensures that the sequence of function requests from the bus master can be handled by the bus slave. This period of time will be complied by the bus master (Class 1) for every master-slave function with exception of the function Global_Control. For the function Global_Control the User is responsible for compliance with Min_Slave_Interval.

Data_Control_Time

The Data_Control_Time defines the time in which a DP-master (Class 1) checks the data transfer to its associated DP-slaves. Furthermore, in half of this time the DP-master (Class 1) indicates his operation mode by means of a Global Control Service to the dedicated DP- slaves .

The Master parameter set contains the Data_Control_Time.

Rule

TWD > TTR (2)

TWD > Min_Slave_Interval (3)

Data_Control_Time ≥ 6 ⋅ TWD (4)

Monitoring of the MS2 – AR 6.9.2

The objective of the connection monitoring is to detect the failure of the communication partner. Idle PDUs are exchanged to retrigger the monitoring timer of the communication partner.

The Idle service cycle initiated by a bus master is called Master-Idle. The Idle service cycle initiated by the Slave is called Slave-Idle.

All monitoring and idle sequences are controlled with a single timebase “Send Timeout”.

Send_Timeout

Each MSAC2 communication relationship is supervised by a Timer (Send_Timeout).

If this Timer expires the bus master (Class 2) aborts the MSAC2-communication relationship.

Additionally the User of a bus master (Class 2) has to be informed.

This Timer has to be set up according to a) the network load

b) the number of parallel connections per DP-master

Rule

( ) Num_of_max ( ) TS

TSend_TO(TS) ≥ ∑ATCyc × (5)

where

ATCyc means delay of all activities of a token cycle,

Num_of_max means number of maximal acyclic connections.

NOTE The Send_Timeout parameter in the Initiate service is coded as an unsigned integer value, each unit represents 10ms. Due to Timer errors and the round-up of integer, the next possible integer plus one has to be used as Send_Timeout.

It is assumed that one acyclic interaction is executed within a Token cycle at each DP-master. If more than one can be executed, the Send_TO may be divided by the number of acyclic interactions per token cycle.

Figure 19 shows an example for the establishment of an MS2 connection between a Master (Class 2) and a Slave. The connection monitoring starts immediately after this.

Master Slave

MSAC2M T

I m e r

F D L

BUS F

D L

T I m e r

MSRM2S/MSAC2S

/*Connection

Establishment*/ <<<RM_SAP used

Initiate.req-> SRD(Initiate-REQ-PDU) -

> S

S SRD.req -

>

(NA) <- S MSAC2S_Init(all C2-SM started)  RM_Init.req

<- Abort <- SAP_Activate(RM_SAP)

Initiate.req-> <- RPL_UPD (RM-REQ-PDU)

SRD(Initiate-REQ-PDU)-

> S

S SRD.req -

>

S <- (Data) -> Initiate-REQ-PDU

S <- RPL_UPD(RM-REQ-PDU)

<- RM-REQ-PDU S <- SAP_Activate(Server_SAP)

<<<Server_SAP used

Poll.req -> R U Initiate.ind ->

R SRD.req-> U R <-(no

Data) U

R U

R SRD.req-> U R <-(no

Data) U <- Initiate.res(+)

R F <- RPL_UPD(Initiate-RES-PDU) R SRD.req -

> F

R <- (Data) F

Initiate-RES-PDU<- R I -> Initiate send

<- Initiate.cnf S I

S I +++Connection open+++

S I

Figure 19 – Example for connection establishment on MS2

Phase a) Connection monitoring during pending MS2 service response or running Master-Idle:

The DP-master starts the R-Timer (receive timer) when the MS2 service request is transferred to the local DLL. The R-Timer monitors the remote MSAC2S and the local DLL.

The R-Timer is stopped if a response is received or restarted if a Slave-Idle request is received. The connection monitoring aborts the connection if a negative DL confirmation appears or the R-Timer expires.

The slave starts the U-Timer (user response timer) when a confirmed service indication is passed to the User. The U-Timer is stopped when the User provides the service response. If the U-Timer expires a Slave-Idle request is sent to retrigger the monitoring R-Timer of the Master.

The DP-slave starts the F-Timer (fetch response timer) when a service response or Slave-Idle request is passed to the local DLL. The F-Timer is stopped when the master has fetched the PDU. If the F-Timer expires the connection monitoring aborts the connection.

The connection monitoring of phase a) is shown in Figure 20.

/*Data-Transfer Idle at Master-Side*/

S I

S-Timer expired <- S I

SRD(Idle-REQ-PDU) -> R I R SRD.req -> I

R <-(no Data) F -> Idle-REQ-PDU

R F <- RPL_UPD(Idle-RES-PDU)

R F

R SRD.req -> F

R <-(Data) I -> Idle send

Idle-RESP-PDU <- S I

S I

S I

Figure 20 – Idle at master-side on MS2 Phase b) Connection monitoring without pending service response:

The bus master starts the S-Timer (send timer) if a response PDU or an Idle-PDU is received.

The S-Timer is stopped if a service request is provided by the User. If the S-Timer expires a Master-Idle request is sent to stop the monitoring I-Timer of the Slave.

During pending Master-Idle responses the connection monitoring is handled as described in Phase a).

The Slave starts the I-Timer (indication timer) when the reply update buffer has been fetched by the Master. The I-Timer is stopped if a Master-Idle request or a service indication is received. If the I-Timer expires the connection monitoring aborts the connection.

The Master monitors the transmission of the Abort-REQ-PDU. The Master starts the S-Timer when the Abort.req is transferred to the local DLL. The S-Timer is stopped when the Abort.req is sent. If the S-Timer expires the connection is closed and the User is informed with a MSAC2M_Closed.ind.

The Slave monitors the fetching of the Abort-REQ-PDU by the Master. The Slave starts the F- Timer when the Abort.req is transferred to the local DL. The F-Timer is stopped if the Master has fetched the Abort-REQ-PDU. If the F-Timer expires the Server_SAP is deactivated and the connection is closed.

The connection monitoring of phase b) is shown in Figure 21.

Master Slave

MSAC2M T

I m e r

F D L

BUS F

D L

T I m e r

MSRM2S/MSAC2S

/*Data-Transfer Idle at Slave-Side*/

Read.req-> S I

SRD(Read-REQ-PDU)-> R I

R SRD.req -> I

R <-(no Data) -> Read-REQ-PDU

Poll.req -> R U Read.ind ->

R SRD.req -> U R <-(no Data) U

R U -> U-Timer expired

R F <- RPL_UPD(Idle-REQ-PDU)

R F

R SRD.req -> F

R <-(Data) I -> Idle send

Idle-REQ-PDU<- R I

SRD(Idle-RES-PDU) -> R I R SRD.req -> I

R <-(no Data) U -> Idle-RES-PDU

R U

R SRD.req -> U <- Read.res

R <-(no Data) F <- RPL_UPD(Read-RES-PDU)

R F

R SRD.req -> F

R <-(Data) I -> Response send

Read-RES-PDU <- R I

<- Read.cnf S I

S I

Figure 21 – Idle at slave-side on MS2 7 AP-context state machine

There is no AP-Context State Machine defined for this Protocol.

Một phần của tài liệu Iec 61158 6 3 2014 (Trang 96 - 101)

Tải bản đầy đủ (PDF)

(744 trang)