Command control blocks, Implementing ladder to support special functions – ProSoft Technology PTQ-104C User Manual

Page 50

Advertising
background image

Module Configuration

49TPTQ-104C ♦ 48TQuantum Platform

12TUser Manual

47TIEC 60870-5-104 Client


Command Control Blocks

Block identification codes greater than 9900 are utilized to perform special
functions in the module. Each control block recognized and used by the module
is defined in the following topics.

Command Codes

Descriptions

9250

Status Block

9251

Client X Status Data

9901

User Constructed Command

9902

Command Control Block (Add command to Command List Queue)

9903

Event Messages from Master port

9950

Command List Error data

9970

Set PLC time using module's time

9971

Set module's time using PLC time

9999

Cold Boot Request from PLC (Block contains no data)

Note: The command code in the I/O area is also referred to as the block ID.

Implementing Ladder to Support Special Functions

In order to use Special Functions, some form of control logic must be
implemented. The following section uses structured text language to illustrate
how a typical function might be implemented.

Example: Rebooting the Module.

MyTrigger is a variable that triggers this logic

OutputControl variable array starts at register 4000001

The first instruction guarantees that the processor requests this block for only
one scan.

The second instructions sets the Block Number (9999 = ColdBoot) and then sets
the sequence number to 1.

IF MyTrigger>0 AND OutputControl1[1]> 0 THEN

OutputControl1[0]:= InputData[0];

OutputControl1[1]:=0;

MyTrigger :=0;

END_IF;

IF (MyTrigger=9999)OR (MyTrigger=9998) OR (MyTrigger=9250) THEN

OutputControl1[1] :=MyTrigger;

Temp:=WORD_TO_INT(OutputControl1[0]);

Temp:=Temp+1;

OutputControl1[0]:=INT_TO_WORD(Temp);

END_IF;

Page 50 of 136

ProSoft Technology, Inc.

March 4, 2013

Advertising