Commands in IEC 870-5-101 and 104 Slave Protocol

<< Click to Display Table of Contents >>

 

Commands in IEC 870-5-101 and 104 Slave Protocol

Block Tag to handle select or execute commands in IEC 870-5-101 and 104 Slave protocols

Option

Description

Protocols

IEC 870-5-101 Slave Unbalanced, IEC 870-5-101 Slave Balanced, and IEC 870-5-104 Slave

Numerical Parameters

B1: Station number, B2: 4 (four, data reading of cache memory), B3: ASDU (from 45 to 51 and from 58 to 64, please check the next table), and B4: Object address

Parameters in String format

Not available

Block size

Four Elements

Writing

Sends to the Master an answer to a Select or Execute command

Reading

Receives Select or Execute commands sent by the Master

 

The meaning of possible values for the B3 (ASDUs) parameter are described on the next table.

Possible values for ASDUs

Value

Name

Description

45

C_SC_NA_1

Single command

46

C_DC_NA_1

Double command

47

C_RC_NA_1

Regulating step command

48

C_SE_NA_1

Set point command, normalized value

49

C_SE_NB_1

Set point command, scaled value

50

C_SE_NC_1

Set point command, short floating point number

51

C_BO_NA_1

Bitstream of 32 bits

58

C_SC_TA_1

Single command with 7-octet timestamp

59

C_DC_TA_1

Double command with 7-octet timestamp

60

C_RC_TA_1

Regulating step command with 7-octet timestamp

61

C_SE_TA_1

Set point command, normalized value with 7-octet timestamp

62

C_SE_TB_1

Set point command, scaled value with 7-octet timestamp

63

C_SE_TC_1

Set point command, short floating point number with 7-octet timestamp

64

C_BO_TA_1

Bitstream of 32 bits with 7-octet timestamp

 

When a Driver receives one of the commands described previously, this Block Tag receives a block with information about that command. On this Block Tag's OnRead event, the application must handle the received information, changing the Block Elements and writing that block back to the Driver. This way, the Driver can send an answer to the Master. The Elements of this Block Tag are the following:

Element 0: Command value, depending on the type of command

Element 1: Cause of Transmission, 6: Activate or 8: Deactivate

Element 2: 1: Select or 0: Execute

Element 3: Quality of Command, 0: Undefined, 1: Short pulse duration, 2: Long duration pulse, or 3: Persistent output

 

When an indication of an activation command is received, that is, Element 1 (one) equal to 6 (six), the application must respond immediately with a positive ACTCON (Activation Confirmation) command if the command can proceed, that is, Element 1 (one) equal to 7 (seven), or a negative ACTCON command if the command cannot proceed, that is, Element 1 (one) equal to 135.

If a positive ACTCON command is sent, the application must then check Element 2 (two, Select or Execute) and execute the proper action.

If an Execute command is requested, the application must execute the command and, after finished, send an ACTTERM (Activation Termination) command to indicate that the command was executed, that is, Element 1 (one) equal to 10.

The next example contains an OnRead event for this Block Tag.

' CMDIndication is a Block Tag with size 4
' This Tag's parameters are the following
' AdviseType     = 0 (AlwaysInAdvise)
' AllowRead      = True
' AllowWrite     = False
' B1             = <station address>
' B2             = 4
' B3             = 45 to 51, 58 to 64
' B4             = <command point address>
' EnableDeadband = False
' Size           = 4
 
Sub CMDIndication_OnRead()
  Dim CMD, SE, COT, QU
  CMD = Item(1).Value ' Command value
  COT = Item(2).Value ' COT
  SE  = Item(3).Value ' 1=Select, 0=Execute
  QU  = Item(4).Value ' Quality of command
 
  Select Case COT
    Case 6
      ' ACT(6) must be answered with ACTCON(7)
      WriteEx Array(CMD, 7, SE, QU), TimeStamp
      If SE = 0 Then
        ' Execute the command here, probably
        ' a writing to another Driver
        ' Sends an ACTTERM(10)
        WriteEx Array(CMD, 10, SE, QU), TimeStamp
      End If
    Case 8
      ' DEACT(8) must be answered with DEACTCON(9)
      WriteEx Array(CMD, 9, SE, QU), TimeStamp
  End Select
End Sub

Was this page useful?