Sei sulla pagina 1di 342

ALSPA Controcad System Function Blocks Library

ACCESSIBILITY DATE

Free 2008-05-21 NAME SIGNATURE

CREATED BY CHECKED BY

DELIGNE D. DOR J.C.

APPROVED BY DOCUMENT TYPE ALSTOM DOCUMENT CODE REFERENCE LG

SABOT H.

REV

ORIGIN

Format Size

Status

SH/SH END

N of SH

PTP21A40014

en

EMB/PCS/CSD

A4

GFE

1/342

342

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden Template No.: CS-T-010 Rev.C (Procedure CS-P-009)

REVISION HISTORY
REV CREATED BY A B C MARDUEL MARDUEL MARDUEL CHECKED BY APPROVED BY BARTHOULOT BARTHOULOT BARTHOULOT CANTERO CANTERO CANTERO DATE 2000/06/27 2001/01/15
First version Intermediate version FIX : functionnal block deleted ABS : input types between INT, DOUBLE & REAL IF_MOVE_BOOL : redundancy management Translation FROM/TO BCD, FROM/TO GRAY News blocks TON/TOF/TP/IMP with word redundancy SQRT, INV, DIV, DIVMUL : security management MAX3 & MIN3 FROM/TO BCD, FROM/TO GRAY : more explanation Compatible with the versions 3.2.4 and 3.2.5 New FB : TON_W, TOF_W, TP_W, IMP_W, IMP_R, OSL_D, OSL_W, OSL_R, EVLOG, DIV_D, DIV_R : more security, MUL2_R, AVERAGE_R : more security, LOGCP FB modified : DIV , SQRT, DIVMUL, INV, INT_TO_BCD compatible with the version CCAD 331 Update of document New FB : APP_PROPS / New FB : CCL_HMIES / CCL_ICES / New FB : CCL_OMR / CUR_CTRL_FLTS / New FB : DUAL_CTRL_FLTS / EXT_CTRL_FLTS / FCL_OMR / RECV_FROM_DUAL / New FB : S_REF / SA_REF / B_REF / SC_REF / New FB : SEQ_END / SEQ_FG / SEQ_STEP New FB : ZONE_S, ZONE_SA, ZONE_SB, ZONE_SC1_32, ZONE_SC33_128 NEW FB : DATE TIME FB modified : SQRT, RCV_FROM_DUAL,SEND_TO_DUAL NEW FB : DATE TIME Correction FB : ZONE_SC12_32 & ZONE_SC33_128 Update FB : TOF & TON & TP FB modified : FB modified : EV_LOG (CR10330 / 12876), R_TRIG (CR11251), TWB (CR11225 SEQ_FG (CR16288) SEQ_END (CR16288) SEQ_STEP (CR16288) SEQ_FG (CR16872) TBW (CR16262)

DESCRIPTION

STAT. BPE BPO BPO

MARDUEL

BARTHOULOT TARDY DOR SABOT

CANTERO

2001/11/28

BPE

MARDUEL

CANTERO

2002/04/12

BPE

DELIGNE

SABOT

CANTERO

2003/02/17

BPE

G H I J K

DELIGNE DELIGNE DELIGNE DELIGNE DELIGNE

SABOT SABOT GATEAU GATEAU GATEAU

CANTERO CANTERO SABOT SABOT SABOT

2003/05/14 2003/06/20 2003/07/24 2004/03/03 2005/03/22

BPE BPE GFE GFE GFE GFE GFE

L M N

DELIGNE DELIGNE DELIGNE

REYDON HOLZ HOLZ

SABOT SABOT SABOT

2005/04/21 2005/06/14 2006/12/20

FB modified : FB modified :

FB modified : TOB, TBO (CR20654 - 22330) New FB : ISFLOAT / SUB / OSC_B / CYCPLS / CUR_CPU_FLTS / CUR_E920_FLTS / CUR_EPL_FLTS / CUR_F8000_FLTS / CUR_MODBUS_FLTS / CUR_PROFIBUS_FLTS / CUR_REDUNDANCY_FLTS / CUR_STI300_FLTS / DUAL_CPU_FLTS / DUAL_E920_FLTS / DUAL_EPL_FLTS / DUAL_F8000_FLTS / DUAL_MODBUS_FLTS / DUAL_PROFIBUS_FLTS / DUAL_REDUNDANCY_FLTS / DUAL_STI300_FLTS / PROFIBUS_CONTROL / CUR_EPL_PRES / CUR_MODBUS_PRES / DUAL_EPL_PRES / DUAL_MODBUS_PRES / APPLI_STATUS New form document FB modified : CUR_MODBUS_PRES (CR24939) DUAL_MODBUS_PRES (CR24939) IMP_D, IMP_W, IMP_R, IMPW_D CYCPLS, OSC_B FB modified : APPLI_STATUS / FCL_OMR / EVLOG / CUR_EPL_PRES / DUAL_EPL_PRES FB created : CUR_F8000_PRES / DUAL_F8000_PRES Update for version 4.5.1

GFE

DELIGNE

HOLZ

SABOT

2007/11/29

GFE

DELIGNE

PERRIER

SABOT

2008/04/22

GFE

DELIGNE

PERRIER

SABOT

2008/05/21

GFE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 2/342

SOMMAIRE / TABLE OF CONTENTS


Section 1 Section 2 Section 3 Section 4 Section 5 Section 6 Section 7 Section 8 Section 9 Section 10 Section 11 Section 12 Section 13 Section 14 Section 15 Section 16 Section 17 Section 18 Section 19 Section 20 Section 21 Section 22 Section 23 Section 24 Section 25 Section 26 Section 27 Section 28 Section 29 Section 30 Section 31 Section 32 Section 33 Section 34 Section 35 Section 36 Section 37 Section 38 Section 39 Section 40 PRESENTATION OF THE DOCUMENT.................................................................. 7 2OF3 : VOTING 2 OF THREE INPUTS.................................................................. 13 2OF4 : VOTING 2 OF 4 INPUTS........................................................................... 14 3OF4 : VOTING 3 OF 4 INPUTS........................................................................... 15 ABS : ABSOLUTE VALUE.................................................................................... 16 ACOS : PRINCIPAL ARC COSINE ....................................................................... 17 ACOSMC : ARC COSINE...................................................................................... 18 ACTION : ACTION CONTROL BLOCK................................................................. 19 ADD : ADDITION OF 2.N INPUTS......................................................................... 22 AND : BOOLEAN AND OF 2.N INPUTS ............................................................... 23 APP_PROPS ......................................................................................................... 24 APPLI_STATUS .................................................................................................... 26 ASIN : PRINCIPAL ARC SINE .............................................................................. 28 ASINMC : ARC SINE............................................................................................. 29 ATAN : PRINCIPAL ARC TANGENT .................................................................... 31 AVERAGE : AVERAGE......................................................................................... 32 AVERAGE_R : SECURED AVERAGE BETWEEN REALS .................................. 33 BCD_TO_INT : BCD VALUE TO DECIMAL VALUE ............................................. 35 CCL_HMIES .......................................................................................................... 37 CCL_ICES ............................................................................................................. 39 CCL_OMR ............................................................................................................. 41 CELL_TEMP.......................................................................................................... 44 CONVERGENCE_AND : CONVERGENCE OF SIMULTANEOUS SEQUENCES ........................................................................................................ 46 CONVERGENCE_OR : CONVERGENCE OF SEQUENCE SELECTION ............. 48 COS : COSINE ...................................................................................................... 50 COSMC : COSINE................................................................................................. 51 CTUD_I/D : UP-DOWN COUNTER........................................................................ 52 CUR_CPU_FLTS ................................................................................................... 56 CUR_CTRL_FLTS ................................................................................................. 58 CUR_E920_FLTS .................................................................................................. 61 CUR_EPL_FLTS ................................................................................................... 63 CUR_EPL_PRES................................................................................................... 65 CUR_F8000_FLTS ................................................................................................ 67 CUR_F8000_PRES ............................................................................................... 69 CUR_MODBUS_FLTS........................................................................................... 72 CUR_MODBUS_PRES.......................................................................................... 74 CUR_PROFIBUS_FLTS ........................................................................................ 77 CUR_REDUNDANCY_FLTS ................................................................................. 79 CUR_STI300_FLTS ............................................................................................... 81 CYCPLS : CYCLE PULSE..................................................................................... 84

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 3/342

Section 41 Section 42 Section 43 Section 44 Section 45 Section 46 Section 47 Section 48 Section 49 Section 50 Section 51 Section 52 Section 53 Section 54 Section 55 Section 56 Section 57 Section 58 Section 59 Section 60 Section 61 Section 62 Section 63 Section 64 Section 65 Section 66 Section 67 Section 68 Section 69 Section 70 Section 71 Section 72 Section 73 Section 74 Section 75 Section 76 Section 77 Section 78 Section 79 Section 80 Section 81 Section 82

DATE TIME............................................................................................................ 87 DEMUX_I/D/R : DEMULTIPLEXER ....................................................................... 89 DIV : DIVIDE......................................................................................................... 91 DIV_D : INTEGER DIVIDE..................................................................................... 92 DIV_R : REAL DIVIDE........................................................................................... 94 DIVERGENCE_AND : DIVERGENCE OF SIMULTANEOUS SEQUENCES ......... 96 DIVERGENCE_OR : DIVERGENCE OF SEQUENCE SELECTION...................... 98 DIVMUL : DIVISION AND MULTIPLICATION ..................................................... 100 DUAL_CPU_FLTS............................................................................................... 102 DUAL_CTRL_FLTS............................................................................................. 104 DUAL_E920_FLTS .............................................................................................. 107 DUAL_EPL_FLTS ............................................................................................... 109 DUAL_EPL_PRES .............................................................................................. 111 DUAL_F8000_FLTS ............................................................................................ 113 DUAL_F8000_PRES ........................................................................................... 115 DUAL_MODBUS_FLTS ...................................................................................... 118 DUAL_MODBUS_PRES...................................................................................... 120 DUAL_PROFIBUS_FLTS .................................................................................... 123 DUAL_REDUNDANCY_FLTS ............................................................................. 125 DUAL_STI300_FLTS........................................................................................... 127 END OF SEQUENCE SEQ_END......................................................................... 130 EQ : EQUALITY................................................................................................... 132 EVLOG : EVENT LOG......................................................................................... 133 EXP : EXPONENTIAL ......................................................................................... 142 EXP : EXPONENTIAL ......................................................................................... 143 EXPT : EXPONENTIATION ................................................................................. 144 EXT : EXTENSION .............................................................................................. 145 EXT_CTRL_FLTS................................................................................................ 147 F_TRIG : FALLING EDGE DETECTOR .............................................................. 151 FCL_OMR............................................................................................................ 153 FGEN : FUNCTION GENERATOR ...................................................................... 155 FUNCTION GROUP SEQ_FG ............................................................................. 157 GE : GREATER OR EQUAL................................................................................ 166 GRAY_TO_INT : GRAY DECODING................................................................... 167 GT : GREATER ................................................................................................... 169 IF_MOVE_BOOL : CONDITIONNED MOVE_BOOL BLOCK.............................. 170 IMP_D : PULSE (PARAMETER TYPE DOUBLE INTEGER UNIT 0,01 SECOND) ............................................................................................................ 172 IMP_R : PULSE (PARAMETER TYPE REAL UNIT 1 SECOND) ..................... 177 IMP_W : PULSE (PARAMETER TYPE WORD UNIT 0,01 SECOND) .............. 181 IMPW_D : PULSE (PARAMETER TYPE DOUBLE INTEGER UNIT 0,01 SECOND) ............................................................................................................ 186 INT_TO_BCD : BCD CODING............................................................................. 191 INT_TO_GRAY : GRAY CONFIG ........................................................................ 193

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 4/342

Section 83 Section 84 Section 85 Section 86 Section 87 Section 88 Section 89 Section 90 Section 91 Section 92 Section 93 Section 94 Section 95 Section 96 Section 97 Section 98 Section 99 Section 100 Section 101 Section 102 Section 103 Section 104 Section 105 Section 106 Section 107 Section 108 Section 109 Section 110 Section 111 Section 112 Section 113 Section 114 Section 115 Section 116 Section 117 Section 118 Section 119 Section 120 Section 121 Section 122 Section 123 Section 124 Section 125 Section 126

INV : INVERSE .................................................................................................... 195 ISFLOAT : TEST IF VARIABLE HAS A FLOAT FORMAT.................................. 197 LE : LESS OR EQUAL ........................................................................................ 199 LIMIT : LIMITER .................................................................................................. 200 LN : NEPERIAN LOGARITHM ............................................................................ 202 LOG : LOGARITHM BASE 10............................................................................. 203 LOGCP : LOGICAL THRESHOLD ...................................................................... 204 LT : LESS THAN ................................................................................................. 208 MAX : MAX OF 2.N INPUTS................................................................................ 209 MAX3 : MAX OF 2 OR 3 INPUTS ........................................................................ 211 MIN : MIN OF 2.N INPUTS .................................................................................. 213 MIN3 .................................................................................................................... 215 MOD : MODULO.................................................................................................. 217 MOVE : MOVE..................................................................................................... 218 MOVE_B : MOVE(BOOLEAN) ............................................................................ 219 MUL : MULTIPLICATION OF 2.N INPUTS .......................................................... 220 MUL2_R : MULTIPLICATION OF 2 REAL INPUTS ............................................ 221 MUX : MULTIPLEXER......................................................................................... 223 NE : INEQUALITY ............................................................................................... 225 NOT : LOGICAL NEGATION............................................................................... 226 OPP : OPPOSITION ............................................................................................ 227 OR : BOOLEAN OR OF 2.N INPUTS ................................................................. 228 OSC_B : OSCILLATOR ...................................................................................... 229 OSL_D : ONE SHOT LIMITED FOR DOUBLE, 32 BITS REDUNDANCY ........... 232 OSL_R : ONE SHOT LIMITED FOR REAL, 32 BITS REDUNDANCY ................ 235 OSL_W : ONE SHOT LIMITED FOR WORD, 16 BITS REDUNDANCY .............. 238 PROFIBUS_CONTROL ....................................................................................... 241 R_TRIG : RISING EDGE DETECTOR ................................................................. 245 RECV_FROM_DUAL........................................................................................... 247 ROL : LEFT-ROTATED BY N BITS CIRCULAR ................................................. 249 ROR : RIGHT-ROTATED BY N BITS CIRCULAR............................................... 250 RS BISTABLE FUNCTION BLOC (RESET DOMINANT) .................................... 251 S_REF ................................................................................................................. 253 SA_REF............................................................................................................... 256 SB_REF............................................................................................................... 259 SC_REF............................................................................................................... 261 SEL : BINARY SELECTION ................................................................................ 263 SEL_B : BINARY SELECTION BETWEEN BOOLEANS .................................... 265 SEND_TO_DUAL ................................................................................................ 267 SHL : LEFT-SHIFTED BY N BITS,ZERO FILLED ON RIGHT............................. 269 SHR : RIGHT-SHIFTED BY N BITS,ZERO FILLED ON LEFT ............................ 270 SIN : SINE ........................................................................................................... 271 SINMC : SINE ...................................................................................................... 272 SM : SUM ............................................................................................................ 274

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 5/342

Section 127 Section 128 Section 129 Section 130 Section 131 Section 132 Section 133 Section 134 Section 135 Section 136 Section 137 Section 138 Section 139 Section 140 Section 141 Section 142 Section 143 Section 144 Section 145 Section 146 Section 147 Section 148 Section 149 Section 150 Section 151 Section 152 Section 153 Section 154 Section 155 Section 156 Section 157 Section 158 Section 159

SQRT : SQUARE ROOT ..................................................................................... 276 SR : BISTABLE FUNCTION BLOC (SET DOMINANT)....................................... 278 STEP OF SEQUENCE (SEQ_STEP) ................................................................... 280 STEP : PAIR ( STEP, TRANSITION ) OF THE SFC MODEL .............................. 284 SUB : SUBSTRACTION ...................................................................................... 286 TAN : TANGENT ................................................................................................. 288 TBO : TRANSFER BIT/BYTE .............................................................................. 289 TBW : TRANSFER BIT/WORD ........................................................................... 291 TOB : TRANSFER BYTE/BIT.............................................................................. 293 TOF_D : OFF-DELAY FOR DOUBLE, WITH REDUNDANCY 32 BITS............... 295 TOF_R : OFF-DELAY FOR REAL....................................................................... 297 TOF_W: OFF-DELAY for WORD ........................................................................ 299 TOFI_D : OFF-DELAY FOR DOUBLE, 16 BITS REDUNDANT .......................... 301 TOFW_D : OFF-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS ........... 303 TON_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 32 BITS ................ 305 TON_R : ON-DELAY FOR REAL ........................................................................ 307 TON_W : ON-DELAY FOR WORD, WITH REDUNDANCY 16 BITS ................... 309 TONI_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS ............... 311 TONW_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS............. 313 TP_D : PULSE TIMING FOR DOUBLE, WITH 34 BITS REDUNDANCY ............ 315 TP_R : PULSE TIMING FOR REAL .................................................................... 317 TP_W : PULSE TIMING FOR WORD, WITH 18 BITS REDUNDANCY ............... 319 TPI_D : PULSE TIMING FOR DOUBLE, WITH 18 BITS REDUNDANCY ........... 321 TPW_D : PULSE TIMING FOR DOUBLE, WITH 18 BITS REDUNDANCY ......... 323 TRANSP_VAL : TRANSPORT VALIDATOR....................................................... 325 TRIGGER_SPT : TRIGGER OF SET POINT ....................................................... 327 TWB : TRANSFER WORD/BIT ........................................................................... 329 XOR : EXCLUSIVE OR........................................................................................ 331 ZONE_S : %S BIT VALUE ................................................................................. 333 ZONE_SA : %SA BIT VALUE ............................................................................. 335 ZONE_SB : %SB BIT VALUE ............................................................................. 337 ZONE_SC1_32 : %SC1_32 BIT VALUE.............................................................. 339 ZONE_SC33_128 : %SC33_128 BIT VALUE...................................................... 341

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 6/342


Section 1

Section 1 PRESENTATION OF THE DOCUMENT

PRESENTATION OF THE DOCUMENT


This document describes the use of the function blocks belonging to the system library. Each function block is described in a technical sheet enclosed in the following document. The technical sheets are presented in alphabetical order.

1.1

Presentation Of The Technical Sheets The technical sheet includes the following items : The name of the function block (on the left top of the sheet), The graphical Representation of the function block, The FB function description The table of arguments characteristics, The function block use description that includes ; an optional and specific argument description, some notes on particular use. the fast description of the state variables used inside the block The function block specification of the variables used into the FB. the technical description of the variables used in the FB, the LEA code generated by CONTROCAD in place of the graphical FBs, the basic function used by the FB.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 7/342


1.2 Function Block Graphical Representaton

Section 1 PRESENTATION OF THE DOCUMENT

1.3

Function Block Use Description A function block Representation is given hereafter ; 12Name of the function block, Code name(10 characters) ; name of the argument which is used in the FB code, Display name (10 characters): name of the argument displayed in CONTROCAD, ARROW : Full arrow : represent an input/output that must be wired to another FB, or connected to a variable or an immediate value (mandatory connection='Y'), Empty arrow : represent an optional input/output.

3-

4-

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 8/342


1.4 Table Of Arguments Characteristics
Name Description Type Neg

Section 1 PRESENTATION OF THE DOCUMENT

Range

Mand. Connection

Def. Value

Mand Data

Advised parameters value

First scan value

Inputs INPUT1 ( IN1) IN2 IN3 IN4 Outputs RE Parameters Input Input Input Input B B B B Y Y Y Y Y Operator result Boolean Y Y N Y Y 1 N N N N Y -

There are two names for an argument. The key name which is used into the code and the display name which is displayed. Often, the names are the same, but sometimes they could be differents. In this case, the display name is between parents. The differents columns contain: NAME : name of the argument input output parameters : it is an input often connected to a tunning variable which can have 2 levels : Configurator : the parameters cant be changed online (eg : mechanical characteristics). User : the parameters can be changed online. DESCRIPTION : description of the argument,

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 9/342

Section 1 PRESENTATION OF THE DOCUMENT

TYPE : a variable can have one of the following types : (B)OOLEAN [1 bit, 0 or 1] (W)ORD [16 bits integer, from 0 to 65535] (I)NTEGER [16 bits integer, from 32768 to 32767] (L)ONG [32 bits integer, from 0 to 4294967295] (D)OUBLE [32 bits integer, from 2147483648 to 2147483647] (R)EAL [32 bits, +/- 3,438] (TIME)DURATION [32 bits] (SINT) Short INT [8 bits] (USINT) Unsigned Short INT [8 bits] ANY_INT WORD, INTEGER, LONG, DOUBLE, TIME DURATION, SINT, USINT ANY_NUM WORD, INTEGER, LONG, DOUBLE, REAL, TIME DURATION, SINT,
USINT

ANY_NUM : mean that all the arguments in the FB must be in the same type. For arguments representing an array of value, the lenght must be indicated. eg : an array of 8 boolean -> BOOLEAN[8]. RANGE For each argument, the limit of the numerical value must be indicated according to its type. Sometimes it is important to give its physical value. NEG It is the possibilty of negation for a boolean input (/) and of opposition for a numerical input (-). The choce between the negation and the opposition is according to the genius of the component, which can be logical or numerical. MANDATORY CONNECTION When set to "Y" the argument must be wired to another FB, or connected to a variable or an immediate value. DEFAULT VALUE Its the default value of the signal on an argument if there is no signal associated with that argument. Another possibility to define a default signal is to declare a DEFAULT VARIABLE by using the pre-processing directives of the LEA language. MANDATORY DATA Obligation to affect a value or a variable to the argument. ADVISED PARAMETER VALUE Value used in normal condition during the execution of the FB.This value is an attribute of the connected varible. FIRST SCAN VALUE Value of the argument during the first execution cycle. It allows the function block to be internally initialized.
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 10/342

Section 1 PRESENTATION OF THE DOCUMENT

1.5

General Type Of Argument There is a rule to name the arguments according to their goal inside the block : HY HI LO HT LT DL DI DF TY SL PT IN IC IV IS ST RE hysteresis high limit low limit high threshold low threshold line validation Disable input default validation type of process slope Period of Time input init command init value init status Status Result RUN BCL BOL BSY ME SP FRZ OLC TRK ENO GN AT TH BD LL HL run command busy for closed loop busy for open loop busy measurement set point freeze open loop compaign tracking error output gain attenuation threshold Band Low limit indicator High limit indicator

1.5.1

Function or function block ? The international standard IEC 1131-3 defines the functions and the function blocks. A function is defined as something which, when executed, yields exactly one data element and whose invocation can be used as an operand in a expression. Functions shall contain no internal state information: the invocation of a function with the same inputs shall always yield the same outputs. Since the name of the function is often used for the assignment of its output value, no formal output name shall be shown at the right side of the block. A function block is defined as something which, when executed, yields one or more values. It can have state variables, and the invocation of the same FB with the same inputs nedd not always yield the same output values. The IEC standard defines the basic functions and functions blocks. CONTROCAD provides a main part of all these basic blocks, but sometimes a block which is a function inside the standard IEC is a function block inside CONTROCAD. We indicate the nature of the block.

1.5.2

State variables & redundancy If the block is a function block we indicate the variables used inside the block, which can be state variables or work variables. A state variable is a redundant variable: the users don't have to matter with the redundancy of all their other variables. Their program will stand the redundancy.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 11/342


Section 2

2OF3 : VOTING 2 OF THREE INPUTS

2.1

Representation

2.2

Function The output RE of the function block is set to 1 if at least 2 inputs are set to 1.The output DFA of the function block is set to 1 if all inputs are not identical.

2.3

Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand Data Advised parameters value First scan value

Inputs IN1 IN2 IN3 Outputs RE DFA Parameters Result Antivalence B B Y(/) Y(/) Y N Y Y Input 1 Input 2 Input 3 B B B Y(/) Y(/) Y(/) Y Y Y N N N -

2.4

Use No state variables. It is a function block in the meaning of IEC.

2.5

Specifications Function block code BOO IN1.IN2+IN2.IN3+IN3.IN1=RE #IF defined ($DFA) BOO /(IN1.IN2.IN3 + /IN1./IN2./IN3)= DFA #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 13/342


Section 3

2OF4 : VOTING 2 OF 4 INPUTS

3.1

Representation

3.2

Function The output RE of the function block is set to 1 if at least 2 inputs are set to 1. The output DFA of the function block is set to 1 if all inputs are not identical.

3.3

Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 IN3 IN4 Outputs RE DFA Parameters Input Input Input Input B B B B Y(/) Y(/) Y(/) Y(/) Y Y Y Y N N N N -

Result Antivalence

B B

Y(/) Y(/)

Y N

Y Y

3.4

Use The block is a function block in the IEC meaning, without state variables.

3.5

Specifications

3.5.1

Function block code BOO IN1.IN2+IN1.IN3+IN1.IN4+IN2.IN3+IN2.IN4+IN3.IN4=RE #IF defined ($DFA) BOO /(IN1.IN2.IN3.IN4 + /IN1./IN2./IN3./IN4) = DFA #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 14/342


Section 4

3OF4 : VOTING 3 OF 4 INPUTS

4.1

Representation

4.2

Function The output RE of the function block is set to 1 if at least 3 inputs are set to 1. The output DFA of the function block is set to 1 if all inputs are not identical.

4.3

Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand Data Advised parameters value First scan value

Inputs IN1 IN2 IN3 IN4 Outputs RE DFA Parameters Input 1 Input 2 Input 3 Input 4 B B B B Y(/) Y(/) Y(/) Y(/) Y Y Y Y N N N N -

Result Antivalence

B B

Y(/) Y(/)

Y N

Y Y

4.4

Use No state variable. Function block in the IEC meaning

4.5

Specifications

4.5.1

Internal function block code BOO IN2.IN3.IN4+IN1.IN3.IN4+IN1.IN2.IN4+ IN1.IN2.IN3=RE #IF defined ($DFA) BOO /(IN1.IN2.IN3.IN4 + /IN1./IN2./IN3./IN4) = DFA #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 15/342


Section 5

ABS : ABSOLUTE VALUE

5.1

Representation

5.2

Function The ABS function block sends in its output RE the absolute value of IN.

5.3

Arguments Characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Input INT, DOUBLE, REAL, SINT, USINT Y(-) Y N -

Outputs RE Parameters Result output ANY_NUM Y(-) Y N -

5.4

Use It is a function in the meaning of IEC.

5.5

Specifications

5.5.1

Generated expression ABS (IN)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 16/342


Section 6

ACOS : PRINCIPAL ARC COSINE

6.1

Representation

6.2

Function The function block returns in its output the arccosine of IN in the range 0 to radians.

6.3

Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator result REAL Y(-) [0 ;] radians Y N Input REAL Y(-) [-1 ;1] Y N -

6.4

Use If the input IN is less than 1 or greater than 1, ACOS returns an indefinite value. This function block is a function in the meaning of IEC

6.5

Specifications

6.5.1

Generated expression ACOS (IN)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 17/342


Section 7

ACOSMC : ARC COSINE

7.1

Representation

7.2

Function The ACOSMC function block returns in its output the arccosine of IN in the range 0 to *10000 radians. Input scale range : -1 is equivalent to 10000 and +1 is equivalent to +10000. Output scale range : 0 is equivalent to 0 and is equivalent to *10000.

7.3

Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Operator result I Y(-) [0 ; *10000] radians Y Y Input I Y(-) [-10000 ; +10000] Y N -

Parameters

7.4

Use If the input IN is less than 10000 or greater than 10000, ACOSMC returns an indefinite value in its output RE. The block is a function block in the meaning of IEC, without state variables.

7.5

Specifications

7.5.1

Function block code CAL 10000 * ACOS(<IN>/10000.0) = <RE>

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 18/342


Section 8

ACTION : ACTION CONTROL BLOCK

8.1

Representation

8.2

Function This block is relevant to a sequential function block diagram. Actions shall be associated with steps via graphical action blocks. But for a good visibility, control of actions shall be expressed by actions qualifiers. The best way to associate an action with diffrents steps is to use the action control block. QUALIFIER N R S L D P SD DS SL EXPLANATION Non stored Overriding reset Set (stored) Time limited Time delayed Pulse Stored and time delayed Delayed and stored Stored and time limited

An action control block is a graphical element for the combination of a boolean variable with one of the actions qualifiers, to produce an enabling condition, according to the rules given below, for an associated action.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 19/342


Associated with each action shall be the functional equivalent of an instance of the ACTION_CONTROL function block. If the action is declared as a boolean variable, the output of the block ACTION_CONTROL shall be the state of this boolean variable. If the action is declared as a collection of boolean transferts, then this collection shall be executed continually while the output of the ACTION_CONTROL block stands at TRUE. The IF_MOVE_BOOL block is the block of a transfert according to a condition. It is not required that the ACTION_CONTROL block itself be implemented, but only that the control of actions be equivalents to the precedent rules. 8.3 Arguments Characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs N R S L D P SD DS SL Outputs Q Parameters T Output Boolean N Y Y Non Stored Overriding Reset Set (Stored) Time Limited Time Delayed Pulse Stored and Time Delayed Delayed ans Stored Stored ans Time Limited Boolean Boolean Boolean Boolean Boolean Boolean Boolean Boolean Boolean N N N N N N N N N N N N N N N N N N FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE N N N N N N N N N -

Time, in 0.01 s

Duration

8.4

Use The best way to use it is to have only an instance of block by action. For example, il two steps are associated with the same action which is the set not stored of a boolean variable, a OR gate must be used for the logical union between the state variables of each step and the rsult of the OR gate must be connected with the entry N of the block. The scurity is to have only one time the set of the value of an action. There is a lot of indirect state variables, which are the state variable of the rizing trigger, of the 4 blocks RS and of the 5 blocks TON_D.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 20/342


8.5 Specifications

8.5.1

Internal Variables The output of a block SR associated with S entry: VS, boolean The outputs of a block TON_D associated with L entry : VL, boolean and VTL, duration The outputs of a block TON_D associated with D entry : VD, boolean and VTD, duration The output of the block R_TRIG associated with P entry: VP, boolean The output of the block RS associated with SD entry : VSD1, boolean The outputs of the block TON_D associated with SD entry : VSD2, boolean, and VTSD2, duration The ouputs of the block TON_D associated with DS entry : VDS1, boolean and VTDS1, duration The outputs of the block RS associated with DS entry : VDS2, boolean The output of the block RS associated with SL entry : VSL1, boolean The outputs of the block TON_D associated with SL entry : VSL2, boolean and VTSL2, duration

8.5.2

Internal code
#FB( RS, S, R, 0, VS, ) #FB( TON_D, L, T, VL, VTL ) #FB( TON_D, D, T, VD, VTD ) #FB( R_TRIG, P, VP ) #FB( RS, SD, R, 0, VSD1, ) #FB( TON_D, VSD1, T, VSD2, VTSD2 ) #FB( TON_D, DS, T, VDS1, VTDS1 ) #FB( RS, VDS1, R, 0, VDS2, ) #FB( RS, SL, R, 0, VSL1, ) #FB( TON_D, VSL1, T, VSL2, VTSL2 ) BOO /R.(N + VS + L./VL + VD + VP + VSD2 + VDS2 + VSL1./VSL2) = Q

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 21/342


Section 9

ADD : ADDITION OF 2.N INPUTS

9.1

Representation

9.2

Function The functionality of the ADD block is as the following : RE = IN1+IN2+.+Inn

9.3

Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs ININn Outputs RE Parameters Operator result ANY_NUM Y(-) Y N Inputs to be added ANY_NUM Y(-) Y N -

9.4

Use No indication of overflow. It is a function, in the meaning of IEC

9.5

Specifications

9.5.1

generated expression I1 + I2 +IN

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 22/342


Section 10

AND : BOOLEAN AND OF 2.N INPUTS

10.1 Representation

10.2 Function The function block AND represent Boolean logic AND gates for 2.N inputs. The functionality of the AND block is to do : with boolean inputs, the boolean AND with word or integer inputs, the boolean AND bit by bit 10.3 Arguments Characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1..Inn Outputs RE Parameters Result output B/W/I Y(/) Y N Inputs B/W/I Y(/) Y N -

10.4 Use It is a function in the meaning of IEC. 10.5 Specifications

10.5.1

Expression generated IN1.IN2 INn

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 23/342


Section 11

APP_PROPS

11.1 Representation

11.2 Function The APP_PROPS function block shows the application properties such as the initialization phase, the cycle time and the presence of the master controller. It can be used in any controller (cell or field controller). 11.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Output RE_INIT RE_CYC RE_MASTER Indicator of Initialisation Cycle Time Master Indicator B L B Y N Y N N N Y Y Y

11.4 Use Not used for a CE2000 11.4.1 Description of terminals RE_INIT : It is set to 1 at the first cycle of the controller, then set to 0 for the other cycles. It shows the cycle time in milliseconds. It depends on the application sweep time and the period of POU owner of diagram where is put this function block. Application Sweep Time POUs Period = RE_CYC It is set to 1 when the controller is present in master running mode. If the controller is alone, it is always set to 1.

RE_CYC :

RE_MASTER :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 24/342


11.5 Specifications

11.5.1

Internal variables None

11.5.2

Internal code #IF defined ($RE_INIT) BOO INIT = RE_INIT #ENDIF #IF defined ($RE_CYC) CAL CYC = RE_CYC #ENDIF #IF defined ($RE_MASTER) BOO MASTER = RE_MASTER #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 25/342


Section 12

APPLI_STATUS

12.1 Representation

12.2 Function To prevent the maintenance of a Safety equipment, the APPLI_STATUS function block allowed to inform applicative bits which go back to the CENTRALOG through MFC3000's STAT. These applicative bits correspond to diagnostic bits of the safety equipment. It has to obligatory entries : NON_BLOCK HIGH_TEMP 12.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs NON_BLOCK Non blocking fault Temperature high HIGH_TEMP limit reached B B N N Y Y Y Y -

12.4 Use Used for a MFC3000 12.5 Description Of Terminals NON_BLOCK : Set to 1 if non blocking fault. It makes it possible to ensure the maintenance of the safety equipment before a second fault does not cause the release of alarm Set to 1 to prevent the going beyond of the temperature

HIGH_TEMP :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 26/342


12.6 Specifications

12.6.1

Internal variables BIT_INDEX BIT_VALUE BYTE_INDEX BYTE_VALUE2 usint usint usint Boolean

12.6.2

Internal code
#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF (* Common bit index in driver tables CAL CCAD_SAFETY_EQPT_NUM MOD 8 = BIT_INDEX (* B0: Configured safety equipment TBW 1 = CCAD_APPLI_STATUS(0) (* B1: Safety equipment present on channel 1 CAL 1 + CCAD_SAFETY_NET_NUM * 32 + 0 + CCAD_SAFETY_EQPT_NUM / 8 = BYTE_INDEX SHR CCAD_SENT_TO_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = BIT_VALUE2 BOO / BIT_VALUE2 = BIT_VALUE2 TBW ,BIT_VALUE2 = CCAD_APPLI_STATUS(0) (* B2: Safety equipment present on channel 2 CAL 1 + CCAD_SAFETY_NET_NUM * 32 + 8 + CCAD_SAFETY_EQPT_NUM / 8 = BYTE_INDEX SHR CCAD_SENT_TO_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = BIT_VALUE2 BOO / BIT_VALUE2 = BIT_VALUE2 TBW ,,BIT_VALUE2 = CCAD_APPLI_STATUS(0) (* B3: Non blocking fault TBW ,,,NON_BLOCK = CCAD_APPLI_STATUS(0) (* B4: Temperature high limit reached TBW ,,,,HIGH_TEMP = CCAD_APPLI_STATUS(0) (* B5: Safety equipment com. OK on channel 1 (* B7: Safety equipment com. OK on channel 1 on dual PCX CAL 1 + CCAD_SAFETY_NET_NUM * 32 + 16 + CCAD_SAFETY_EQPT_NUM / 8 = BYTE_INDEX SHR CCAD_SENT_TO_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = BIT_VALUE2 BOO / BIT_VALUE2 = BIT_VALUE2 TBW ,,,,,BIT_VALUE2 = CCAD_APPLI_STATUS(0) SHR CCAD_RECVD_FROM_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = BIT_VALUE2 BOO / BIT_VALUE2 = BIT_VALUE2 TBW ,,,,,,,BIT_VALUE2 = CCAD_APPLI_STATUS(0) (* B6: Safety equipment com. OK on channel 2 (* B8: Safety equipment com. OK on channel 2 on dual PCX CAL 1 + CCAD_SAFETY_NET_NUM * 32 + 24 + CCAD_SAFETY_EQPT_NUM / 8 = BYTE_INDEX SHR CCAD_SENT_TO_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = BIT_VALUE2 BOO / BIT_VALUE2 = BIT_VALUE2 TBW ,,,,,,BIT_VALUE2 = CCAD_APPLI_STATUS(0) SHR CCAD_RECVD_FROM_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = BIT_VALUE2 BOO / BIT_VALUE2 = BIT_VALUE2 TBW BIT_VALUE2 = CCAD_APPLI_STATUS(1)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 27/342


Section 13

ASIN : PRINCIPAL ARC SINE

13.1 Representation

13.2 Function The ASIN function block returns in its output RE the arcsine of IN in the range /2 to /2 radians. 13.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator result REAL Y(-) [-/2 ; /2] radians Y N Input REAL Y(-) [-1 ;1] Y N -

13.4 Use If the input IN is less than 1 or greater than 1, ASIN returns an indefinite value in its output RE. Recommendation : To avoid overflow problems, a solution is to connect a limiter to the output of the ASIN block. It is a function in the meaning of IEC. 13.5 Specifications

13.5.1

Generated expression ASIN(IN)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 28/342


Section 14

ASINMC : ARC SINE

14.1 Representation

14.2 Function The ASIN function block returns in its output RE the arcsine of IN in the range /2*10000 to /2*10000 radians. Input scale range : +10000. -1 is equivalent to 10000 and +1 is equivalent to

Output scale range :-/2 is equivalent to -/2*10000 and /2 is equivalent to /2*10000. 14.3 Arguments Characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Operator result I Y(-) [-/2*10000; /2*10000] radians Y Y Input I Y(-) [-10000 ;10000] Y N -

Parameters

14.4 Use If the input IN is less than 10000 or greater than 10000, ASIN returns an indefinite value in its output RE. Recommendation : To avoid overflow problems, a solution is to connect a limiter to the output of the ASIN function block. this block is a function block in the meaning of IEC, without state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 29/342


14.5 Specifications

14.5.1

Function block code CAL 10000 * ASIN(<IN>/10000.0) = <RE>

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 30/342


Section 15

ATAN : PRINCIPAL ARC TANGENT

15.1 Representation

15.2 Function The ATAN function block calculates and returns in its output RE the arctangent of IN. If IN is 0, ATAN returns 0. ATAN returns a value in the range /2 to /2 radians. 15.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Operator rsult REAL Y(-) ]- /2 ;+/2 [ radians Y N Input REAL Y(-) ]- ;+[ Y N -

Parameters

15.4 Use This function block is a function in the meaning of IEC 15.5 Specifications

15.5.1

Generated expression ATAN(IN)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 31/342


Section 16

AVERAGE : AVERAGE

16.1 Representation

16.2 Function The function block AVERAGE gives the average of the inputs: RE = (IN1++INn)/n 16.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1..IN2 IN3..IN8 Outputs RE Parameters Result output ANY_NUM Y(-) Y Y Inputs Inputs ANY_NUM ANY_NUM Y(-) Y(-) Y N N N Y -

16.4 Use No indication of overflow Function block in the meaning of IEC, without state variables 16.5 Specifications

16.5.1

Internal code of the block #EVAL CAL (IN1 + IN2 + IN3 + IN4 + IN5 + IN6 + IN7 + IN8) / @{[defined($IN1) + defined($IN2) + defined($IN3) + defined($IN4) + defined($IN5) + defined($IN6) + defined($IN7) + defined($IN8)]} = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 32/342


Section 17

AVERAGE_R : SECURED AVERAGE BETWEEN REALS

17.1 Representation

17.2 Function The function block AVERAGE_R gives the average of the inputs: RE = (IN1++INn)/n 17.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1..IN8 Outputs RE Parameters Result output REAL Y(-) Y Y Inputs REAL Y(-) N N -

17.4 Use Not used for a CE2000 Function block in the meaning of IEC, without state variables

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 33/342


17.5 Specifications

17.5.1

State variables and internal variables No state variables. One internal real variable.

17.5.2

Internal code of the block (* BEGIN AVERAGE_R #IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF (* #EVAL CAL @{[defined($IN1) + defined($IN2) + defined($IN3) + defined($IN4) + defined($IN5) + defined($IN6) + defined($IN7) + defined($IN8) ]} = NB CAL 0 = RE #IF defined($IN1) CAL RE + IN1 / NB = RE #ENDIF #IF defined($IN2) CAL RE + IN2 / NB = RE #ENDIF #IF defined($IN3) CAL RE + IN3 / NB = RE #ENDIF #IF defined($IN4) CAL RE + IN4 / NB = RE #ENDIF #IF defined($IN5) CAL RE + IN5 / NB = RE #ENDIF #IF defined($IN6) CAL RE + IN6 / NB = RE #ENDIF #IF defined($IN7) CAL RE + IN7 / NB = RE #ENDIF #IF defined($IN8) CAL RE + IN8 / NB = RE #ENDIF (* (* END AVERAGE_R

17.5.3

Basic function No use of BF.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 34/342


Section 18

BCD_TO_INT : BCD VALUE TO DECIMAL VALUE

18.1 Representation

18.2 Function The block converts a BCD value into a decimal value, which can be positive or negative according to the value of the input. BCD value = 0x0000 0000 0010 0011 => decimal value = 23 BCD value = 0x1000 0000 0010 0011 => decimal value = -23 18.3 Argument Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Result INTEGE R N [-7999, 7999] Y Y Input WORD N Y N -

18.4 Use If the BCD value can't be converted, the output is set to the specific value 0 and the status is set to FALSE, elsewhere the status is set to TRUE. The block is without state variables. 18.5 Specifications

18.5.1

Internals variables V1, integer V2, word

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 35/342


18.5.2 Function block code IF { IN = 0 } THEN CAL 0 = RE #IF defined($ST) BOO 1 = ST #ENDIF ELSE LOG IN . 16#7FFF = V2 TRA V2 DTB V1 IF { V1 = 0 } THEN #IF defined($ST) BOO 0 = ST #ENDIF ELSE #IF defined($ST) BOO 1 = ST #ENDIF ENDIF IF { IN >= 16#8000 } THEN CAL -V1 = RE ELSE CAL V1 = RE ENDIF ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 36/342


Section 19

CCL_HMIES

19.1 Representation

19.2 Function The CCL_HMIES function block gives informations on exchanges between the cell controller and supervisors. It can only be used in a cell controller. 19.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Outputs E_TM R_TC I_TC R_TVC I_TVC Emission Indicator Reception Indicator Boolean Command Row Reception Indicator Analog Command Row B B W B W N N N N N N N N N N Y Y Y Y Y

19.4 Use Used for a C8035 only head cell

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 37/342


19.4.1 Description of terminals E_TM : It shows if there is at least one sent analogic signal (ccASig) in the current cycle. It shows if there is one received boolean command (OpenLoop_ccCmd_x) in the current cycle. It is set by the Communication Services at each reception of boolean command (OpenLoop_ccCmd_x) and it shows the row of the last received boolean command. It is set by Communication Services at each reception of analogic setpoint (ccSPt_x). It is set by Communication Services at each reception of analogic command (ccSPt_x) and it shows the row of the last received analogic setpoint.

R_TC :

I_TC :

R_TVC :

I_TVC :

19.5 Specifications

19.5.1

Internal variables None

19.5.2

Internal code #IF defined ($E_TM) BF (C_GET_BIT_M, 83, E_TM) #ENDIF #IF defined ($R_TC) BF (C_GET_BIT_M, 90, R_TC) #ENDIF #IF defined ($I_TC) BF (C_GET_WORD_R, 9803, I_TC) #ENDIF #IF defined ($R_TVC) BF (C_GET_BIT_M, 91, R_TVC) #ENDIF #IF defined ($I_TVC) BF (C_GET_WORD_R, 9804, I_TVC) #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 38/342


Section 20

CCL_ICES

20.1 Representation

20.2 Function The CCL_ICES function block gives informations on emissions through the unit network. It can only be used in a cell controller. 20.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Outputs E_IA E_RG Indicator Indicator B B Y Y N N Y Y

20.4 Use Used for a C8035 only head cell 20.4.1 Description of terminals E_IA : It is an indicator of emission towards all cells. It is set to 1 if the emission happens at the end of the current cycle. It is an indicator of emission towards the cell of regroupement. It is set to 1 if the emission happens at the end of the current cycle.

E_RG :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 39/342


20.5 Specifications

20.5.1

Internal variables None

20.5.2

Internal code #IF defined ($E_IA) BF (C_GET_BIT_M, 86, E_IA) #ENDIF #IF defined ($E_RG) BF (C_GET_BIT_M, 87, E_RG) #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 40/342


Section 21

CCL_OMR

21.1 Representation

21.2 Function The CCL_OMR function block sets informations for the redundancy management and gives informations on redundancy and operationnal mode of the cell controller. It can only be used in a cell controller. 21.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs INST CRIx Inhibition input Criteria input [17] B B N N N N Y Y

Outputs NORM MTF8 S_OK C_OK Function mode Function mode Supervisor presence Presence of commandability B B B B N N N N N N N N Y Y Y Y

21.4 Use Used for a C8035 only head cell

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 41/342


21.4.1 Description of terminals INST : This indicator is set by the application in the master cell controller to inhibit temporarily the topple. It so allows to avoid the master cell controller on F8000 network to topple after the faults arrival, whom dont concern the F8000, when the application must keep the control on F8000 to retain her coherency vis--vis her equipments. The indicator INST can be set by the application on the master to inibate the topple master-slave.It can be set to 1 only if the FS_MTF8 is set to 1 to avoid dysfunction.

CRIx (x between 1 to 7) : These indicators are set by the application on each cell controller to show that given conditions, which determine if one of controllers has the best state, act upon the choice of master cell controller function of the relative priority of each criteria. So that one criteria indicate that the controller is more capable of being the master than the other, this criteria should set to 1 on the primary controller and should set to 0 in the secondary controller. NORM : This indicator shows the function mode, master or slave, of the cell controller vis--vis S8000. It is set to 1 for master S8000 operational mode. It is set to 0 for the slave mode. This indicator shows the function mode, master or slave, of the cell controller vis--vis F8000. It is set to 1 for master F8000 operational mode. It is set to 0 for the slave mode. It is set by communication service at any sweep in function of supervisors presence. It is set to 1 by the communication service when the supervisor is able to send directly commands to the cell controller. It is set to 0 if the connexion with the supervisor has lost since at least 30 seconds or if the cell controller topples in slave mode.

MTF8 :

S_OK :

C_OK :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 42/342


21.5 Specifications

21.5.1

Internal variables None

21.5.2

Internal code
#IF defined ($INST) BF (C_STORE_BIT_M, 385, INST) #ENDIF #IF defined ($CRI1) BF (C_STORE_BIT_M, 386, CRI1) #ENDIF #IF defined ($CRI2) BF (C_STORE_BIT_M, 387, CRI2) #ENDIF #IF defined ($CRI3) BF (C_STORE_BIT_M, 388, CRI3) #ENDIF #IF defined ($CRI4) BF (C_STORE_BIT_M, 389, CRI4) #ENDIF #IF defined ($CRI5) BF (C_STORE_BIT_M, 390, CRI5) #ENDIF #IF defined ($CRI6) BF (C_STORE_BIT_M, 391, CRI6) #ENDIF #IF defined ($CRI7) BF (C_STORE_BIT_M, 392, CRI7) #ENDIF #IF defined ($NORM) BF (C_GET_BIT_M, 78, NORM) #ENDIF #IF defined ($MTF8) BF (C_GET_BIT_M, 75, MTF8) #ENDIF #IF defined ($S_OK) BF (C_GET_BIT_M, 81, S_OK) #ENDIF #IF defined ($C_OK) BF (C_GET_BIT_M, 82, C_OK) #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 43/342


Section 22

CELL_TEMP

22.1 Representation

22.2 Function The bit system %SB33 of C80-75 is now dedicated to the generation of information system "cubicle Temperature high". The acquisition of this information (dry contact resulting from a thermostat installed in the standard ES cubicle) is done via 1 to 3 boolean input cards included in 1 to 3 CE2000. The value of the thermostat shall be set to: 25 or 40C, within the framework of the applications of safety boiler, in order to satisfy the recommendation of the level of safety SIL3, of the IEC 61508 standards. (These adjustments relate to the temperature of the ambient air inside the cubicle corresponding to a maximum temperature at the location of the components of 30 and 45 C respectively.) 55 C maximum, excepting boiler safety applications, which corresponds to the maximum authorized operation value of a cell ES. 22.3 Arguments Characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 IN3 Outputs RE Result B N N Input 1 Input 2 Input 3 B B B Y N N 0 0 Y N N -

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 44/342


22.4 Use Used for C8075 The purpose is to calculate the bit %SB33 according to the state of the contact of high temperature on one of the 3 input channels (3 Boolean, of which the first one only must be input, and the 2 others have value 0 by default). %SB33 is equal to 1 if at least one of the three entries is equal to 1, and 0 if the 3 inputs are equal to 0. Moreover, the FB includes at output the value of bit %SB33 worked out in this FB (one non mandatory boolean). 22.5 Specifications

22.5.1

Internal variables 1 internal boolean private variable : VI

22.5.2

Internal code #IF $TARGET_TYPE !~ 'C8075' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF (* Compute high temperature contact (from 1 to 3 input channels) BOO IN1 + IN2 + IN3 = VI (* Store result in %SB33 BF (C_STORE_BIT_SB, 33, VI) (* Store result in optional output argument #IF defined ($RE) BOO VI = RE #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 45/342


Section 23

CONVERGENCE_AND : CONVERGENCE OF SIMULTANEOUS SEQUENCES

23.1 Representation

23.2 Function This block is relevant to a sequential function block diagram. As many as eight simultaneous sequences can be managed by the block. The block has eight inputs which are the activation orders from the last step from each sequence and an output which is set to one if each sequence ordered the next step activation. 23.3 Arguments Characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value

Inputs ORDER1(O1) First sequence next step activation order Second sequence next step activation order Last sequence next step activation order Boolean N N 1 N -

ORDER2(O2)

Boolean

N .. N

1 .. 1

N .. N

ORDER8(O8)

Boolean

Outputs NEXT Next sequence activation order Boolean N Y Y 0

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 46/342


23.4 Use All inputs have their property 'mandatory connection' at 'No'. It means it is not mandatory to have a signal on each input. If the application needs only two simultaneous sequences, it can have no care with the six others inputs. At the first scan into the controlers, the output's value is FALSE. There are 8 boolean internal variables and 8 indirect state variables, by the calls to the 8 SR Function Blocks 23.5 Specifications 8 Internal variables : V1, V2, V3 -> V8, all booleans 23.5.1 Internal code IF INIT THEN BOO 0 = NEXT ELSE BOO V1.V2.V3.V4.V5.V6.V7.V8 = NEXT ENDIF #FB( SR, ORDER1, NEXT, 0, V1, ) #FB( SR, ORDER2, NEXT, 0, V2, ) #FB( SR, ORDER3, NEXT, 0, V3, ) #FB( SR, ORDER4, NEXT, 0, V4, ) #FB( SR, ORDER5, NEXT, 0, V5, ) #FB( SR, ORDER6, NEXT, 0, V6, ) #FB( SR, ORDER7, NEXT, 0, V7, ) #FB( SR, ORDER8, NEXT, 0, V8, )

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 47/342


Section 24

CONVERGENCE_OR : CONVERGENCE OF SEQUENCE SELECTION

24.1 Representation

24.2 Function This block is relevant to a sequential function block diagram. The goal of the block is to manage the convergence of a sequence selection. The block has eight inputs which are the activation orders from the last steps and an output which is the next step activation order. The block set to one its output if one of the eight sequences ordered the next step activation. 24.3 Arguments Characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value -

Inputs ORDER1(O1)

ORDER8(O8)

First sequence next step activation order eighth sequence next step activation order Next sequence activation order

Boolean

Boolean

Outputs NEXT

Boolean

24.4 Use The output's value is always the rsult of a OR gate between the different meaningful inputs. The block is a function block in the meaning of IEC, without state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 48/342


24.5 Specifications

24.5.1

Internal code
BOO ORDER1+ORDER2+ORDER3+ORDER4+ORDER5+ORDER6+ORDER7+ORDER8 = NEXT

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 49/342


Section 25

COS : COSINE

25.1 Representation

25.2 Function The COS function return in its output RE the cosine of the input IN. The input unit is the radian. 25.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator result REAL Y(-) -1 ; 1 Y N Input REAL Y(-) - ; Y N -

25.4 Use If IN is greater than or equal to , or less than or equal to , a loss of significance in the result of a call to COS occurs, in which case the function returns an indefinite result. The block is a function in the meaning of IEC 25.5 Specification

25.5.1

Generated Expression COS(IN)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 50/342


Section 26

COSMC : COSINE

26.1 Representation

26.2 Function The COS function return in its output RE the cosine of the input IN. The input unit is the radian. Output scale range : -1 is equivalent to 10000 and +1 is equivalent to +10000. Input scale range : - is equivalent to -*10000 and is equivalent to *10000. 26.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator result I Y(-) -10000 ; 10000 Y Y Input I Y(-) -*10000 ; *10000 Y N -

26.4 Use If IN is greater than or equal to *10000, or less than or equal to *10000, a loss of significance in the result of a call to COS occurs, in which case the function returns an indefinite result. The block is a function block in the meaning of IEC.No state variables 26.5 Specification

26.5.1

Internal Code CAL 10000 * COS(IN/10000.0) = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 51/342


Section 27

CTUD_I/D : UP-DOWN COUNTER

27.1 Representation

27.2 Function The goal is provide an up-counter and a down-counter in the same block: It is possible to count from 0 to a preset value, or to down-count from a preset value to 0. Two CTUD function block are available :CTUD_I for integer and CTUD_D for double integer. The overflow is managed in each block. 27.3 Arguments Characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value

Inputs CU CD R LD Outputs CV QD QU Parameters PV Counter result Down counting state Up counting state preset value I or D B B I or D N N N N Y N N Y Y Y Y Y 0 Up counting Down counting Reset Load B B B B N N N N Y Y Y Y Y Y Y Y -

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 52/342


27.3.1 Use Not used for a CE2000 There is a state variable of the block and its value is always put into the output CV. Its initial value is set to 0. The parameter PV can be tuned on line or before the execution of the function block. Specific Argument description CU CD LD : : : up counting input. Compulsory boolean input. Down counting input. Compulsory boolean input. LOAD. If LD = 1, CV = PV to intiate the down-counting R : RESET. Optional boolean input If R = 1, CV = 0 to initiate the up-counting CV : OPERATOR RESULT : Positive integer output. CV++ if CU CV-- if CD QU : Boolean output: up counting operator state : Set to TRUE when the preset value has been reached QU = 1 if CV>=PV QD : Down counting operator state : Boolean output. Set to true when the zero value has been reached QD=1 if CV<=0 PV : COUNTER VALUE : signed integer value The value of PV sets the value to be reached when counting up (PV>0), and the starting value for counting down (PV<0). Note : any change in the value of PV is taken into account as of the next operating cycle. When counting down, a new value is not taken into account until the next initialisation reset by R = 1, or if the new value is less than the remaining CV value. In the later case, PV is updated to the value of CV. If the input CU or CD is always set to 1, the output CV is increasing or decreasing at each execution of FB.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 53/342


27.4 Specification

27.4.1

State Variables ST1, same type as CV, redundant

27.4.2

Internal Variables The variables QUI and QDI are internal boolean variables. Their goal is to give not mandatory the connexion of arguments QU and QD.

27.4.3

Function Block Code


(*BEGIN CTUD_I (* Initialization: (* -------------#IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF if INIT + R then cal 0 = STA (* Operational mode: (* ---------------else if LD then cal PV = STA else if {STA < 32767} . CU (* INT_MAX value in limits.h then cal STA + 1 = STA else if {STA > -32767} . CD (* INT_MIN value in limits.h then cal STA - 1 = STA endif endif endif endif (* set output values: (* ----------------#IF defined($QU) boo {STA >= PV} = QU #ENDIF #IF defined($QD) boo {STA <= 0} = QD #ENDIF cal STA = CV (* END CTUD_I

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 54/342


(* BEGIN CTUD_D (* Initialization: (* -------------#IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF if INIT + R then cal 0 = STA (* Operational mode: (* ---------------else if LD then cal PV = STA else if {STA < 2147483647} . CU limits.h then cal STA + 1 = STA else if {STA > -2147483647} . CD limits.h then cal STA - 1 = STA endif endif endif endif (* set output values: (* ----------------#IF defined($QU) boo {STA >= PV} = QU #ENDIF #IF defined($QD) boo {STA <= 0} = QD #ENDIF cal STA = CV (* END CTUD_D

(* INT_MAX value in

(* INT_MIN value in

27.4.4

Basic Function Used None

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 55/342


Section 28

CUR_CPU_FLTS

28.1 Representation

28.2 Function The CUR_CPU_FLTS function block allows to create an application fault in the current controller when there is a fault detected with the CPU about the loss of synchronization signal.

28.3 Arguments Characteristics


Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Output TOP HI_TEMP Synchro signal reception High temperature B B N N N N Y Y -

28.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 56/342


28.4.1 Description of terminals TOP : SYNCHRO SIGNAL RECEPTION Set to 1 if Synchronisation signal is not received from external equipment HI_TEMP : HIGH TEMPERATURE Set to 1 when the high temperature value (85C) is reached.

28.5 Specification

28.5.1

Internal variables None

28.5.2

Internal code

#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF (* Major faults TWB CCAD_FAULTS(2) = TOP, HI_TEMP

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 57/342


Section 29

CUR_CTRL_FLTS

29.1 Representation

29.2 Function The CUR_CTRL_FLTS function block allows to create an application fault in the current controller and use some defaults of this controller. It can be used in any controller (cell or field controller). The faults A, SY, SN, M, F and RF concern the field and cell controller. The faults GF, RS, GS and C concern only the cell controller. 29.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Input DFA Input B Y N N -

Outputs A SYN SN M F RF GF RS GS C Application fault Synchronization fault Non-blocking fault Module fault I/O forcing Redundancy fault Communication fault Redundancy fault Communication fault Communication fault B B B B B B B B B B N N N N N N N N N N N N N N N N N N N N Y Y Y Y Y Y Y Y Y Y

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 58/342


29.4 Use Used for a C8035 and RX3i 29.4.1 Description of terminals DFA: A: SY : APPLICATION FAULT INPUT It can be set to 1 by the application to send a fault to the controller. Application fault This fault is set by the application using the FS_DF_A indicator. Synchronization fault This fault is set if the synchronization can be realized in at least 30 seconds before. In the field controller, the synchronisation needs to receive the synchronization pip all 5 seconds and the time message from the supervisor. non-blocking fault This fault is set to 1 when at least one fault appears in one of both fault tables (I/O or CPU) of the controller, and is set to 0 when the both fault tables are erased by the operator with P80. Module fault This fault is set to 1 when at least one module is declared in fault, and erased when entered faults in the IO faults table are acquitted by the operator with P80. I/O Forcing It is set to 1 when at least one forcing is in the controller. Else it is set to 0. F8000 medium redundancy fault This fault is set if the FBC ready condition is true AND the medium fault condition given by the FBC30 is true, else it is set to 0. F8000 communication global fault This fault is set if the FBC ready condition is false OR if this condition is true AND no operational network condition given by the FBC30 is true, else it is set to 0. It can be only used in the cell controller. S8000 medium redundancy fault If the unit network is S8000-E, then it is always set to 0. If the unit network is S8000-F, then it is set if the FBC Ready condition is true AND medium default given by the FBC30 is true on a redundant network, else it is set to 0. It can be only used in the cell controller. S8000 communication global fault It is set if the S Drive Interface condition is false, OR if this S Driver OK is false, OR the S Driver connected is false, else it is set to 0. It can be only used in the cell controller. Supervisor communication fault It is set if the cell controller has not relation with the supervisor (no reception of the time message since at least 30 seconds), else it is set to 0. It corresponds to the S_OK indicator.

SN :

M:

F:

RF :

GF :

RS :

GS :

C :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 59/342


29.5 Specification

29.5.1

Internal variables None

29.5.2

Internal code

#IF $TARGET_TYPE !~ 'C8035' && $TARGET_TYPE !~ 'RX3i' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF defined ($DFA) BOO DFA = FS_DF_A #ENDIF TWB C_PRSCE_STAT = ,A,SY,SN,M,F,RF,GF,RS,GS,C

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 60/342


Section 30

CUR_E920_FLTS

30.1 Representation

30.2 Function The function block CUR_E920_FLTS is used to create an application fault in the current controller. This function block signals the loss of E920 and E900 medium. 30.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Output E920_LOST E900_LOST Both E920 mediums lost E900 medium lost B B B B N N N N N N N N Y Y Y Y -

E920_1LOST E920 medium 1 lost E920_2LOST E920 medium 2 lost

30.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 61/342


30.4.1 Description of terminals E920_LOST : BOTH E920 MEDIUMS LOST This fault is set if MFC3000 communication upon S8000 on E920 protocol is lost. It means that bulk messages from other S8000 device on both media are no more detected since 2 bulk message periods. In case of mono-medium configuration, this fault is set if no bulk message is detected on the S8000 medium. E900_LOST : E900 MEDIUM LOST This fault is set if MFC3000 communication upon S8000 on E900 protocol is lost. It means that bulk messages from other S8000 device on the medium (E900 is a mono-medium protocol) are no more detected since 2 E900 bulk message periods (1 to 1,5s). E920_1LOST : E920 MEDIUM 1 LOST This fault is set if MFC3000 communication upon S8000 on E920 protocol is lost on medium 1. It means that bulk messages from other S8000 device on medium 1 are no more detected since at least 2 bulk message periods. E920_2LOST : E920 MEDIUM 2 LOST This fault is set if MFC3000 communication upon S8000 on E920 protocol is lost on medium 2. It means that bulk messages from other S8000 device on medium 2 are no more detected since at least 2 bulk message periods.

30.5 Specification

30.5.1

Internal variables None

30.5.2

Internal code #IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF (* Major faults TWB CCAD_FAULTS(10) = E920_LOST, E900_LOST (* Minor faults TWB CCAD_FAULTS(11) = E920_1LOST, E920_2LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 62/342


Section 31

CUR_EPL_FLTS

31.1 Representation

31.2 Function The functional block CUR_EPL_FLTS takes the EPL network number as input and creates an application fault when a fault is detected with the board or the mediums.

31.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs NET_NUM EPL network number [0..3]t W N Y Y -

Output BOARD_FLT BOTH_LOST MED_1LOST MED_2LOST Board fault Both mediums lost Medium 1 lost Medium 2 lost B B B B N N N N N N N N Y Y Y Y -

31.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 63/342


31.4.1 Description of terminals NET_NUM : EPL NETWORK NUMBER [0...3] This EPL network number must be specified to have the right network description needed. BOARD_FLT : BOARD FAULT This fault is set to 1 when a board fault is detected and indicated by the EPL driver. BOTH_LOST : BOTH MEDIUMS LOST This fault is set to 1 when both EPL mediums are lost. MED_1LOST : MEDIUM 1 LOST This fault is set to 1 when EPL medium 1 is lost. MED_2LOST : MEDIUM 2 LOST This fault is set to 1 when EPL medium 2 is lost.

31.5 Specification

31.5.1

Internal variables None

31.5.2

Internal code #IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $NET_NUM !~ /^\s*\d+\s*$/ || $NET_NUM > 3 #ERROR EPL network number must be a constant in the range [0..3] #ENDIF (* Major faults CAL 48 + 4 * NET_NUM + 2 = INDEX TWB CCAD_FAULTS(INDEX) = BOARD_FLT, BOTH_LOST (* Minor faults CAL INDEX + 1 = INDEX TWB CCAD_FAULTS(INDEX) = MED_1LOST, MED_2LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 64/342


Section 32

CUR_EPL_PRES

32.1 Representation

32.2 Function The functional block CUR_EPL_PRES takes the EPL network number and the EPL equipment number as inputs and creates an application fault when a fault is detected with this EPL equipment.

32.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs NET_NUM EPL network number [0..3] Equipement number [1..239] usint N Y Y -

EQPT_NUM

usint

Output LINK_PRES Link presence B B B N N N N N Y Y Y -

LINK1_PRES Medium 1 presence LINK2_PRES Medium 2 presence

32.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 65/342


32.4.1 Description of terminals NET_NUM : EPL NETWORK NUMBER [0...3] This EPL network number must be specified to have the right network description needed. EQPT_NUM : EPL EQUIPMENT NUMBER [1...239] This EPL equipment number must be specified to have the right equipment description needed. LINK_PRES : LINK PRESENCE This link presence indication is set to 0 when the equipment is detected as in fault. LINK1_PRES : MEDIUM 1 PRESENCE Set to 0 when the first medium has been lost. LINK2_PRES : MEDIUM 2 PRESENCE Set to 0 when the second medium has been lost. 32.5 Specification

32.5.1

Internal variables
Name BYTE_INDEX Label Byte index Basic Type Word Origin Internal Private YES Memory area Standard Min range 0 Max range 65535

32.5.2

Internal code
#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $NET_NUM !~ /^\s*\d+\s*$/ || $NET_NUM > 3 #ERROR EPL network number must be a constant in the range [0..3] #ENDIF #IF $EQPT_NUM !~ /^\s*\d+\s*$/ || $EQPT_NUM <1 || $EQPT_NUM > 239 #ERROR Equipment number must be a constant in the range [1..239] #ENDIF CAL 128 + 239 * NET_NUM + EQPT_NUM = BYTE_INDEX TWB CCAD_SENT_TO_DUAL (BYTE_INDEX) = LINK_PRES,LINK1_PRES,LINK2_PRES #IF defined ($LINK_PRES) BOO /LINK_PRES = LINK_PRES #ENDIF #IF defined ($LINK1_PRES) BOO /LINK1_PRES = LINK1_PRES #ENDIF #IF defined ($LINK2_PRES) BOO /LINK2_PRES = LINK2_PRES #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 66/342


Section 33

CUR_F8000_FLTS

33.1 Representation

33.2 Function The functional block CUR_F8000_FLTS is used to create an application fault in the current controller for faults detected with the FIP mediums and the FIP board.

33.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Output BOARD_FLT BOTH_LOST MED_1LOST MED_2LOST Board fault Both mediums lost Medium 1 lost Medium 2 lost B B B B N N N N N N N N Y Y Y Y -

33.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 67/342


33.4.1 Description of terminals BOARD_FLT : BOARD FAULT Fault set to 1 when a failure is detected on the FIP board (future use). BOTH_LOST : BOTH MEDIUMS LOST Fault set to 1 when communication is failing on both FIP mediums 1 & 2. MED_1LOST : MEDIUM 1 LOST Fault set to 1 when communication is failing on FIP medium no 1. MED_2LOST : MEDIUM 2 LOST Fault set to 1 when communication is failing on FIP medium no 2.

33.5 Specification

33.5.1

Internal variables None

33.5.2

Internal code

#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF (* Major faults TWB CCAD_FAULTS(14) = BOARD_FLT, BOTH_LOST (* Minor faults TWB CCAD_FAULTS(15) = MED_1LOST, MED_2LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 68/342


Section 34

CUR_F8000_PRES

34.1 Representation

34.2 Function The functional block CUR_F8000_PRES is used to indicated the state of connection of a F8000 Field Controller connected to the current MFC3000.

34.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Input EQPT_NUM Output LINK1_PRES LINK2_PRES MAJOR_FLT MINOR_FLT MASTER


TRANSP_VAL

Equipment number [2..125]

USINT

Medium 1 presence Medium 2 presence Major fault Minor fault Master flag Transport validant

B B B B B B

N N N N N N

N N N N N N

Y Y Y Y Y Y

34.4 Use Used only on MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 69/342


34.4.1 Description of terminals EQP_NUM : EQUIPMENT NUMBER Number of equipment to survey on F8000 Network (subscriber number). LINK1_PRES : MEDIUM 1 PRESENCE Set to 0 when the first medium has been lost. LINK2_PRES : MEDIUM 2 PRESENCE Set to 0 when the second medium has been lost. MAJOR_FLT : MAJOR FAULT It indicates major fault (set to 1). Else set to 0 (no major fault). Examples : Controller not present on the Network. Invalid VCOM consomed Device not run MINOR_FLT : MINOR FAULT It indicates minor fault (set to 1). Else set to 0 (no minor fault). Examples : Problems of synchronisation or FIP Medium Redundancy Lost. MASTER : MASTER FLAG It indicates if F8000 controller is master (set to 1) or slave (set to 0).

TRANSP_VAL :

TRANSPORT VALIDANT Set to 0 when the value of the others parameters are valid, else set to 1.

34.5 Specification

34.5.1

Internal variables None

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 70/342


34.5.2 Internal code
#IF $TARGET_TYPE !~ 'PCX' && $TARGET_TYPE !~ 'SIMULATOR' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $EQPT_NUM !~ /^\s*\d+\s*$/ || $EQPT_NUM > 125 || $EQPT_NUM < 2 #ERROR Equipment number must be a constant in the range [2..125] #ENDIF CAL 143 + EQPT_NUM = BYTE_INDEX TWB CCAD_SENT_TO_DUAL (BYTE_INDEX) = LINK1_PRES, MAJOR_FLT, MINOR_FLT, MASTER, , , TRANSP_VAL

LINK2_PRES,

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 71/342


Section 35

CUR_MODBUS_FLTS

35.1 Representation

35.2 Function The functional block CUR_MODBUS_FLTS is used to create an application fault. The functional block takes the Modbus network number as input and signals a fault when the Modbus medium is lost.

35.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs NET_NUM Modbus network number [0..3] W N Y Y -

Output MED_LOST Medium lost B N N Y -

35.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 72/342


35.4.1 Description of terminals NET_NUM : MODBUS NETWORK NUMBER [0...3] Modbus network number. MED_LOST : MEDIUM LOST Fault set to 1 when communication is failing on the Modbus network (no connexion established with any Modbus subscriber).

35.5 Specification

35.5.1

Internal variables None

35.5.2

Internal code

#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $NET_NUM !~ /^\s*\d+\s*$/ || $NET_NUM > 3 #ERROR Modbus network number must be a constant in the range [0..3] #ENDIF (* Major faults CAL 32 + 4 * NET_NUM + 2 = INDEX TWB CCAD_FAULTS(INDEX) = ,MED_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 73/342


Section 36

CUR_MODBUS_PRES

36.1 Representation

36.2 Function

The functional block CUR_MODBUS_PRES is used to create an application fault. The functional block takes a Modbus network number and a Modbus equipment number as input and signals connection fault and exchanges fault for the equipment.

36.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs NET_NUM Modbus network number [0..3] Equipement number [1..239] usint N Y Y -

EQPT_NUM

usint

Output LINK1_PRES LINK2_PRES LINK1_EXCH LINK2_EXCH Connection OK Channel 1 Connection OK Channel 2 Exchange OK Channel 1 Exchange OK Channel 2 B B B B N N N N N N N N Y Y Y Y -

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 74/342


36.4 Use Used for a MFC3000

36.4.1

Description of terminals NET_NUM : MODBUS NETWORK NUMBER [0...3] Modbus network number. EQPT_NUM : EQUIPMENT NUMBER [1...63] Equipment number. LINK1_PRES : CONNEXION OK CHANNEL 1 Set to 1 when Modbus TCP connection is operational on equipments channel 1, 0 otherwise. Not significant (set to 0) on secondary MFC3000 and communication with the equipment configured as mono-medium. LINK2_PRES : CONNEXION OK CHANNEL 2 Set to 1 when Modbus TCP connection is operational on equipments channel 2, 0 otherwise. Not significant (set to 0) for single-channel equipment or on primary MFC3000 and communication with the equipment configured as mono-medium. LINK1_EXCH : EXCHANGE OK CHANNEL 1 Set to 1 when there is no Modbus exchange fault via channel 1, set to 0 otherwise (see MFC3000 Startup guide P-TP21A41057 for possible faults : Modbus exception answer, exchange overrun, etc). When LINK1_PRES=0, set to 0 when significant (see above), 1 otherwise. LINK2_EXCH : EXCHANGE OK CHANNEL 2 Set to 1 when there is no Modbus exchange fault via channel 2, set to 0 otherwise. When LINK2_PRES=0, set to 0 when significant (see above), 1 otherwise.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 75/342


36.5 Specification

36.5.1

Internal variables

Name BIT_INDEX BIT_VALUE BYTE_INDEX

Label Bit index Bit value Byte index

Basic Type usint usint usint

Origin Internal Internal Internal

Private YES YES YES

Memory area Standard Standard Standard

Min range 0 0 0

Max range 255 255 255

36.5.2

Internal code
#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $NET_NUM !~ /^\s*\d+\s*$/ || $NET_NUM > 3 #ERROR Modbus network number must be a constant in the range [0..3] #ENDIF #IF $EQPT_NUM !~ /^\s*\d+\s*$/ || $EQPT_NUM > 63 || $EQPT_NUM == 0 #ERROR Equipment number must be a constant in the range [1..63] #ENDIF #IF defined ($LINK1_PRES) CAL 1 + NET_NUM * 32 + 0 + (EQPT_NUM) / 8 = BYTE_INDEX CAL EQPT_NUM MOD 8 = BIT_INDEX SHR CCAD_SENT_TO_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = LINK1_PRES #ENDIF #IF defined ($LINK2_PRES) CAL 1 + NET_NUM * 32 + 8 + (EQPT_NUM) / 8 = BYTE_INDEX CAL EQPT_NUM MOD 8 = BIT_INDEX SHR CCAD_SENT_TO_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = LINK2_PRES #ENDIF #IF defined ($LINK1_EXCH) CAL 1 + NET_NUM * 32 + 16 + (EQPT_NUM) / 8 = BYTE_INDEX CAL EQPT_NUM MOD 8 = BIT_INDEX SHR CCAD_SENT_TO_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = LINK1_EXCH #ENDIF #IF defined ($LINK2_EXCH) CAL 1 + NET_NUM * 32 + 24 + (EQPT_NUM) / 8 = BYTE_INDEX CAL EQPT_NUM MOD 8 = BIT_INDEX SHR CCAD_SENT_TO_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = LINK2_EXCH #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 76/342


Section 37

CUR_PROFIBUS_FLTS

37.1 Representation

37.2 Function The functional block CUR_PROFIBUS_FLTS is used to create an application fault in the current controller for faults detected with the Profibus mediums and the Profibus board.

37.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs NET_NUM Profibus network number [0..3] W N Y Y -

Output BOARD_FLT MED_LOST Board fault Medium lost B B N N N N Y Y -

37.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 77/342


37.4.1 Description of terminals NET_NUM : PROFIBUS NETWORK NUMBER [03] Profibus device number with a fault. BOARD_FLT : BOARD FAULT A board fault is signalled if the board is missing or if a fault occurs when initializing and starting the board or if downloading a new configuration fails. MED_LOST : MEDIUM LOST A medium lost is signalled if the master cannot communicate with at least one slave.

37.5 Specification

37.5.1

Internal variables None

37.5.2

Internal code

#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $NET_NUM !~ /^\s*\d+\s*$/ || $NET_NUM > 3 #ERROR Profibus network number must be a constant in the range [0..3] #ENDIF (* Major faults CAL 16 + 4 * NET_NUM + 2 = INDEX TWB CCAD_FAULTS(INDEX) = BOARD_FLT, MED_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 78/342


Section 38

CUR_REDUNDANCY_FLTS

38.1 Representation

38.2 Function The functional block CUR_REDUNDANCY_FLTS is used in the current controller to signal an application fault when the Primary redundancy link or Auxiliary redundancy link or both are lost.

38.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Output R_LOST AUX_LOST R link lost Auxiliary link lost B B N N N N Y Y -

38.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 79/342


38.4.1 Description of terminals R_LOST : R LINK LOST Set if loss of the redundancy link. AUX_LOST : AUXILLARY LINK LOST Set if loss of one of auxiliary link ( S8000, E8000 or F8000).

38.5 Specification

38.5.1

Internal variables None

38.5.2

Internal code

#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF (* Minor faults TWB CCAD_FAULTS(7) = R_LOST, AUX_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 80/342


Section 39

CUR_STI300_FLTS

39.1 Representation

39.2 Function STI300 Faults on the current MFC3000. 39.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Output GISR PPSR SBPR ITCR WBDR1 WBDR2 WBDR3 SPSR1 SPSR2 SPSR3 General Internal Status OK Process Power Supply ON STI Board Presence OK Internal Test Completion OK Wire Break Detected Channel 1 Wire Break Detected Channel 2 Wire Break Detected Channel 3 Sensor Power Supply ON Channel 1 Sensor Power Supply ON Channel 2 Sensor Power Supply ON Channel 3 B B B B B B B B B B N N N N N N N N N N N N N N N N N N N N Y Y Y Y Y Y Y Y Y Y -

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 81/342

39.4 Use Used for a MFC3000

39.4.1

Description of terminals GISR : General Internal Status OK This status indicates that the STI300 board is correctly initialized. No fault has been detected by this board during initialization. This Status is generated by both "General Intrinsic Failure" bit and "Board Initialized" bit. These data are read from STI300 board. This Status is set to 1 if it is OK. PPSR : Process Power Supply ON This status indicates that the board has detected a correct power supply provided by the process. It is set to 1 if it is OK. SBPR : STI Board Presence OK This status indicates that the board has been detected by the driver and this driver performs periodic accesses to this board for register reading. It is set to 1 if it is OK. ITCR : Internal Test Completion OK This status indicates the completion of self_tests performed by the STI300 board. These tests are performed only if Process Power is on. It is set to 1 if it is OK. WBDR1 : Wire Break Detected Channel 1 This fault is set to 1 if a wire break has been detected by the STI300 board on channel 1. This fault may occur if the high threshold or low threshold have been trespassed by the input signal. WBDR2 : Wire Break Detected Channel 2 This fault is set to 1 if a wire break has been detected by the STI300 board on channel 2. WBDR3 : Wire Break Detected Channel 3 This fault is set to 1 if a wire break has been detected by the STI300 board on channel 3.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 82/342


SPSR1 : Sensor Power Supply ON Channel 1 This state is set to 1 when STI300 board has detected that the sensor or interface on channel 1 is powered on. SPSR2 : Sensor Power Supply ON Channel 2 This state is set to 1 when STI300 board has detected that the sensor or interface on channel 2 is powered on. SPSR3 : Sensor Power Supply ON Channel 3 This state is set to 1 when STI300 board has detected that the sensor or interface on channel 3 is powered on. 39.5 Specification

39.5.1

Internal variables None

39.5.2

Internal code
(* Major faults TWB CCAD_FAULTS(66) = GISR, PPSR, BINR, SBPR #IF defined ($GISR) BOO /GISR = GISR #ENDIF #IF defined ($PPSR) BOO /PPSR = PPSR #ENDIF #IF defined ($BINR) BOO /BINR = BINR #ENDIF #IF defined ($SBPR) BOO /SBPR = SBPR #ENDIF (* Minor faults TWB CCAD_FAULTS(67) = ITCR, WBDR1, WBDR2, WBDR3, SPSR1, SPSR2, SPSR3 #IF defined ($ITCR) BOO /ITCR = ITCR #ENDIF #IF defined ($SPSR1) BOO /SPSR1 = SPSR1 #ENDIF #IF defined ($SPSR2) BOO /SPSR2 = SPSR2 #ENDIF #IF defined ($SPSR3) BOO /SPSR3 = SPSR3 #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 83/342


Section 40

CYCPLS : CYCLE PULSE

40.1 Representation

40.2 Function Function block CYCPLS generates a single pulse with a maximum duration, which is given by the parameter NC (number of cycles). When the input IN is set to high, the output RE is also high for NC number of cycles. The output RC indicates the number of cycles executed. If the input returns to zero, the outputs RE and RC will also set to zero, even if the specified number of cycles NC has not yet elapsed since the start of the pulse.

Fig: Example of functioning of function block CYCPLS.


Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 84/342


40.3 Arguments Characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE RC Parameters NC Input Boolean Y Y Y -

Result Number of cycles executed Number of cycles

Boolean Word

N N

Y N

Y Y

Word

40.4 Use Not used for a CE2000 40.5 Specification

40.5.1

Associated MVM CYCPLS_V

40.5.2

Internal variable
NAME IB0 IEND IRC DESCRIPTION Internal compted value Previous state Number of cycle executed TYPE B B W Private YES YES YES Redundancy exchange Redund Redund

40.5.3

Internal code
#IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF if (INIT) then (* Check the initialization of the basic function boo 0=RE cal 0=IRC boo 0=IEND else if (IN) then boo {IRC<NC} = IB0 if (IB0./IEND) then (* Tempo not finish boo 1=RE (* Sets the result RE to 1 cal IRC+1=IRC (* increment the value of IRC else (* Tempo not finish Reset RE and IRC value boo 0=RE cal 0=IRC boo 1=IEND endif else (* IN=0 reset RE and IRC value boo 0=RE cal 0=IRC boo 0=IEND endif endif #IF defined($RC) cal irc = rc #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 85/342

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 86/342


Section 41

DATE TIME

41.1 Representation

41.2 Function Return the DATE and TIME of the current controller.

41.3 Arguments Characteristics


Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Outputs V_YEAR V_MONTH V_DAY_OF_MONTH V_HOURS V_MINUTES V_SECONDS V_DAY_OF_WEEK Year since 2000 Month Day Hours Minutes Seconds Day of week W W W W W W W N N N N N N N 0-99 1-12 1-31 0-23 0-59 0-59 1-7 N N N N N N N N N N N N N N Y Y Y Y Y Y Y -

41.4 Use Not used for a CE2000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 87/342


41.4.1 Description of terminals YEAR 0 = 2000, 1 = 2001 MONTH HOURS MINUTES SECONDS 1 = January, 2 = February from 1 to 31 from 0 to 23 from 0 to 59 from 0 to 59 1 = Sunday, 2 = Monday DAY_OF_MONTH

DAY_OF_WEEK

41.5 Specification

41.5.1

Internal Code #IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF BF (DATE_TIME, V_YEAR, V_MONTH, V_DAY_OF_MONTH, V_HOURS, V_MINUTES, V_SECONDS, V_DAY_OF_WEEK) #IF defined ($YEAR) CAL V_YEAR = YEAR #ENDIF #IF defined ($MONTH) CAL V_MONTH = MONTH #ENDIF #IF defined ($DAY_OF_MONTH) CAL V_DAY_OF_MONTH = DAY_OF_MONTH #ENDIF #IF defined ($HOURS) CAL V_HOURS = HOURS #ENDIF #IF defined ($MINUTES) CAL V_MINUTES = MINUTES #ENDIF #IF defined ($SECONDS) CAL V_SECONDS = SECONDS #ENDIF #IF defined ($DAY_OF_WEEK) CAL V_DAY_OF_WEEK = DAY_OF_WEEK #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 88/342


Section 42

DEMUX_I/D/R : DEMULTIPLEXER

42.1 Representation

42.2 Function The function block DEMUX selects one of N outputs depending on input K. Ex : if K = 2 and IN=5 then RE2=5 and all the other outputs are unchanged.

For i=1 to N { REi(k) = Rei(k-1) If K(i)=i then REi(k)=IN(k) } There are 3 DEMUX functions block : DEMUX_I : for integers 42.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

DEMUX_R : for real

DEMUX_D : for double

Inputs IN K Outputs Inputs Selection inputs I or R or D I Y(-) N [1 8] Y N 0 N Y -

RE1..RE8 Parameters

Result

I or D or R

Y(-)

42.4 Use There are 8 state variables ( I / L / R ) to hold the outputs at the last scan :
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 89/342


STA1 --> STA8. 42.5 Specification

42.5.1

Internal Code
(* BEGIN DEMUX) IF INIT THEN #IF defined($RE1) CAL 0 = RE1 #ENDIF #IF defined($RE2) CAL 0 = RE2 #ENDIF #IF defined($RE3) CAL 0 = RE3 #ENDIF #IF defined($RE4) CAL 0 = RE4 #ENDIF #IF defined($RE5) CAL 0 = RE5 #ENDIF #IF defined($RE6) CAL 0 = RE6 #ENDIF #IF defined($RE7) CAL 0 = RE7 #ENDIF #IF defined($RE8) CAL 0 = RE8 #ENDIF ELSE #IF defined($RE1) CAL STA1 = RE1 IF { K = 1} THEN CAL IN = RE1 ENDIF #ENDIF #IF defined($RE2) CAL STA2 = RE2 IF {K = 2} THEN CAL IN = RE2 ENDIF #ENDIF #IF defined($RE3) CAL STA3 = RE3 IF {K = 3} THEN CAL IN = RE3 ENDIF #ENDIF #IF defined($RE4) CAL STA4 = RE4 IF {K = 4} THEN CAL IN = RE4 ENDIF #ENDIF #IF defined($RE5) CAL STA5 = RE5 IF {K = 5} THEN CAL IN = RE5 ENDIF #ENDIF #IF defined($RE6) CAL STA6 = RE6 IF {K = 6} THEN CAL IN = RE6 ENDIF #ENDIF #IF defined($RE7) CAL STA7 = RE7 IF {K = 7} THEN CAL IN = RE7 ENDIF #ENDIF #IF defined($RE8) CAL STA8 = RE8 IF {K = 8} THEN CAL IN = RE8 ENDIF #ENDIF ENDIF #IF defined($RE1) CAL RE1 = STA1 #ENDIF #IF defined($RE2) CAL RE2= STA2 #ENDIF #IF defined($RE3) CAL RE3 = STA3 #ENDIF #IF defined($RE4) CAL RE4 = STA4 #ENDIF #IF defined($RE5) CAL RE5 = STA5 #ENDIF #IF defined($RE6) CAL RE6 = STA6 #ENDIF #IF defined($RE7) CAL RE7 = STA7 #ENDIF #IF defined($RE8) CAL RE8 = STA8 #ENDIF (* END DEMUX

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 90/342


Section 43

DIV : DIVIDE

43.1 Representation

43.2 Function The main function divides the numerator IN1 by the denominator IN2.

43.3 Arguments Characteristics


Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 Outputs RE Parameters Operator result ANY_NUM Y(-) Y Y Numerator Denominator ANY_NUM ANY_NUM Y(-) Y(-) Y Y N N -

43.4 Use There is no protection against the division by 0.

43.5 Specification It is an operator

43.5.1

Generated Code IN1 / IN2

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 91/342


Section 44

DIV_D : INTEGER DIVIDE

44.1 Representation

44.2 Function The main function divides the numerator IN1 by the denominator IN2. The global function is the following one : IF IN2 = 0 RESULT ENO ELSE RESULT ENO ENDIF 44.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

<= (DEFAULT) <= TRUE <= (IN1) / (IN2) <= FALSE

Inputs IN1 IN2 DEF(DEFAULT ) Outputs RE EN0(ENO) Parameters Numerator Denominator Default result ANY_INT ANY_INT REAL Y(-) Y(-) N Y Y N 0 N N Y -

Operator result Disable result

ANY_INT BOOL

Y(-) N

Y N

Y Y

44.4 Use There is a protection against the division by 0. The FB has no redundant variables.
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 92/342


44.5 Specification

44.5.1

Internal Variables VD, double integer, private

44.5.2

Internal Code (* BEGIN DIV_D CAL IN2 = VD IF { VD = 0 } THEN CAL DEF = RE #IF defined($EN0) BOO 0 = EN0 #ENDIF ELSE CAL IN1 / VD = RE #IF defined($EN0) BOO 1 = EN0 #ENDIF ENDIF (* END DIV_D

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 93/342


Section 45

DIV_R : REAL DIVIDE

45.1 Representation

45.2 Function The main function divides the numerator IN1 by the denominator IN2. The global function is the following one : IF ABS(IN2) < ABS(EPSILON) RESULT <= (DEFAULT) ENO <= TRUE ELSE RESULT <= IN1 / IN2 ENO <= FALSE ENDIF 45.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 EPS(EPSILON) DEF(DEFAULT ) Outputs RE EN0(ENO) Parameters Numerator Denominator Denominator Low Limit Default result REAL REAL REAL REAL Y(-) Y(-) N N Y Y N N 1e-6 0 N N Y Y -

Operator result Disable result

REAL BOOL

Y(-) N

Y N

Y Y

45.4 Use There is a protection against the division by 0.


Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 94/342

45.5 Specification

45.5.1

Internal Variables VR and EPS2, real, private

45.5.2

Internal Code (* BEGIN DIV_R (* CAL ABS(IN2) = VR CAL ABS(EPS) = EPS2 IF { VR < EPS2 } THEN CAL DEF = RE #IF defined($EN0) BOO 1 = EN0 #ENDIF ELSE CAL IN1 / IN2 = RE #IF defined($EN0) BOO 0 = EN0 #ENDIF ENDIF (* (* END DIV_R

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 95/342


Section 46

DIVERGENCE_AND : DIVERGENCE OF SIMULTANEOUS SEQUENCES

46.1 Representation

46.2 Function This block is relevant to a sequential function block diagram where the block STEP is already used. Its goal is to manage simultaneous sequences, as many as eight, to activate each one.There are : one input which is the next step activation order from the above sequence eight outputs which are the activation orders of the eight below sequences The below sequences can be activated when they reIECve an order from the above sequence. 46.3 Arguments Characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value

Inputs ORDER Above squence next step activation order Boolean N Y N -

Outputs NEXT1(N1) .. NEXT8(N8) First sequence activation order Eighth sequence step activation order Boolean N N Y -

Boolean

Parameters

46.4 Use It is a function block, in the meaning of IEC, without state variables
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 96/342

46.5 Specification

46.5.1

Internal Code (* BEGIN DIVERGENCE_AND #IF defined($NEXT1) BOO ORDER = NEXT1 #ENDIF #IF defined($NEXT2) BOO ORDER = NEXT2 #ENDIF #IF defined($NEXT3) BOO ORDER = NEXT3 #ENDIF #IF defined($NEXT4) BOO ORDER = NEXT4 #ENDIF #IF defined($NEXT5) BOO ORDER = NEXT5 #ENDIF #IF defined($NEXT6) BOO ORDER = NEXT6 #ENDIF #IF defined($NEXT7) BOO ORDER = NEXT7 #ENDIF #IF defined($NEXT8) BOO ORDER = NEXT8 #ENDIF (* END DIVERGENCE_AND

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 97/342


Section 47

DIVERGENCE_OR : DIVERGENCE OF SEQUENCE SELECTION

47.1 Representation

47.2 Function This block is relevant to a sequential function block diagram where the block STEP is already used. Its goal is to manage a selection between some sequences, to activate one or another one.There are : an input which is the next order sent by the step from, eight others inputs which are the condition to go in a specific sequence eight outputs which are the activation orders of each sequence an output which is the OR between all the condition inputs

47.3 Arguments Characteristics


Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value

Inputs COND1(C1) COND8(C8) ORDER Outputs NEXT1(N1) First sequence activation order eighth sequence activation Order global condition Boolean N N Y Condition to go to the first sequence Condition to go to the eighth sequence Selection Activation Order Boolean Y(/) N 0 N -

Boolean Boolean

Y(/) N

N Y

N N

NEXT8(N8)

Boolean

COND Parameters

Boolean

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 98/342


47.4 Use The application has to manage that only one sequence will be choosen. The block is a function block without state variables

47.5 Specification

47.5.1

Internal Code (* BEGIN DIVERGENCE_OR #IF defined ( $NEXT1) BOO ORDER.COND1 = NEXT1 #ENDIF #IF defined ( $NEXT2) BOO ORDER.COND2 = NEXT2 #ENDIF #IF defined ( $NEXT3) BOO ORDER.COND3 = NEXT3 #ENDIF #IF defined ( $NEXT4) BOO ORDER.COND4 = NEXT4 #ENDIF #IF defined ( $NEXT5) BOO ORDER.COND5 = NEXT5 #ENDIF #IF defined ( $NEXT6) BOO ORDER.COND6 = NEXT6 #ENDIF #IF defined ( $NEXT7) BOO ORDER.COND7 = NEXT7 #ENDIF #IF defined ( $NEXT8) BOO ORDER.COND8 = NEXT8 #ENDIF #IF defined($COND)
BOO COND1 + COND2 + COND3 + COND4 + COND5 + COND6 + COND7 + COND8 = COND

#ENDIF (* BEGIN DIVERGENCE_OR

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 99/342


Section 48

DIVMUL : DIVISION AND MULTIPLICATION

48.1 Representation

48.2 Function The DIVMUL function block calculates the following : RE=(IN/DI)*FA The overflow and the division by zero are managed. An output can indicate if the value of the divisor is too low The low limit is tunable on the block, by a specific input The block result, when the divisor is too small, is also tunable 48.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN DI FA EPS(EPSILON) DEF(DEFAULT ) Outputs RE EN0(ENO) Parameters Input to be divided Divisor Factor Divisor Low Limit Default result R R R R R Y Y Y N N Y Y Y N N 1e-6 0 N N N Y Y -

Block Result Disable Result

R Bool

Y Y

Y N

Y Y

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 100/342


48.4 Use The global function of the block is the following one : IF absolute_value(DI) < absolute_value(EPSILON) RE <= (DEFAULT) EN0 <= 1 ELSE RE <= ( (IN) / (DI) ) * (FA) EN0 <= 0 ENDIF

The signals on EPSILON, DEFAULT and EN0 are not mandatory: An user can use the block without manage the overflow or the division by 0. 48.5 Specification

48.5.1

Internal Variables VR and EPS2, real, private

48.5.2

Internal Code (* BEGIN DIV_MUL CAL ABS(DI) = VR CAL ABS(EPS) = EPS2 IF { VR < EPS2 } THEN CAL DEF = RE #IF defined($EN0) BOO 0 = EN0 #ENDIF ELSE CAL (IN/DI)*FA = RE #IF defined($EN0) BOO 1 = EN0 #ENDIF ENDIF (* END DIV_MUL

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 101/342


Section 49

DUAL_CPU_FLTS

49.1 Representation

49.2 Function The DUAL_CPU_FLTS function block allows to create an application fault in the dual controller when there is a fault detected with the CPU. 49.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Output TOP CUR_R_LOST Synchro signal reception R link lost on current MFC3000 High temperature B B N N N N Y Y -

HI_TEMP

49.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 102/342


49.4.1 Description of terminals TOP : SYNCHRO SIGNAL RECEPTION Set to 1 if Synchronisation signal is not received by the redundant controller from external equipment. CUR_R_LOST : REDUNDANCY LINK LOST ON CURRENT MFC3000 Set to 1 when the redundancy link is lost. In this case, the previous information are not significant. HI_TEMP : HIGH TEMPERATURE Set to 1 when the high temperature value (85C) is reached.

49.5 Specification

49.5.1

Internal variables None

49.5.2

Internal code

#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF (* Major faults TWB CCAD_FAULTS_RED(2) = TOP, HI_TEMP TWB CCAD_FAULTS(7) = CUR_R_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 103/342


Section 50

DUAL_CTRL_FLTS

50.1 Representation

50.2 Function The DUAL_CTRL_FLTS function block allows to use some defaults of the dual controller. It can be used in any redundant controller (cell or field controller). The faults A, SY, SN, M, F and RF concern the field and cell controller. The faults GF, RS, GS and C concern only the cell controller.

50.3 Arguments Characteristics


Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Outputs GN A SYN SN M F RF GF RS GS C Controller Presence Application fault Synchronization fault Non-blocking fault Module fault I/O forcing Redundancy fault Communication fault Redundancy fault Communication fault Communication fault B B B B B B B B B B B N N N N N N N N N N N N N N N N N N N N N N Y Y Y Y Y Y Y Y Y Y Y

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 104/342


50.4 Use Used for a C8035 and RX3i

50.4.1

Description of terminals GN : A: SY : CONTROLLER PRESENCE This bit is set if the controller is present on the F8000 field network. Application fault This fault is set by the application using the FS_DF_A indicator. Synchronization fault This fault is set if the synchronization can be realized in at least 30 seconds before. In the field controller, the synchronisation needs to receive the synchronization pip all 5 seconds and the time message from the supervisor. non-blocking fault This fault is set to 1 when at least one fault appears in one of both fault tables (I/O or CPU) of the controller, and is set to 0 when the both fault tables are erased by the operator with P80. Module fault This fault is set to 1 when at least one module is declared in fault, and erased when entered faults in the IO faults table are acquitted by the operator with P80. I/O Forcing It is set to 1 when at least one forcing is in the controller. Else it is set to 0. F8000 medium redundancy fault This fault is set if the FBC ready condition is true AND the medium fault condition given by the FBC30 is true, else it is set to 0. F8000 communication global fault This fault is set if the FBC ready condition is false OR if this condition is true AND no operational network condition given by the FBC30 is true, else it is set to 0. It can be only used in the cell controller. S8000 medium redundancy fault If the unit network is S8000-E, then it is always set to 0. If the unit network is S8000-F, then it is set if the FBC Ready condition is true AND medium default given by the FBC30 is true on a redundant network, else it is set to 0. It can be only used in the cell controller. S8000 communication global fault It is set if the S Drive Interface condition is false, OR if this S Driver OK is false, OR the S Driver connected is false, else it is set to 0. It can be only used in the cell controller. Supervisor communication fault It is set if the cell controller has not relation with the supervisor (no reception of the time message since at least 30 seconds), else it is set to 0. It corresponds to the S_OK indicator.

SN :

M:

F: RF :

GF :

RS :

GS :

C:

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 105/342


50.5 Specification

50.5.1

Internal variables None

50.5.2

Internal code #IF $TARGET_TYPE !~ 'C8035' && $TARGET_TYPE !~ 'RX3i' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF TWB D_PRSCE_STAT = GN,A,SY,SN,M,F,RF,GF,RS,GS,C

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 106/342


Section 51

DUAL_E920_FLTS

51.1 Representation

51.2 Function The function block DUAL_E920_FLTS is used to create an application fault in the dual controller. This function block signals the loss of E920 and E900 medium. 51.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Output E920_LOST E900_LOST Both E920 mediums lost E900 medium lost B B B B B N N N N N N N N N N Y Y Y Y Y -

E920_1LOST E920 medium 1 lost E920_2LOST E920 medium 2 lost CUR_R_LOS T R link lost on current MFC3000

51.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 107/342


51.4.1 Description of terminals E920_LOST : BOTH E920 MEDIUMS LOST Set if loss of communication on both E920 media (or on medium 1 in case of mono-medium configuration) has been detected by E920 driver on the redundant MFC3000 machine. E900_LOST : E900 MEDIUM LOST Set if loss of communication on E900 medium 1 has been detected by E920 driver on the redundant MFC3000 machine. E920_1LOST : E920 MEDIUM 1 LOST Set if loss of communication on E920 medium 1 has been detected by E920 driver on the redundant MFC3000 machine. E920_2LOST : E920 MEDIUM 2 LOST Set if loss of communication on E920 medium 2 has been detected by E920 driver on the redundant MFC3000 machine. CUR_R_LOST : REDUNDANCY LINK LOST ON CURRENT MFC3000 Set to 1 when the redundancy link is lost. In this case, the previous information are not significant. 51.5 Specification

51.5.1

Internal variables None

51.5.2

Internal code

#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF (* Major faults TWB CCAD_FAULTS_RED(10) = E920_LOST, E900_LOST (* Minor faults TWB CCAD_FAULTS_RED(11) = E920_1LOST, E920_2LOST TWB CCAD_FAULTS(7) = CUR_R_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 108/342


Section 52

DUAL_EPL_FLTS

52.1 Representation

52.2 Function The functional block DUAL_EPL_FLTS takes the EPL network number as input and creates an application fault when a fault is detected with the board or the mediums.

52.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs NET_NUM EPL network number [0..3]t W N Y Y -

Output BOARD_FLT BOTH_LOST MED_1LOST MED_2LOST CUR_R_LOS T Board fault Both mediums lost Medium 1 lost Medium 2 lost R link lost on current MFC3000 B B B B B N N N N N N N N N N Y Y Y Y Y -

52.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 109/342


52.4.1 Description of terminals NET_NUM : EPL NETWORK NUMBER [0...3] This EPL network number must be specified to have the right network description needed. BOARD_FLT : BOARD FAULT This fault is set to 1 when a board fault is detected and indicated by the EPL driver. BOTH_LOST : BOTH MEDIUMS LOST This fault is set to 1 when both EPL mediums are lost. MED_1LOST : MEDIUM 1 LOST This fault is set to 1 when EPL medium 1 is lost. MED_2LOST : MEDIUM 2 LOST This fault is set to 1 when EPL medium 2 is lost. CUR_R_LOST : REDUNDANCY LINK LOST ON CURRENT MFC3000 Set to 1 when the redundancy link is lost. In this case, the previous information are not significant. 52.5 Specification

52.5.1

Internal variables None

52.5.2

Internal code
#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $NET_NUM !~ /^\s*\d+\s*$/ || $NET_NUM > 3 #ERROR EPL network number must be a constant in the range [0..3] #ENDIF (* Major faults CAL 48 + 4 * NET_NUM + 2 = INDEX TWB CCAD_FAULTS_RED(INDEX) = BOARD_FLT, BOTH_LOST (* Minor faults CAL INDEX + 1 = INDEX TWB CCAD_FAULTS_RED(INDEX) = MED_1LOST, MED_2LOST TWB CCAD_FAULTS(7) = CUR_R_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 110/342


Section 53

DUAL_EPL_PRES

53.1 Representation

53.2 Function The functional block DUAL_EPL_PRES takes the EPL network number and the EPL equipment number as inputs and creates an application fault when a fault is detected with this EPL equipment. 53.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs NET_NUM EPL network number [0..3] Equipement number [1..239] usint N Y Y -

EQPT_NUM

usint

Output LINK_PRES Link presence B B B B N N N N N N N N Y Y Y Y -

LINK1_PRES Medium 1 presence LINK2_PRES Medium 2 presence


CUR_R_LOST

R link lost on current MFC3000

53.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 111/342


53.4.1 Description of terminals NET_NUM : EPL NETWORK NUMBER [0...3] This EPL network number must be specified to have the right network description needed. EQPT_NUM : EPL EQUIPMENT NUMBER [1...239] This EPL equipment number must be specified to have the right equipment description needed. LINK_PRES : LINK PRESENCE This link presence indication is set to 0 when the equipment is detected as in fault. LINK1_PRES : MEDIUM 1 PRESENCE Set to 0 when the first medium has been lost. LINK2_PRES : MEDIUM 2 PRESENCE Set to 0 when the second medium has been lost. CUR_R_LOST : REDUNDANCY LINK LOST ON CURRENT MFC3000 Set to 1 when the redundancy link is lost. In this case, the previous information are not significant. 53.5 Specification

53.5.1

Internal variables
Name BYTE_INDEX Label Byte index Basic Type Word Origin Internal Private YES Memory area Standard Min range 0 Max range 65535

53.5.2

Internal code
#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $NET_NUM !~ /^\s*\d+\s*$/ || $NET_NUM > 3 #ERROR EPL network number must be a constant in the range [0..3] #ENDIF #IF $EQPT_NUM !~ /^\s*\d+\s*$/ || $EQPT_NUM <1 || $EQPT_NUM > 239 #ERROR Equipment number must be a constant in the range [1..239] #ENDIF CAL 128 + 239 * NET_NUM + EQPT_NUM = BYTE_INDEX TWB CCAD_RECVD_FROM_DUAL (BYTE_INDEX) = LINK_PRES,LINK1_PRES,LINK2_PRES #IF defined ($LINK_PRES) BOO /LINK_PRES = LINK_PRES #ENDIF #IF defined ($LINK1_PRES) BOO /LINK1_PRES = LINK1_PRES #ENDIF #IF defined ($LINK2_PRES) BOO /LINK2_PRES = LINK2_PRES #ENDIF TWB CCAD_FAULTS(7) = CUR_R_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 112/342


Section 54

DUAL_F8000_FLTS

54.1 Representation

54.2 Function The functional block DUAL_F8000_FLTS is used to create an application fault in the current controller for faults detected in the dual controller with the FIP mediums and the FIP board. 54.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Output BOARD_FLT BOTH_LOST MED_1LOST MED_2LOST CUR_R_LOS T Board fault Both mediums lost Medium 1 lost Medium 2 lost R link lost on current MFC3000 B B B B B N N N N N N N N N N Y Y Y Y Y -

54.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 113/342


54.4.1 Description of terminals BOARD_FLT : BOARD FAULT Fault set to 1 when a failure is detected on the dual FIP board (future use). BOTH_LOST : BOTH MEDIUMS LOST Fault set to 1 when communication is failing on both dual FIP mediums 1 & 2. MED_1LOST : MEDIUM 1 LOST Fault set to 1 when communication is failing on dual FIP medium no 1. MED_2LOST : MEDIUM 2 LOST Set to 1 when the redundancy link is lost. In this case, the previous information is not significant. CUR_R_LOST : REDUNDANCY LINK LOST ON CURRENT MFC3000 Set to 1 when the redundancy link is lost. In this case, the previous information are not significant. 54.5 Specification

54.5.1

Internal variables None

54.5.2

Internal code #IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF (* Major faults TWB CCAD_FAULTS(14) = BOARD_FLT, BOTH_LOST (* Minor faults TWB CCAD_FAULTS(15) = MED_1LOST, MED_2LOST TWB CCAD_FAULTS(7) = CUR_R_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 114/342


Section 55

DUAL_F8000_PRES

55.1 Representation

55.2 Function The functional block DUAL_F8000_PRES is used to indicate the state connection of F8000 Field Controller connected to the DUAL MFC3000. 55.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Input EQPT_NUM Output LINK1_PRES LINK2_PRES MAJOR_FLT MINOR_FLT MASTER TRANSP_VAL CUR_R_LOST Medium 1 presence Medium 2 presence Major fault Minor fault Master flag Transport validant R link lost on current MFC3000 B B B B B B B N N N N N N N N N N N N N N Y Y Y Y Y Y Y Equipment number [2..125] USINT N Y Y -

55.4 Use Used only on MFC3000


Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 115/342


55.4.1 Description of terminals EQP_NUM : EQUIPMENT NUMBER Number of equipment to survey on F8000 Network (subscriber number). LINK1_PRES : MEDIUM 1 PRESENCE Set to 0 when the first medium has been lost. LINK2_PRES : MEDIUM 2 PRESENCE Set to 0 when the second medium has been lost. MAJOR_FLT : MAJOR FAULT It indicates major fault (set to 1). Else set to 0 (no major fault). Examples : Controller not present on the Network. Invalid VCOM consomed Device not run MINOR_FLT : MINOR FAULT It indicates minor fault (set to 1). Else set to 0 (no minor fault). Examples : Problems of synchronisation or FIP Medium Redundancy Lost. MASTER : MASTER FLAG It ndicates if F8000 controller is master (set to 1) or slave (set to 0).

TRANSP_VAL :

TRANSPORT VALIDANT Set to 0 when the value of the others parameters are valid, else set to 1.

CUR_R_LOST :

REDUNDANCY LINK LOST ON CURRENT MFC3000 Set to 1 when the redundancy link is lost. In this case, the previous information are not significant.

55.5 Specification

55.5.1

Internal variables None

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 116/342


55.5.2 Internal code
#IF $TARGET_TYPE !~ 'PCX' && $TARGET_TYPE !~ 'SIMULATOR' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $EQPT_NUM !~ /^\s*\d+\s*$/ || $EQPT_NUM > 125 || $EQPT_NUM < 2 #ERROR Equipment number must be a constant in the range [2..125] #ENDIF CAL 143 + EQPT_NUM = BYTE_INDEX TWB CCAD_RECVD_FROM_DUAL (BYTE_INDEX) = LINK1_PRES, MAJOR_FLT, MINOR_FLT, MASTER, , , TRANSP_VAL TWB CCAD_FAULTS(7) = CUR_R_LOST

LINK2_PRES,

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 117/342


Section 56

DUAL_MODBUS_FLTS

56.1 Representation

56.2 Function The functional block DUAL_MODBUS_FLTS is used to create an application fault for faults detected in the dual controller. The functional block takes the Modbus network number as input and signals a fault when the dual Modbus medium is lost. 56.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs NET_NUM Modbus network number [0..3]t W N Y Y -

Output MED_LOST CUR_R_LOS T Medium lost R link lost on current MFC3000 B B N N N N Y Y -

56.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 118/342


56.4.1 Description of terminals NET_NUM : MODBUS NETWORK NUMBER [0...3] Modbus network number. MED_LOST : MEDIUM LOST Fault set to 1 when communication is failing on the dual Modbus network (no connexion established with any Modbus subscriber). CUR_R_LOST : REDUNDANCY LINK LOST ON CURRENT MFC3000 Set to 1 when the redundancy link is lost. In this case, the previous information are not significant. 56.5 Specification

56.5.1

Internal variables None

56.5.2

Internal code

#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $NET_NUM !~ /^\s*\d+\s*$/ || $NET_NUM > 3 #ERROR Modbus network number must be a constant in the range [0..3] #ENDIF (* Major faults CAL 32 + 4 * NET_NUM + 2 = INDEX TWB CCAD_FAULTS_RED(INDEX) = ,MED_LOST TWB CCAD_FAULTS(7) = CUR_R_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 119/342


Section 57

DUAL_MODBUS_PRES

57.1 Representation

57.2 Function The functional block DUAL_MODBUS_PRES is used to create an application fault for faults detected in the dual controller. The functional block takes a Modbus network number and a Modbus equipment number as input and signals connection fault and exchanges fault for the equipment, seen by the dual MFC3000. 57.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs NET_NUM Modbus network number [0..3] Equipement number [1..239] usint N Y Y -

EQPT_NUM

usint

Output LINK1_PRES LINK2_PRES LINK1_EXCH LINK2_EXCH Shortest link presence Longest link presence Shortest link exchanges Longest link exchanges R link lost on current MFC3000 B B B B N N N N N N N N Y Y Y Y -

CUR_R_LOS T

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 120/342


57.4 Use Used for a MFC3000 57.4.1 Description of terminals NET_NUM : MODBUS NETWORK NUMBER [0...3] Modbus network number. EQPT_NUM : EQUIPMENT NUMBER [1...63] Equipment number. LINK1_PRES : CONNECTION OK CHANNEL 1 Set to 1 when Modbus TCP connection is operational for dual MFC3000 on equipments channel 1, 0 otherwise. Not significant (set to 0) on secondary MFC3000 and communication with the equipment configured as mono-medium. LINK2_PRES : CONNECTION OK CHANNEL 2 Set to 1 when Modbus TCP connection is operational for dual MFC3000 on equipments channel 2, 0 otherwise. Not significant (set to 0) for single-channel equipment or on primary MFC3000 and communication with the equipment configured as monomedium. LINK1_EXCH : EXCHANGE OK CHANNEL 1 Set to 1 when there is no Modbus exchange fault via channel 1 for dual MFC3000, set to 0 otherwise (see MFC3000 Startup guide PTP21A41057 for possible faults). When LINK1_PRES=0, set to 0 when significant (see above), 1 otherwise. LINK2_EXCH : EXCHANGE OK CHANNEL 2 Set to 1 when there is no Modbus exchange fault via channel 2 for dual MFC3000, set to 0 otherwise (see MFC3000 Startup guide PTP21A41057 for possible faults). When LINK2_PRES=0, set to 0 when significant (see above), 1 otherwise. CUR_R_LOST : REDUNDANCY LINK LOST ON CURRENT MFC3000 Set to 1 when the redundancy link is lost. In this case, the previous information are not significant.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 121/342

57.5 Specification

57.5.1

Internal variables

Name BIT_INDEX BIT_VALUE BYTE_INDEX

Label Bit index Bit value Byte index

Basic Type usint usint usint

Origin Internal Internal Internal

Private YES YES YES

Memory area Standard Standard Standard

Min range 0 0 0

Max range 255 255 255

57.5.2

Internal code
#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $NET_NUM !~ /^\s*\d+\s*$/ || $NET_NUM > 3 #ERROR Modbus network number must be a constant in the range [0..3] #ENDIF #IF $EQPT_NUM !~ /^\s*\d+\s*$/ || $EQPT_NUM > 63 || $EQPT_NUM == 0 #ERROR Equipment number must be a constant in the range [1..63] #ENDIF #IF defined ($LINK1_PRES) CAL 1 + NET_NUM * 32 + 0 + (EQPT_NUM) / 8 = BYTE_INDEX CAL EQPT_NUM MOD 8 = BIT_INDEX SHR CCAD_RECVD_FROM_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = LINK1_PRES #ENDIF #IF defined ($LINK2_PRES) CAL 1 + NET_NUM * 32 + 8 + (EQPT_NUM) / 8 = BYTE_INDEX CAL EQPT_NUM MOD 8 = BIT_INDEX SHR CCAD_RECVD_FROM_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = LINK2_PRES #ENDIF #IF defined ($LINK1_EXCH) CAL 1 + NET_NUM * 32 + 16 + (EQPT_NUM) / 8 = BYTE_INDEX CAL EQPT_NUM MOD 8 = BIT_INDEX SHR CCAD_RECVD_FROM_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = LINK1_EXCH #ENDIF #IF defined ($LINK2_EXCH) CAL 1 + NET_NUM * 32 + 24 + (EQPT_NUM) / 8 = BYTE_INDEX CAL EQPT_NUM MOD 8 = BIT_INDEX SHR CCAD_RECVD_FROM_DUAL (BYTE_INDEX), BIT_INDEX = BIT_VALUE TWB BIT_VALUE = LINK2_EXCH #ENDIF TWB CCAD_FAULTS(7) = CUR_R_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 122/342


Section 58

DUAL_PROFIBUS_FLTS

58.1 Representation

58.2 Function The functional block DUAL_PROFIBUS_FLTS is used to create an application fault in the dual controller for faults detected with the Profibus mediums and the Profibus board. 58.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs NET_NUM Profibus network number [0..3]t W N Y Y -

Output BOARD_FLT MED_LOST CUR_R_LOS T Board fault Medium lost R link lost on current MFC3000 B B B N N N N N N Y Y Y -

58.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 123/342


58.4.1 Description of terminals NET_NUM : PROFIBUS NETWORK NUMBER [03] Profibus device number with a fault. BOARD_FLT : BOARD FAULT A board fault is signalled if the board is missing or if a fault occurs when initializing and starting the board or if downloading a new configuration fails. MED_LOST : MEDIUM LOST A medium lost is signalled if the master cannot communicate with at least one slave. CUR_R_LOST : REDUNDANCY LINK LOST ON CURRENT MFC3000 Set to 1 when the redundancy link is lost. In this case, the previous information are not significant. 58.5 Specification

58.5.1

Internal variables None

58.5.2

Internal code #IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $NET_NUM !~ /^\s*\d+\s*$/ || $NET_NUM > 3 #ERROR Profibus network number must be a constant in the range [0..3] #ENDIF (* Major faults CAL 16 + 4 * NET_NUM + 2 = INDEX TWB CCAD_FAULTS(INDEX) = BOARD_FLT, MED_LOST TWB CCAD_FAULTS(7) = CUR_R_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 124/342


Section 59

DUAL_REDUNDANCY_FLTS

59.1 Representation

59.2 Function The functional block DUAL_REDUNDANCY_FLTS is used in the dual controller to signal an application fault when the Primary redundancy link or Auxiliary redundancy link or both are lost. 59.3 Arguments Characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Output R_LOST AUX_LOST CUR_R_LOS T R link lost Auxiliary link lost R link lost on current MFC3000 B B B N N N N N N Y Y Y -

59.4 Use Used for a MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 125/342

59.4.1

Description of terminals R_LOST : REDUNDANCY LINK LOST Set if loss of one of auxiliary link (S8000, E8000 or F8000). AUX_LOST : AUXILLARY LINK LOST Set if the redundant controller looses of the redundancy link. CUR_R_LOST : REDUNDANCY LINK LOST ON CURRENT MFC3000 Set to 1 when the redundancy link is lost. In this case, the previous information are not significant.

59.5 Specification

59.5.1

Internal variables None

59.5.2

Internal code #IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF (* Minor faults TWB CCAD_FAULTS_RED(7) = R_LOST, AUX_LOST TWB CCAD_FAULTS(7) = CUR_R_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 126/342


Section 60

DUAL_STI300_FLTS

60.1 Representation

60.2 Function STI300 Faults on the dual MFC3000. 60.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Output GISR PPSR SBPR ITCR WBDR1 WBDR2 WBDR3 SPSR1 SPSR2 SPSR3 CUR_R_L OST General Internal Status OK Process Power Supply ON STI Board Presence OK Internal Test Completion OK Wire Break Detected Channel 1 Wire Break Detected Channel 2 Wire Break Detected Channel 3 Sensor Power Supply ON Channel 1 Sensor Power Supply ON Channel 2 Sensor Power Supply ON Channel 3 R link lost on current MFC3000 B B B B B B B B B B B N N N N N N N N N N H N N N N N N N N N N N Y Y Y Y Y Y Y Y Y Y Y -

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 127/342


60.4 Use Used for a MFC3000 60.4.1 Description of terminals The elements of "Dual STI300 Faults" functional block are those generated by redundant machine. Their definition is not given again here. GISR : General Internal Status OK This status indicates that the STI300 board is correctly initialized. No fault has been detected by this board during initialization. This Status is generated by both "General Intrinsic Failure" bit and "Board Initialized" bit. These data are read from STI300 board. This Status is set to 1 if it is OK. Process Power Supply ON This status indicates that the board has detected a correct power supply provided by the process. It is set to 1 if it is OK. SBPR : STI Board Presence OK This status indicates that the board has been detected by the driver and this driver performs periodic accesses to this board for register reading. It is set to 1 if it is OK. ITCR : Internal Test Completion OK This status indicates the completion of self tests performed by the STI300 board. These tests are performed only if Process Power is on. It is set to 1 if it is OK. WBDR1 : Wire Break Detected - Channel 1 This fault is set to 1 if a wire break has been detected by the STI300 board on channel 1. This fault may occur if the high threshold or low threshold has been trespassed by the input signal. Wire Break Detected - Channel 2 This fault is set to 1 if a wire break has been detected by the STI300 board on channel 2. Wire Break Detected - Channel 3 This fault is set to 1 if a wire break has been detected by the STI300 board on channel 3.

PPSR :

WBDR2 :

WBDR 3 :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 128/342


SPSR1 : Sensor Power Supply ON - Channel 1 This state is set to 1 when STI300 board has detected that the sensor or interface on channel 1 is powered on. Sensor Power Supply ON - Channel 2 This state is set to 1 when STI300 board has detected that the sensor or interface on channel 2 is powered on. Sensor Power Supply ON - Channel 3 This state is set to 1 when STI300 board has detected that the sensor or interface on channel 3 is powered on. CUR_R_LOST : REDUNDANCY LINK LOST ON CURRENT MFC3000 Set to 1 when the redundancy link is lost. In this case, the previous information are not significant. 60.5 Specification

SPSR2 :

SPSR3 :

60.5.1

Internal variables None

60.5.2

Internal code
(* Major faults TWB CCAD_FAULTS(66) = GISR, PPSR, BINR, SBPR #IF defined ($GISR) BOO /GISR = GISR #ENDIF #IF defined ($PPSR) BOO /PPSR = PPSR #ENDIF #IF defined ($BINR) BOO /BINR = BINR #ENDIF #IF defined ($SBPR) BOO /SBPR = SBPR #ENDIF (* Minor faults TWB CCAD_FAULTS(67) = ITCR, WBDR1, WBDR2, WBDR3, SPSR1, SPSR2, SPSR3 #IF defined ($ITCR) BOO /ITCR = ITCR #ENDIF #IF defined ($SPSR1) BOO /SPSR1 = SPSR1 #ENDIF #IF defined ($SPSR2) BOO /SPSR2 = SPSR2 #ENDIF #IF defined ($SPSR3) BOO /SPSR3 = SPSR3 #ENDIF TWB CCAD_FAULTS(7) = CUR_R_LOST

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 129/342


Section 61

END OF SEQUENCE SEQ_END

61.1 Representation

61.2 Function This function block is the last step of the part ON/OFF of the sequence. After this step activation, the sequence becomes untriggered and returns to step zero.

61.3 Argument Characteristics


NAME Inputs STEP_NB Outputs SEQ_LK P_END DESCRIPTION Current step number Sequence link End of sequence pulsed TYPE I W 14 Length Default value MAND data Y Y MAND. connection Y Y

61.4 Use

61.4.1

Description of terminals

61.4.1.1

Inputs STEP_NB: Current step number (Integer type constant).

61.4.1.2

Outputs SEQ_LK: Sequence link (Word, length 14). This link is used to exchange information between the head of sequence and the steps of sequence (variable in read/write access). P_END: End of sequence (pulse 1 cycle) , available for logic application (Boolean).

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 130/342


61.4.2 Associated MVM MVM in IEEE standard: SEQ_END_IEEE MVM in KKS standard: SEQ_END_KKS

61.5 Code

61.5.1

Internal Variables
NAME I_P_END DESCRIPTION END OF SEQUENCE OUTPUT TYPE B INIT. VAL 0 PRIVATE YES REDUND YES

61.5.2

Function Block Code


(* FUNCTION BLOCK SEQ_END :END OF SEQUENCE (* ESTABLISH ON 24/03/04 BY C. BOULEY (* VERSION 2.1 (* Modifications : (* 21/11/02 - V1.0 : AUTHOR : C. BOULEY : First issue (* 12/01/04 - V1.1 : AUTHOR : C. BOULEY : Component instance name is VARIANT to allow KKS or IEEE naming rules. (* 06/02/04 - V2.0 : AUTHOR : C. BOULEY : Lenght of SEQ_LK is set to 14 in accordance with BF (* 24/03/04 - V2.1 : AUTHOR : C. BOULEY : Addition of pulsed output P_END, indicating the end of sequence for logic application #IF $TARGET_TYPE =~ 'C8035' || $TARGET_TYPE =~ 'RX3i' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF BF( SEQ_END_BOPE, STEP_NB, SEQ_LK, I_P_END) # IF defined ($P_END) TRF I_P_END = P_END # ENDIF

61.5.3

Basic Function Used SEQ_END

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 131/342


Section 62

EQ : EQUALITY

62.1 Representation

62.2 Function The functionality of the EQ function Block is as the following : IF(IN1==IN2) RE=1 ELSE RE=0 62.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 Outputs RE Parameters Result B N Y Y Input 1 Input 2 ANY_NUM ANY_NUM Y(-) Y(-) Y Y Y Y -

62.4 Use No State variables. It is a function block in the meaning of IEC 62.5 Specification

62.5.1

Function Block Code BOO {IN1=IN2} = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 132/342


Section 63

EVLOG : EVENT LOG


Specification version : 1.8(05/18/04). This block will change libraries : it will belong to System Function Block Library for 3.3.2 CONTROCAD Release on July 2002.

63.1 Representation

63.2 Function The event log block stores successive values of selected variables for an off-line display. Variables are designated by their corresponding registers. The values are stored during a period in which the event has occurred. The Controset interface will allow bloc configuration, monitoring of the storage, and data retrieval. This will be made possible by two, internal, buffers which are accessed by the block and Controset (TAB_CONFIG and TAB_RESULT) The bloc can also be monitored by either its physical inputs (names wih capital letters) or by Controset, via the buffers, (names in italic) but not by both at the same time. It is Controset who decides who's in charge with the cmd_cset bit. Once the settings have been read by the block from the TAB_CONFIG buffer, as well as from the TAB_RESULT header, and validated by the block, storing can start by the START input or the start_cset bit of the TAB_RESULT buffer. Unless the settings are correct, the storing can not go ahead. While waiting for a trigger event, the block stores, at every cycle or n cycles according to configuration (reg_fonct), the values of selected variables, each in its reserved buffer space. However, not all the space is used before the trigger event but only part of it (pre-trigger) while the rest of the space will be filled up by the values of the variable after the event. The part of the space used before the event is specified by the parameter seg_cset (storage space before trigger = 1/seg_cset of the whole space destined for one variable) of the TAB_RESULT buffer. The trigger can be forced by the TRIG_ON input or by the trig_on_cset bit. Storing, before or after trigger, can be stopped by the CANCEL input or cancel_cset bit.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 133/342

The block recordes the value of each variable at every n cycles of its execution. Therefore the time aspect can be found out by, simply, knowing the cycle time of the diagram and the value n. The output MEM indicates the state of the block : MEM = 0 block not configured at all or not well configured MEM = 1 block configured and waiting for a START or start_cset MEM = 2 recording on the first segment and waiting for trigger to fill up the second segment MEM = 3 recording on the second segment is in progress after trigger MEM = 4 recording finished and block is in locked state until values recorded have been downloaded. The output FAULT_1 indicates which equation set the trigger first : 0, 1, 2, 3, 4 or 5 respectively no fault, 1st trigger, 2nd trigger, 3rd trigger, TRIG_ON or trig_on_cset A segment of registers for storing data is assigned to each selected 16 bits analogue variable, a double segment for each 32 bits analogue variable and one segment for all logic variables. The size of the segment depends on the number of variables to record, their type (size), as well as the storage space.

63.2.1

Configuration of the event log block The header of the configuration table TAB_CONFIG contains the trigger equations settings. Each of the three equations comprises a comparison variables (CLASSE_REGx, TYPE_REGx, RANG_REGx, BIT_OFFSET), the operator (OPx) and a threashold (SEUILx) . It contains for each variable, its class (%I, %R or %M), its type (logical, integer, word, double, float or unsigned long), its rank and its offset bit (only for logic variable in %R class).

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 134/342


The maximum number of stored variables is 16 logic and 9 analogue, 25 in all. The memory space allocated to each variable, and therefore the time of memorisation, is calculated according to the number of analogue variables to memorise and their type (16 or 32 bits). A number of logic variables of 0 or 16 use the same memory space. The block can memorise two types of analogue variables : 16 or 32 bits analogue variables. The triggers diagram is as follows: Any equation not set or wrongly set is considered to be true. 4 operators are allowed : OPx OPx OPx OPx OPx 0 corresponds to = 1 corresponds to 2 corresponds to 3 corresponds to 4 corresponds to rising edge (for logic variables only) OPx = 5 corresponds to falling edge (for logic variables only) = = = = =

Notes : More than one EVLOG blocks can be put into the same diagram. <= and >= operators should not be used with logic variables otherwise, the equation is considered to be true. Operators 4 and 5 should not be used with numeric variables otherwise, the equation is considered to be true.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 135/342


63.2.2 Configuration table structure (TAB_CONFIG) TAB_CONFIG contains 122 elements, the first register indicates the number of variables to memorise, 21 registers for the trigger parameters and 100 registers for the parameters of the 25 variables to memorise (16 logical + 9 analogue). Apart from the threashold registers, which are expressed on 32 bits words, the other elements are 16 bit words. 1st part : Trigger parameters:
NBR_VARIAB LE RANG_REG2 SEUIL3 CLASSE_REG 1 BIT_OFFSET2 TYPE_RE G1 OP2 RANG_REG 1 SEUIL2 BIT_OFFSET1 CLASSE_REG 3 OP1 TYPE_RE G3 SEUIL1 RANG_REG 3 CLASSE_REG 2 BIT_OFFSET3 TYPE_RE G2 OP3

2nd part : Settings for variables to memorise:


CLASSE_REG1 TYPE_REG1 RANG_REG1 BIT_OFFSET1 CLASSE_REG2 4 TYPE_REG24 RANG_REG24 BIT_OFFSET24

NBR_VARIABLE : contains the total number of variables to memorise. CLASSE_REGx RANG_REGx TYPE_REGx : indicates the class register of the variable x to memorise ( 1 %I, 2 %R, "3" %AI, "4" %M, "5" %Q et "6" %AQ). : indicates the register row. : indicates the type of variable to memorise ( 1 type logical, 2 type integer, 3 type word, 4 type double, 5 type float, 6 type unsigned long). : indicates the offset in the specified register for the logic %R class variables starting at 1 (1 indicates the first bit)

BIT_OFFSETx

Variables must be put in the configuration table in the following order: logic, analogue 16 bits and analogue 32 bits. Trigger comparison values must be of the same type as that of the variables against which they will be compared. The types supported are : INTEGER, WORD, LONG, REAL, DOUBLE A configuration is considered valid if the number specified in the first register of TAB_CONFIG is less than or equal to the number of configured variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 136/342


63.2.3 Result table structure The result table (TAB_RESULT) contains a header and 500 registers that will be filled up by part of the data recorded in the blocs memory. The blocks memory is much larger than TAB_RESULT. When memorisation is finished, the bloc checks the register reg_fonct to see which segement of data is wanted then copies it from blocs memory to TAB_RESULT. The bloc memory is of this form :
Control nbr_pert, pos0, pos_trigger, nbr_reg, reg_fonct, seg_cset LOGICAL L0,,L16 ANALOGUE A1 ANALOGUE ANALOGUE An

T = Trigger position (fixed by seg_cset register) 0 = trigger event position (between the beginning of the segment and T), this position is specified in pos0 register in the header. The result table header contains 12 (16 bits) registers: nbr_pert pos0 : : specifies the number of registers in this table. specifies the index at which trigger occured ( (T-1) ). contains the position at which memorisation will continue after trigger occurs(T). contains the number of registers for each 16 bits variable. working register which contains control bits : Low byte : bit0 : indicates if the block is locked after filling up its memory

pos_trigger : nbr_reg reg_fonct : :

the rest of the bits are not used currently High byte : At configuration and while memorising, this byte should be set to the number n of points to ommit (1 out of n points will be recorded). (1<=n<=256) Ex : if n = 5, 1 point out of five will be recorded When the block has finished memorising and is locked, this byte should be set to the segment number of the results wanted.

Ex : if the total memory of the bloc is 12000 words then to get all the memorised points the user needs to set the high byte to 1 for the first segment, then 2 for the secondand 24 for the last.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 137/342


year_reg : stores the year for the trigger date stores the month for the trigger date when it occurs stores the day for the trigger date when it occurs stores the hour for the trigger date when it occurs stores the minute for the trigger date when it occurs stores the second for the trigger date when it occurs This register is used for two purposes.* month_reg : day_reg hour_reg min_reg sec_reg seg_cset : : : : :

The low order byte is used to store the number on which the length of the segment is divided to find the length of the pre-trigger. Ex : 8 means the length of memorising zone before trigger is 1/8th of the length of the segment intended for the variable. The high order byte is used by Controset in order to control the bloc : bit8 : start_cset : Start recording

bit9 : trig_on_cset : Controset manual trigger bit10: cancel_cset bit11: cmd_cset the block (0) : Controset cancel recording : who controles Controset (1) or

bit12: restart_cset : Restart recording

The rest of the space is to be shared between the variables to be memorised according to the formula bellow: Number of registers =

Bloc _ buffer _ size (1 number _ of _ 16bits _ var iables ) (2 * number _ of _ 32bits _ var iables
Here are few examples for a block with 12000 words memory Number of logic variables 0 0 1 7 16 16 16 16 Number of 16 bits variables 1 1 1 1 1 2 4 9 Number of 32 bits variables 0 1 1 1 1 2 4 0 Number of registers 6000 3000 3000 3000 3000 1714 923 1200

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 138/342


16 0 9 631

63.2.4

Global working graph

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 139/342


63.3 Arguments Characteristics
Name Description Type Neg Range Mand. Def. value Connection N N N N 0 0 0 0 Mand. Data Y Y Y Y Advised parameters value First scan value -

Inputs START CANCEL TRIG_ON RESTART Outputs MEM FAULT_1 Parameters SMALL_SIZE

Start memorisation Cancel memorisation Command ON manually Restart memorisation

B B B B

N N N N

State of memorisation First Fault Small size choice (3000 Words)

W W B

N N N

[0-4] [0-5] -

Y Y N Not connected (7500 Words) Not connected (3000 Words)

Y Y N

5000_SIZE

5000 size selected between the two small sizes (5000 or 3000)

63.4 Use Used for a C8035, C8075 and RX3i

63.4.1

Parameters to initialize Small_size to choice the minimal size of the block (3000 Words for the internal array TAB_RESULT[]) ; 5000_size to choice between the two small sizes (5000 or 3000), the medium size for the internal array TAB_RESULT[] ; Without any value on SMALL_SIZE or 5000_SIZE, the block will be intialized like the previous version of the EVLOG, with 7500 Words for the internal array TAB_RESULT[] ;

63.4.2

Scheme None

63.4.3

Associated FGT None

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 140/342


63.5 Specification

63.5.1

Internal Variables and State variables


TAB_CONFIG TAB_RESULT_EXT STA_MEMO_CONF1 STA_MEMO_CONF2 STA_COUNT_REG STA_COUNT_LOG COM : Configuration table, TYPE : WORD, LENGTH=122 COM: External result table, TYPE : WORD, LENGTH=512 COM : Saves configuration, TYPE : WORD, LENGTH=116 COM : Saves threasholds, TYPE : REAL, LENGTH=3 COM : Register index TYPE : WORD COM : Logic variable counter, TYPE : WORD

STA_COUNT_ANAL16 COM : 16 bits analogue variables counter, TYPE : WORD STA_COUNT_ANAL32 COM : 32 bits analogue variables counter, TYPE : WORD STA_TRIGGER STA_NBR_REG STA_NBR_LOG STA_NBR_ANAL16 STA_NBR_ANAL32 STA_SEG_CSET STA_TRIG1 STA_TRIG2 STA_TRIG3 STA_COND1 STA_COND2 COM : Trigger state, TYPE : WORD COM : Number of registers for a channel, TYPE : WORD COM : Number of logic variables, TYPE : WORD COM : Number of 16 bits analogue variables, TYPE : WORD COM : Number of 32 bits analogue variables, TYPE : WORD COM : Segment divider for pre-trigger, TYPE : WORD COM : Previous state of boolean value equation for edge detection, TYPE : BOOLEAN COM : Previous state of boolean value equation for edge detection, TYPE : BOOLEAN COM : Previous state of boolean value equation for edge detection, TYPE : BOOLEAN of of of 1st 2nd 3rd

COM : previous state of 1st equation, to find out who triggered, TYPE : BOOLEAN COM : previous state of 2nd equation, to find out who triggered, TYPE : BOOLEAN

STA_TMP_FAULT_1 COM : Previous value of FAULT_1, TYPE : WORD STA_N_FOIS COM : Previous value of number recording a point, TYPE : WORD of times before

63.5.2

Function block code None

63.5.3

Basic function used EVLOG(), EVLOG_5000(), EVLOG_3000().

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 141/342


Section 64

EXP : EXPONENTIAL

64.1 Representation

64.2 Function The function block EXP calculates the exponential of the input IN. 64.3 Arguments Characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator result Real Y(-) ]0 ; 3.4E+38[ Y N Input Real Y(-) ]-3.4E+38 ; 88.72[ Y N -

64.4 Use No limitation and no indication of overflow. It is a function in the meaning of IEC 64.5 Specification

64.5.1

Generated expression EXP(IN)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 142/342


Section 65

EXP : EXPONENTIAL

65.1 Representation

65.2 Function The function block EXP calculates the exponential of the input IN. 65.3 Arguments characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator result Real Y(-) ]0 ; 3.4E+38[ Y N Input Real Y(-) ]-3.4E+38 ; 88.72[ Y N -

65.4 USE No limitation and no indication of overflow. It is a function in the meaning of IEC 65.5 SPECIFICATION

65.5.1

Generated expression EXP(IN)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 143/342


Section 66

EXPT : EXPONENTIATION

66.1 Representation

66.2 Function The functionnality of the function block EXPT calculates as following: RE = IN1^IN2

66.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 Outputs RE Parameters Operator result R Y(-) Y N Input 1 Input 2 I/R R N Y(-) >0 Y Y N N -

66.4 Use No indication of overflow. There is a limitation if IN1< 0 It is a function in the meaning of IEC.

66.5 Specification 1. Generated expression IN1 ^ IN2

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 144/342


Section 67

EXT : EXTENSION

67.1 Representation

67.2 Function The functionality of the EXT function block is : IF IN = 0 IF IN = 1 then RE = 0x0000 then RE = 0xFFFF

67.3 Arguments characteristics


Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator result I/W Y(/) Y N Input Boolean N Y Y -

67.4 Use This block is a function in the meaning of IEC.

67.5 Specification

67.5.1

Generated expression IN

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 145/342


67.5.2 Function block code
/* Start of the original Program */ if(!INIT) { if (IN<0) { RE = PAR[0] + IN*(PAR[1]-PAR[0])*10; } else if (IN >=1) { RE = PAR[10] + (IN-1)*(PAR[10]-PAR[9])*10; } else { I=(CCAD_INTEGER) (IN*10); X=(CCAD_REAL)I/10; switch (I) { case 0: F = PAR[0]; G = PAR[1]; break; case 1: F = PAR[1]; G = PAR[2]; break; case 2: F = PAR[2]; G = PAR[3]; break; case 3: F = PAR[3]; G = PAR[4]; break; case 4: F = PAR[4]; G = PAR[5]; break; case 5: F = PAR[5]; G = PAR[6]; break; case 6: F = PAR[6]; G = PAR[7]; break; case 7: F = PAR[7]; G = PAR[8]; break; case 8: F = PAR[8]; G = PAR[9]; break; case 9: F = PAR[9]; G = PAR[10]; break; } RE =(CCAD_REAL) (F + ((IN-X)/0.1)*(G-F)); } }/* End of the original program */

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 146/342


Section 68

EXT_CTRL_FLTS

68.1 Representation

68.2

Function The EXT_CTRL_FLTS function block allows to use some defaults of the external controller. It can be used in any controller of C8035 type (cell, field or IHR controller). But the external controller must exchange its defaults on the field network with the C8035 or C8075 controller in which is used this function block. The faults A, SY, SN, M, F and RF are common to all the controllers. The faults GF, RS, GS and C concern only the cell controller. The faults SLxx concern the IHR controller.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 147/342


68.3 Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Input ABO Outputs GN A SYN SN M F RF GF_SL02 RS_SL03 GS_SL04 C_SL05 SL06 SL07 SL08 SL09 SL10 Controller presence Application fault Synchronization fault No-jaming fault Module fault I/O forcing Redundancy fault Fault Fault Fault Fault Slot Fault Slot Fault Slot Fault Slot Fault Slot Fault B B B B B B B B B B B B B B B B N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Input W N Y N

68.4

Use Used for a C8035 and RX3i

68.4.1

Description of terminals ABO : SUBCRIBER NUMBER This word shows the subcriber number of the external controller. It is indicated in the properties windows of the external controller. CONTROLLER PRESENCE This bit is set if the controller is present on the F8000 field network. Application fault This fault is set by the application using the FS_DF_A indicator. Synchronization fault This fault is set if the synchronization can be realized in at least 30 seconds before. In the field controller, the synchronisation needs to receive the synchronization pip all 5 seconds and the time message from the supervisor.

GN :

A:

SY :

SN :

NON-BLOCKING fault

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 148/342


This fault is set to 1 when at least one fault appears in one of both fault tables of the controller, and is set to 0 when the both fault tables are erased by the operator with P80. M: Module fault This fault is set to 1 when at least one module is declared in fault, and erased when entered faults in the IO faults table are acquitted by the operator with P80. I/O Forcing This fault is set to 1 when at least one forcing is in the controller. Else it is set to 0. F8000 medium redundancy fault This fault is set if the FBC ready condition is true AND the medium fault condition given by the FBC30 is true, else it is set to 0. F8000 communication global fault This fault is set if the FBC ready condition is false OR if this condition is true AND no operational network condition given by the FBC30 is true, else it is set to 0. S8000 medium redundancy fault If the unit network is S8000-E, then it is always set to 0. If the unit network is S8000-F, then it is set if the FBC Ready condition is true AND medium default given by the FBC30 is true on a redundant network, else it is set to 0. S8000 communication global fault It is set if the S Drive Interface condition is false, OR if this S Driver OK is false, OR the S Driver connected is false, else it is set to 0. Supervisor communication fault It is set if the cell controller has not relation with the supervisor (no reception of the time message since at least 30 seconds), else it is set to 0. It corresponds to the S_OK indicator. IHR module fault This fault is set to 1 when the module, setting on the slot number x, is declared in fault, and set to 0 when entered faults in the IO faults table are acquitted by the operator with P80.

F:

RF :

GF :

RS :

GS :

C:

SLx :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 149/342


68.5 SPECIFICATIONS

68.5.1

Internal variables TEMP

68.5.2

Internal code #IF $TARGET_TYPE !~ 'C8035' && $TARGET_TYPE !~ 'RX3i' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF CAL 16 ABO/2 = TMP CAL PRSCE_STAT_TB(TMP) = TMP TWB TMP = GN, A, SY, SN, M, F, RF, GF_SL02, RS_SL03, GS_SL04, C_SL05, SL6, SL07, SL08, SL09, SL10

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 150/342


Section 69

F_TRIG : FALLING EDGE DETECTOR

69.1 Representation

Cycle time

IN

RE

69.2 Function The RE output of an F_TRIG function block shall stand at the Boolean 1 value from one execution of the function block to the next, following the 1 to 0 transition of the IN input, and shall return to 0 at the next execution. RE(K) = IN(K-1) and NOT IN(K)

69.3 Arguments characteristics


Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value 0

Inputs IN Outputs RE Parameters

Input Result

Boolean Boolean

Y(/) N

Y Y

N Y

69.4 USE Not used for a CE2000

Function block with State variables : 1 Boolean variable.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 151/342


69.5 Specification

69.5.1

State variables M : Boolean state variable, redundant, with a initial value set to 0.

69.5.2

Function block code (* BEGIN F_TRIG) #IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF IF INIT THEN BOO 0 = RE ELSE BOO M./IN = RE ENDIF BOO IN = M (* END F_TRIG)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 152/342


Section 70

FCL_OMR

70.1 Representation

70.2 Function The FCL_OMR function block sets informations for redundancy management and gives informations on redundancy and operationnal mode of the field controller. It can only be used in the field controller.

70.3 Arguments characteristics


Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs DMVE Input B N N Y

Outputs MTF8 Indicator B N N Y

70.4 Use Used for a C8035 field controller and RX3i

70.4.1

Description of terminals DMVE : This indicator allows the application to ask punctually the topple in the slave mode of the controller, entailling the topple of the dual controller in the master mode. It is had to set to 1 by the application during at least one sweep to ask the topple in the slave mode of the controller. The application must set to 0 after one sweep.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 153/342


MTF8 : This indicator shows the function mode, master or slave, of the cell controller vis--vis F8000. It is set to 1 for master F8000 operational mode. It is set to 0 for the slave mode

70.5 Specification

70.5.1

Internal variables None

70.5.2

Internal code #IF $TARGET_CONFIGURATION !~ 'C8035(fc|cc1|cc2)_' && $TARGET_CONFIGURATION !~ 'RX3i' #ERROR Invalid target type '$TARGET_CONFIGURATION' #ENDIF IF INIT THEN BOO 0 = DMVME_PREV ELSE #IF defined ($DMVE) IF { DMVE = 1 } THEN IF {DMVME_PREV = 0} THEN BF (C_STORE_BIT_M, 4095, 1) ENDIF ELSE IF {DMVME_PREV = 1} THEN BF (C_STORE_BIT_M, 4095, 0) ENDIF ENDIF BOO DMVE = DMVME_PREV #ENDIF ENDIF (* ca on le fait tout le temps #IF defined ($MTF8) BF (C_GET_BIT_M, 4094, MTF8) #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 154/342


Section 71

FGEN : FUNCTION GENERATOR

71.1 Representation

RE
12 10 8 6 4 2 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2

IN

71.2 Function The function block calculates the value of output RE based on the standardised input IN. This function, F(IN), is defined by 11 equidistant x-axis points corresponding to 11 parameters, PAR[1]..PAR[11]. The curve between these points is linear. If x<IN<x+0.1 where : x = [0.0 ;0.1 ;0.2 ;0.9] RE = (IN-x)/0.1 *[F(x+0.1) F(x)] + F(x) If IN>1 the ramp considered is that of segment 0.9 1 If IN<0 the ramp considered is that of segment 0-0.1.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 155/342


71.3 Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters PAR(PAR[]) Result Parameter array f(0),f(0.1)f(0.9),f(1) R R N N Y Y Y Y Input R Y [0 ;1] Y Y -

71.4 Use Not used for the MFC3000

Parameter to be initilized : PAR : Array of 11 PARAMETERS defining the y-axis of the 11 points of the curve. Comments : Overflow may occur during the calculation of RE. Function block without state variables 71.5 Specification

71.5.1

Internal Variables I X F G : : : : INTEGER REAL REAL REAL : internal use, not a state variable : internal use, not a state variable : internal use, not a state variable : internal use, not a state variable

71.5.2

Basic function used FGEN(IN,PAR,RE,3)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 156/342


Section 72

FUNCTION GROUP SEQ_FG

72.1 Representation

72.2 Function The function group function block is used to control a group of subordinate function blocks. The function group produces start and stop orders to subordinate systems and supervises the execution of the command.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 157/342


72.2.1 Initialisation The ON, OFF and blocking orders are initialised to 0. At the first controller start up, the group is in the Automatic sequence activation mode and the sequence is in the initial status. 72.2.2 Operation The function group can be switched on, off or to stop mode individually by the operator on the HMI or automatically from an upper level function, according to the logic criteria. After an individual or automatic ON command ([MAN_1] or [AUT1]) validated by the starting [SC1] and permanent [PC1] releases, the sequence is started on the sequence ON part. This ON command sets the [ORD1] output and resets the [ORD0] and [ORDS] outputs. In the same time, a pulse of 1 controller cycle is given on [PUL_1] output. The first step of the ON sequence so is activated. But if jump condition of ON sequence [C_JMP1] is present, the activated step is not the first of the ON sequence, but the one given by input [JMP1]. After an individual or automatic OFF command ([MAN_0] or [AUT0]) validated by the stopping [SC0] and permanent [PC0] releases are present, the sequence is launched on the sequence OFF part. This OFF command sets the [ORD0] output and resets the [ORD1] and [ORDS] outputs. In the same time, a pulse of 1 controller cycle is given on [PUL_0] output. The first step of the OFF sequence so is activated. But if jump condition of OFF sequence [C_JMP0] is present, the activated step is not the first of the OFF sequence, but the one given by input [JMP0]. If the stopping release criteria [C_BLK] are present, the individual or automatic STOP command [BLK] puts the function group into blocking mode, sets the [ORDS] output and resets the ON and OFF orders. Consequently it deactivates the supervision of subordinate systems. OFF commands have higher priority than ON commands. Furthermore, the STOP command has higher priority than the ON and OFF commands. Feedback signals in or out service ([FB1] or [FB0]) are checked before time-out supervision. One time-out value monitors attainment of the ON state [TLTE_1] and another time-out value monitors attainment of the OFF state [TLTE_0]. These timeout values can be infinite by setting the corresponding parameter to zero. In case of a loss of feedback or on a group time-out, the function group is disturbed and sets the [FG_FLT] output. After a fault, acknowledgment command from operator [ACK] has to be validated to indicate that the fault has been seen by the operator (especially on BADEN projects). If [ACK] is not connected, the default is always acknowledged (case of BOPE projects). The missing of starting or permanent conditions ([SC1] or [PC1]) when the operator gives an individual ON command [MAN_1], induces the apparition of a message on the Centralog displayed by the individual ON command locking [LCK1]. The missing of starting or permanent conditions ([SC0] or [PC0]) when the operator gives an individual OFF command [MAN_0], induces the apparition of a message on the Centralog displayed by the individual OFF command locking [LCK0].

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 158/342


The missing of blocking conditions [C_BLK] when the operator gives an individual blocking command [BLK], induces the apparition of a message on the Centralog displayed by the individual blocking command locking [LCKS]. After a start or stop order, as long as feedbacks are expected and the group isnt in fault state, the group stays in progress [GP_PRG]. The operator can choose between three sequence activation modes: automatic [AUT], step by step [S/S] or operator guide mode [OG]. In automatic mode, the sequence evolution is continuous, in operator guide the evolution is individual and in step by step mode the operator must confirm the automatic progress of the sequence at every step. By default, "operator guide" mode [OG] is not activated. It is possible to change modes when the sequence is in progress. In this case the sequence is blocked and a new operator order is needed to re-start the sequence. If the change mode is not connected, the group is in Automatic mode. If an automatic order ([AUT1] or [AUT0]) is given when the sequence is in step by step mode, the sequence automatically returns in AUTOMATIC mode, with an alarm [AUTO_AL] sent to the operator.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 159/342

72.3 Arguments characteristics


NAME Inputs MAN_1 AUT_1 SC_1 PC_1 MAN_0 AUT_0 SC_0 PC_0 BLK C_BLK AUTO S_S OG ACK FB_1 FB_0 C_JMP1 JMP1 C_JMP0 JMP0 Outputs M_ON PUL_1 LCK1 STATE_1 M_OFF PUL_0 LCK0 STATE_0 ORDS LCKS FG_STE FG_FLT GP_PRG CUR_I CUR_G CUR_T CUR_GR MAX_GR AUTO_AL SEQ_STE STEP_ACT STEP_NEXT SEQ_LK Parameters TLTE_1 TLTE_0 STP_OFF REINIT RESEND Group starting TLTE value Group stopping TLTE value OFF sequence last step Reinit to step 0 after fault or blocking state Resending order L L I B B 0 0 0 0 0 Y Y Y Y Y TLTE_1 TLTE_0 ORD1 Group ON order PULSE ON ORDER Individual ON command locking ON feedback validated by ON order Group OFF order PULSE OFF ORDER Individual OFF command locking OFF feedback validated by OFF order Group blocking order Individual blocking command locking Group state animation Group fault alarm Group in progress Step current intermediate TLTE Step current global TLTE Step current transfer time Group current TLTE Group maximum TLTE Step to step to Auto mode transition Sequence state Active step number Next step to be activated Sequence link B B B B B B B B B B W B B D D D D D B W W W W Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y ORD_ON PULSE_ON LCK1 STATE_ON ORD_OFF PULSE_OFF LCK0 STATE_OFF ORDS LCKS FG_STE FG_FLT GP_PRG CUR_I CUR_G CUR_T CUR_GR MAX_GR AUTO_AL SEQ_STE STEP_ACT STEP_NEXT SEQ_LK AUT1 SC1 PC1 AUT0 SC0 PC0 Group manual ON command Group automatic ON command Starting releases Permanent ON releases Group manual OFF command Group automatic OFF command Stopping releases Permanent ON releases Blocking command Blocking releases Automatic mode Step by step mode Operator guide mode Fault acknowledgment Feedback group in service Feedback group out service ON sequence jump conditions ON sequence jump step number OFF sequence jump conditions OFF sequence jump step number B B B B B B B B B B B B B B B B B I B I 0 0 1 1 0 0 1 1 0 1 1 0 0 1 / 0 0 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y CMD.ON AUTO_ON SC_ON PC_ON CMD.OFF AUTO_OFF SC_OFF PC_OFF CMD.BLK C_BLK MODE.AUTO MODE.STEP ACK FB_ON FB_OFF C_JMP1 C_JMP0 DISPLAY NAME DESCRIPTION TYPE Lengt h Default value MAND. data MAND. connectio n MVM Link (Path)

AUT S/S

FB1 FB0

ORD0

Y Y Y Y Y Y Y Y Y Y Y

14

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 160/342


72.4 Use

72.4.1

Description of terminals

72.4.1.1

Inputs MAN_1 Group individual starting command (Boolean). This pulse signal initiates the start sequence and comes from operator level individual command. Group automatic starting command (Boolean). This pulse or maintained signal initiates the start sequence and comes from the upper level (principally issued by control groups) or sensors. ON sequence start criteria (Boolean) which must be present to validate MAN1 or AUT1. ON sequence permanent criteria (Boolean) which must be present throughout the ON part sequence activation. Group individual stopping command (Boolean). This pulse signal initiates the stop sequence and comes from operator level individual command. Group automatic stopping command (Boolean). This pulse or maintained signal initiates the stop sequence and comes from upper level (principally issued by control groups) or sensors. OFF sequence stop criteria (Boolean) which must be present to validate MAN0 or AUT0. OFF sequence permanent criteria (Boolean) which must be present throughout the OFF part sequence activation. Group and sequence blocking command or taking over inhibition (Boolean). This signal stops any sequence executing on the active step and is a pulse signal coming from operator level individual command. Blocking criteria (Boolean) which must be present to validate the BLK command. Automatic sequence activation mode command (Boolean). Step by step sequence activation mode command (Boolean). Operator guide sequence activation mode command (Boolean). Fault acknowledgment from operator (especially used in BADEN projects) (Boolean). Feedback group in service (Boolean). Feedback group out service (Boolean). ON sequence jump conditions (Boolean). ON sequence jump step number (Integer). OFF sequence jump conditions (Boolean). OFF sequence jump step number (Integer).

AUT1

SC1 PC1 MAN_0

AUT0

SC0 PC0 BLK

C_BLK AUT S/S OG ACK FB1 FB0 C_JMP1 JMP1 C_JMP0 JMP0

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 161/342


72.4.1.2 Outputs ORD1 PUL_1 LCK1 Maintained ON order (Boolean). Pulsed ON order 1 cycle (Boolean). Individual ON command locking (Boolean). If the starting or permanent conditions are invalidated when the operator gives an individual start command, a message appears on Centralog to invalidate the ON command. ON feedback validated by ON order (Boolean). Used especially with BADEN standard projects. Maintained OFF order (Boolean). Pulsed OFF order 1 cycle (Boolean). Individual OFF command locking (Boolean). If the stopping or permanent conditions are invalidated when the operator gives an individual stop command, a message appears on Centralog to invalidate the OFF command. OFF feedback validated by OFF order (Boolean). Used especially with BADEN standard projects. Maintained blocking order (Boolean). This order stops any sequence executing on the active step or is used to inhibit the taking over. Individual blocking command locking (Boolean). If the blocking releases are invalidated when the operator gives an individual blocking command, a message appears on Centralog to invalidate the blocking command. Group state (Word multistate variable). This output is used by Centralog to animate the group in the control window. Group fault (Boolean). Group in progress (Boolean). Intermediate current TLTE display of active step (Double). This output is used by Centralog to animate the current intermediate TLTE time in the sequence displays. Current active step global TLTE display (Double). This output is used by Centralog to animate the current global TLTE time in the sequence displays. Current active step transition time display (Double). This output is used by Centralog to animate the current transition time in the sequence displays. Current group TLTE display (Double). This output is used by Centralog to animate the current group TLTE time in the sequence displays. Group maximum TLTE display (Double). This output represents maximum TLTE and is used by Centralog to animate the barchart of the group control window . Pulse output (alarm) given to the operator to indicate that mode has change from step by step (S/S) to automatic (AUTO) mode due to an automatic command.

STATE_1 ORD0 PUL_0 LCK0

STATE_0 ORDS

LCKS

FG_STE FG_FLT GP_PRG CUR_I

CUR_G

CUR_T

CUR_GR

MAX_GR

AUTO_AL

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 162/342


SEQ_STE STEP_ACT STEP_NEXT Sequence state (Word multistate variable). This output is used by Centralog to animate the sequence displays. Current sequence active step number (Word multistate variable). This output is used by Centralog to animate the sequence displays. Next active step number (Word multistate variable). This output is used by Centralog to animate the sequence displays in case of a step jump. Sequence link (Word, length 14). This link is used to exchange information between the head of sequence and the sequence steps (variable in read/write access).

SEQ_LK

72.4.1.3

Parameters TLTE_1 TLTE_0 STP_OFF REINIT RESEND Too Long Time Execution value in seconds to reach ON state (Constant Long). TLTE_1=0 equivalent to infinite value. Too Long Time Execution value in seconds to reach OFF state (Constant Long). TLTE_0=0 equivalent to infinite value. Last step number of the stop sequence (Integer type constant) This parameter (Boolean) restarts the sequence on the first step (if REINIT=1) after a FAULT or HELD sequence. This parameter (Boolean) transmits all the step orders even if all the feedback criteria are true (if RESEND=1) during 1 cycle.

72.4.2

Associated MVM MVM in IEEE standard: SEQ_FG_IEEE MVM in KKS standard: SEQ_FG_KKS

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 163/342


72.5 Code

72.5.1

Internal Variables
NAME I_FB0 I_GP_PRG I_LCK0 I_LCK1 I_LCKS I_M_FAULT I_STATE_0 I_STATE_1 I_STEP_NEXT I_TLTE_0 I_TLTE_1 I_TLTE_G I_TLTE_I I_ORD1 I_ORD0 I_ORDS I_PUL_0 I_PUL_1 I_STATE_0 I_STATE_1 I_M_FAULT I_BOP_BAD I_STATE I_MAX_GR ARRAY_BOOL_IN DESCRIPTION FEEDBACK OFF IF NOT CONNECTED GROUP IN PROGRESS NOT CONNECTED OFF COMMAND LOCKED NOT CONNECTED ON COMMAND LOCKED NOT CONNECTED BLOCK COMMAND LOCKED NOT CONNECTED FAULT TO ACK MEMO (REDUND) (NOT USED) STATE_0 NOT CONNECTED (NOT USED) STATE_1 NOT CONNECTED (NOT USED) STEP_NEXT NOT CONNECTED OFF GROUP TLTE OUTPUT (REDUND) ON GROUP TLTE OUTPUT (REDUND) GLOBAL TLTE OUTPUT (REDUND) INTERMEDIATE TLTE OUTPUT (REDUND) ON ORDER OFF ORDER BLOCKING ORDER PULSED OFF ORDER IF NOT CONNECTED PULSED ON ORDER IF NOT CONNECTED OFF FEEDBACK VALIDATED BY OFF ORDER ON FEEDBACK VALIDATED BY ON ORDER FAULT TO ACKNOWLEDGE MEMORY (REDUND) BOPE (0) or BADEN (1) standard parameter GROUP STATE MEMORY GROUP MAXIMUM TLTE BOOLEAN INPUTS ARRAY Redundanc y exchange TYPE B B B B B REDUND B B B W L L L L B B B B B B B B REDUND B B DI 0 YES YES YES 0 YES Private Initial Value

REDUND REDUND REDUND REDUND REDUND REDUND REDUND

YES YES YES YES YES YES YES YES

72.5.2

Function Block Code


(* FUNCTION BLOCK SEQ_FG_BOPE : HEAD OF SEQUENCE (* VERSION 2.3 ESTABLISH ON 02/12/04 BY C. BOULEY (* Modifications : (* 21/11/02 - V1.0 : AUTHOR : C. BOULEY : First issue (* 03/02/03 - V1.1 : AUTHOR : C. BOULEY : Outputs ORD1, ORD0 and ORDS are set no mandatory connection. Addition of internal variables I_ORD1, I_ORD0 and I_ORDS (* 05/05/03 - V1.2 : AUTHOR : C. BOULEY : Renaming of IND1 and IND0 arguments by MAN_1 and MAN_0 for correct function of sequences (* 12/01/04 - V1.3 : AUTHOR : C. BOULEY : Addition of PUL_1 (Pulse ON) and PUL_0 (Pulse OFF). Addition of input Acknowledge to be in conformance with BADEN projects. (* Addition of outputs STATE_1 and STATE_0 to be in conformance with BADEN projects. (* OG mode (Operator Guide) is not associated by default. (* Component instance name is VARIANT to allow KKS or IEEE naming rules. (* 19/01/04 - V2.0 : AUTHOR : C. BOULEY : Addition of jump inputs C_JMP1, JMP1, C_JMP0, JMP0 to allow jump on first step of starting or stopping sequence. (* 06/02/04 - V2.1 : AUTHOR : C. BOULEY : Internal variable I_BOPE_BAD is put in the FB to allow easy parametering of standard (input of the BF). (* Lenght of SEQ_LK is set to 14 in accordance with BF (* Addition of output AUTO_AL for indicate transfert from S/S to AUTO mode in case of AUT_1 or AUT_0 (* 17/09/04 - V2.2 AUTHOR : C. BOULEY : Remove of OG in argument association in argument group (* 02/12/04 - V2.3 AUTHOR : C. BOULEY : - Addition of I_STATE internal variable which is an output of BF for redundancy

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 164/342


(* - Boolean inputs BLK, C_BLK, FB1, FB0, AUT, S_S, OG, ACK, C_JMP1, C_JMP0, (* REINIT, RESEND are transformed in Word ARRAY_BOOL_IN to reduce numbers of input of BF. #IF $TARGET_TYPE =~ 'C8035' || $TARGET_TYPE =~ 'RX3i' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF TBW BLK, C_BLK, FB_1, FB_0, AUTO, S_S, OG, ACK, C_JMP1, C_JMP0, REINIT, RESEND = ARRAY_BOOL_IN # IF defined ($FB_0) BOO FB_0 = I_FB0 #ELSE BOO /FB_1 = I_FB0 #ENDIF BF(SEQ_FG, ARRAY_BOOL_IN, MAN_1,AUT_1, SC_1, PC_1, MAN_0,AUT_0, SC_0, PC_0, JMP1, JMP0 , TLTE_1, TLTE_0, STP_OFF, I_BOPE_BAD, I_ORD1, I_PUL_1, I_ORD0, I_PUL_0, I_ORDS, I_GP_PRG, I_LCK1, I_LCK0, I_LCKS, FG_STE, FG_FLT, SEQ_STE, STEP_ACT, I_STEP_NEXT, CUR_I, CUR_G, CUR_T, CUR_GR, I_MAX_GR, SEQ_LK, I_TLTE_I, I_TLTE_G,I_TLTE_1, I_TLTE_0, I_STATE_1, I_STATE_0, I_M_FAULT, I_AUTO_AL, I_STATE ) # IF defined ($STEP_NEXT) TRF I_STEP_NEXT = STEP_NEXT # ENDIF # IF defined ($GP_PRG) TRF I_GP_PRG = GP_PRG # ENDIF # IF defined ($LCK1) TRF I_LCK1 = LCK1 # ENDIF # IF defined ($LCK0) TRF I_LCK0 = LCK0 # ENDIF # IF defined ($LCKS) TRF I_LCKS = LCKS # ENDIF # IF defined ($M_ON) TRF I_ORD1 = M_ON # ENDIF # IF defined ($M_OFF) TRF I_ORD0 = M_OFF # ENDIF # IF defined ($ORDS) TRF I_ORDS = ORDS # ENDIF # IF defined ($PUL_1) TRF I_PUL_1 = PUL_1 # ENDIF # IF defined ($PUL_0) TRF I_PUL_0 = PUL_0 # ENDIF # IF defined ($STATE_1) BOO I_STATE_1 = STATE_1 # ENDIF # IF defined ($STATE_0) BOO I_STATE_0 = STATE_0 # ENDIF # IF defined ($AUTO_AL) BOO I_AUTO_AL = AUTO_AL # ENDIF # IF defined ($MAX_GR) CAL I_MAX_GR = MAX_GR # ENDIF

72.5.3

Basic Function Used SEQ_FG

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 165/342


Section 73

GE : GREATER OR EQUAL

73.1 Representation

73.2 Function The functionality of the GE function Block is : IF(IN1>=IN2) ELSE RE=0 RE=1

73.2.1

Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 Outputs RE Parameters Result state B N Y Y Input 1 Input 2 ANY_NUM ANY_NUM Y(-) Y(-) Y Y Y Y -

73.3 Use Function block in IEC meaning, without state variables

73.4 Specification

73.4.1

Function block code BOO {IN1>=IN2} = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 166/342


Section 74

GRAY_TO_INT : GRAY DECODING

74.1 Representation

74.2 Function The block converts a GRAY value into a decimal value, which must be positive or null.

74.3 Argument characteristics


Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs E01(IN) Outputs S01(RE) S02(ST) Parameters Result Status INTEGER BOOLEAN N Y Y N Y Y Input WORD N Y N -

74.4 Use If the GRAY value can't be converted (left bit set to 1), the status is set to FALSE and the result is set to 0, elsewhere the status is set to TRUE. The block has no state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 167/342


74.5 Specification

74.5.1

Internals variables W01, word W02, word W11, word W12, word

74.5.2

Function block code log E01 = W01 log 16#8000 . W01 = W02 IF { W02 = 16#8000 } THEN #IF defined($S02) boo 0 = S02 #ENDIF LOG 0 = S01 ELSE #IF defined($S02) boo 1 = S02 #ENDIF rog W02, 1 = W02 rog W01, 2 = W01 POUR_X_DE 0,14,1 log 16#0001 . W01 = W11 log W11 ox W02 = W12 rog W02, 1 = W02 log 16#0001 . W12 = W12 log W02 + W12 = W02 rog W01, 1 = W01 finpour TRF W02 = S01 ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 168/342


Section 75

GT : GREATER

75.1 Representation

75.2 Function The functionality of the GT function Block is as the following : IF(IN1>IN2) ELSE RE=0 RE=1

75.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 Outputs RE Parameters Result B N Y Y Input 1 Input 2 ANY_NUM ANY_NUM Y(-) Y(-) Y Y Y Y -

75.4 Use Function block in the IEC meaning, without state variables. 75.5 Specification

75.5.1

Function block code BOO {IN1>IN2} = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 169/342


Section 76

IF_MOVE_BOOL : CONDITIONNED MOVE_BOOL BLOCK

76.1 Representation

76.2 Function The goal of this block is to provide an boolean affectation which is conditionned by the state of another boolean: IF FIRST_SCAN = TRUE THEN OUTPUT <- 0 ELSE IF CONDITION = TRUE THEN OUTPUT <- (INPUT) ELSE OUTPUT <- (previous OUTPUT) ENDIF ENDIF

76.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN COND Outputs RE Parameters Result Boolean Y(/) Y Y O Input condition Boolean Boolean Y(/) Y(/) Y Y N N -

76.4 Use IEC Function block with a boolean redundant state variable

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 170/342


76.5 Spcification

76.5.1

State variable STA, boolean, to store the value of the output

76.5.2

Internals variables No

76.5.3

Function block code IF INIT THEN BOO 0 = RE ELSE IF COND THEN BOO IN = RE ELSE BOO STA = RE ENDIF ENDIF BOO RE = STA

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 171/342


Section 77

IMP_D : PULSE (PARAMETER TYPE DOUBLE INTEGER UNIT 0,01 SECOND)

77.1 Representation

77.2 Function The Functional Block IMP carries out a retriggerable pulse, and controls two booleans outputs REU and RED. When the input IN has a rising edge a pulse is generated on the output REU, when the input IN has a falling edge a pulse is generated on the output RED. In both cases, the duration of the pulse is the value of the parameter TP depending to the cycle time. The pulse is retriggerable. Then, if a new edge of the same type appears before the end of time period, the duration of the pulse is extended by TP. Time diagram

IN REU TP TP

RED

TP

TP

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 172/342


77.3 Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameter s value First scan value

Inputs INP(IN) Outputs REU RED Parameters TP Pulse Input B Y Y -

Output I+ Output I-

B B

Y Y

Y Y

0 0

Duration in 0.01 of second

0;

N * Cycle Time

77.4 Use Description of terminals : IN : PULSE INPUT boolean input compulsory. The function block IMP reacts to the rising and falling edge of IN. REU : OUTPUT 1 : I + If there is a rising edge on IN, the Function Block IMP generates a pulse of duration TP on REU. This pulse is retriggerable by a new rising edge occuring before the end of the times period. RED : OUTPUT 2 : I If there is a falling edge on IN, the function block IMP generates a pulse of duration TP on RED. This pulse is retriggerable by a new rising edge occuring before the en of the times period. TP : DURATION Duration of pulse in 0.01 second. D type double integer : maximum value + 2,147 * 109 If TP is less than or equal to cycle time, it is considered to be 0 ; no pulse. The output RED and REU are calculated in function of cycle time. Example : If TP = 190 (1.9 sec.) and IF Tcyc = 0,5 sec, the duration of the pulses is on (1.9 / 0.5 = 3 integer ) 3 cycles therefore ( 3 * 0. 5 = 1.5) 1.5 seconds. Changes to TP during a pulse are not taken into account. Its taking account at the next pulse.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 173/342


Notes : During initialization cycles, at the controller start up : REU = RED = 0, no pulse In operating mode (INIT 0) if IN(K) = IN(K-1), the pulse is not started if IN(K) IN(K-1), a pulse is started on REU or RED depending on the state change : 0->1 or 1->0 of IN. 3 state variables, 2 double and 1 boolean

77.5 Specification

77.5.1

State variables There are 3 states variables : SCDWN, double, State Var Counter Down SCUP, double, State Var Counter Up, STA_IN, boolean, State Var of Input

77.5.2

Internals variables NB_CYC, double, Number of Cycles TP10, double, 10*TP of delay VRED, boolean, VREU, boolean VTMP, boolean, VTMP IN != STA_IN

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 174/342


77.5.3 Internal code (* IMPMC_D : Version 2 (09/27/2000) (* Specification version : ? (* ---------------------------------------CAL TP * 10 = TP10 CAL TP10 / CYC = NB_CYC IF INIT (* Initialisation Function ) THEN BOO 0 = VREU BOO 0 = VRED BOO INP = STA_IN CAL 0 = SCUP CAL 0 = SCDWN ELSE (* Computing and Updating Outputs ) BOO ( INP OX STA_IN ) = VTMP IF VTMP THEN IF INP THEN IF {TP10 > CYC} THEN BOO 1 = VREU ELSE BOO 0 = VREU ENDIF IF {SCDWN <> 0} THEN BOO 1 = VRED ELSE BOO 0 = VRED ENDIF ELSE IF {TP10 > CYC} THEN BOO 1 = VRED ELSE BOO 0 = VRED ENDIF IF {SCUP <> 0} THEN BOO 1 = VREU ELSE BOO 0 = VREU ENDIF ENDIF ELSE IF {SCUP = 0} THEN BOO 0 = VREU ELSE BOO 1 = VREU
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 175/342


ENDIF IF {SCDWN = 0} THEN BOO 0 = VRED ELSE BOO 1 = VRED ENDIF ENDIF (* Computing and Updating State Variables ) IF VTMP THEN IF VREU THEN IF INP THEN CAL NB_CYC = SCUP ENDIF ENDIF IF VRED THEN IF /INP THEN CAL NB_CYC = SCDWN ENDIF ENDIF ENDIF IF {SCUP <> 0} THEN CAL SCUP - 1 = SCUP ENDIF IF {SCDWN <> 0} THEN CAL SCDWN - 1 = SCDWN ENDIF BOO INP = STA_IN ENDIF #IF defined ($REU) BOO VREU = REU #ENDIF #IF defined ($RED) BOO VRED = RED #ENDIF (* ----------(* End of IMPMC_D

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 176/342


Section 78

IMP_R : PULSE (PARAMETER TYPE REAL UNIT 1 SECOND)

78.1 Representation

78.2 Function The Functional Block IMP carries out a retriggerable pulse, and controls one boolean output REU and one real output RET. When the input IN has a rising edge a pulse is generated on the output REU. The duration of the pulse is the value of the parameter TP depending to the cycle time. The pulse is retriggerable. Then, if a new edge of the same type appears before the end of time period, the duration of the pulse is extended by TP. RET indicates the time elapsed since the last edge of the input. 78.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs INP(IN) Outputs REU RET Parameters TP Pulse Input B Y Y -

Output I+ Remaining time

B R

N N

Y Y

0 0

Duration in second

REAL

0;

N * Cycle Time

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 177/342


78.4 Use Description of terminals : IN : PULSE INPUT boolean input compulsory. The function block IMP reacts to the rising and falling edge of IN. REU : OUTPUT 1 : I + If there is a rising edge on IN, the Function Block IMP generates a pulse of duration TP on REU. This pulse is retriggerable by a new rising edge occuring before the end of the times period. RET : elpased time It indicates the elapsed time since the last edge of the input. TP : DURATION Duration of pulse in seconds. Type real : maximum value + 2.0 * 107 If TP is less than or equal to cycle time, it is considered to be 0 ; no pulse. The output REU is computed in function of cycle time. Example : If TP = 1.9 sec. and IF Tcyc = 0,5 sec, the duration of the pulses is on (1.9 / 0.5 = 3 integer ) 3 cycles therefore ( 3 * 0. 5 = 1.5) 1.5 seconds. Changes to TP during a pulse are not taken into account. Its taking account at the next pulse. Notes : During initialization cycles, at the controller start up : REU = 0, no pulse In operating mode (INIT 0) if IN(K) = IN(K-1), the pulse is not started if IN(K) IN(K-1), a pulse is started on REU depending on the state change of IN from 0 to 1 2 state variables, 1 double and 1 boolean

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 178/342


78.5 Specification

78.5.1

State variables There are 2 states variables : SCUP, double, State Var Counter Up, STA_IN, boolean, State Var of Input

78.5.2

Internals variables NB_CYC, double, Number of Cycles TP10, double, 1000*TP of delay VREU, boolean SCUP2, double, VTMP, boolean, VTMP IN != STA_IN

78.5.3

Internal code (* IMP_R : Version 1 (* ---------------------------------------(* les calculs sont faits en ms CAL TP * 1000 = TP10 CAL TP * 1000 / CYC = NB_CYC IF INIT (* Initialisation Function ) THEN BOO 0 = VREU CAL 0 = SCUP2 ELSE (* Computing and Updating Outputs ) BOO INP./STA_IN = VTMP IF VTMP THEN IF {TP10 > CYC} THEN BOO 1 = VREU ELSE BOO 0 = VREU ENDIF ELSE IF {SCUP2 = 0} THEN BOO 0 = VREU ELSE BOO 1 = VREU ENDIF ENDIF (* on gere le retriggerage

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 179/342


IF VTMP THEN IF VREU THEN CAL NB_CYC = SCUP2 ELSE CAL SCUP = SCUP2 ENDIF ENDIF (* on decremente IF {SCUP2 <> 0} THEN CAL SCUP2 - 1 = SCUP2 ENDIF ENDIF (* gestion des vars d'tat BOO INP = STA_IN CAL SCUP2 = SCUP (* on ecrit les sorties : le boolen et le temps restant #IF defined ($RET) CAL TP - (SCUP2 * CYC)/1000.0 = RET #ENDIF #IF defined ($REU) BOO VREU = REU #ENDIF (* ----------(* End of IMP_R

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 180/342


Section 79

IMP_W : PULSE (PARAMETER TYPE WORD UNIT 0,01 SECOND)

79.1 Representation

79.2 Function The Functional Block IMP carries out a retriggerable pulse, and controls two booleans outputs REU and RED. When the input IN has a rising edge a pulse is generated on the output REU, when the input IN has a falling edge a pulse is generated on the output RED. In both cases, the duration of the pulse is the value of the parameter TP depending to the cycle time. The pulse is retriggerable. Then, if a new edge of the same type appears before the end of time period, the duration of the pulse is extended by TP. Time diagram

IN REU TP TP

RED

TP

TP

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 181/342


79.3 Arguments Characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs INP(IN) Outputs REU RED Parameters TP Pulse Input B Y Y -

Output I+ Output I-

B B

Y Y

Y Y

0 0

Duration in 0.01 of second

0;

N * Cycle Time

79.4 Use Description of terminals : IN : PULSE INPUT boolean input compulsory. The function block IMP reacts to the rising and falling edge of IN. REU : OUTPUT 1 : I + If there is a rising edge on IN, the Function Block IMP generates a pulse of duration TP on REU. This pulse is retriggerable by a new rising edge occuring before the end of the times period. RED : OUTPUT 2 : I If there is a falling edge on IN, the function block IMP generates a pulse of duration TP on RED. This pulse is retriggerable by a new rising edge occuring before the en of the times period. TP : DURATION Duration of pulse in 0.01 of second. D type WORD : maximum value 65535 If TP is less than or equal to 0, it is considered to be 0 ; no pulse. The output RED and REU are calculated in function of cycle time. Example : If TP = 190 (1.9 sec.) and IF Tcyc = 0,5 sec, the duration of the pulses is on (1.9 / 0.5 = 3 integer ) 3 cycles therefore ( 3 * 0. 5 = 1.5) 1.5 seconds. Changes to TP during a pulse are not taken into account. Its taking account at the next pulse.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 182/342


Notes : During initialization cycles, at the controller start up : REU = RED = 0, no pulse In operating mode (INIT 0) if IN(K) = IN(K-1), the pulse is not started if IN(K) IN(K-1), a pulse is started on REU or RED depending on the state change : 0->1 or 1->0 of IN. 3 state variables, 2 double and 1 boolean

79.5 Specification

79.5.1

State variables There are 3 states variables : SCDWN, word, State Var Counter Down SCUP, word, State Var Counter Up, STA_IN, boolean, State Var of Input

79.5.2

Internals variables NB_CYC, double, Number of Cycles TP10, double, 10*TP of delay VRED, boolean, VREU, boolean VTMP, boolean, VTMP IN != STA_IN

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 183/342


79.5.3 Internal code (* IMP_W: Version ? (* Specification version : ? (* ---------------------------------------CAL TP * 10 = TP10 CAL TP10 / CYC = NB_CYC IF INIT (* Initialisation Function ) THEN BOO 0 = VREU BOO 0 = VRED BOO INP = STA_IN CAL 0 = SCUP CAL 0 = SCDWN ELSE (* Computing and Updating Outputs ) BOO ( INP OX STA_IN ) = VTMP IF VTMP THEN IF INP THEN IF {TP10 > CYC} THEN BOO 1 = VREU ELSE BOO 0 = VREU ENDIF IF {SCDWN <> 0} THEN BOO 1 = VRED ELSE BOO 0 = VRED ENDIF ELSE IF {TP10 > CYC} THEN BOO 1 = VRED ELSE BOO 0 = VRED ENDIF IF {SCUP <> 0} THEN BOO 1 = VREU ELSE BOO 0 = VREU ENDIF ENDIF ELSE IF {SCUP = 0} THEN BOO 0 = VREU ELSE BOO 1 = VREU ENDIF
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 184/342


IF {SCDWN = 0} THEN BOO 0 = VRED ELSE BOO 1 = VRED ENDIF ENDIF (* Computing and Updating State Variables ) IF VTMP THEN IF VREU THEN IF INP THEN CAL NB_CYC = SCUP ENDIF ENDIF IF VRED THEN IF /INP THEN CAL NB_CYC = SCDWN ENDIF ENDIF ENDIF IF {SCUP <> 0} THEN CAL SCUP - 1 = SCUP ENDIF IF {SCDWN <> 0} THEN CAL SCDWN - 1 = SCDWN ENDIF BOO INP = STA_IN ENDIF #IF defined ($REU) BOO VREU = REU #ENDIF #IF defined ($RED) BOO VRED = RED #ENDIF (* ----------(* End of IMP_W

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 185/342


Section 80

IMPW_D : PULSE (PARAMETER TYPE DOUBLE INTEGER UNIT 0,01 SECOND)

80.1 Representation

80.2 Function The Functional Block IMP carries out a retriggerable pulse, and controls two booleans outputs REU and RED. When the input IN has a rising edge a pulse is generated on the output REU, when the input IN has a falling edge a pulse is generated on the output RED. In both cases, the duration of the pulse is the value of the parameter TP depending to the cycle time. The pulse is retriggerable. Then, if a new edge of the same type appears before the end of time period, the duration of the pulse is extended by TP. Time diagram
IN REU

TP

TP

RED

TP

TP

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 186/342


80.3 Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs INP(IN) Outputs REU RED Parameters TP Pulse Input B Y Y -

Output I+ Output I-

B B

Y Y

Y Y

0 0

Duration in 0.01 of second

0;

N * Cycle Time

80.4 Use Description of terminals : IN : PULSE INPUT boolean input compulsory. The function block IMP reacts to the rising and falling edge of IN. REU : OUTPUT 1 : I + If there is a rising edge on IN, the Function Block IMP generates a pulse of duration TP on REU. This pulse is retriggerable by a new rising edge occuring before the end of the times period. RED : OUTPUT 2 : I If there is a falling edge on IN, the function block IMP generates a pulse of duration TP on RED. This pulse is retriggerable by a new rising edge occuring before the en of the times period. TP : DURATION Duration of pulse in 0.01 of second. D type double integer : maximum value + 2,147 * 109 If TP is less than or equal to 0, it is considered to be 0 ; no pulse. The output RED and REU are calculated in function of cycle time. Example : If TP = 190 (1.9 sec.) and IF Tcyc = 0,5 sec, the duration of the pulses is on (1.9 / 0.5 = 3 integer ) 3 cycles therefore ( 3 * 0. 5 = 1.5) 1.5 seconds. Changes to TP during a pulse are not taken into account. Its taking account at the next pulse.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 187/342


Notes : During initialization cycles, at the controller start up : REU = RED = 0, no pulse In operating mode (INIT 0) if IN(K) = IN(K-1), the pulse is not started if IN(K) IN(K-1), a pulse is started on REU or RED depending on the state change : 0->1 or 1->0 of IN. 3 state variables, 2 double and 1 boolean

80.5 SPECIFICATION

80.5.1

State variables There are 3 states variables : SCDWN, word, State Var Counter Down SCUP, word, State Var Counter Up, STA_IN, boolean, State Var of Input

80.5.2

Internals variables NB_CYC, double, Number of Cycles TP10, double, 10*TP of delay VRED, boolean, VREU, boolean VTMP, boolean, VTMP IN != STA_IN

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 188/342


2. Internal code (* IMPW_D : Version (19/7/2000)

CAL TP * 10 = TP10 CAL TP10 / CYC = NB_CYC IF {NB_CYC > 65500} THEN CAL 65500=NB_CYC ENDIF . IF INIT (* Initialisation Function ) THEN BOO 0 = VREU BOO 0 = VRED BOO INP = STA_IN CAL 0 = SCUP CAL 0 = SCDWN ELSE (* Computing and Updating Outputs ) BOO ( INP OX STA_IN ) = VTMP IF VTMP THEN IF INP THEN IF {TP10 > CYC} THEN BOO 1 = VREU ELSE BOO 0 = VREU ENDIF IF {SCDWN <> 0} THEN BOO 1 = VRED ELSE BOO 0 = VRED ENDIF ELSE IF {TP10 > CYC} THEN BOO 1 = VRED ELSE BOO 0 = VRED ENDIF IF {SCUP <> 0} THEN BOO 1 = VREU ELSE BOO 0 = VREU ENDIF ENDIF ELSE IF {SCUP = 0} THEN BOO 0 = VREU
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 189/342


ELSE BOO 1 = VREU ENDIF IF {SCDWN = 0} THEN BOO 0 = VRED ELSE BOO 1 = VRED ENDIF ENDIF (* Computing and Updating State Variables ) IF VTMP THEN IF VREU THEN IF INP THEN CAL NB_CYC = SCUP ENDIF ENDIF IF VRED THEN IF /INP THEN CAL NB_CYC = SCDWN ENDIF ENDIF ENDIF IF {SCUP <> 0} THEN CAL SCUP - 1 = SCUP ENDIF IF {SCDWN <> 0} THEN CAL SCDWN - 1 = SCDWN ENDIF BOO INP = STA_IN ENDIF #IF defined ($REU) BOO VREU = REU #ENDIF #IF defined ($RED) BOO VRED = RED #ENDIF (* ----------(* End of IMPW_D

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 190/342


Section 81

INT_TO_BCD : BCD CODING

81.1 Representation

81.2 Function The block converts a decimal value, which can be positive or negative, into a BCD value. decimal value = 23 => BCD value = 0x0000 0000 0010 0011

decimal value = -23 => BCD value = 0x1000 0000 0010 0011

81.3 Argument characteristics


Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE ST Parameters Result Status WORD BOOLEAN N Y Y N Y Y Input INTEGER N [-7999, 79999] Y N -

81.4 use If the input is outside the range, the output takes a specific value : 0x0000 and the status is set to FALSE, elsewhere the status is set to TRUE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 191/342


81.5 Specification

81.5.1

State variables No.

81.5.2

Internals variables V1, integer, private V2, word, private

81.5.3

Function block code (* BEGIN INT_TO_BCD CAL ABS(IN) = V1 IF { V1 > 7999 } THEN #IF defined($ST) BOO 0 = ST #ENDIF LOG 0 = RE ELSE #IF defined($ST) BOO 1 = ST #ENDIF TRA V1 BTD V2 IF { IN < 0 } THEN LOG V2 + 16#8000 = RE ELSE LOG V2 = RE ENDIF ENDIF (* END INT_TO_BCD

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 192/342


Section 82

INT_TO_GRAY : GRAY CONFIG

82.1 Representation

82.2 Function The block converts a decimal value, which must be positive, into a GRAY value. Natural 0 1 2 3 4 5 6 7 . Gray 00000000 00000001 00000011 00000010 00000110 00000111 00000101 00000100 .. Natural 8 9 10 11 12 13 14 15 .. Gray 00001100 00001101 00001111 00001110 00001010 00001011 00001001 00001000

82.3 Argument characteristics


Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs E01(IN) Outputs S01(RE) S18(ST) Parameters Result Status WORD BOOLEAN N Y Y N Y Y Input INTEGER N [0, 32767] Y N -

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 193/342


82.4 Use If the input is outside the range, the status is set to FALSE and the result is set to 0, elsewhere the status is set to TRUE Function block without state variables.

82.5 Specification

82.5.1

State variables No.

82.5.2

Internals variables W01, word, private W02, word, private W11, word, private W12, word, private

82.5.3

Function block code IF { E01 < 0 } THEN #IF defined($S18) BOO 0 = S18 #ENDIF LOG 0 = S01 ELSE #IF defined($S18) BOO 1 = S18 #ENDIF TRF 0 = W02 TRF E01 = W01 POUR_X_DE 0,14,1 rod W01, 1 = W11 log W01 ox W11 = W12 log 16#0001 . W12 = W12 log W12 + W02 = W02 rod W01, 1 = W01 rod W02, 1 = W02 FINPOUR log 16#0001 . W01 = W12 log W12 + W02 = W02 rod W02, 1 = W02 TRF W02 = S01 ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 194/342


Section 83

INV : INVERSE

83.1 Representation

83.2 Function The main functionality of the function block is : RE <= 1 / (IN). The total functionality of the block is IF ABSOLUTE_VALUE(INPUT) < ABSOLUTE_VALUE(EPSILON) RESULT <= (DEFAULT) EN0 <= TRUE ELSE RESULT <= 1 / (INPUT) EN0 <= FALSE ENDIF

83.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN DEF(DEFAULT ) Input Result value if input too small Low limit to check REAL REAL Y(-) N Y N 0 1E-6 N Y -

REAL

EPS(EPSILON) Outputs RE EN0

Operator result Disable result

REAL BOOLEAN

Y(-) N

Y N

Y Y

Parameters

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 195/342


83.4 Use There is a protection against zero, but the block is a real function block. The user must indicate a variable where the block can put the result.

83.5 Specification

83.5.1

Internal variables VR and EPS2, real, private

83.5.2

Internal code (* BEGIN INV CAL ABS(IN) = VR CAL ABS(EPS) = EPS2 IF { VR < EPS2 } THEN CAL DEF = RE #IF defined($EN0) BOO 1 = EN0 #ENDIF ELSE CAL 1 / IN = RE #IF defined($EN0) BOO 0 = EN0 #ENDIF ENDIF (* END INV

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 196/342


Section 84

ISFLOAT : TEST IF VARIABLE HAS A FLOAT FORMAT

84.1 Representation

84.2 Function The ISFLOAT function test if input IN has a float format

84.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs Is NaN - infinity + infinity Parameters Output Output Output BOOLEAN BOOLEAN BOOLEAN N N N N N N N N N Input REAL LONG N Y Y -

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 197/342


84.4 Use Not used for a CE2000

The ISFLOAT function block returns : ISNAN=1 if the input IN is not a number INF_MINUS=1 if the input IN equal - INF_PLUS=1 if the input IN equal + This Function Block calls a Basic Function (ISFLOAT). This BF parameters are : Input IN (32 bits format) : value to test Output RES (word format) : result (0 if real, 1 if not a number, 2 if +, 3 if -) 84.5 Specification

84.5.1

Internal variables I_RESULT private and Word

84.5.2

Internal code
#IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF defined ($ISNAN) if {I_RESULT = 0} then BOO 0 = ISNAN else BOO 1 = ISNAN endif #ENDIF #IF defined ($INF_PLUS) if {I_RESULT = 2} then BOO 1 = INF_PLUS else BOO 0 = INF_PLUS endif #ENDIF #IF defined ($INF_MINUS) if {I_RESULT = 3} then BOO 1 = INF_MINUS else BOO 0 = INF_MINUS endif #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 198/342


Section 85

LE : LESS OR EQUAL

85.1 Representation

85.2 Function The functionality of the LE function Block is as the following : IF(IN1<=IN2) ELSE RE=1 RE=0

85.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 Outputs RE Parameters Result state B N Y Y Input 1 Input 2 ANY_NUM ANY_NUM Y(-) Y(-) Y Y Y Y -

85.4 Use Function block without state variables. 85.5 Specification

85.5.1

Function block code BOO {IN1<=IN2} = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 199/342


Section 86

LIMIT : LIMITER

86.1 Representation

86.2 Function The functionality of the LIMIT function Block is as the following : RE = MIN( MAX( IN, LO ), HI ) It means that the result is equal to the input as long as it is within the range defined par the limits LOW and HIGH. If the input exceeds one of the limits, the result will be set equal to the limit and the corresponding boolean signal ( HL, LL ) will be set to 1. If the upper limit (HI) is smaller than the lower limit (LO), the output will be set equal to the upper limit HI and both binary signals HL, LL will be set to 1.

86.3 Arguments characteristics


Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs LO IN HI Outputs RE HL LL Parameters Result Greater than HI Less Than LO ANY_NUM B B N N N Y N N Y Y Y Minimum Input Maximum ANY_NUM ANY_NUM ANY_NUM Y(-) Y(-) Y(-) Y Y Y Y Y Y -

86.4 Use Function block without state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 200/342


86.5 Specification

86.5.1

Function block code


(* BEGIN LIMIT) IF {HI < LO} THEN CAL HI = RE #IF defined($LL) BOO 1=LL #ENDIF #IF defined($HL) BOO 1=HL #ENDIF ELSE CAL IN=RE #IF defined($LL) BOO 0=LL #ENDIF #IF defined($HL) BOO 0=HL #ENDIF IF {LO > IN} THEN CAL LO = RE #IF defined($LL) BOO 1=LL #ENDIF ENDIF IF{HI<IN} THEN CAL HI=RE #IF defined($HL) BOO 1=HL #ENDIF ENDIF ENDIF (* END LIMIT)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 201/342


Section 87

LN : NEPERIAN LOGARITHM

87.1 Representation

87.2 Function The function box LN calculates the Neperian logarithm function.

87.3 Arguments characteristics


Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Result R Y(-) ]-3.4E+38 ;88.7220[ Y N Input R Y(-) ] 0 ; 3.4e+38 [ Y N -

Parameters

87.4 Use It is a function in the meaning of IEC.

87.5 Specification

87.5.1

Generated code LN(<IN>)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 202/342


Section 88

LOG : LOGARITHM BASE 10

88.1 Representation

88.2 Function The function block LOG calculates the 10 base logarithm of the input IN : RE = Log (IN ) = ln(IN) / ln (10)

88.3 Arguments characteristics


Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator Result R Y(-) ]-3.4e + 38 ; 38.53 [ Y N Input R Y(-) ]0; 3.4e + 38 [ Y N -

88.4 Use The block is a function in the meaning of IEC.

88.5 Specification

88.5.1

Generated expression LOG10(<IN>)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 203/342


Section 89

LOGCP : LOGICAL THRESHOLD

89.1 Representation

89.2 Function The [LOGCP] functional block is used to calculate logical threshold from logical inputs. It provides the functions, according to [T] input: greater than ([T] <= 1), lower than ([T] = 2), greater than or equal to ([T] = 3), lower than or equal to ([T] = 4), equal to ([T] >= 5). The number of logical input set is calculated, added with upper number report (input [NR]), and report on [N] output. The value on [N] output is then compared to the pre-set value (input [M]), with the function according to [T] input, and the result is reported on logical output [LO]. The [N] output can be connected to another following [LOGCP] function block on its [NR] input, in order to make logical threshold on 5 to 8 logical inputs. Then, several [LOGCP] function blocks can be chained in order to make intermediate and end logical thresholds on a variable quantity of logical inputs.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 204/342


89.3 Arguments characteristics
Name Inputs I1 I2 I3 I4 M T NR Outputs N LO Parameters None Number of inputs at state 1 Logical output Word Boolean N Y N N Y Y Input 1 Input 2 Input 3 Input 4 Comparison number Inequation type (>, <, >=, <=, =) Upper LOGCP input number report Boolean Boolean Boolean Boolean Word Word Word Y Y Y Y N N N N N N N N N N 0 0 0 0 1 1 0 N N N N Y Y N Description Type Negation Supported Mandatory Connection Default Value Mandatory Data

89.4 Use

89.4.1

Functional diagram None

89.4.2

Use of terminals All logical inputs and output can be connected or not, and toggle to logical not if necessary Default value of [NR] input is 0 in order to perform the calculation on inputs [I1] to [I4] directly if [NR] is not necessary and then not connected. Default value of [M] input is 1 in order to directly compare [N] to 1 when [N] isnt connected Default value of [T] input is 1 in order to make the comparison greater than when it isnt connected Usual way of configuring the function type input [T] and the comparison number [M] is to connect constants.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 205/342


Example of [NR] report input using:

89.4.3

Associated argument group / MVM Name of argument group ( MVM defining the argument group ) : None

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 206/342


89.5 Specification

89.5.1

Internal variables and state variables


Name Type Description Initial Value 0 0 0 0 Redundant Exchange Y Y Y Y N N Range

VARI1 VARI2 VARI3 VARI4 VARLO VARN

Boolean Boolean Boolean Boolean Boolean Word

Input 1 Input 2 Input 3 Input 4 Logical output Number of inputs at state 1

These variables are used to allow the toggle to Logical not of logic I/O, and the nonconnection of outputs

89.5.2

Function block code BOO BOO BOO BOO I1 I2 I3 I4 = = = = VARI1 VARI2 VARI3 VARI4

BF(LOGCP,NR,VARI1,VARI2,VARI3,VARI4,M,T,VARLO,VARN) #IF defined($LO) BOO VARLO = LO #ENDIF #IF defined($N) TRF VARN = N #ENDIF

89.5.3

Basic function used LOGCP

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 207/342


Section 90

LT : LESS THAN

90.1 Representation

90.2 Function The functionality of the LT function Block is as the following : IF(IN1<IN2) ELSE RE=0 RE=1

90.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 Outputs RE Parameters Result state B N Y Y Input 1 Input 2 ANY_NUM ANY_NUM Y(-) Y(-) Y Y Y Y -

90.4 Use Function block without state variables 90.5 Specification

90.5.1

Function block code BOO {IN1<IN2} = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 208/342


Section 91

MAX : MAX OF 2.N INPUTS

91.1 Representation

91.2 Function The functionality of the MAX block is as the following : RE=MAX(IN1,IN2,,IN8) The Q<i> are indicating which input is selected. Only One is set to 1, the others one are set to 0.

91.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1..IN2 IN3..IN8 Outputs RE Q<i> Parameters Result output Input selection ANY_NUM B Y(-) N Y N Y Y Input 1&2 Inputs ANY_NUM ANY_NUM Y(-) Y(-) Y N Y Y -

91.4 Use Function block without state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 209/342


91.5 Specification

91.5.1

Function block code


(*BEGIN MAX) CAL IN1 = RE #IF defined($Q1) BOO 1 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 0 = Q4 #ENDIF #IF defined($Q5) BOO 0 = Q5 #ENDIF #IF defined($Q6) BOO 0 = Q6 #ENDIF #IF defined($Q7) BOO 0 = Q7 #ENDIF #IF defined($Q8) BOO 0 = Q8 #ENDIF #IF defined ($IN2) IF {IN2 > RE} THEN CAL IN2 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 1 = Q2 #ENDIF ENDIF #ENDIF #IF defined ($IN3) IF {IN3 > RE} THEN CAL IN3 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 1 = Q3 #ENDIF ENDIF #ENDIF #IF defined ($IN4) IF {IN4 > RE} THEN CAL IN4 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 1 = Q4 #ENDIF ENDIF #ENDIF #IF defined ($IN5) IF {IN5 > RE} THEN CAL IN5 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 0 = Q4 #ENDIF #IF defined($Q5) BOO 1 = Q5 #ENDIF ENDIF #ENDIF #IF defined ($IN6) IF {IN6 > RE} THEN CAL IN6 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 0 = Q4 #ENDIF #IF defined($Q5) BOO 0 = Q5 #ENDIF #IF defined($Q6) BOO 1 = Q6 #ENDIF ENDIF #ENDIF #IF defined ($IN7) IF {IN7 > RE} THEN CAL IN7 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 0 = Q4 #ENDIF #IF defined($Q5) BOO 0 = Q5 #ENDIF #IF defined($Q6) BOO 0 = Q6 #ENDIF #IF defined($Q7) BOO 1 = Q7 #ENDIF ENDIF #ENDIF #IF defined ($IN8) IF {IN8 > RE} THEN CAL IN8 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 0 = Q4 #ENDIF #IF defined($Q5) BOO 0 = Q5 #ENDIF #IF defined($Q6) BOO 0 = Q6 #ENDIF #IF defined($Q7) BOO 0 = Q7 #ENDIF #IF defined($Q8) BOO 1 = Q8 #ENDIF ENDIF #ENDIF (* END MAX)

91.5.2

Basic function used No use of basic function

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 210/342


Section 92

MAX3 : MAX OF 2 OR 3 INPUTS

92.1 Representation

92.2 Function The functionality of the MAX block is as the following : RE=MAX(IN1,IN2, IN3) The Q<i> are indicating which input is selected. Only One is set to 1, the others one are set to 0.

92.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1..IN2 IN3 Outputs RE Q<i> Parameters Result output Input selection ANY_NUM B Y(-) N Y N Y Y Input 1&2 Inputs ANY_NUM ANY_NUM Y(-) Y(-) Y N Y Y -

92.4 Use Function block without state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 211/342


92.5 Specification

92.5.1

Function block code


(*BEGIN MAX3 CAL IN1 = RE #IF defined($Q1) BOO 1 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF IF {IN2 > RE} THEN CAL IN2 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 1 = Q2 #ENDIF ENDIF #IF defined ($IN3) IF {IN3 > RE} THEN CAL IN3 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 1 = Q3 #ENDIF ENDIF #ENDIF (* END MAX3

92.5.2

Basic function used No use of basic function

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 212/342


Section 93

MIN : MIN OF 2.N INPUTS

93.1 Representation

93.2 Function The functionality of the MIN block is as the following : RE=MIN(IN1,IN2,,IN8) The Q<i> are indicating which input is selected. Only One is set to 1, the others one are set to 0.

93.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1..IN2 IN3..IN8 Outputs RE Q<i> Parameters Result output Input selected ANY_NUM B Y(-) N Y N Y Y Input1 Inputs ANY_NUM ANY_NUM Y(-) Y(-) Y N Y Y -

93.4 Use Function block without state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 213/342


93.5 Specification

93.5.1

Function block code


(*BEGIN MIN) CAL IN1 = RE #IF defined($Q1) BOO 1 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 0 = Q4 #ENDIF #IF defined($Q5) BOO 0 = Q5 #ENDIF #IF defined($Q6) BOO 0 = Q6 #ENDIF #IF defined($Q7) BOO 0 = Q7 #ENDIF #IF defined($Q8) BOO 0 = Q8 #ENDIF #IF defined ($IN2) IF {IN2 < RE} THEN CAL IN2 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 1 = Q2 #ENDIF ENDIF #ENDIF #IF defined ($IN3) IF {IN3 < RE} THEN CAL IN3 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 1 = Q3 #ENDIF ENDIF #ENDIF #IF defined ($IN4) IF {IN4 < RE} THEN CAL IN4 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 1 = Q4 #ENDIF ENDIF #ENDIF #IF defined ($IN5) IF {IN5 < RE} THEN CAL IN5 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 0 = Q4 #ENDIF #IF defined($Q5) BOO 1 = Q5 #ENDIF ENDIF #ENDIF #IF defined ($IN6) IF {IN6 < RE} THEN CAL IN6 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 0 = Q4 #ENDIF #IF defined($Q5) BOO 0 = Q5 #ENDIF #IF defined($Q6) BOO 1 = Q6 #ENDIF ENDIF #ENDIF #IF defined ($IN7) IF {IN7 < RE} THEN CAL IN7 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 0 = Q4 #ENDIF #IF defined($Q5) BOO 0 = Q5 #ENDIF #IF defined($Q6) BOO 0 = Q6 #ENDIF #IF defined($Q7) BOO 1 = Q7 #ENDIF ENDIF #ENDIF #IF defined ($IN8) IF {IN8 < RE} THEN CAL IN8 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF #IF defined($Q4) BOO 0 = Q4 #ENDIF #IF defined($Q5) BOO 0 = Q5 #ENDIF #IF defined($Q6) BOO 0 = Q6 #ENDIF #IF defined($Q7) BOO 0 = Q7 #ENDIF #IF defined($Q8) BOO 1 = Q8 #ENDIF ENDIF #ENDIF (*END OF MIN)

93.5.2

Basic function used No use of basic function.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 214/342


Section 94

Section 94 MIN3

MIN3

94.1 Representation

94.2 Function The functionality of the MIN3 block is as the following : RE=MIN(IN1,IN2,IN3) The Q<i> are indicating which input is selected. Only One is set to 1, the others one are set to 0.

94.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1..IN2 IN3 Outputs RE Q<i> Parameters Result output Input selected ANY_NUM B Y(-) N Y N Y Y Input1 Input ANY_NUM ANY_NUM Y(-) Y(-) Y N Y Y -

94.4 Use Function block without state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 215/342


94.5 Specification

Section 94 MIN3

94.5.1

Function block code


(*BEGIN MIN3 CAL IN1 = RE #IF defined($Q1) BOO 1 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 0 = Q3 #ENDIF IF {IN2 < RE} THEN CAL IN2 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 1 = Q2 #ENDIF ENDIF #IF defined ($IN3) IF {IN3 < RE} THEN CAL IN3 = RE #IF defined($Q1) BOO 0 = Q1 #ENDIF #IF defined($Q2) BOO 0 = Q2 #ENDIF #IF defined($Q3) BOO 1 = Q3 #ENDIF ENDIF #ENDIF (* End MIN3

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 216/342


Section 95

Section 95 MOD : MODULO

MOD : MODULO

95.1 Representation

95.2 Function The functionality of the MOD function Block is as the following :The result is the rest of the integer division of IN1 by IN2. Example: 14 modulo 3 gives 2 because 14 = 4 * 3 + 2

95.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 Outputs RE Parameters Operator Result ANY_NUM Y(-) Y N Input 1 Input 2 ANY_INT ANY_INT Y(-) Y(-) Y Y N N -

95.4 Use No indication of overflow. This block is a function in the meaning of IEC. 95.5 Specification

95.5.1

generated expression IN1 MOD IN2

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 217/342


Section 96

Section 96 MOVE : MOVE

MOVE : MOVE

96.1 Representation

96.2 Function The functionality of the MOVE function Block is the affectation or the cast from a signal to another signal, with different possible types for each signal. For this function block, the connection on the RE output is mandatory. 96.3 Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Result ANY_NUM Y(-) Y Y Input ANY_NUM Y(-) Y N -

96.4 Use Function block without state variables. 96.5 Specification

96.5.1

Generated expression IN

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 218/342


Section 97

Section 97 MOVE_B : MOVE(BOOLEAN)

MOVE_B : MOVE(BOOLEAN)

97.1 Representation

97.2 Function The functionality of the MOVE_B function Block is the affectation from a boolean signal in another boolean signal. For this function block, the connection on the RE output is mandatory. 97.3 Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Result B Y(/) Y Y Input B Y(/) Y N -

97.4 Use Function block without state variables. 97.5 Specification

97.5.1

Generated Expression IN

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 219/342


Section 98

Section 98 MUL : MULTIPLICATION OF 2.N INPUTS

MUL : MULTIPLICATION OF 2.N INPUTS

98.1 Representation

98.2 Function The functionality of the MUL block is as the following : RE =IN1*IN2*.*Inn

98.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1..INn Outputs RE Parameters Operator result ANY_NUM Y(-) Y N Inputs ANY_NUM Y(-) Y N -

98.4 Use No indication of overflow The block is a expandable function in the meaning of IEC. 98.5 Specification

98.5.1

generated block code IN1*IN2* *INn

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 220/342


Section 99

Section 99 MUL2_R : MULTIPLICATION OF 2 REAL INPUTS

MUL2_R : MULTIPLICATION OF 2 REAL INPUTS

99.1 Representation

99.2 Function The functionality of the MUL2_R block is as the following : IF (IN1) * (IN2) > 3.4 E+38 THEN RE <= (DEF) ENO <= TRUE ELSE RE <= (IN1) * (IN2) ENO <= FALSE ENDIF

99.3 Arguments characteristics


Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 DEF(DEFAULT ) Outputs RE EN0(ENO) Parameters Operator result Overflow signal REAL BOOLEAN N N Y N Y Y Input Input Default result REAL REAL REAL Y(-) Y(-) N Y Y N 3.4 +38
E

Y Y Y

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 221/342


99.4 Use

Section 99 MUL2_R : MULTIPLICATION OF 2 REAL INPUTS

The FB has no redundant variables.

99.5 specification

99.5.1

Internal variables MAX, TOTAL, ABS1, ABS2, LOG1, LOG2: 6 real variables

99.5.2

Function block code (* BEGIN MUL2_R CAL ABS(IN1) = ABS1 CAL ABS(IN2) = ABS2 CAL LOG10(ABS1+1) = LOG1 CAL LOG10(ABS2+1) = LOG2 CAL LOG1 + LOG2 = TOTAL CAL 38 * LOG10 3.4 = MAX IF { TOTAL < MAX } THEN CAL IN1 * IN2 = RE #IF defined($EN0) BOO 0 = EN0 #ENDIF ELSE CAL DEF = RE #IF defined($EN0) BOO 1 = EN0 #ENDIF ENDIF (* END MUL2_R

99.5.3

Basic function No use of basic function.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 222/342


Section 100

Section 100 MUX : MULTIPLEXER

MUX : MULTIPLEXER

100.1Representation

100.2Function The function block MUX select one of N inputs depending on input K. Example : as RE=A RE = MUX(K = 1 , IN1=A,IN2=B,IN3=C) would have the same effect

100.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1..IN8 K Outputs RE Parameters Result ANY_NUM Y(-) Y Y Inputs Selection inputs ANY_NUM I Y(-) N [1 8] N N 0 0 N N -

100.4Use If the value of K is out of its range, the result will be set to 0. Function block without state variables
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 223/342


100.5Specification

Section 100 MUX : MULTIPLEXER

100.5.1 Internal variables V01 (INTEGER) to hold a copy of K. 100.5.2 Function block code CAL K = V01 SWITCH V01 CASE 1 CAL CASE 2 CAL CASE 3 CAL CASE 4 CAL CASE 5 CAL CASE 6 CAL CASE 7 CAL CASE 8 CAL DEFAULT CAL ENDSWITCH

IN1 = RE IN2 = RE IN3 = RE IN4 = RE IN5 = RE IN6 = RE IN7 = RE IN8 = RE 0 = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 224/342


Section 101

Section 101 NE : INEQUALITY

NE : INEQUALITY

101.1Representation

101.2Function The functionality of the NE function Block is as the following : IF(IN1IN2) ELSE RE=0

RE=1

101.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 Outputs RE Parameters Result state B N Y Y Input 1 Input 2 ANY_NUM ANY_NUM Y(-) Y(-) Y Y Y Y -

101.4Use Function block without state variables. 101.5Specification

101.5.1 Function block code BOO {IN1<>IN2}=RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 225/342


Section 102

Section 102 NOT : LOGICAL NEGATION

NOT : LOGICAL NEGATION

102.1Representation

102.2Function The functionality of the NOT function Block is the logical negation of the input. For word and integers, the FB does a bit by bit logical not : EX : IN=1=Ox0001 then RE=OX1110=14

102.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator Result B/W/I N Y N Input B/W/I N Y N -

102.4Use The block is a function in the meaning of IEC 102.5specification

102.5.1 Generated expression /IN

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 226/342


Section 103

Section 103 OPP : OPPOSITION

OPP : OPPOSITION

103.1Representation

103.2Function The functionality of the OPP function Block is to return the numerical opposite of the input.

103.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator Result ANY_NUM N Y N Input ANY_NUM N Y N -

103.4Use The block is a function in the meaning of IEC. 103.5Specification

103.5.1 Generated expression <IN>

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 227/342


Section 104

Section 104 OR : BOOLEAN OR OF 2.N INPUTS

OR : BOOLEAN OR OF 2.N INPUTS

104.1Representation

104.2Function The function block OR represent Boolean logic OR gates for 2..N inputs. The functionality of the OR block is to do : with boolean inputs, the boolean OR with word or integer inputs, the boolean OR bit by bit.

104.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1..INn Outputs RE Parameters Inputs B/W/I Y(/) Y N -

Operator result

B/W/I

Y(/)

104.4use The block is an expandable function in the meaning of the IEC 104.5Specification

104.5.1 Generated expression IN1+IN2++Inn

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 228/342


Section 105

Section 105 OSC_B : OSCILLATOR

OSC_B : OSCILLATOR

105.1Representation

105.2function Function block OSC_B generates a series of pulse trains with variable frequency and pulse time based on the input values. This function block has one input, one output and two parameters. IN is the enable input to start oscillator. TP is the input parameter for setting the value of positive time pulse and TN is the input parameter for setting the value of negative time pulse. RE is the result of oscillator. If the value of parameters TP or TN is less than the system cycle time, then the parameters are set with system cycle time. One total cycle TC=TP+TN If TP>32767 seconds, then TP=32767 seconds If TN>32767 seconds, then TN=32767 seconds If TP<CYC, then TP=CYC If TN<CYC, then TN=CYC If CYC<TP<2* CYC, then the result RE is high for 1 CYC If CYC<TN<2 * CYC, then the result RE is low for 1 CYC The value of TP and TN are in terms of seconds.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 229/342

Section 105 OSC_B : OSCILLATOR

Fig: Example of an oscillation with TP=1 sec, TN=0.5 sec and the cycle time is 100 ms.

105.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters TP Result Positive Time Pulse Negative Time Pulse Boolean Real N N Y Y Y Y Enable Input to start oscillator Boolean N Y Y -

TN

Real

105.4Use Not used for a CE2000 105.5Specification

105.5.1 Associated MVM OSC_B_V 105.5.2 Internal Variables


NAME CPT DESCRIPTION To keep the previous value of input IN TYPE Real Private YES Redundancy exchange Redund

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 230/342


105.5.3 Basic Function

Section 105 OSC_B : OSCILLATOR

Basic function OSC_B belongs to function blocks library System\Control\Pulses 105.5.4 Internal code (*BEGIN OSC_B) #IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF

(* Call Basic function OSC_B (*=================

BF(OSC_B,IN,TP,TN,RE,CPT) (*=================

(*#IF defined($PER) (*Cal TPER = PER (*#ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 231/342


Section 106

Section 106 OSL_D : ONE SHOT LIMITED FOR DOUBLE, 32 BITS REDUNDANCY

OSL_D : ONE SHOT LIMITED FOR DOUBLE, 32 BITS REDUNDANCY

106.1Representation

106.2Function The functionality of this block is as the following: The dynamic input triggers a single pulse, the maximum duration of which is given by the time TP parameter.However, if the input signals returns to zero, the output will do the same, even if the specified time TP has not yet elapsed since the start of the pulse. TP : DURATION Duration of pulse in 0,01 second. D type double : maximum value + 2,147 * 109 If TP is less than or equal to cycle time, it is considered to be 0 ; no pulse. The output REB is calculated in function of cycle time. Example : If TP = 190 (1,9 sec.) and IF Tcyc = 0,5 sec, the duration of the pulses is on (1,9 / 0,5 = 3 double ) 3 cycles therefore ( 3 * 0,5 = 1,5) 1,5 seconds. Changes to TP during a pulse are not taken into account. Its taking account at the next pulse.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 232/342

Section 106 OSL_D : ONE SHOT LIMITED FOR DOUBLE, 32 BITS REDUNDANCY

IN
0

REB
0

TP
TP

TP

TP

RET
0

106.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value -

Inputs IN Outputs REB RET Parameters TP

Input

Y(/)

Result output Time Parameter

B DOUBLE DOUBLE

N N N

Y N Y

Y Y Y

106.4Use Not used for a CE2000

The time units are double integer units of 0.01 seconds. The total redundancy of the block is made with 1 double (32 bits), because the block uses a block TON_D.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 233/342


106.5Specification

Section 106 OSL_D : ONE SHOT LIMITED FOR DOUBLE, 32 BITS REDUNDANCY

106.5.1 State variables No state variables 106.5.2 Internal Variables V (BOOLEAN), private, to hold the result of the timer W (DOUBLE), private, to hold the elapsed time of the timer 106.5.3 Function block code (* BEGIN OSL_D #IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #FB( TON_D, IN, TP, V, W ) BOO IN . / V = REB #IF defined($RET) IF REB THEN CAL W = RET ELSE CAL 0 = RET ENDIF #ENDIF (* END OSL_D

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 234/342


Section 107

Section 107 OSL_R : ONE SHOT LIMITED FOR REAL, 32 BITS REDUNDANCY

OSL_R : ONE SHOT LIMITED FOR REAL, 32 BITS REDUNDANCY

107.1Representation

107.2Function The functionality of this block is as the following: The dynamic input triggers a single pulse, the maximum duration of which is given by the time TP parameter.However, if the input signals returns to zero, the output will do the same, even if the specified time TP has not yet elapsed since the start of the pulse. TP : DURATION Duration of pulse in 1 second. D type real : maximum value + 3,4 * 1038 If TP is less than or equal to cycle time, it is considered to be 0 ; no pulse. The output REB is calculated in function of cycle time. Changes to TP during a pulse are not taken into account. Its taking account at the next pulse.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 235/342

Section 107 OSL_R : ONE SHOT LIMITED FOR REAL, 32 BITS REDUNDANCY

IN
0

REB
0

TP
TP

TP

TP

RET
0

107.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value -

Inputs IN Outputs REB RET Parameters TP

Input

Y(/)

Result output Time Parameter

B REAL REAL

N N N

Y N Y

Y Y Y

107.4Use Not used for a CE2000

The time units are double integer units of seconds. The total redundancy of the block is made with 1 double (32 bits), because the block uses a block TON_R.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 236/342


107.5Specification

Section 107 OSL_R : ONE SHOT LIMITED FOR REAL, 32 BITS REDUNDANCY

107.5.1 State variables No state variables 107.5.2 Internal Variables V (BOOLEAN), private, to hold the result of the timer W (REAL), private, to hold the elapsed time of the timer 107.5.3 Function block code (* BEGIN OSL_R #IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #FB( TON_D, IN, TP, V, W ) BOO IN . / V = REB #IF defined($RET) IF REB THEN CAL W = RET ELSE CAL 0 = RET ENDIF #ENDIF (* END OSL_R

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 237/342


Section 108

Section 108 OSL_W : ONE SHOT LIMITED FOR WORD, 16 BITS REDUNDANCY

OSL_W : ONE SHOT LIMITED FOR WORD, 16 BITS REDUNDANCY

108.1Representation

108.2Function The functionality of this block is as the following: The dynamic input triggers a single pulse, the maximum duration of which is given by the time TP parameter.However, if the input signals returns to zero, the output will do the same, even if the specified time TP has not yet elapsed since the start of the pulse. TPc : DURATION Duration of pulse in 0,01 second. D type word : maximum value + 65535 If TP is less than or equal to cycle time, it is considered to be 0 ; no pulse. The output REB is calculated in function of cycle time. Example : If TP = 190 (1,9 sec.) and IF Tcyc = 0,5 sec, the duration of the pulses is on (1,9 / 0,5 = 3 word ) 3 cycles therefore ( 3 * 0,5 = 1,5) 1,5 seconds. Changes to TP during a pulse are not taken into account. Its taking account at the next pulse.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 238/342

Section 108 OSL_W : ONE SHOT LIMITED FOR WORD, 16 BITS REDUNDANCY

IN
0

REB
0

TP
TP

TP

TP

RET
0

108.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value -

Inputs IN Outputs REB RET Parameters TP

Input

Y(/)

Result output Time Parameter

B WORD WORD

N N N

Y N Y

Y Y Y

108.4Use Not used for a CE2000

The time units are double integer units of 0.01 seconds. The total redundancy of the block is made with 1 WORD (16 bits), because the block uses a block TON_W

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 239/342


108.5Specification 3.

Section 108 OSL_W : ONE SHOT LIMITED FOR WORD, 16 BITS REDUNDANCY

State variables No state variables

108.5.1 Internal Variables V (BOOLEAN), private, to hold the result of the timer W (WORD), private, to hold the elapsed time of the timer 108.5.2 Function block code (* BEGIN OSL_W #IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #FB( TON_D, IN, TP, V, W ) BOO IN . / V = REB #IF defined($RET) IF REB THEN CAL W = RET ELSE CAL 0 = RET ENDIF #ENDIF (* END OSL_W

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 240/342


Section 109

Section 109 PROFIBUS_CONTROL

PROFIBUS_CONTROL

109.1Representation

109.2

Function Control of slaves on a network. The orders (CLEAR_DATA, UNFREEZE, FREEZE, UNSYNC and SYNC) affect all the slaves which were put in the group 1 in SYCON software. See document P-TP21-A41053 Profibus Configuration Guide.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 241/342


109.3 Arguments characteristics
Name Description Type Neg Range

Section 109 PROFIBUS_CONTROL

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs NET_NUM TRIG_CMD STAT_ADDR CLEAR_DAT A UNFREEZE FREEZE UNSYNC SYNC Profibus network number [0..3]t Triggers a command Station address Output fallback Deactivate freeze function Activate freeze function Deactivate sync function Activate sync function W B W B B B B B N N N N N N N N Y Y Y N N N N N Y Y Y Y Y Y Y Y -

Output CMD_RUN Command is running B N N Y -

109.4

Use Used for a MFC3000

109.4.1

Description of terminals NET_NUM : PROFIBUS NETWORK NUMBER [03] Profibus device number. TRIG_CMD : TRIGGERS A COMMAND Used to trigger one of the following commands: ClearData, Freeze, Unfreeze, Sync, Unsync. STAT_ADDR : STATION ADDRESS Station address. CLEAR_DATA : OUTPUT FALLBACK The command to be sent is ClearData : = 1 the slave will set the outputs to the fallback value

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 242/342


UNFREEZE :

Section 109 PROFIBUS_CONTROL

DEACTIVATE FREEZE FUNCTION The command to be sent is Unfreeze.

FREEZE :

ACTIVATE FREEZE FUNCTION The command to be sent is Freeze.

UNSYNC :

DEACTIVATE SYNC FUNCTION The command to be sent is Unsync.

SYNC :

ACTIVATE SYNC FUNCTION The command to be sent is Sync.

CMD_RUN :

COMMAND IS RUNNING The last command is still running

109.5Specification

109.5.1 Internal variables None 109.5.2 Internal code


#IF $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $NET_NUM !~ /^\s*\d+\s*$/ || $NET_NUM > 3 #ERROR Profibus network number must be a constant in the range [0..3] #ENDIF (* Index of network in CCAD_PROFIBUS_CONTROL interface variable CAL NET_NUM * 4 = INDEX (* Commands can only be run on the master MFC3000 IF MASTER THEN (* Test if a previous command is still running IF {CCAD_PROFIBUS_CONTROL(INDEX) = 0} THEN (* Driver is ready to handle a new command BOO TRIG_CMD = CMD_RUN IF CMD_RUN THEN (* A new command is issued CAL 1 = CCAD_PROFIBUS_CONTROL(INDEX) CAL INDEX + 1 = INDEX

(* Update field

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 243/342

Section 109 PROFIBUS_CONTROL

CAL STAT_ADDR = CCAD_PROFIBUS_CONTROL(INDEX) (* StationAddress field CAL INDEX + 1 = INDEX CAL 1 = CCAD_PROFIBUS_CONTROL(INDEX) (* GroupNumber field CAL INDEX + 1 = INDEX CAL 0 = CCAD_PROFIBUS_CONTROL(INDEX) (* Command field TBW ,CLEAR_DATA, UNFREEZE, FREEZE, UNSYNC, SYNC = CCAD_PROFIBUS_CONTROL(INDEX) ENDIF ELSE (* Previous command is still running BOO 1 = CMD_RUN ENDIF ELSE (* On the slave MFC3000 we must insure that no command is pending BOO 0 = CMD_RUN CAL 0 = CCAD_PROFIBUS_CONTROL(INDEX) (* Update field ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 244/342


Section 110

Section 110 R_TRIG : RISING EDGE DETECTOR

R_TRIG : RISING EDGE DETECTOR

110.1Representation

IN

RE

110.2Function The RE output of an R_TRIG function block shall stand at the Boolean 1 value from one execution of the function block to the next, following the 0 to 1 transition of the IN input, and shall return to 0 at the next execution: output = (current input) AND NOT(previous input)

110.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters result Boolean N Y Y 0 Input Boolean Y(/) Y N -

110.4Use Not used for a CE2000 Function block with a boolean state variable

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 245/342


110.5Specification

Section 110 R_TRIG : RISING EDGE DETECTOR

110.5.1 State variable M, Boolean, redundant 110.5.2 Function block code (* BEGIN R_TRIG) #IF $TARGET_TYPE =~ 'CE2000' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF IF INIT THEN BOO 0 = RE ELSE BOO /M.IN = RE ENDIF BOO IN = M (* END R_TRIG)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 246/342


Section 111

Section 111 RECV_FROM_DUAL

RECV_FROM_DUAL

111.1Representation

111.2Function The RECV_FROM_DUAL function block gives informations from the application of the dual controller. It can be used in the redundant controller of C8035, MFC3000 or RX3i type (cell or field controller). But the exchange of application faults between slave and master controller contain only five bits. This block must be used with the SEND_TO_DUAL function block. This five bits can be used, for example, for the redundancy management. Many RECV_FROM_DUAL can be used in a controller.

111.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Outputs RE1 RE2 RE3 RE4 RE5 Fault Fault Fault Fault Fault B B B B B N N N N N N N N N N Y Y Y Y Y

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 247/342


111.4Use Used C8035, MFC3000 and RX3i

Section 111 RECV_FROM_DUAL

111.5Description of terminals REx : It is a no-redundant boolean output received by the dual controller. Set to 1 when the SEND_TO_DUALs input INx of the dual controller is put to 1

111.6Specifications

111.7Internal variables None 111.8Internal code #IF $TARGET_TYPE !~ 'C8035' && $TARGET_TYPE !~ 'RX3i' && $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $TARGET_TYPE =~ 'C8035' || $TARGET_TYPE =~ 'RX3i' TWB D_PRSCE_STAT=,,,,,,,,,,,RE5,RE4,RE3,RE2,RE1 #ENDIF #IF $TARGET_TYPE =~ 'PCX' TWB CCAD_RECVD_FROM_DUAL=,,,RE5,RE4,RE3,RE2,RE1 #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 248/342


Section 112

Section 112 ROL : LEFT-ROTATED BY N BITS CIRCULAR

ROL : LEFT-ROTATED BY N BITS CIRCULAR

112.1Representation

112.2Function The functionality for the ROL function block is as the following : RE=IN left rotated by N bits, circular

112.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN N Outputs RE Parameters result I/W N Y Y Input Number of rotation I/W W N N Y N 0 Y Y -

112.4Use Function block without state variables. 112.5Specification

112.5.1 Function block code ROL IN , N = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 249/342


Section 113

Section 113 ROR : RIGHT-ROTATED BY N BITS CIRCULAR

ROR : RIGHT-ROTATED BY N BITS CIRCULAR

113.1Representation

113.2Function The functionality fo the ROR function block is as the following : RE=IN right rotated by N bits, circular

113.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN N Outputs RE Parameters Operator result I/W N Y Y Input Number of rotation I/W W N N Y N 0 Y Y -

113.4Use Function block without state variables. 113.5Specification

113.5.1 Function block code ROL IN, N = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 250/342


Section 114

Section 114 RS

BISTABLE FUNCTION BLOC (RESET DOMINANT)

RS BISTABLE FUNCTION BLOC (RESET DOMINANT)

114.1Representation

114.2Function The functional Block RS processes a logic state storage. Its operator state Q1 is set to 1 when the input S (set) is equal to 1, and is set to 0 when the input R1 (reset) is equal to 1. When S and R1 are both equal to 1, the reset order has the priority. If R1(K) = 1 If R1(K) = 0 IF S = 1 If S = 0 Then Q1(k) = 1 Then Q1(k) = Q1(k-1) Then Q1(K) = 0

114.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs S R1 Outputs Q1 NQ1(/Q1) Parameters IV Initialisation value B Y(/) N 0 N Result Negated Result B B N N Y N Y Y IV Set Reset dominant B B Y(/) Y(/) Y Y N N -

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 251/342


114.4Use

Section 114 RS

BISTABLE FUNCTION BLOC (RESET DOMINANT)

Function block with a boolean state variable During initialisation (INIT = 1), at PLC start-up : Q1 = IV Example of sequence outside initialisation :
S 0 0 0 1 0 0 1 1 0 R1 0 1 0 0 0 1 1 0 0 Q1 0 0 0 1 1 0 0 1 1

114.5Specification

114.5.1 State variables STA : Memorisation boolean variable (redundant) : Q1(K-1) 114.5.2 Function block code (*BEGIN RS IF INIT THEN (* Initialization Function BOO IV = Q1 ELSE (* Operation and Update Outputs Function IF R1 THEN BOO 0 = Q1 ELSE BOO STA + S = Q1 ENDIF ENDIF (* Operation and Update States Variables Function BOO Q1 = STA (* Update negated state #IF defined($NQ1) BOO /Q1 = NQ1 #ENDIF (* END RS

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 252/342


Section 115

Section 115 S_REF

S_REF

115.1Representation

115.2Function The S_REF function block gives information from the controller PLC.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 253/342

Section 115 S_REF

115.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Outputs FST_SCN LST_SCN T_10MS T_100MS T_SEC T_MIN ALW_ON ALW_OFF SY_FULL IO_FULL OVR_PRE PRG_CHK PLC_BAT SNPX_RD SNPX_WT Indicator Indicator Timer pulse Timer pulse Timer pulse Timer pulse 1 0 Indicator Indicator Indicator Indicator Indicator Indicator Indicator B B B B B B B B B B B B B B B N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

115.4Use Not used CE2000 and MFC3000 115.4.1 Description of terminals FST_SCN : LST_SCN : T_10MS : T_100MS : T_SEC : T_MIN : ALW_ON : ALW OFF : SY_FULL : Set to 1 when the current scan is the first scan. Reset from 1 to 0 when the current scan is the last scan. 0.01 second timer contact. 0.1 second timer contact. 1.0 second timer contact. 1.0 minute timer contact. Always ON (the information is a "1" logical ). Always OFF (the information is a "0" logical). Set when the PLC fault table fills up. Cleared when an entry is removed from the PLC fault table and when the PLC fault table is cleared. Set when the I/O fault table fills up. Cleared when an entry is removed from the I/O fault table and when the I/O fault table is cleared. Set when an override exists in %I, %Q, %M and %G memory. Set when a background program check is active. Set to indicate a bad battery in a Release 4 or later CPU. The contact reference is updated once per sweep. SNP-X host is actively attached to the CPU. SNP-X host has read data from the CPU. SNP-X host has a written data to the CPU.

IO_FULL :

OVR_PRE : PRG_CHK : PLC_BAT : SNPXACT : SNPX_RD : SNPX_WT :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 254/342


115.5Specifications

Section 115 S_REF

115.5.1 Internal variables None 115.5.2 Internal code


#IF $TARGET_TYPE =~ 'CE2000' || $TARGET_TYPE =~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF defined ($FST_SCN) BF (C_GET_BIT_S, 1, FST_SCN) #ENDIF #IF defined ($LST_SCN) BF (C_GET_BIT_S, 2, LST_SCN) #ENDIF #IF defined ($T_10MS) BF (C_GET_BIT_S, 3, T_10MS) #ENDIF #IF defined ($T_100MS) BF (C_GET_BIT_S, 4, T_100MS) #ENDIF #IF defined ($T_SEC) BF (C_GET_BIT_S, 5, T_SEC) #ENDIF #IF defined ($T_MIN) BF (C_GET_BIT_S, 6, T_MIN) #ENDIF #IF defined ($ALW_ON) BF (C_GET_BIT_S, 7, ALW_ON) #ENDIF #IF defined ($ALW_OFF) BF (C_GET_BIT_S, 8, ALW_OFF) #ENDIF #IF defined ($SY_FULL) BF (C_GET_BIT_S, 9, SY_FULL) #ENDIF #IF defined ($IO_FULL) BF (C_GET_BIT_S, 10, IO_FULL) #ENDIF #IF defined ($OVR_PRE) BF (C_GET_BIT_S, 11, OVR_PRE) #ENDIF #IF defined ($PRG_CHK) BF (C_GET_BIT_S, 13, PRG_CHK) #ENDIF #IF defined ($PLC_BAT) BF (C_GET_BIT_S, 14, PLC_BAT) #ENDIF #IF defined ($SNPXACT) BF (C_GET_BIT_S, 17, SNPXACT) #ENDIF #IF defined ($SNPX_RD) BF (C_GET_BIT_S, 18, SNPX_RD) #ENDIF #IF defined ($SNPX_WT) BF (C_GET_BIT_S, 19, SNPX_WT) #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 255/342


Section 116

Section 116 SA_REF

SA_REF

116.1Representation

116.2Function The SA_REF function block gives information from the controller PLC.

116.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Outputs PB_SUM OV_SWP APL_FLT CFG_MM HRD_CPU LOW_BAT LOS_IOM LOS_SIO ADD_IOM ADD_SIO HRD_SIO SFT_SIO Cheksum problem Over sweep Application fault Config. mismatch CPU Hardware pb Low battery Lost module Lost module Added module Added module Hardware failure Software fault B B B B B B B B B B B B N N N N N N N N N N N N N N N N N N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 256/342


116.4Use Not used CE2000 and MFC3000 116.5Description of terminals PB_SUM :

Section 116 SA_REF

Set when a cheksum is calculated on the application program does not match reference cheksum. If the fault was due to a temporary failure, the discrete bit can be cleared by again storing the program to the CPU. If the fault was due to a hard RAM failure, the CPU must be replaced. Set when the PLC detects that the previous sweep took longer than the time specified by the user. Cleared when the PLC detects that the previous sweep did not take longer than the specified time. It is also cleared during the transition from STOP to RUN mode. Only valid if the PLC is in CONSTANT SWEEP mode. Set when an application fault occurs. Cleared when the PLC transitions from STOP to RUN mode. Set when a configuration mismatch is detected during system powerup or during a store of the configuration. Cleared by the powering-up PLC when no mismatches are present or during a store of configuration that matches hardware. Set when the diagnostic detects a problem with the CPU hardware. Cleared by replacing the PLC module. Set when a low battery fault occurs. Cleared by replacing the battery and ensuring that the PLC powers up without the low battery condition. Set when an I/O module stops communicating with the PLC CPU. Cleared by replacing the module and cycling power on the main rack. Set when an option module stops communicating with the PLC CPU. Cleared by replacing the module and cycling power on the main rack. Set when an I/O module is added to a rack. Cleared by cycling on power the main rack and when the configuration matches the hardware after a store. Set when an option module is added to a rack. Cleared by cycling on power the main rack and when the configuration matches the hardware after a store. Set when a hardware failure is detected in option module. Cleared by replacing the module and cycling power on the main rack. Set when an unrecoverable software fault is detected in a option module. Cleared by cycling power on the main rack and when the configuration matches the hardware.

OV_SWP :

APL_FLT : CFG_MM :

HRD_CPU : LOW_BAT :

LOS_IOM : LOS_SIO : ADD_IOM :

ADD_SIO :

HRD_SIO : SFT_SIO :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 257/342


116.6Specifications

Section 116 SA_REF

116.6.1 Internal variables None 116.6.2 Internal code #IF $TARGET_TYPE =~ 'CE2000' || $TARGET_TYPE =~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF defined ($PB_SUM) BF (C_GET_BIT_SA, 1, PB_SUM) #ENDIF #IF defined ($OV_SWP) BF (C_GET_BIT_SA, 2, OV_SWP) #ENDIF #IF defined ($APL_FLT) BF (C_GET_BIT_SA, 3, APL_FLT) #ENDIF #IF defined ($CFG_MM) BF (C_GET_BIT_SA, 9, CFG_MM) #ENDIF #IF defined ($HRD_CPU) BF (C_GET_BIT_SA, 10, HRD_CPU) #ENDIF #IF defined ($LOW_BAT) BF (C_GET_BIT_SA, 11, LOW_BAT) #ENDIF #IF defined ($LOS_IOM) BF (C_GET_BIT_SA, 14, LOS_IOM) #ENDIF #IF defined ($LOS_SIO) BF (C_GET_BIT_SA, 15, LOS_SIO) #ENDIF #IF defined ($ADD_IOM) BF (C_GET_BIT_SA, 19, ADD_IOM) #ENDIF #IF defined ($ADD_SIO) BF (C_GET_BIT_SA, 20, ADD_SIO) #ENDIF #IF defined ($HRD_SIO) BF (C_GET_BIT_SA, 27, HRD_SIO) #ENDIF #IF defined ($SFT_SIO) BF (C_GET_BIT_SA, 31, SFT_SIO) #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 258/342


Section 117

Section 117 SB_REF

SB_REF

117.1Representation

117.2Function The SB_REF function block gives information from the controller PLC.

117.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Outputs BAD_RAM BAD_PWD SFT_CPU STOR_ERR Corrupted RAM Violated password Software error Storing error B B B B N N N N N N N N Y Y Y Y

117.4use Not used CE2000 and MFC3000 117.4.1 Description of terminals BAD_RAM : Set when the CPU detects corrupted RAM memory at power-up. Cleared when the CPU detects that RAM memory is valid at power-up. Set when the password access violation occurs. Cleared by clearing the PLC fault table.

BAD_PWD :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 259/342


SFT_CPU :

Section 117 SB_REF

Set when the CPU detects an unrecoverable error in the software. Cleared by clearing the PLC fault table. Set when an error occurs during a programmer store operation. Cleared when a store operation is completed successfully.

STOR_ERR :

117.5Specification

117.5.1 Internal variables None 117.5.2 Internal code #IF $TARGET_TYPE =~ 'CE2000' || $TARGET_TYPE =~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF defined ($BAD_RAM) BF (C_GET_BIT_SB, 10, BAD_RAM) #ENDIF #IF defined ($BAD_PWD) BF (C_GET_BIT_SB, 11, BAD_PWD) #ENDIF #IF defined ($SFT_CPU) BF (C_GET_BIT_SB, 13, SFT_CPU) #ENDIF #IF defined ($STOR_ER) BF (C_GET_BIT_SB, 14, STOR_ER) #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 260/342


Section 118

Section 118 SC_REF

SC_REF

118.1Representation

118.2Function The SC_REF function block gives information from the controller PLC

118.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Outputs ANY_FLT SY_FLT IO_FLT SY_PRES IO_PRES HRD_FLT SFT_FLT Fault indicator Fault indicator Fault indicator Presence indicator Presence indicator Fault indicator Fault indicator B B B B B B B N N N N N N N N N N N N N N Y Y Y Y Y Y Y

118.4Use Not used CE2000 and MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 261/342


118.4.1 Description of terminals ANY_FLT : SY_FLT : IO_FLT : SY_PRES : IO_PRES : HRD_FLT : SFT_FLT :

Section 118 SC_REF

Set when any fault occurs. Cleared when both fault tables have no entries. Set when any fault occurs that causes an entry to be placed in PLC fault table. Cleared when the PLC fault table has no entries. Set when any fault occurs that causes an entry to be placed in I/O fault table. Cleared when the I/O fault table has no entries. Set as long as there is at least one entry in the PLC fault table. Cleared when the PLC fault table has no entries. Set as long as there is at least one entry in the I/O fault table. Cleared when the I/O fault table has no entries. Set when a hardware fault occurs. Cleared when the both fault tables have no entries. Set when a software fault occurs. Cleared when the both fault tables have no entries.

118.5Specification

118.5.1 Internal variables None 118.5.2 Internal code


#IF $TARGET_TYPE =~ 'CE2000' || $TARGET_TYPE =~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF defined ($ANY_FLT) BF (C_GET_BIT_SC, 9, ANY_FLT) #ENDIF #IF defined ($SY_FLT) BF (C_GET_BIT_SC, 10, SY_FLT) #ENDIF #IF defined ($IO_FLT) BF (C_GET_BIT_SC, 11, IO_FLT) #ENDIF #IF defined ($SY_PRES) BF (C_GET_BIT_SC, 12, SY_PRES) #ENDIF #IF defined ($IO_PRES) BF (C_GET_BIT_SC, 13, IO_PRES) #ENDIF #IF defined ($HRD_FLT) BF (C_GET_BIT_SC, 14, HRD_FLT) #ENDIF #IF defined ($SFT_FLT) BF (C_GET_BIT_SC, 15, SFT_FLT) #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 262/342


Section 119

Section 119 SEL : BINARY SELECTION

SEL : BINARY SELECTION

119.1Representation

119.2Function The function box SEL sends as output signal RE a numerical value defined either by IN0 or by IN1 depending on the selection made by the input G. If G = 0 Then If G = 1 Then RE = IN1 RE = IN2

The SEL has the same functionnality as a 2 input MUX.The difference is that the FB has a boolean selector G. 119.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 G Outputs RE Parameters Result ANY_NUM Y(-) Y Y Input 1 Input 2 Select input ANY_NUM ANY_NUM B Y(-) Y(-) N N N Y 0 0 N N Y -

119.4Use Function block without state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 263/342


119.5Specification

Section 119 SEL : BINARY SELECTION

119.5.1 Function block code IF G THEN CAL IN2 = RE ELSE CAL IN1 = RE ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 264/342


Section 120

Section 120 SEL_B : BINARY SELECTION BETWEEN BOOLEANS

SEL_B : BINARY SELECTION BETWEEN BOOLEANS

120.1Representation

120.2Function The function box SEL_B sends as output signal RE a boolean value defined either by IN0 or by IN1 depending on the selection made by the input G. If G = 0 Then If G = 1 Then RE = IN1 RE = IN2

The SEL_B has the same functionnality as the standard selector.The difference is that the selected values are boolean.

120.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 G Outputs RE Parameters Result B Y(-/ Y Y Input 1 Input 2 Select input B B B Y(/) Y(/) Y(/) N N Y 0 0 N N Y -

120.4Use Function block without state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 265/342


120.5Specification

Section 120 SEL_B : BINARY SELECTION BETWEEN BOOLEANS

120.5.1 State variables No 120.5.2 Internal variables No 120.5.3 Function block code IF G THEN BOO IN2 = RE ELSE BOO IN1 = RE ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 266/342


Section 121

Section 121 SEND_TO_DUAL

SEND_TO_DUAL

121.1Representation

121.2Function The SEND_TO_DUAL function block gives informations to the application of the dual controller. It must be used with the RECV_FROM_DUAL function block. It can be used in the redundant controller of C8035, MFC3000 or RX3i type (cell or field controller). But the exchange of application faults between slave and master controller contain only five bits. This five bits can be used, for example, for the redundancy management. Several SEND_TO_DUAL function blocks can be used in a controller, but the arguments connected must be different from must instance to the other. For example you can affect IN1 and IN2 in a diagram and IN3 in another one, but you should not affect the same argument in both diagrams.

121.3Arguments characteristics

Name

Description

Type

Neg

Range

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs IN1 IN2 IN3 IN4 IN5 Fault Fault Fault Fault Fault B B B B B N N N N N N N N N N Y Y Y Y Y

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 267/342


121.4Use Used for a C8035, MFC3000 and RX3i 121.4.1 Description of terminals INx :

Section 121 SEND_TO_DUAL

It is a no-redundant boolean input send to the dual controller. This controller receives this boolean data by the RECV_FROM_DUAL function block in ouput REx.

121.5Specifications

121.5.1 Internal variables None 121.5.2 Internal code #IF $TARGET_TYPE !~ 'C8035' && $TARGET_TYPE !~ 'RX3i' && $TARGET_TYPE !~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF #IF $TARGET_TYPE =~ 'C8035' || $TARGET_TYPE =~ 'RX3i' TBW ,,,,,,,,,,,IN5,IN4,IN3,IN2,IN1=C_PRSCE_STAT #ENDIF #IF $TARGET_TYPE =~ 'PCX' TBW ,,,IN5,IN4,IN3,IN2,IN1=CCAD_SENT_TO_DUAL #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 268/342


Section 122

Section 122 SHL : LEFT-SHIFTED BY N BITS,ZERO FILLED ON RIGHT

SHL : LEFT-SHIFTED BY N BITS,ZERO FILLED ON RIGHT

122.1Representation

122.2Function The functionality fo the SHL function block is as the following : RE=IN left-shifted by N bits, zero-filled on right

122.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN N Outputs RE Parameters Operator result I/W N Y Y Input Shift input I/W W N N Y N 0 Y Y -

122.4USE Function block without state variables. 122.5Specification

122.5.1 Function block code SHL IN, N = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 269/342


Section 123

Section 123 SHR : RIGHT-SHIFTED BY N BITS,ZERO FILLED ON LEFT

SHR : RIGHT-SHIFTED BY N BITS,ZERO FILLED ON LEFT

123.1Representation

123.2Function The functionality of the SHR function block is as the following : RE=IN right-shifted by N bits, zero-filled on left

123.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN N Outputs RE Parameters Operator result I/W N Y Y Input Shift input I/W W N N Y N 0 Y Y -

123.4use Function block without state variables. 123.5Specification

123.5.1 Function block code SHL IN, N = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 270/342


Section 124

Section 124 SIN : SINE

SIN : SINE

124.1Representation

124.2Function The SIN function block returns in its output RE the sine of IN.

124.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator result REAL Y(-) [-1 ;1] Y N Input REAL Y(-) [- ;] radians Y N -

124.4Use If IN is greater than or equal to , or less than or equal to , a loss of significance in the result occurs, in which case the function returns an indefinite result. The block is a function in the meaning of IEC 124.5Specification

124.5.1 generated expression SIN (IN)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 271/342


Section 125

Section 125 SINMC : SINE

SINMC : SINE

125.1Representation

125.2Function The SINMC function block returns in its output RE the sine of IN. Output scale range : +10000 -1 is equivalent to 10000 and +1 is equivalent to

Input scale range : - is equivalent to -*10000 and + is equivalent to +*10000 125.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Input I Y(-) [-*10000 ; *10000] radians Y N -

Outputs RE Operator result I Y(-) [-10000 ; 10000] Y Y -

Parameters

125.4Use If IN is greater than or equal to *10000, or less than or equal to *10000, a loss of significance in the result occurs, in which case the function returns an indefinite result. Function block without state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 272/342


125.5Specification

Section 125 SINMC : SINE

125.5.1 Function block code CAL 10000 * SIN (IN/10000.0) = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 273/342


Section 126

Section 126 SM : SUM

SM : SUM

126.1Representation

126.2Function The function block SM calculates the sum of inputs IN1, IN2, IN3 with the gain G1, G2, G3, and an offset DEC. The Fb processes the following equation : RE=(G1*IN1)+(G2*IN2)+(G3*IN3)+DEC 126.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 IN3 Outputs RE Parameters G1 G2 G3 DEC Sum input 1 Sum input 2 Sum input 3 ANY_NUM ANY_NUM ANY_NUM Y Y Y N N N 0 0 0 Y Y Y -

Result Gain 1 Gain 2 Gain 3 Offset

ANY_NUM ANY_NUM ANY_NUM ANY_NUM ANY_NUM

N N N N N

Y N N N N

1 1 1 0

Y Y Y Y Y

126.4Use There is no indication of overflow. Function block without state variables

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 274/342


126.5Specification

Section 126 SM : SUM

126.5.1 Function block code CAL (G1*IN1)+(G2*IN2)+(G3*IN3)+DEC = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 275/342


Section 127

Section 127 SQRT : SQUARE ROOT

SQRT : SQUARE ROOT

127.1Representation

127.2Function The function of the block is to return the square-root of IN. The function manages the case if the input is negative.

127.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN DEF Outputs RE EN0 (ENO) Parameters Operator Result Problem Signal ANY_NUM BOOLEAN Y(-) Y Y N Y Y Input Default Output if Input < 0 ANY_NUM ANY_NUM Y(-) N Y N 0 Y Y -

127.4Use If the input is positive or null, SQRT returns the square-root of the input into its result, and returns FALSE into EN0, if EN0 is defined If the input is negative, SQRT returns the dfault output signal into its result, and returns TRUE into EN0, if EN0 is defined

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 276/342


127.5Specification

Section 127 SQRT : SQUARE ROOT

127.5.1 internal variables no variables 127.5.2 Internal code (* BEGIN SQRT IF { IN < 0 } THEN CAL DEF = RE #IF defined ($EN0) BOO 1 = EN0 #ENDIF ELSE CAL SQRT(IN) = RE #IF defined ($EN0) BOO 0 = EN0 #ENDIF ENDIF (* END SQRT

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 277/342


Section 128

Section 128 SR : BISTABLE FUNCTION BLOC (SET DOMINANT)

SR : BISTABLE FUNCTION BLOC (SET DOMINANT)

128.1Representation

128.2Function The functional Block SR processes a logic state storage. Its operator state Q1 is set to 1 when the input S1 (set) is equal to 1 ,and is set to 0 when the input R (reset) is equal to 1. When S1 and R are both equal to 1, the set order has the priority. If S1(K) = 1 Q1(K) = 1 Else If R(K) = 1 If R(K) = 0 End if then Q1(K) = 0 then Q1(K) = Q1(k-1) Then

128.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value

Inputs S1 R Outputs Q1 NQ1(/Q1) Parameters IV Initialisation value Boolean Y(/) N 0 N Result Negated result Boolean Boolean N N Y N Y Y IV Set Reset Boolean Boolean Y(/) Y(/) Y Y N N -

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 278/342


128.4Use

Section 128 SR : BISTABLE FUNCTION BLOC (SET DOMINANT)

Function block with a boolean state variable During initialisation (INIT = 1), at PLC start-up : Q1 = IV, boolean Example of sequence outside initialisation :
S1 0 0 0 1 0 0 1 1 0 R 0 1 0 0 0 1 1 0 0 Q 0 0 0 1 1 0 1 1 1

128.5Specification

128.5.1 State variables STA : Memorisation boolean variable(redundant) : Q1(K-1) 128.5.2 Internals variables No 128.5.3 Function block code
(*BEGIN SR) IF INIT THEN (* Initialization Function BOO IV = Q1 ELSE (* Operation and Update Outputs Function IF S1 THEN BOO 1 = Q1 ELSE BOO STA . /R = Q1 ENDIF ENDIF (* Operation and Update States Variables Function BOO Q1 = STA #IF defined($NQ1) BOO /Q1 = NQ1 #ENDIF (* END SR )

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 279/342


Section 129

Section 129 STEP OF SEQUENCE (SEQ_STEP)

STEP OF SEQUENCE (SEQ_STEP)

129.1Representation

129.2Function Only one step in the sequence can be activated. It is identified by the step number [STEP_NB]. At the start of the sequence, the first step or the step indicated by [JMP1]/ [JMP0] if its associated condition [C_JMP1]/ [C_JMP0] of the head of sequence is activated. When all the feedback criteria ([FB_I], [FB_G] and [AC]) are present in the associated TLTE time, the next step becomes active. When the step is activated, the step order [ORDER] is set (only in automatic and step by step mode). It stays at 1 until reception of feedback, as well as sequence is in progress. When the step is activated, the step activated output [ACTVT] is set (in all mode AUTO, S/S and OPERATOR GUIDE). It stays at 1 during all the time the step is activated (I comprise when [ORDER]is activated, but also during transfer time , or when step is in fault or blocked). There is one intermediate time-out TLTE [TLTE_I] associated to the intermediate feedback [FB_I]. In case the intermediate feedback criterion is not present at the end of the intermediate TLTE, the sequence is in fault. There is one global time out TLTE [TLTE_G] associated to the global feedback [FB_G]. In case the global or/and intermediate feedback criterion is not present at the end of the global TLTE, the sequence is in fault. The global TLTE must be higher than the intermediate TLTE and can be infinite by setting the corresponding parameters to zero.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 280/342

Section 129 STEP OF SEQUENCE (SEQ_STEP)

The advance conditions [AC] are checked after a transition time [TIME_T] and must be present to go on to the next step. If the advance conditions are missing after the transition time, the sequence is held. The loss of intermediate or global feedback during the transition time switches the sequence to fault. The presence of jump condition [C_JMP] at the end of the global TLTE time delay allows jumping to a discontinuous step [STEP_JMP]. This jump can be executed forward or backward but only in the same part ON or OFF of the sequence. Only one jump is possible per step. The override [OVRID] criteria allows to not take in account the feedback criteria and advance conditions, and the active step is jumped to the next step (following step in the numerotation, or step indicated by [STEP_JMP] if validated by [C_JMP].

129.3Argument Characteristics

NAME Inputs STEP_NB FB_I FB_G AC C_JMP STEP_JMP OVRID Outputs ORDER SEQ_LK ACTVT Parameters TLTE_I TLTE_G TIME_T

DESCRIPTION

Type

Length

Default value

MAND data

MAND. connection

MVM Link (Path)

Current step number Intermediate feedback Global feedback Advance condition Jump condition Number of next step in case of jump Step override Step order Sequence link Step activated Intermediate TLTE value Global TLTE value Transfer time

I B B B B I B B W B L L L

1 1 1 0 0 0

Y Y Y Y Y Y Y Y Y Y

Y FB_I FB_G AC C_JMP

OVRID ORDER Y ACTVT TLTE_I TLTE_G TIME_T

14

0 0 0

Y Y Y

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 281/342


129.4Use

Section 129 STEP OF SEQUENCE (SEQ_STEP)

129.4.1 Description of terminals

129.4.1.1 Inputs STEP_NB FB_I FB_G Current step number (Integer type constant). Intermediate feedback (Boolean). Must be present before end of intermediate TLTE [TLTE_I] (also checked during global TLTE [TLTE_G]). Global feedback (Boolean). Must be present before end of global TLTE [TLTE_G]. Advance conditions (Boolean). Must be present after the transfer time [TIME_T]. Jump conditions (Boolean). Must be present after the advance conditions in case of jump to validate the step jump. Number of the next step in case of jump if the associated conditions are true (Integer type constant). Override of the step. The step is jumped if OVRID is at 1. (Boolean)

AC C_JMP STEP_JMP OVRID 129.4.1.2 Outputs SEQ_LK

Sequence link (Word, length 14). This link is used to exchange information between the head of sequence and the steps of sequence (variable in read/write access). Step order (Boolean). Maintained when the step is actived until reception of feedback. Step activation (Boolean). Maintained all time the step is actived.

ORDER ACTVT 129.4.1.3 Parameters TLTE_I TLTE_G TIME_T

Too Long Time Execution value in seconds for checking intermediate feedback (Long). TLTE_I=0 equivalent to infinite value. Too Long Time Execution value in seconds for checking global feedback (Long). TLTE_G=0 equivalent to infinite value. Transition time value in seconds before checking advance condition (Long). If not connected or if TIME_T=0, there is no transition time, advance conditions are checked immediatly after global and intermediary feedback reception.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 282/342


129.5Associated MVM

Section 129 STEP OF SEQUENCE (SEQ_STEP)

MVM in IEEE standard: SEQ_STEP_IEEE MVM in KKS standard: SEQ_STEP_KKS 129.6Code

129.6.1 Internal variables


NAME I_ACTVT I_ORDER DESCRIPTION STEP ACTIVATED ORDER TO LOW LEVEL TYPE B B Private YES YES

129.6.2 Function Block Code


(* FUNCTION BLOCK SEQ_STEP : STEP OF SEQUENCE (* ESTABLISH ON 06/02/04 BY C. BOULEY (* VERSION 2.1 (* 21/11/02 - V1.0 : AUTHOR : C. BOULEY : : First issue (* 12/01/04 - V1.1 : AUTHOR : C. BOULEY : Component instance name is VARIANT to allow KKS or IEEE naming rules. (* 21/01/04 - V2.0 : AUTHOR : C. BOULEY : Addition of overide input OVRID and step activated output ACTVT, and internal variable I_ACTVT. (* 06/02/04 - V2.1 : AUTHOR : C. BOULEY : to 14 in accordance with BF Lenght of SEQ_LK is set

#IF $TARGET_TYPE =~ 'C8035' || $TARGET_TYPE =~ 'RX3i' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF BF(SEQ_STEP_BOPE, TLTE_I, TLTE_G, TIME_T, STEP_NB, FB_I, FB_G, AC, C_JMP, STEP_JMP, OVRID, SEQ_LK, I_ORDER, I_ACTVT) # IF defined($ORDER) BOO I_ORDER = ORDER # ENDIF # IF defined($ACTVT) BOO I_ACTVT = ACTVT # ENDIF

129.6.3 Basic Function Used SEQ_STEP

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 283/342


Section 130

Section 130 STEP : PAIR ( STEP, TRANSITION ) OF THE SFC MODEL

STEP : PAIR ( STEP, TRANSITION ) OF THE SFC MODEL

130.1Representation

130.2Function The goal of the block is to provide the function of the pair (step, transition following ) of the SFC language. The Step has a state, can be activated, can activate the next step if its state is active and if the transition condition from itself to the next step is true.

130.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs ORDER COND FOR_1 FOR_0 Outputs STATE NEXT Step state Next Step Activation Order Boolean Boolean N N Y Y Y Y IV FALS E Step activation order Transition condition Step Forcing Order Graph Forcing Order Boolean Boolean Boolean Boolean N Y(/) Y(/) Y(/) Y Y N N FALSE FALSE N N N N -

Parameters IV Initialization value Boolean N N FALSE N

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 284/342


130.4Use

Section 130 STEP : PAIR ( STEP, TRANSITION ) OF THE SFC MODEL

Function block in the meaning of IEC, with a boolean state variable During the fisrt cycle, the state of the step is the value of the IV input and the next step activation order is false. There are two other entries for the forcing features. When a graph is forced by another one, that other graph is setting the graph forcing order of each step of the forced graph, and that other graph is setting the step forcing order of each active step during the forcing. 130.5Specification

130.5.1 State variables Yes, there is a indirect boolean state variable, redundant. 130.5.2 Function block code IF INIT THEN BOO 0 = NEXT ELSE BOO COND.STATE = NEXT ENDIF #FB ( SR, FOR_1 + ORDER./FOR_0, NEXT + FOR_0, IV, STATE,)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 285/342


Section 131

Section 131 SUB : SUBSTRACTION

SUB : SUBSTRACTION

131.1Representation

131.2Function Function block SUB performs numerical subtraction operation. It has two inputs IN1 and IN2, and one output RE. In operation mode, IN2 is subtracted from IN1 and displays the result at RE.

131.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 IN2 Input 1 Input 2 Real, Integer Outputs RE Parameters Result Real, Integer N Y Y Y Y Y Real, Integer Y Y Y -

131.4Specification

131.4.1 HMI Display Not applicable

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 286/342


131.4.2 Associated MVM Not applicable 131.4.3 Internal Variables Not applicable 131.4.4 Function Blocks used in LEA Code Function block is not used 131.4.5 Basic Function No function call 131.4.6 Function block code CAL (IN1+ -IN2) = RE

Section 131 SUB : SUBSTRACTION

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 287/342


Section 132

Section 132 TAN : TANGENT

TAN : TANGENT

132.1Representation

132.2Function The function block TAN returns the tangent of IN.

132.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE Parameters Operator result Real Y(-) - ;+ Y N Input Real Y(-) -I ;+ sauf /2+k Y N -

132.4Use If IN is greater than or equal to , or less than or equal to -, a loss of significance in the result occurs, in which case the function returns an indefinite value. The block is a function in the meaning of IEC 132.5Specification

132.5.1 Generated expression TAN(IN)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 288/342


Section 133

Section 133 TBO : TRANSFER BIT/ BYTE

TBO : TRANSFER BIT/BYTE

133.1Representation

133.2Function The TBW function block copies the input IN into the output RE. The input IN should not be a constant of negative value. The value of the output RE is modified according to the 8 inputs INn. Each input represents a bit field of the output. The output is a 8 bit integer variable. For example : the input IN is equal to 8 (0x1000) and IN1=IN3=1, all the other inputs are not connected. After execution of the FB, the output is equal to 13 (0x1101).

133.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN IN1..IN8 Outputs RE Parameters Input to be modified Inputs SINT/ USINT B N N Y N N Y -

8 bits variables

SINT/ USINT

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 289/342


133.4Use Function block without state variables. Only used for a MFC3000 and Simulator 133.5Specification

Section 133 TBO : TRANSFER BIT/ BYTE

133.5.1 Function block code LOG IN = RE TBW IN1,IN2,IN3,IN4,IN5,IN6,IN7,IN8 = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 290/342


Section 134

Section 134 TBW : TRANSFER BIT/WORD

TBW : TRANSFER BIT/WORD

134.1Representation

134.2Function The TBW function block copies the input IN into the output RE. The input IN should not be a constant of negative value. The value of the output RE is modified according to the 16 inputs INn. Each input represents a bit field of the output. The output is a 16 bit integer variable. For example : the input IN is equal to 8 (0x1000) and IN1=IN3=1, all the other inputs are not connected. After execution of the FB, the output is equal to 13 (0x1101).

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 291/342


134.3Arguments characteristics
Name Description Type Neg

Section 134 TBW : TRANSFER BIT/WORD

Range

Mand. connection

Def. value

Mand. Data

Advised parameters value

First scan value

Inputs IN IN1..IN16 Outputs RE Parameters 16 bits variables I/W N Y Y Input to be modified Inputs I/W B N N Y N N Y -

134.4Use Function block without state variables. 134.5Specification

134.5.1 Function block code


LOG IN = RE
TBW IN1,IN2,IN3,IN4,IN5,IN6,IN7,IN8,IN9,IN10,IN11,IN12,IN13,IN14,IN15,IN16 = RE

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 292/342


Section 135

Section 135 TOB : TRANSFER BYTE/BIT

TOB : TRANSFER BYTE/BIT

135.1Representation

135.2Function Each bit of the TOB function block represent a bit of the input bit field. For example, if IN is equal to 10 the outputs will be ; RE1=0,RE2=1,RE3=0,RE4=1 and RE[58]=0 if they are connected. The input IN should not be a constant of negative value.

135.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE1..RE8 Parameters Outputs B N N Y Input SINT/ USINT N Y N -

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 293/342


135.4Use Function block without state variables. Only used for a MFC3000 and Simulator 135.5Specification

Section 135 TOB : TRANSFER BYTE/BIT

135.5.1 Internals variables V01, type BYTE, to hold a copy of IN 135.5.2 Function block code LOG IN = V01 TWB V01 = RE1,RE2,RE3,RE4,RE5,RE6,RE7,RE8

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 294/342


Section 136

Section 136 TOF_D : OFF-DELAY FOR DOUBLE, WITH REDUNDANCY 32 BITS

TOF_D : OFF-DELAY FOR DOUBLE, WITH REDUNDANCY 32 BITS

136.1Representation

136.2Function The functionality of the TOF function block is as the following :

REB TP RET t0 t1 t1+TP t2 t3 t4 t5 t5+TP

The duration is in units of 0.01s It is possible to specify a TP duration of 2^32 * 0,01 s ~ 43 000 000 s ~ 248 days. The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases. The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time. that means that : The exit "temporization fallen" takes into account the initial time which started temporization and not current time.
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 295/342

Section 136 TOF_D : OFF-DELAY FOR DOUBLE, WITH REDUNDANCY 32 BITS

The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes. 136.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs REB RET Parameters TP Result output Time Parameter BOOLEAN DOUBLE DURATION N N N Y N Y Y Y Y Input BOOLEAN Y(/) Y N -

136.4Use Function block with a 32 bits state variable 136.5Specification

136.5.1 State variables V02, duration, redundant, private, to hold the remaining time 136.5.2 Internal Variable No internal variable 136.5.3 Function block code (* BEGIN TOF_D BOO IN = TOF (TP) V02, REB #IF defined($RET) CAL TP - V02 = RET #ENDIF (* END TOF_D 136.5.4 Basic function No basic function : it takes too much time.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 296/342


Section 137

Section 137 TOF_R : OFF-DELAY FOR REAL

TOF_R : OFF-DELAY FOR REAL

137.1Representation

137.2Function The functionality of the TOF function block is as the following :

IN
T0 T1 T2 T3 T4 T5

REB

T1+TP TP RET

T5+TP

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases. The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time. that means that : The exit "temporization fallen" takes into account the initial time which started temporization and not current time. The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 297/342


137.3Arguments characteristics
Name Description Type Neg Range

Section 137 TOF_R : OFF-DELAY FOR REAL

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs IN Outputs REB RET Parameters TP Result output Time Parameter B R R N N N Y N Y Y Y N Input B Y(/) Y N -

137.4Use Don't forget the time units for the block : REAL (The arguments TP and RET are in real units of seconds) Function block in the IEC meaning, with : State variables 1 var (DURATION) to hold remaining time, redundant Internal Variable V01 (DURATION) to hold a converted ( from s to 0.01 s ) copy of TP 137.5Specification

137.5.1 Variables V02, duration, redundant V01, duration, no redundant 137.5.2 Function block code CAL TP / 0.01 = V01 (* Convert from s to 0.01s BOO IN = TOF (V01) V02, REB #IF defined($RET) CAL (V01 - V02) * 0.01 = RET (* Convert back to s #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 298/342


Section 138

Section 138 TOF_W: OFF-DELAY for WORD

TOF_W: OFF-DELAY for WORD

138.1Representation

138.2Function The functionality of the TOFW_D function block is as the following :

IN

REB

RET t0 t1 t1+TP t2 t3 t4 t5 t5+TP

TP

The duration is in units of 0,01s It is possible to specify a TP duration of 2^16 * 0,01 s ~ 640 s ~ 10 min & 40 s The FB is 16 bits useful. The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases. The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time. that means that : The exit "temporization fallen" takes into account the initial time which started temporization and not current time. The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 299/342


138.3Arguments characteristics
Name Description Type Neg Range

Section 138 TOF_W: OFF-DELAY for WORD

Mand. Connection

Def. Value

Mand. Data

Advised parameters value

First scan value

Inputs IN Outputs REB RET Parameters TP Result output Time Parameter B WORD WORD N N N Y N Y Y Y Y Input B Y(/) Y N -

138.4Use Function block with a 16 bits state variable 138.5Specification

138.5.1 State variables V02, word, redundant, private, to hold the remaining time 138.5.2 Internal Variable TPBIS, double, private, to manage the delay into the LEA instruction DUMMY, double, private, to manage the duration greater than 5min 20s 138.5.3 Function block code (* BEGIN TOF_W CAL TP = TPBIS CAL V02=DUMMY BOO IN = TOF (TPBIS) DUMMY, REB CAL DUMMY=V02 #IF defined($RET) CAL TP - V02 = RET #ENDIF (* End TOF_W

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 300/342


Section 139

Section 139 TOFI_D : OFF-DELAY FOR DOUBLE, 16 BITS REDUNDANT

TOFI_D : OFF-DELAY FOR DOUBLE, 16 BITS REDUNDANT

139.1Representation

139.2Function The functionality of the TOFI_D function block is as the following :

IN

RE B

TP RET

t0

t1 t1+TP t2 t3

t4

t5

t5+TP

The duration is in units of 0.01s It is possible to specify a TP duration of 2^15 * 0,01 s ~ 320 s ~ 5 min 20 s

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :


The exit "temporization fallen" takes into account the initial time which started temporization and not current time.
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 301/342

Section 139 TOFI_D : OFF-DELAY FOR DOUBLE, 16 BITS REDUNDANT

The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes. 139.2.1 Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs REB RET Parameters TP Result output Time Parameter BOOLEAN DOUBLE DURATION N N N Y N Y Y Y Y Input BOOLEAN Y(/) Y N -

139.2.2 Use Function block with a 16 bits state variable 139.3Specification

139.3.1 State variables V02, integer, redundant, private, to hold the remaining time 139.3.2 Internal Variable MAX, integer, private, to limit the delay because the interface to enter the TP duration has a type 'DURATION'

139.3.3 Function block code (* BEGIN TOFI_D IF { TP <= 32700 } THEN CAL TP = MAX ELSE CAL 32700 = MAX ENDIF BOO IN = TOF (MAX) V02, REB #IF defined($RET) CAL MAX - V02 = RET #ENDIF (* End TOFI_D

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 302/342


Section 140

Section 140 TOFW_D : OFF-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS

TOFW_D : OFF-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS

140.1Representation

140.2Function The functionality of the TOFW_D function block is as the following :

IN RE

RE T t0 The duration is in units of 0.01s t1 t1+TP t2 t3 t4 t5 t5+TP

TP

It is possible to specify a TP duration of 2^16 * 0,01 s ~ 640 s ~ 10 min & 40 s The duration of the delay can reach 640 s, but the internal code of the block takes more times than the internal code of the TOFI_D block.

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 303/342

Section 140 TOFW_D : OFF-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS

The exit "temporization fallen" takes into account the initial time which started temporization and not current time. The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes. 140.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameter s value First scan value

Inputs IN Outputs REB RET Parameters TP Result output Time Parameter B DOUBLE DURATION N N N Y N Y Y Y Y Input B Y(/) Y N -

140.4Use Function block with a 16 bits state variable 140.5Specification

140.5.1 State variables V02 , word, redundant, private, to hold the remaining time 140.5.2 Internal Variable MAX, double, private, to limit the delay to MAX_WORD DUMMY, double, private, to manage the duration greater than 5min 20s 140.5.3 Function block code (* BEGIN TOFW_D IF { TP <= 65500 } THEN CAL TP = MAX ELSE CAL 65500 = MAX ENDIF CAL V02=DUMMY BOO IN = TOF (MAX) DUMMY, REB CAL DUMMY=V02 #IF defined($RET) CAL MAX - V02 = RET #ENDIF
(* End TOFW_D
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 304/342


Section 141

Section 141 TON_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 32 BITS

TON_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 32 BITS

141.1Representation

141.2Function The functionality of the TON_D function block is as the following :

IN

REB T0+PT RET T4+PT

T0

T1

T2 T3 T4

T5

It is possible to specify a duration of 1. E 32 x 0,01 s ~ 40 000 000 s ~ 10 000 h ~ 248 days

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :


The exit "temporization fallen" takes into account the initial time which started temporization and not current time.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 305/342

Section 141 TON_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 32 BITS

The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes. 141.2.1 Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs REB RET Parameters TP Result output Time Parameter B D TIME N N N Y N Y Y Y Y Input B Y(/) Y N -

141.3Use Function block with a 32 bits signed state variable 141.4Specification

141.4.1 State variables V02, type DOUBLE, private, redundant, to hold remaining time 141.4.2 Internal Variable V01, BOOLEAN, private, to store the input before to call the basic function. 141.4.3 Function block code (* BEGIN TON_D BOO IN = TON (TP) V02, REB #IF defined($RET) CAL TP - V02 = RET #ENDIF (* END TON_D

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 306/342


Section 142

Section 142 TON_R : ON-DELAY FOR REAL

TON_R : ON-DELAY FOR REAL

142.1Representation

142.2Function The functionality of the TON function block is as the following :

IN

REB T0+PT RET T4+PT

T0

T1

T2 T3 T4

T5

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :


The exit "temporization fallen" takes into account the initial time which started temporization and not current time. The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 307/342


142.3Arguments characteristics
Name Description Type Neg Range

Section 142 TON_R : ON-DELAY FOR REAL

Mand. Connection

Def. value

Mand. Data

Advised parameters value

First scan value

Inputs IN Outputs REB RET Parameters TP Result output Time Parameter B R R N N N Y N Y Y Y N Input B Y(/) Y N -

142.4Use The Times ( TP and RET) are in real units of seconds. Function block with a duration state variable, to hold remaining time 142.5Specification

142.5.1 Internal Variable and State variables V01, DURATION, to hold a converted copy of TP V02, DURATION, redundant 142.5.2 Function block code (* BEGIN TON_R) CAL TP / 0.01 = V01 BOO IN = TON (V01) V02, REB #IF defined($RET) CAL (V01 - V02) * 0.01 = RET #ENDIF (* END TON_R)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 308/342


Section 143

Section 143 TON_W : ON-DELAY FOR WORD, WITH REDUNDANCY 16 BITS

TON_W : ON-DELAY FOR WORD, WITH REDUNDANCY 16 BITS

143.1Representation

143.2Function The functionality of the TON_W function block is showed on the drawing :

IN

REB T0+PT RET T4+PT

T0

T1

T2 T3 T4

T5

It is possible to specify only a duration of 1. E 16 x 0,01 s ~ 640 s

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :


The exit "temporization fallen" takes into account the initial time which started temporization and not current time. The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes.
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 309/342

Section 143 TON_W : ON-DELAY FOR WORD, WITH REDUNDANCY 16 BITS

143.2.1 Arguments characteristics


Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs REB RET Parameters TP Result output Time Parameter B WORD WORD N N N Y N Y Y Y Y Input B Y(/) Y N -

143.3Use Function block with a 16 bits state variable. 143.4Specification

143.4.1 State variables V02, type WORD, redundant, , to hold remaining time 143.4.2 Internal Variable TPBIS, type DOUBLE, private, to manage the delay into the LEA instruction, DUMMY, type DOUBLE, private, to manage the remaining time into the LEA instruction. 143.4.3 Function block code (* BEGIN TON_W CAL TP = TPBIS CAL V02 = DUMMY BOO IN = TON (TPBIS) DUMMY, REB CAL DUMMY = V02 #IF defined($RET) CAL TP - V02 = RET #ENDIF (* END TON_W

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 310/342


Section 144

Section 144 TONI_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS

TONI_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS

144.1Representation

144.2Function The functionality of the TONI_D function block is as the following :

IN

REB T0+PT RET T4+PT

T0

T1

T2 T3 T4

T5

It is possible to specify only a duration of 1. E 15 x 0,01 s ~ 320 s The duration of the delay can reach only 320 s, but the internal code of the block takes less times than the internal code of the TONW_D block.

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 311/342

Section 144 TONI_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS

The exit "temporization fallen" takes into account the initial time which started temporization and not current time. The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes. 144.2.1 Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs REB RET Parameters TP Result output Time Parameter B D TIME N N N Y N Y Y Y Y Input B Y(/) Y N -

144.3Use Function block with a 16 bits state variable 144.4Specification

144.4.1 State variables V02, type INTEGER, redundant, private, , to hold remaining time 144.4.2 Internal Variable MAX, type INTEGER, private, to limit the delay to MAX_INT 144.4.3 Function block code
(* TONI_D : Version 2 (18/07/2001) (* Specification version : ? (* ---------------------------------(* BEGIN TONI_D IF { TP <= 32700 } THEN CAL TP = MAX ELSE CAL 32700 = MAX ENDIF BOO IN = TON (MAX) V02, REB #IF defined($RET) CAL MAX - V02 = RET #ENDIF (* END TONI_D

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 312/342


Section 145

Section 145 TONW_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS

TONW_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS

145.1Representation

145.2Function The functionality of the TONW_D function block is showed on the drawing :

IN

REB T0+PT RET T4+PT

T0

T1

T2 T3 T4

T5

It is possible to specify only a duration of 1. E 16 x 0,01 s ~ 640 s

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :


The exit "temporization fallen" takes into account the initial time which started temporization and not current time.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 313/342

Section 145 TONW_D : ON-DELAY FOR DOUBLE, WITH REDUNDANCY 16 BITS

The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes. 145.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs REB RET Parameters TP Result output Time Parameter B D TIME N N N Y N Y Y Y Y Input B Y(/) Y N -

145.4Use Function block with a 16 bits state variable. The duration of the delay can reach 640 s, but the internal code of the block takes more times than the internal code of the TONI_D block. 145.5Specification

145.5.1 State variables V02, type WORD, redundant, , to hold remaining time 145.5.2 Internal Variable MAX, type DOUBLE, private, to limit the delay DUMMY, type DOUBLE, private, to manage the limit to MAX_WORD 145.5.3 Function block code (* BEGIN TONW_D IF { TP <= 65500 } THEN CAL TP = MAX ELSE CAL 65500 = MAX ENDIF CAL V02 = DUMMY BOO IN = TON (MAX) DUMMY, REB CAL DUMMY = V02 #IF defined($RET) CAL MAX - V02 = RET #ENDIF (* END TONW_D
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 314/342


Section 146

Section 146 TP_D : PULSE TIMING FOR DOUBLE, WITH 34 BITS REDUNDANCY

TP_D : PULSE TIMING FOR DOUBLE, WITH 34 BITS REDUNDANCY

146.1Representation

146.2Function The functionality of the TP function block is as the following :

IN

t0 REB

t1

t2

t3

t4

t5

t0+pt

t2+pt

t4+pt

PT

RE T

t0

t1

t2

t3

t4

t5

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :


Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 315/342

Section 146 TP_D : PULSE TIMING FOR DOUBLE, WITH 34 BITS REDUNDANCY

The exit "temporization fallen" takes into account the initial time which started temporization and not current time. The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes. 146.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value -

Inputs IN Outputs REB RET Parameters TP

Input

Y(/)

Result output Time Parameter

B DOUBLE TIME

N N N

Y N Y

Y Y Y

146.4Use The time units are double integer units of 0.01 seconds. The total redundancy of the block is made with 2 booleans and 1 double (32 bits), because the block uses a block 'bistable' and a block TON_D. 146.5Specification

146.5.1 State variables V03 (BOOLEAN), redundant, to hold the output of the internal timer 146.5.2 Internal Variables V04 (DOUBLE), private, to call the block TON_D 146.5.3 Function block code #FB( RS, IN, V03, 0, REB, ) #FB( TON_D, IN + REB,TP,V03,V04) #IF defined($RET) CAL V04 = RET #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 316/342


Section 147

Section 147 TP_R : PULSE TIMING FOR REAL

TP_R : PULSE TIMING FOR REAL

147.1Representation

147.2Function The functionality of the TP function block is as the following :

IN t0 RE t0+pt t2+pt t4+pt t1 t2 t3 t4 t5

PT

RE t0 t1 t2 t3 t4 t5

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :


The exit "temporization fallen" takes into account the initial time which started temporization and not current time.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 317/342

Section 147 TP_R : PULSE TIMING FOR REAL

The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes. 147.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value

Inputs IN Outputs REB RET Parameters TP Input Result output Time Parameter B B R R Y(/) N N N Y Y N Y N Y Y N -

147.4Use Function block with : 1 direct State variable 1 var BOOLEAN to hold the output of internal timer 3 indirect state variables 1 var BOOLEAN, to hold the state of the bistable 1 var DURATION, to hold the remaining times of the internal timer 147.5Specification

147.5.1 Internal Variable and State variables V03, BOOLEAN, redundant 147.5.2 Function block code (* BEGIN TP_R #FB( RS, IN, V03, 0, REB, ) #FB( TON_R, IN + REB,TP,V03,RET) (* END TP_R

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 318/342


Section 148

Section 148 TP_W : PULSE TIMING FOR WORD, WITH 18 BITS REDUNDANCY

TP_W : PULSE TIMING FOR WORD, WITH 18 BITS REDUNDANCY

148.1Representation

148.2Function The functionality of the TP function block is as the following :

IN t0 REB t0+pt t2+pt t4+pt t1 t2 t3 t4 t5

PT RE T

t0

t1

t2

t3

t4

t5

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :


The exit "temporization fallen" takes into account the initial time which started temporization and not current time.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 319/342

Section 148 TP_W : PULSE TIMING FOR WORD, WITH 18 BITS REDUNDANCY

The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes. 148.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value -

Inputs IN Outputs REB RET Parameters TP

Input

Y(/)

Result output Time Parameter

B WORD WORD

N N N

Y N Y

Y Y Y

148.4Use The time units are double integer units of 0.01 seconds. The total redundancy of the block is made with 2 booleans and 1 WORD (16 bits), because the block uses a block 'bistable' and a block TON_W. 148.5Specification

148.5.1 State variables V03 (BOOLEAN), redundant, to hold the output of the internal timer 148.5.2 Internal Variables V04 (WORD), private, to call the block TON_W 148.5.3 Function block code #FB( RS, IN, V03, 0, REB, ) #FB( TON_W, IN + REB,TP,V03,V04) #IF defined($RET) CAL V04 = RET #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 320/342


Section 149

Section 149 TPI_D : PULSE TIMING FOR DOUBLE, WITH 18 BITS REDUNDANCY

TPI_D : PULSE TIMING FOR DOUBLE, WITH 18 BITS REDUNDANCY

149.1Representation

149.2Function The functionality of the TP function block is as the following :

IN t0 RE B t0+pt t1 t2 t3 t4 t4+pt t5

t2+pt

PT RE T

t0

t1

t2

t3 t4

t5

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :


The exit "temporization fallen" takes into account the initial time which started temporization and not current time.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 321/342

Section 149 TPI_D : PULSE TIMING FOR DOUBLE, WITH 18 BITS REDUNDANCY

The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes. 149.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value -

Inputs IN Outputs REB RET Parameters TP

Input

Y(/)

Result output Time Parameter

B DOUBLE TIME

N N N

Y N Y

Y Y Y

149.4Use The time units are double integer units of 0.01 seconds. The total redundancy of the block is made with 2 booleans and 1 integer (18 bits), because the block uses a block 'bistable' and a block TONI_D. The duration of the delay can reach only 320 s, but the internal code of the block takes less times than the internal code of the TPW_D block. 149.5Specification

149.5.1 State variables V03 (BOOLEAN), redundant, to hold the output of the internal timer 149.5.2 Internal Variables V04 (DOUBLE), to call the block TONI_D 149.5.3 Function block code (* BEGIN TPI_D #FB( RS, IN, V03, 0, REB, ) #FB( TONI_D, IN + REB,TP,V03,V04) #IF defined($RET) CAL V04 = RET #ENDIF (* END TPI_D

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 322/342


Section 150

Section 150 TPW_D : PULSE TIMING FOR DOUBLE, WITH 18 BITS REDUNDANCY

TPW_D : PULSE TIMING FOR DOUBLE, WITH 18 BITS REDUNDANCY

150.1Representation

150.2Function The functionality of the TP function block is as the following :

IN t0 REB t0+pt t2+pt t4+pt t1 t2 t3 t4 t5

PT

RE t0 t1 t2 t3 t4 t5

The exit temporization fallen of the BF is activated one cycle of controller after the end of counting. This delay of 1 cycle is negligible if temporizations are not too small and this delay is thus acceptable in all the cases.
The temporizations are directed "countdown" with respect to their operation. There is stability of "time remaining" even in the event of change of the specified time.

that means that :


The exit "temporization fallen" takes into account the initial time which started temporization and not current time.
Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 323/342

Section 150 TPW_D : PULSE TIMING FOR DOUBLE, WITH 18 BITS REDUNDANCY

The exit "time past" which is worth "current time - remaining time" is updated as a function of to the time if this time changes. 150.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. Value Mand. Data Advised parameters value First scan value -

Inputs IN Outputs REB RET Parameters TP

Input

Y(/)

Result output Time Parameter

B DOUBLE TIME

N N N

Y N Y

Y Y Y

150.4Use The time units are double integer units of 0.01 seconds. The total redundancy of the block is made with 2 booleans and 1 double (32 bits), because the block uses a block 'bistable' and a block TON_D. The duration of the delay can reach 640 s, but the internal code of the block takes more times than the internal code of the TPI_D block. 150.5Specification

150.5.1 State variables V03 (BOOLEAN), redundant, to hold the output of the internal timer 150.5.2 Internal Variables V04 (DOUBLE), to call the block TONW_D 150.5.3 Function block code (* BEGIN TPW_D #FB( RS, IN, V03, 0, REB, ) #FB( TONW_D, IN + REB,TP,V03,V04) #IF defined($RET) CAL V04 = RET #ENDIF (* END TPW_D

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 324/342


Section 151

Section 151 TRANSP_VAL : TRANSPORT VALIDATOR

TRANSP_VAL : TRANSPORT VALIDATOR

151.1Representation

151.2Function The functionality of the TRANSP_VAL block is as the following : Allows to produce the transport validator of input connected variable. Output value is 0 if transport is valid otherwise it is 1. This function block applies to a variable coming from F8000 or S8000 network. If the variable is not transported via the network, the value 0 is then produce. On the MFC3000 this FB returns the validity of the variable when this variable has a validator and is produced by one the following network EPL and PROFIBUS and F8000 for cBSig.

151.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Variable whose transport validator is requested ANY_NUM + Boolean N Y Y -

Outputs RE Operator result Boolean N Y Y -

151.4Use No

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 325/342


151.5Specification

Section 151 TRANSP_VAL : TRANSPORT VALIDATOR

151.5.1 generated expression #IF $TARGET_TYPE =~ 'CE2000' BF (X_COPY, !IN, RE) #ELSE BOO !IN = RE #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 326/342


Section 152

Section 152 TRIGGER_SPT : TRIGGER OF SET POINT

TRIGGER_SPT : TRIGGER OF SET POINT

152.1Representation

152.2Function The functionality of the TRIGGER_SPT block is to inform that a new value of the setpoint is arrived (Chg) and to give the value (Re).

152.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs Chg RE Changement bit Result Boolean Integer Y N Y Y Y Y Set Point Integer N Y Y -

152.4Use

Only head cell controller


Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 327/342


152.5Specification

Section 152 TRIGGER_SPT : TRIGGER OF SET POINT

152.5.1 generated expression if {SETPOINT = 16#FFFF} then (* None modification BOO 0 = CHG else (* New arrived setpoint BOO 1 = CHG CAL SETPOINT = RE CAL 16#FFFF = SETPOINT endif

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 328/342


Section 153

Section 153 TWB : TRANSFER WORD/BIT

TWB : TRANSFER WORD/BIT

153.1Representation

153.2Function Each bit of the TWB function block represent a bit of the input bit field. For example, if IN is equal to 10 the outputs will be ; RE1=0,RE2=1,RE3=0,RE4=1 and RE[516]=0 if they are connected. The input IN should not be a constant of negative value.

153.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE1..RE16 Parameters Outputs B N N Y Input I/W N Y N -

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 329/342


153.4Use Function block without state variables. 153.5Specification

Section 153 TWB : TRANSFER WORD/BIT

153.5.1 Internals variables V01, type WORD, to hold a copy of IN 153.5.2 Function block code LOG IN = V01
TWB V01 = RE1,RE2,RE3,RE4,RE5,RE6,RE7,RE8,RE9,RE10,RE11,RE12,RE13,RE14,RE15,RE16

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 330/342


Section 154

Section 154 XOR : EXCLUSIVE OR

XOR : EXCLUSIVE OR

154.1Representation

154.2Function The function block XOR represent boolean EXCLUSIVE OR gates for 2..N logic inputs. It sends the signal RE=1 if only one input is set to 1. This FB is not an inparity detector.

154.3Arguments characteristics
Name Description Type Neg Range Mand. connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1..IN2 IN3..IN8 Outputs RE Parameters Operator state B Y(/) Y Y Inputs inputs B B Y(/) Y(/) Y N 0 Y Y -

154.4Use Function block without state variables.

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 331/342


154.5Specification

Section 154 XOR : EXCLUSIVE OR

154.5.1 Internal variables No 154.5.2 Function block code (* BEGIN XOR BOO IN1./IN2./IN3./IN4./IN5./IN6./IN7./IN8 + /IN1.IN2./IN3./IN4./IN5./IN6./IN7./IN8 + /IN1./IN2.IN3./IN4./IN5./IN6./IN7./IN8 + /IN1./IN2./IN3.IN4./IN5./IN6./IN7./IN8 + /IN1./IN2./IN3./IN4.IN5./IN6./IN7./IN8 + /IN1./IN2./IN3./IN4./IN5.IN6./IN7./IN8 + /IN1./IN2./IN3./IN4./IN5./IN6.IN7./IN8 + /IN1./IN2./IN3./IN4./IN5./IN6./IN7.IN8 = RE (* END XOR

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 332/342


Section 155

Section 155 ZONE_S : %S BIT VALUE

ZONE_S : %S BIT VALUE

155.1Representation

155.2Function The function block ZONE_S makes it possible to give the value of the bit of the memory zone %S corresponding to the number of bit defined in entry. IN ranging between 1 and 32 for a C8035 and RX3i IN ranging between 1 and 128 for a C8075.

155.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE %S bit value Boolean N Y Y Bit row %S Word N Y Y -

155.4Use Used for a C8035, C8075 and RX3i

Not used for a CE2000 and MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 333/342


155.5Specification

Section 155 ZONE_S : %S BIT VALUE

155.5.1 generated expression

155.5.2 Internal variables No 155.5.3 Function block code #IF $TARGET_TYPE =~ 'CE2000' || $TARGET_TYPE =~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ELSE #IF $TARGET_TYPE =~ 'C8035' || $TARGET_TYPE =~ 'RX3i' #IF $IN !~ /^\s*\d+\s*$/ || $IN < 1 || $IN > 32 #ERROR A constant between 1 and 32 was expected in input #ENDIF BF (C_GET_BIT_S, IN, RE) #ELSE #IF $IN !~ /^\s*\d+\s*$/ || $IN < 1 || $IN > 128 #ERROR A constant between 1 and 128 was expected in input #ENDIF BF (C_GET_BIT_S, IN, RE) #ENDIF #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 334/342


Section 156

Section 156 ZONE_SA : %SA BIT VALUE

ZONE_SA : %SA BIT VALUE

156.1Representation

156.2Function The function block ZONE_SA makes it possible to give the value of the bit of the memory zone %SA corresponding to the number of bit defined in entry. IN ranging between 1 and 32 for a C8035 and RX3i IN ranging between 1 and 128 for a C8075.

156.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE %SA bit value Boolean N Y Y Bit row %SA Word N Y Y -

156.4Use Used for a C8035, C8075 and RX3i

Not used for a CE2000 and MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 335/342


156.5Specification

Section 156 ZONE_SA : %SA BIT VALUE

156.5.1 generated expression

156.5.2 Internal variables No 156.5.3 Function block code #IF $TARGET_TYPE =~ 'CE2000' || $TARGET_TYPE =~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ELSE #IF $TARGET_TYPE =~ 'C8035' || $TARGET_TYPE =~ 'RX3i' #IF $IN !~ /^\s*\d+\s*$/ || $IN < 1 || $IN > 32 #ERROR A constant between 1 and 32 was expected in input #ENDIF BF (C_GET_BIT_SA, IN, RE) #ELSE #IF $IN !~ /^\s*\d+\s*$/ || $IN < 1 || $IN > 128 #ERROR A constant between 1 and 128 was expected in input #ENDIF BF (C_GET_BIT_SA, IN, RE) #ENDIF #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 336/342


Section 157

Section 157 ZONE_SB : %SB BIT VALUE

ZONE_SB : %SB BIT VALUE

157.1Representation

157.2Function The function block ZONE_SB makes it possible to give the value of the bit of the memory zone %SB corresponding to the number of bit defined in entry. IN ranging between 1 and 32 for a C8035 and RX3i IN ranging between 1 and 128 for a C8075.

157.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE %SB bit value Boolean N Y Y Bit row %SB Word N Y Y -

157.4Use Used for a C8035, C8075 and RX3i

Not used for a CE2000 and MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 337/342


157.5Specification

Section 157 ZONE_SB : %SB BIT VALUE

157.5.1 generated expression

157.5.2 Internal variables No 157.5.3 Function block code #IF $TARGET_TYPE =~ 'CE2000' || $TARGET_TYPE =~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ELSE #IF $TARGET_TYPE =~ 'C8035' || $TARGET_TYPE =~ 'RX3i' #IF $IN !~ /^\s*\d+\s*$/ || $IN < 1 || $IN > 32 #ERROR A constant between 1 and 32 was expected in input #ENDIF BF (C_GET_BIT_SB, IN, RE) #ELSE #IF $IN !~ /^\s*\d+\s*$/ || $IN < 1 || $IN > 128 #ERROR A constant between 1 and 128 was expected in input #ENDIF BF (C_GET_BIT_SB, IN, RE) #ENDIF #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 338/342


Section 158

Section 158 ZONE_SC1_32 : %SC1_32 BIT VALUE

ZONE_SC1_32 : %SC1_32 BIT VALUE

158.1Representation

158.2Function The function block ZONE_SC1_32 makes it possible to give the value of the bit of the memory zone %SC corresponding to the number of bit defined in entry. IN ranging between 1 and 32 for a C8035 and RX3i IN ranging between 1 and 32 for a C8075.

158.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN Outputs RE %SC1_32 bit value Boolean N Y Y Bit row %SC1_32 Word N Y Y -

158.4Use Used for a C8035, C8075 and RX3i

Not used for a CE2000, MFC3000

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 339/342


158.5Specification

Section 158 ZONE_SC1_32 : %SC1_32 BIT VALUE

158.5.1 generated expression

158.5.2 Internal variables No 158.5.3 Function block code #IF $IN !~ /^\s*\d+\s*$/ || $IN < 1 || $IN > 32 #ERROR A constant between 1 and 32 was expected in input #ENDIF #IF $TARGET_TYPE =~ 'CE2000' || $TARGET_TYPE =~ 'PCX' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF BF (C_GET_BIT_SC, IN, RE)

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 340/342


Section 159

Section 159 ZONE_SC33_128 : %SC33_128 BIT VALUE

ZONE_SC33_128 : %SC33_128 BIT VALUE

159.1Representation

159.2Function The function block ZONE_SC33_128 makes it possible to write Boolean value IN2 in the bit number IN1 of the memory zone %SC. The output RE is equal to the value of the bit previously written. This output is not obligatory. This FB cannot be used for a C8035 for a C8075

IN1 ranging between 33 and 128

159.3Arguments characteristics
Name Description Type Neg Range Mand. Connection Def. value Mand. Data Advised parameters value First scan value

Inputs IN1 Bit row %SC33_128 Value to store Word N Y Y -

IN2 Outputs RE

Boolean

%SC33_128 bit value

Boolean

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 341/342


159.4Use Used for a C8075

Section 159 ZONE_SC33_128 : %SC33_128 BIT VALUE

Not used for a C8035, CE2000, MFC3000 and RX3i 159.5Specification

159.5.1 generated expression

159.5.2 Internal variables No 159.5.3 Function block code #IF $IN1 !~ /^\s*\d+\s*$/ || $IN1 < 33 || $IN1 > 128 #ERROR A constant between 33 and 128 was expected in input #ENDIF #IF $TARGET_TYPE !~ 'C8075' #ERROR Invalid target type '$TARGET_TYPE' #ENDIF BF (C_STORE_BIT_SC, IN1, IN2) #IF defined ($RE) BF (C_GET_BIT_SC, IN1, RE) #ENDIF

Copyright ALSTOM 2008. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden

ALSPA Controcad - System Function Blocks - Library

PTP21A40014-en Rev.Q 342/342

Potrebbero piacerti anche