Text language (STL) programming


STL text language (Statement List) is a set of instructions comprising logical operations, relations as well as functions of flip-flops, timers, counters etc. which allow proper programming of the relay. The use of a text language for programming of the NEED relay is very efficient and produces an object code which is closest to the internal structure of the program.

STL program structure

An STL program is a sequence of successively executed instructions. Each instruction is composed of two elements:
1) Instruction symbol - identifier (code), which is a keyword in STL language,
2) Argument i.e. variable.


                      <code>                                              
<argument>
A, A(, AN, AN(, O,O(, ON, ON(, X, X(, XN, XN(,

SET, CLR,

S, R, =, FP,

SD, SF, SE, SL,

CU, CD,

L
I, Q, M, MDIR, H, A, T, C, HC1, H

L-Licznik1),

L- Timer2)

1  -  L - Licznik - is a set number of counts to be performed by the Counter.
2  -  L - Timer - is a set time to be measured by the Timer.


Logical notation of some sequences, of which the program is composed, consists of a condition (so-called preceding part) and a result (so-called successive part). In other words if the conditions, noted using specific instructions and variables, are met that situation will yield a result which is also noted using specific instructions and variables. Such composition of a condition and a statement is called a circuit.


Instructions recorded in lines 1 and 2 are conditions in this example. If both conditions are met, the I1 output and A2 comparator output states being high, then the Q4 output will be set (state ‘1’) and Q1 output will be reset (state ‘0’). Thus instructions ‘S Q4’ and ‘R Q1’ are the result. Instructions: A, A(, AN, AN(, O, O(, ON, ON(, X, X(, XN, XN (compose the conditional part of the circuit while the instructions: S, R, =,FP, SD, SF, SL, SE, CD, CU are the resultant part of the circuit. Each separate circuit should begin with a condition and end with a result.

There is only one program in the programmable relay which cannot be split into subroutines to be called.The controller processor executes individual instructions successively, beginning with the first and ending with the last one. Once the last instruction is executed the program cycle is repeated. Controller program processing is presented in figure below.

Table below contains all available STL instructions.

STL
Instrukction
Description Operands
A AND instruction I,Q,M,MDIR,A,H,C,HC1,T
A( AND parenthesis instruction  
AN AND NOT instruction I,Q,M,MDIR,A,H,C,HC1,T
AN( AND NOT parenthesis instruction  
O OR instruction I,Q,M,MDIR,A,H,C,HC1,T
O( OR parenthesis instruction  
ON OR NOT instruction I,Q,M,MDIR,A,H,C,HC1,T
ON( OR NOT parenthesis instruction  
X XOR instruction I,Q,M,MDIR,A,H,C,HC1,T
X( XOR parenthesis instruction  
XN XOR NOT instruction I,Q,M,MDIR,A,H,C,HC1,T
XN( XOR NOT parenthesis instruction  
S Setting instruction Q,M
R Resetting instruction Q,M,C,HC1,T
= Assigning instruction Q,M
FP Pulse relay Q,M
L Loading instruction Constant operand value
SD Timer – Delayed turn-on T
SE Timer – Delayed turn-off T
SF Timer – Single pulse T
SL Timer – Pulses T
CU Counter – Up-count C, HC1
CD Counter – Down-count C, HC1
SET „Always setting” instruction  
CLR „Always clearing” instruction  


Converted from CHM to HTML with chm2web Pro 2.7 (unicode)