teleperm m - siemens...copy,type,nam1,nam2:no;copy programs and preset the internal block number...
TRANSCRIPT
-
Standard Function Blocks:Block List Description
Automation System�����������������
��������
Description
Volume 3/3
Bestell-Nr. C79000-G8076-C416-02
1
3456789
10
TELEPERM M
Siemens Aktiengesellschaft
Contents Reg.
2
1
345
2
1
345
2
Warning C79000-R8076-C416
InformationSuggestions/ Corrections
Description, Part 1 C79000-T8076-C416–02Contents
Vol.1
Description, Part 2 C79000-T8076-C416–02Contents
Vol. 2
Description, Part 3 C79000-T8076-C416–02Contents
Vol. 3
Introduction
Description
Data Blocks
System Interfaces
Configuring
Data Types
Message and DiagnosisConcept
Communication via theCS 275 Bus System
Arrangement according to CharacteristicsMethod of Functioning: A to FM
Method of Functioning: FN to RAD
Method of Functioning: RE to ZKS
Memory Requirements and Execution Time
Brief Instructions
Special Features of the C79000–T8076–C484–04System Software with AS 235 H
-
The reproduction, transmission or use of this document or its contents isnot permitted without express written authority. Offenders will be liable for damages. All rights, including rights created bypatent grant or registration of a utility model or design, are reserved.
Copyright � Siemens AG 1993–2002 All Rights Reserved
We have checked the contents of this manual for agreement with thehardware and software described. Since deviations cannot be precludedentirely, we cannot guarantee full agreement. However, the data in themanual are reviewed regularly and any necessary corrections included insubsequent editions. Suggestions for improvement are welcome.
Technical data subject to change.
Order No. C79000–G8076–C416
Printed in the Federal Republic of Germany
Siemens Aktiengesellschaft
-
Operator inputsAS 235 System Software
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 1
10 Brief Instructions
10.1 Operator Inputs
10.1.1 Primary Operator Inputs
Authorization levels of the process communication keyboard:
0: Configuration keyboard and process communication keyboard are both inhibited.1: Only operator–process communication via PBT possible.2: PBT inhibited, process and configuration inputs (selection also possible in NEMO and
NEDA) via configuring keyboard are possible. The configuration, however, cannot be modified (LS, EI, ER and L).
3: All operator inputs enabled (including NEDA and NEMO instructions).
QM;QF,errorno;
QF,type,bname;
QF,type,bname,errorno;
QF,messagetext;
QF;QF,*;
QF,*,errorno1,errorno2;
QS;
QH;
F;
F:pageno;
F:elna;
Z;
ZYK,cycleno;
BI;
BI,no1,no2;
Message acknowledgement on the monitor; clear message line.Enabling individual system fault messages.Enabling of all fault alarms of a block
Enabling of a message text
Enabling one or all error messages from a block
Enabling of all system fault messagesPrintout of waiting I&C alarms with message number selection.Printout of waiting I&C alarms with message number selection.
Printout of waiting I&C alarms with selection of message numbersin the range between errorno1 and errorno2.AS 235: Acknowledgement for S block; only possible if S
loop display has been selectedMS 236: Message acknowledgement on the new page 0 of the
message sequence
QF,*,errorno;
Acknowledgement of all HUP blocks. The operator input QH; sets theflag GB.ORPA.144=1B. The SAB output in all HUP blocks and thecommon output GB142 are reset (acknowledged)
Instruction Meaning
Continuation of screen outputsDirect page selectionDirect selection of the page in which the element name elna isavailable (not possible in NEMO)
Scrolling backwards during screen outputDefault setting of acyclic and cyclic processing levelscycleno.: 1 = acyclic (alarm level)
2 = cyclic 125 ms3 = cyclic 1 s4 = cyclic 1 s (image output, NEMO, ...)5 = acyclic (background)
Printout of screen content on selected printerOutput from screen page no1 to screen page no2 on the selectedprinter
-
Operator inputs AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E210 – 2
Instruction Meaning
GE,deviceno,logno;
UZ,hour,minute, second:day;
DA,day,month,year
deviceno: 0 = No output1 = Logging printer 12 = Logging printer 23 = Event recorder 14 = Event recorder 25 = Monitor of AS 235 operator position
1) 6 = External terminal1) 7 = Documentation uploading via PBT/
configuration keyboard1) 8 = Documentation uploading via PBT/
configuration keyboard with compressed transfer
2) 3 = 300 bits/s (11/12/13)2) 6 = 600 bits/s (11/12/13)2) 12 = 1200 bits/s (11/12/13)2) 24 = 2400 bits/s (11/12/13)2) 48 = 4800 bits/s (11/12/13)2) 96 = 9600 bits/s (11/12/13)
logno: 0 = Configuration logs 1 = Messages 2 = Operator input messages 3 = I&C alarms 4 = Copy image (BI) 5 = MS 236 alarm status logs 6 = External configuration2) 11 = Set baud rate for operator position 12) 12 = Set baud rate for operator position 22) 13 = Set baud rate for current operator position
This instruction is used for setting the time
Setting the time
1) only if logno= 62) if logno = 11, 12 or 13 the input value on deviceno will be used for setting the baud rate.
10.1.2 Operator Inputs via the PBT
All PBT operator inputs can also be performed via the configuring keyboard. The “;” is equivalent tothe PBT key “AUSFÜHREN”; commas are omitted when entering instructions via the process com-munication keyboard.
Some instructions need not be terminated by “AUSFÜHREN” when entered via the PBT:
UB; Selection of overview displayBE; Setting the operator input modeQM; Message line acknowledgementQS; Acknowledgemenet for S blockQH; Acknowledgement of all HUP blocksTE; Switchover of variable PBT keys (next line)F1, ... F9 Triggering of configured functions
-
Operator inputsAS 235 System Software
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 3
Variable keys:
These keys are used according to the corresponding label on the alphanumeric display for:
– loop display selection (only if area display has been selected)
– value input (only if loop display has been selected and operator input “BE” switched on).
Loop display selection:
type variable key for TYPname block number (via numeric keypad)
Parameter value input:
BE: Select ”operator input”GP; orUB; orBR; Return
then value input
Binary values
– variable key for desired parameter
– ;
Analog values:
– variable key for desired parameter
– value (via numeric keypad)
– ;
or
– variable key for desired parameter and
’arrow up key’ : increase (slow)’arrow up’ + ’SG key’ : increase (fast)’arrow down key’ : decrease (slow)’arrow down’ + ’SG key’ : decrease (fast)
’slow’ is approximately 1% of the measuring range per cycle’fast’ is approximately 10% of the measuring range per cycle
Correction: (only possible via PBT)
CE Clear last entryC Clear input line
Modification of the PBT type display:
Change sequence:
All operator–controllable block types are output on the PBT when an area display has been selec-ted. If the display is to begin with a type number (typeno) different to the smallest one, parameterGA40 = typeno in GA.ORPA must be parameterized.
Suppress types:
-
Operator inputs AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E210 – 4
A type display (typeno) on the PBT is suppressed if the parameter (typeno) in FB.ORPA has beenset to 0.
Free configuration of TYP display using SYST.WART menu TYPE PRESETTING ON PBT.
10.1.3 Press function keys
FT,n; Operator input using a function key (FUTA) n via the configuring keyboard (only function keys 1 to 9 can be used via the PBT).
10.1.4 Reset functions
TPER; Reset the N8/N–AS local bus interface
RSOF; Reset AS 235/MS 236 with “compress memory”
LOES; Clear user configuration, restart
RSOF; and LOES; are only possible in STOP mode (”STO;”).
10.1.5 Execution levels
STO; Block processing is stopped (STOP mode, currently running logs (printer) are aborted.Cycle 5 can be excluded from the STOP mode with the SYST.WART menu ”System
switch”.
STA; Re–start of execution in cycles 1–5.
HALT; Stop processor; only possible in STOP mode.THIS STATUS CAN ONLY BE RELEASED BY A HARDWARE RESET (ZRS on processor module).
10.1.6 List output
B; The SEQUENCE LIST of the selected cycle is output.The list specifies the block processing sequence.The cycle must have been selected (ZYK,n;)!
B:type,no; Output of the page of the sequence in which type.no is integrated.
F:type,name;Scrolling to the page containing the block requested.type = type namename = block name
ABBR; Aborting a printout currently in progress, if the log output blocks the operator station for a too long time.
-
Operator inputsAS 235 System Software
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 5
BT,TYP; Display of all block types on the monitorBT,TYP:A; The absolute block memory address is also displayed in decimal
representation
F:type Scrolling to the page containing the requested block type
BT,type; Output of all available blocks of the specified typeBT,type;A As above, including starting address
BT,type;B Output of all available blocks of the specified type, contained and their number of occurrences.
BT,RAM; This instruction is used for listing all blocks in the RAM area sequentially including the memory starting address.
BT,PROM; This instruction is used for listing all blocks in the system RAM area sequentially; including the memory starting address.
F:type,name; Scrolling to the page with the selected blocktype = type namename = block name
BT,STAT:@; Status output
10.1.7 Function block handling
D,type,no; Definition eines Bausteins 1)
D,type,no: Exception: The required number of variables is also specifiedlargest variableno; for the GA, GB, GM and GT global blocks as well as for the
field blocks
D,type,no,ibno Block definitiontype = type nameno = block name 1)
ibno = Presetting of an internal block number
D,type,no:largest Exception: The required number of variables is also variableno,ibno; specified for the GA, GB, GM and GT global blocks
type = type nameno = block name 1)variableno = number of requested variablesibno = presetting of an internal block number
E,type,no Inserting a block after the specified blockE,STRT,1; Inserting a block at the 1st location of the processing level
E; Inserting a block after the last block to have been inserted
AUS,type,no; Removing a block from the processing levelL,type,no; Deleting a block
A,type,no; Block list outputCOPY,type,sourceno, Copy block datatargetno;
COPY,type,nam1,nam2; Copy programsCOPY,type,nam1,nam2:no; Copy programs and preset the internal block number
number for the copy (8 ≤ no ≤ 4094)
1) The block name may consist of up to four alphanumeric characters. Special characters and symbols may not be used
(configuration uploading).
-
Operator inputs AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E210 – 6
10.1.8 Configuration
P,no,value; Block parameterizationP,no:index,value; Exception: indexed variablePnr,N; Indexed variableELL,FC:ind,dez; Parameterize FC field(NEDA)! ind: element in the field
dec: character decimal equivalentMB,out,bitno,value; Code bit modifies output variable
MB,in:E,bitno,value; Code bit modifies input variablebitno0: Status bit
3: fault bit4: Fault bit
Q,inputno,type,no, Interconnection of two blocks outputno;Q,inputno,type,no, Special case: parallel connection of inputs inputno:E;
Q,inputno:N; Clearing an interconnection
Q,inputno,type, Interconnection of a program with connecting blocksname,0; type: PROB, STEP, LAYO
10.1.9 Display selection
type,name;The LOOP DISPLAY of the block “type,name” is output.Example: ”M,3;”
AT,at; Output via the process–related name ”AT”:The LOOP DISPLAY of the block with the S16 string “AT” is output.Example: ”AT,OFEN 4;”The LOOP DISPLAY of the block with the S16 string parameterized as ”OFEN 4” is output. The first name found is displayed if a name has been used repeatedly.
GP,n; The GROUP DISPLAY of the group “n” is output.Example: ”GP,8;”
BR; The AREA DISPLAY is output.
UB; The OVERVIEW DISPLAY is output, if there is any.
10.1.10 Process control
Operator input is possible after the loop display has been selected:
BE; Switch on operator inputBT keys used for entering values are labelled according to the block selected.
GP; or UB; Switch off operator inputor BR;
-
Operator inputsAS 235 System Software
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 7
10.1.11 Floppy Disk Instructions
FORM,diskettename; Formatting a disketteAR,filename; Filing the memory contents onto a diskette (n)AR,filnemane:U; Filing the memory contents onto a diskette.
The previous configuration will be overwritten if theformats are identical.
ARB,filename; Filing via the busARBR; Filing the RAM contents via the bus (target AS to
configuration AS).LA,filename; Loadting the diskette contents into the RAMLAB,filename; Loading via the busLABR; Loading the RAM via the bus (configuration AS to
target AS)DI; Inhaltsverzeichnis DISK ausgeben
In the loading and filing process, the next diskette is requested by a blinking “DISK” in the messageline (cf. screen layout in Chapter 10.2).
Short entries are possible from 2nd diskette onwards:
LA; Loading using the previously entered name as presetting value(LA,filename;)
AR; Filing using the previously entered name as presetting value(AR,filename;)
Overwrite mode remains activated.
No additional diskette instructions are allowed during formatting, filing or loading. Both operatorpositions are inhibited during the loading process.
10.1.12 New function blocks
NEDA; Switch on the NEDA compiler; define (”D,...;”) the data structure of new function blocks or output (”A,...;”) complete blocks including internal elements.
NEMO; Switch on NEMO compiler to defined, output or edit programs (PROGRAM, CHECK, PROBLEM, PICTURE, LAYOUT, STEP and RESTART).
END; Switch off compiler. The NEMO compiler can only be switched off once processing by ”DE;” or ”AE;” has been completed.
10.1.13 Communication
For bus communication, a receiver block must log on and off with a transmitter block.
STATUS communicationMELDUNGS communication
busno: Bus number, 0...7, to be selected on N8/N–AS interface.deviceno: Bus number, 0...99, to be selected on N8/N–AS interface.type,no: Data is expected to come from this transmitter block
-
Operator inputs AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E210 – 8
KD,busno,deviceno, Log on for direct communicationtype,no; type = AKE
BK (6 receivers per transmitter block)ZKE(MKE on AS 231)no = number between 1 and 4095
ANM,busno,deviceno,2; Log on for receiving text messages1)
ABM,busno,deviceno,2; Log off for receiving text messages.
KC,busno,deviceno, Log on for CD communicationtype,no; (common data communication)
no = number between 1 and 16 (any number of receivers per transmitting block on the receiver).
KL; Clear communication link with the selected receiver block.
1) Up to 8 “receiver systems” may be logged on with an AS 235 device.
10.1.14 Operator input via the bus
These instructions are not possible under NEDA, NEMO, BE.
Operator inputs for acknowledgement of I&C alarms:
BB:busno,deviceno,QF...;Enabling an I&C alarm with another bus device (cf. QF instruction)
BB:busno,deviceno; Presetting the target device for the abbreviated QF operator input via the bus.The presetting is cleared by:– a different BB:...;instruction– UB; BR; GP...; BE; NEDA; NEMO;– BB;The target is displayed on the VDU.
BB,QF..., Abbreviated QF operator input via the bus; requires presetting of thetarget (busno,deviceno).
10.1.15 Central configuration, loading, filing
This function can be performed between all CS 230 (from firmware release E.01 onwards) and AS235 subsystems connected to the CS 275 subsystem. All AS involved must have the same firmwareversion > F01 in order to achieve optimum utilization of this function.
ANMS,busno, Log on for configuration with the target automation subsystem with device no. deviceno on bus busno.After log on, all instructions entered via this operator position will be directed to this target subsystem.
The keyswitch must be in position 3 if the configuring keyboard has been connected via the process communication keyboard. Afterwards the PBT cannot be used for operator inputs.
ABMS; Log off of the central configuration.Enf of communication.
-
Operator inputsAS 235 System Software
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 9
LAB,name: Loading a user system into the target automation subsystem which has logged on. The diskettes are entered via the mini floppy disk drive connected to the configuration automation subsystem. Loading is only possible after the system has been set to “STO” mode.
LAB; Continuation instruction if more than one diskette is used. Loading is only possible after the system has been set to “STO” mode.
LAB:@RS; Aborting the loading process, terminating bus configuration and restarting the target subsystem. The target subsystem memory iscleared.
ARB,name; Filing the user system of the target automation subsystem, which has been logged on, onto diskettes inserted in the mini floppy disk drive connected to the configuration subsystem. The target subsystem memory is cleared.
ARB; Continuation instruction if more than one diskette is used.
ARB:@RS; Abortion of the filing process.
LABR; Loading the user RAM area of the configuration subsystem into thelogged on target AS. The previous configuration of the target subsystem is cleared and replaced by the new data – as in direct loading. Loading is only possible after the system has been set to “STO” mode.
ARBR; Filing the user RAM area of the logged on target subsystem into the RAM of the configuration subsystem. When sending this instruction the configuration subsystem must have sufficient free RAM area to accept the system from the target subsystem. After the data has been transferred completely, the old system in the configuration subsystem is deleted by a restart and the user subsystem, loaded from the target subsystem, is activated. The RAM of the configuration subsystem must first be cleared if there is not sufficient free RAM to accept the target subsystem configuration.
-
�����������������Screen Layout
� Siemens AG 1992 C79000–B8076–C416 E2 10 – 10
10.2 Screen Layout
12345678910111213141516171819202122232425262728
10 20 30 40 50 60 64
5 15 25 35 45 55
A
MVST
4 5 67
1 2 3
12.09.90 / 10.15.52. Bus/0/35/*S388
8
460 BR QS BS NEMO FDFD* BILD NULL ZYK4 BILD ZAHLSTRUbtt
MT
AZ
16 19 10 17 11 18 12 20 21 22 13 14 15
0
ME
0
9
Fig. 10.1 Screen layout, 32 x 64 fields, including 29 x 64 fields of free work area
Legend to Fig. 10.1
A Work area
AZ Output line
ME Message line
MT Echo line
1 Date System time (green) if no message is displayed in the message line.
2 Time Message time (yellow) if a message is waiting (the time is not updated in this case).
3 Message line: System/error messages (see list). Messages from MEL blocks.
4 M More messages are waiting in the buffer which can be displayed by entering ”QM;”.
5 V Lost alarm(s): The alarm buffer takes up to 10 alarms. The oldest alarms will be lost if more occur.
Continued on next page
-
Screen LayoutAS 235 System Software
� � Siemens AG 1992 C79000–T8076–C416 E2 10 – 11
Legend to Fig. 10.1 (continued)
6 Condition codes from sequence control:
Blank No condition codes
ST Sequence has been stopped (STOP mode after ”STO;” command)
Z2 Cycle overflow: overcapacity on level 2
Z3 Cycle overflow: overcapacity on level 3
ZZ Cycle overflow: overcapacity on both levels
5S Sequence has been stopped (cycles 1 to 4) ; cycle 5 is continued (after ”STO;” has been
entered and the flag in GB.ORPA.232 set to “1”.)
7 * (white on black): The selected list has further pages; scrolling possible using ”F;”
* (Black on white): NEMO mode only
F The next page must be selected (”F;”), to issue the end message, otherwise the compiler cannot be
switched (”END;”).
8 Screen area for selected pictures/blocks/lists
The following information appears on the monitor output line (penultimate line).
9 Operator messages
*** The system has not yet terminated an operator input.
DISK Blinking red (after LA,filename; AR,filename; only).
The system requests an additional diskette.
Fnnn Operator input error message (see error list, error number nnn).
10 BR Area alarms; a mark after “BR” indicates an alarm writing in an area. The alarm has not yet been
acknowledged if the mark is blinking. Selection of the group display containing the fault is
considered as acknowledgement. The first mark after “BR” is managed by the system. The user
activates the marks 2 to 12.
11 QS (Blinking red): An S block requests an acknowledgement; acknowledgement by selecting the S
block and enteriing ”QS;”.
12 BB Bus/Device number selected in “BB” operator input.
Special modes:
BE The system mode is “operator input” (”BE;”)
NEDA The NEDA compiler has been switched on
NEMO The NEMO compiler has been switched on. The compiler is switched off by ”END;” after a compiler
run has been terminated, and bus operator input has been logged off.
13 typ.name Block defined last
14 ZYKn Selected cycle (1–5)
15 type.name Block installed last.
16 Echo line: operator inputs entered via the configuring keyboard or PBT are displayed (echoed)
here. The echo line is shortened in bus configuration mode.
17 STRUbtt (Black on white; b = bus no. tt = device no. of target automation subsystem).
Indicates bus configuration via the screen of the automation subsystem used for configuration.
18 BS If bus configuration has been logged on.
19 Ennn Error message from configuration AS (”own errors”).
These messages, which can be distinguished from error messages (indicated by an “F”) of the
target AS by an “E”, have the same meaning as the “F” messages.
20 FD Static white/red indicator: floppy disk active
Blinking: Error during floppy disk access
21 FD (AS 20) but from target AS in bus configuration mode.
22 * Background program active (e.g. L,SUM,1;)
-
�����������������Screen Layout
� Siemens AG 1992 C79000–B8076–C416 E2 10 – 12
Block list:aeno type name value S!#?PA interconnection CBNQ ino
aeno: External element number
type: Data type, e.g. EA, AB, etc.
name: Element name
wert: Value or element contents (number, characters).
S!#?P: Arguments and codes:S: Write protected!: Alarm code has been set#: Fault code has been setP: PROM code has been set? Codes are only output for the source parameter (to which interconnection
is made)A Address code
interconnection: Source specification: typename, blockname, elementname (elna). The fieldlength is specified here when necessary.
CBNQ: Arguments and codes:C: Check code has been set.B: Parameter is operation–controllableN: Parameter is not operation–controllableQ: Parameter may only be interconnected
ino internal element number
Example:
SUM 1 P: 1
1 AA Y 539.00 # N 51 EA X1 77.000 12 EA X2 539.00 ? SUM 1 Y 23 EA X3 0.0000 S 34 EA X4 0.0000 P 4
Fig. 10.2 Block list SUM 1
-
Function BlocksAS 235 System Software
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 13
10.3 Function Blocks
10.3.1 Alphabetical Order
TypeNo.
Typename
Operation-controll.
Dri-ver
Function
A
AA
AAF
ABRABS
AE
AEF
AKE
AKS
33
88
123
13557
89
122
117
109
*
*
*
*
*
Output block for binary signals.Used for controlling or routing a binary value in the GB.Analog output block: Transfers analog values from an automa-tion subsystem to the field devices.Driver for the output of analog signals via the FM analog outputmodules.Driver for analog input/output and BRBK (ME)Absolute value blockGenerates the absolute value of an analog valueAnalog input block;Transfers an analog value from the field devices to the automa-tion subsystem.Driver for the acquisition of analog signals via the FM analog in-put modules.Analog linking receiver block. Used for transferring analog valuesvia the bus.Analog linking transmitter block. Used for transferring analog va-lues via the bus.
APRO
AR
ASLA 110
B
BAF
BAU
BCA
77
90
68103
32
121
87
95
*
*
*
*
*
Connecting block for TML PROBLEMSs. Used for transfer-ring analog values via the bus.Analog input routing block. Transfers 8 analog values from thefield devices to the automation subsystem.Analog value switching block. Relay function. Selector switch.Driver block for the output of 16 binary values from the link process interface module for S5–110 or standard binary outputmodules.Operator communication block: used for controlling two ana-log and two binary values via the process communicationkeyboard.Driver for the output of binary signals via FM binary outputmodulesBinary output block. Transfers 32 binary signals from the auto-mation subsystem to the field devices.BCD output block. Transfers 32 binary signals from the automa-tion subsystem to the field devices.
BCE
BEF
BEI
94
120
85
BCD input block. Transfers an analog value in BCD code fromthe field devices to the automation subsystem.Driver for the acquisition of binary signals via the FM binary si-gnal input modules and for the acquisition of alarm signals fromthe FM binary input and output modules.
Binary signal input block. Transfers between 8 and 48 binary si-gnals from the field devices to the automation subsystem. Thesignals are made available as a field. Also suitable for processalarm acquisition of dynamic binary signals (with AS 235).
*
*
-
AS 235 System SoftwareFunction Blocks
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 14
TypeNo.
BILD
BKE
78
116
Type-name
Operation-controll.
Dri-ver
Function
BKS
BRA
BRBKBU8
BU16
BWC
DIF
DIVDR
108
86
13496
97
7438
59
5398
Display output block; can also be selected via the PBT. Used forlinking LAYOUTs to the system. The LAYOUTs may be superim-posed on various display types (e.g. loop display).
Binary linking receiver block. Used for transferring binary valuesvia the bus.Binary linking transmitter block. Used for transferring binary va-lues via the bus.Binary routing block Transfers 8 binary signals from the field devices to the automa-tion subsystem. the signals may be interconnected individually.Binary arithmetic module header block (ME)Binary encoder monitoring block. Transfers 8 binary signals fromthe field devices to the automation subsystem. The signals maybe monitored (binary qualifiers exist).Binary encoder monitoring block. Transfers 16 binary signals fromthe field devices to the automation subsystem. The signals maybe monitored (binary qualifiers exist).Binary selector block. Special combination of three input signals.Switchover blockUsed for (interlocked) operation of 1 to 3 binary values. Flip flop.Derivative block (D element)
Speed controller. Used as driver block for the speed con-troller module.
Divider block; divides two analog values.
*
*
*
*
*
DZ
EAR
EBR
EG
EK
EM
EU
EV
EXP
42
100
84
43
114
39
113
40
56
Proportioning counter. Used as driver for the proportioning counter module. Additional functions;Routing block for individual analog values. Routes an analogvalue to an element (input, output, GA cell) which cannot nor-mally be interconnected.Routing block for individual binary values. Routes a binaryvalue to an element (input, output, GB or GM cell) which can-not normally be interconnected.Driver block for open–loop control module (4 or 8 channels)
Valve control block. Used as driver for solenoid valve control mo-dule.ESG motor control block. Used as driver for an EM electro–motorcontrol module.
ESG valve control block. Operator–controllable driver.Used as driver for an EV solenoid valve module
Exponential function y = ex
ESG motor control block. Used as driver for an EM electro–motorcontrol module.
**
**
**
**
**
**
E 110
F
102
36
Driver block for the input of 16 binary values from the link processinterface module for S5–110 or standard binary output modules.Window blockUsed for indication and monitoring of 5 analog values for limitvalue violation.
FM 46 Driver used for signal acquisition from an FM interface modulechannel and for controlling the FM interface module together withthe FM central module and the FM–related driver blocks AAF,AEF, BAF and BEF.
*
*
* *
-
Function BlocksAS 235 System Software
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 15
TypeNo.
Typename
Operationcontroll.
Dri-ver
Function
FN
FUTA
G
GK
GP
GW
HA
HUP
INKU
INT
KA
KAK
KB
KBK
KE
KEK
KS
44
47
35
45
49
66
83
93
58
28
125
24
126
25
127
27
Window block used for indication and limit value monitoring of 5measured values.Function key block. Direct control via the PBT possible. Used fordirect input of digital signals (e.g. commands) into the system wi-thout previous selection of a block.Subgroup control blockUsed for operation and monitoring of sequence cascades inpower plant systems.Subgroup control blockUsed for operation and monitoring of sequence cascades inpower plant systems.Group display block; selectable.Used for joining groups of operator–controllable blocks and forindicating their states and alarm status.Limit monitoring blockMonitors an analog value for limit value violation. Schmitt triggerresponse (hysteresis).Booster oil automatic block.Generates the logic control signals of a booster oil pump.
Horn blockActivates signalling devices.Increment–oriented function. Converts an actuating increment(from a controller) into a correspondingly long open/close impulsefor the actuator.Integrator block. Used as I–element, sample–and–hold circuit,analog value memory.
Sequence starting block. For GK controller (for power plant applications). Marks the beginning of a sequence.
Sequence starting block. For G controller. Marks the beginning ofa sequence.
Sequence block. For G controller. Determines the step enablingcondition for the sequence cascade.Sequence block. Determines the step enabling condition for the sequence cascade (power plant application).Sequence ending block.For S and G controller. Marks the end of a sequence cascade.Sequence ending block. For GK controller. (For power plant ap-plications). Marks the end of a sequence cascade.Sequence stepper block. For S controller. Used for linkingSTEP–M programs. Determines the step enabling condition forthe sequence cascade.
*
*
*
KV
LAYOLN
M
26
2055
29
Sequence branching block. For S controller. Marks branchingpoints in a sequence cascade. Performs jumps within the se-quence.Block type for generating LAYOUT (NEMO).Logarithmic block.Generates the natural logarithm of an analog number.Measured data monitoring block.Used for monitoring an analog value for violation of three limit va-lue pairs. Circuit display for viewing these values.
*
MAX 63 Maximum value selector block.Compares three analog values and determines the largest one.
MEL 79 Alarm signalling block. Issues a (configurable) message in theVDU message line and on the printer.
MIN 62 Minimum value selector block.Compares three analog values and determines the smallest one.
-
AS 235 System SoftwareFunction Blocks
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 16
TypeNo.
Typename
Operation-controll.
Dri-ver
Function
MKS
MPX
MSBMUL
PKF
PKM
PLG
PLPS
111
82
13652
81
80
65
145
Signal linking transmitter block (linking block). Transfers messa-ges (binary signals and time) to a process computer and OSsubsystems.Multiplex block.Transfers multiplex parameters to the subsequent KS/VS block.Operator–controlled motor and actuator block.Multiplier block. Multiplies two values.
Process link alarm acquisition block.Used for acquisition of 16 binary signals from field devices andtransfer in a GB field or for message acquisition of internal binarysignals (GB field). The PKM block generates up to 16 configurableconditional messages (cf. PKF). Representation of the alarm sta-tus in a detailed picture.
Polygon curve block. Used for non–linear conversion of analogsignals using a polygon function.Read/write parameter from/to AS 230/235
Process link alarm sequence block.Representation of the PKM block alarm history as detailed picturewith new and old pages; operator–conrollable. Output of messa-ges to VDU, bus and logs to printer.
PROBPROT
PTRRAD
RE
REN
276
603054
41
143
Type used for PROBLEM generation (NEMO)Log output block. Used for LAYOUT printout.
Delay block. Used as 1st order low–pass.Closed–loop controller block. PID controller.Root extractor block. Finds the square root of ananalog number.One–channel closed–loop controller.Driver block for the single–channel closed–loop control module.The module can operate as a stand–alone backup controller.Driver for ME analog/binary input/output module.
*
* *
*
*
RESTRN
RNAMRK
RSKRSKB
075
150112
128131
Type for RESTART generation (NEMO)Closed–loop controller block.PID controller (like R block plus auxiliary functions, such asmeasured data monitoring).Block used for changing block types names.One–channel closed–loop controller (similar to RE). Driverblock for the single–channel closed–loop control module. Themodule can operate as a stand–alone backup controller.Driver for ME controller.Operator input block for ME controller
*
* *
*
RZ
RZA
S
SKSSPEI
92
91
67
34
124
Two–channel closed–loop controller. Driver input section for theRZ module. RZ transfers values from the module to the automa-tion subsystem.
Operator communication block for S controller. Used for setting upsequence cascades in process engineering applications.Status linking and transmitter block.Buffer block. Stores up to 256 analog values sequentially in theGA area. Used as analog value buffer/cyclic buffer.
Two–channel closed–loop controller. Driver output section for theRZ module, RZA transfers values from the automation subsystemto the module.
*
*
*
*
MKE 119 Signal linking and receiver block. Receives messages (binary si-gnals and time) from another bus participant.
PBE 132 Driver for testable binary input module. *
Driver for testable relay output module.PRA 133 *
-
Function BlocksAS 235 System Software
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 17
TypeNo.
Typename
Operation-controll.
Dri-ver
Function
SR 106 Recorder block.Records the chronological sequence of up to 4 analog values. Re-presentation as 4 curves with 24 values each.
*
STEP 21 Type for STEP generation (NEMO)SUM
S5KES5KSSYSTT
TANZ
TOB
TOZ
TVBTUEB
51
107115
137
104
64
61
137105
Adder block.Adds four analog values (2 positive, 2 negative).Receiver block in a link to S5 devices.Transmitter block in a link to S5 devices.Type for SYSTEM generation (NEMO). 1)
Trend block.Draws the time characteristics (trend) of two measured values.Representation as 2 curves. Curves can be transferred to OSsubsystems.Test display block is used for viewing binary and analog varia-bles and facilitates a selective control of variables.
Dead band block.Used for creating response thresholds.Dead time block for analog values.Unit sequence memory. Delays analog values.Partial subgroup and preselector control block (ME).Test monitoring block.Used for monitoring TML block sequences.
UBR
V
VM
VNVOVS
VUVZ
XA
99
31
72
717048
6973
23
Multi–purpose binary routing block.Used for routing up to 16 binary signals to a GB field.Ratio block.Used for ration control. Converts an analog signal using a linearequation. The two linear parameters can be corrected.Flag block.Can co–operate with STEP programs (via GM).Inverter block for binary values.OR block for binary values (OR–gate).STEP–M block. Used for installing STEP–M programs in thesequence list.AND block for binary values (AND–gate)Time delay block for binary values. Delays the rising/fallingedge of a binary signal.Acyclic processing block. Enables the subsequent blocks for onecycle. Especially suitable for blocks on the alarm level (ZYK1).
XB
XZ
ZE
ZKE
ZKS
22
50
101
118
110
Cyclic processing block. Enables or disables the subsequent blocks. Subdivides the le-vel processing time.Time starting blockClock timer. Time–related block activation/de–activation.
Character linking receiver block. Used for transferring characterstrings via the bus.
Count input block. Transfers the values from the CPU module tothe automation subsystem
Character linking transmitter block. Used for transferring characterstrings via the bus.
**
*
*
*
*
*
1) The SYST.WART block has a menue assistance and offers several maintenance functions.
-
AS 235 System SoftwareFunction Blocks
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 18
10.3.2 Grouping According to Block Features
1. Blocks for processing (analog/binary) and normalized representation.2. Blocks for analog and binary processing.3. Blocks (drivers) for I/O modules with normalized representation.4. Blocks (drivers) for I/O modules without normalized representation.5. Blocks for signal exchange via the CS 275 bus subsystem.6. Other blocks7. Data blocks8. User–related and new function blocks.
-
Data BlocksAS 235 System Software
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 19
10.4 Data Blocks
GA 71) Global analog block; multiplex area (MUX). Used for analog values; double precision.
GB 81) Global binary block; multiplex area (MUX). Used for binary values; the values may alsobe used by STEP–M programs.
GM 61) Global flag block; multiplex area (MUX). Used for binary values; the values may also be used by STEP–M programs. Mainly for flags.
GT 51) Global timer block; multiplex area (MUX). Used for time values; an analog value is decremented in a 1–second cycle until it reaches zero. The values may also be used by STEP–M programs.
FSA 16 Analog field; single precision. For analog values in field representation (indexed).
FA 17 Analog field; double precision. For analog values in field representation (indexed).
FB 18 Binary field; double precision. For binary values in field representation (indexed).
FC 19 Character field. For ASCII characters (alphanumeric characters, text) in field representation (indexed). Displayed on VDU as symbol and decimal equivalent.
1) Using the setting “MUX GX.name;”, the global data blocks with internal block numbers between 8 and 255 can directly be
used for multiplex operation.
Indirect address setting is required for internal numbers greater than 255:
.
.
GX.name=:LAx;
MUX GX.LAx
.
.
.
.
-
AS 235 System SoftwareSystem Interfaces
� Siemens AG 1992 C79000–T8076–C416 E2 �������
10.5 System Interfaces
The following system interfaces are available:
SL.PCHE: Interface of the CHECK block
GA.ORPA: Analog parameters
GB.ORPA: Binary parameters
FB.ORPA: Output inhibit for function blocks via PBT.Cf. “Operator inputs via the PBT” (Chapter 10.1.2).
FC.ORPA: Special character set for printers; only effective if GB.ORPA GB 223 = 1 in GB.ORPA.See “NEDA” for entering special characters (Chapter 10.7.2).
FSA.ORPA: Extension of GA.ORPA
Interface lists: see Appendix (Chapters 10.7.7 to 10.7.8).
-
��������?������AS 235 System Software
��������������������������������������� 10 – 21
10.6 Troubleshooting
Remedial actions for various faults; malfunctions.
Parameterization/operator input: input isnot rejected, but not accepted by theblock.
Check whether check bit (C) has been set in theparameter concerned. If it has, check whether theCHECK block modifies the value entered.
Malfunction Remedial action
Cycle overflow
Picture selection from operator positionnot possible (loop display, GP, BR).Lists (B;) and parameterization displaysare output.
Log is not displayed
Error message is not displayed butfault is still present.
A block is not processed.
Link not ready
No operator input possible; no output onecho line.
GP block: Block cannot be cleared
Remove blocks or insert XB blocks with graduatedscanning parameters.
Picture inhibit for this operator position has beenactivated in GB.ORPA → Set GB to “0”.
Incorrect device setting (”GE,k,l;”)
Message has been acknowledged (”QM;”), butnot cleared (”QF;”).
Has a block been installed?Is there a preceding XB, XA or S block which isOFF?Has STOP mode been selected? (remedial action:”STA;”)
Interface not ready? (”TPER;”)GA.ORPA.28 = –1 (transmitter inhibit)
PBT has not been connected:Enter ”;” and switch off SHIFT mode on keyboard.PBT connected, PBT keys have not been labelled:enter ”BR;” via PBT to label keys. Check KEYS-WITCH.
Delete entries (NRPL = 0 for operator–controlla-ble blocks making entries).
Linking blocks
Block cannot be removed
Block cannot be defined
Individual block types are not displayedon the PBT (after ”BR;”)
Individual characters are printed incorrectly
Receiver has not logged off.Log off receiver.
Incorrect cycle or no cycle has been selected →select correct cycle.
Illegal name
Check FB.ORPA; the parameter = type no. or typeno. + 256 must be 1 to enable type to be displayedon the PBT.
Check FC.ORPA if the character coding enteredthere is used (only if GB 223 = 1 in GB.ORPA).
Configuration instructions are not accep-ted.
Check authorization level.
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 22
10.7 Appendix
10.7.1 Illegal Names 2)
List of names which are not allowed in NEMO/NEDA (type/block/element names).
ABMABMSANMANMSANDARARBARBRATAUS
BBBEBKBIBHLBHRBIBRBVOBVUBTBY
CALLCOPY
DDADATADEDIDIGDO
EKELELLELSEENDEQUEREU
FFOFORFORBFORMFPFORMFT
GA/GAnoGB/GBnoGEGIVEGKGLPGMGMnoGPGT/GTno
HALTHSPR
IF
KKCKDKLKO
LLA/LAnoLABLABRLB/LBnoLMTLOESLOOPLSLTLW
NEDANEGNEMONOPNOT
OOBODROEOMONBONEONMONTOROUT
PAGE
QFQMQS
RARBRHLRHRRKRMRNRSOFRTRVORVU
SASBSETSMSPASPB
STASTEPSTOSVTSX
SYHSYV
TAKETETHENTIMETMLTPERTOTRACTXHTXV
UUBUEUMUNBUNDUNEUNMUNTUPUZ
VAR
WWAIT
XOR
ZZCZDZE
ZPZYKZ0Z11)
1)
1)
1)
1)1)
1)
1)
1)1)
1)
1)
1)1)
1)
1)
1)1)
1)
MBMOMUX
Y
0Bxx1Bxx
LAnn
3)
3)
3)
1) These code words may not be used as type/element names for operation–controllable block types/elements.2) May not be used in AS 231
3) Special characters or symbols may not be used within blocks.
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 23
10.7.2 Summary of NEDA Instructions
Instruction Meaning
NEDA;D,type,ORPA:number,T=typeno;
EL,no,name,datatype:number,C,B,Q,N;
EL,nr:K,name,C,B,N;
EL,N;
EL,C;
EL,no,$$$$;DE;A,type,ORPA;END;
Start of a new data description definitionData description definitionData element definition
Correction of a defined elementSets the group code for general CHECKprocessingResets the general CHECK processing code.Separating instruction for internal parametersEnd of definitionOutput of a defined data description.End of NEDA execution
Group code for check call:
If the group code has been set, the CHECK block is also called up when a block is being defined,output interconnected or deleted.
EL,C; Setting the group code for general activation of the CHECK routine.
EL,N; Resetting the group code
Separating element:
The separating element separates internal from external parameters (no outputs). Internal parame-ters are then only output under “NEDA”.
EL,no,$$$$;
no: Consecutive number of the separating element.
Parameterization of FC.ORPA (printer conversion field):
Starting at .FC(16), FC.ORPA contains 256 special characters. If normal parameterization of theseelements cannot be achieved (the keyboard has no special characters), their decimal equivalentsmay be entered (cf. symbol table).
The block is selected under “NEDA”:
A,FC,ORPA;
Parameterization of one or more elements:
ELL,FC:index,dec1,dec2,...;
dec1, dec2,...: Decimal equivalents of the characters.
The characters are shown in .FCI as decimal equivalents and in .FC as symbols (of the VDU, notthe printer).
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 24
10.7.3 TML Instructions
Instructions resulting in a configuration change are only permitted in authorization level 3 of the PBT.
Explanation of the abbreviations used below:
elna: Element name in the block listindex: Index of a field element, with index = const, LAx, GAx, .elna
(”.elna” can only be used as an index in abbreviated notation (pointer must first be set to the (SET type.no;) function block!)
name: Program name; 1–4 alphanumeric characters, beginning with a letterno: Name of a defined block (unless specified otherwise)type: Type name (standard or defined in NEDA)instructions: Underlined names may be omitted or added.–––: Further language elements must be added to the notation at the marked position.
NEMO–Rahmen–An-weisungen
Meaning
NEMO; Definition/output/correctionDeletion of program blocks
D,RESTART,name;D,LAYOUT,name;D,PROBLEM,name;D,STEP,name;D,RESTART,name:no;D,LAYOUT,name:no;D,PROBLEM,name:no;D,STEP,name:no;(nr=8 ... 4090)
D,type,PROGRAM;D,type,CHECK;D,type,PICTURE;DE;
Definition of:Initialization blockPicture blockSubroutineSTEP blockInitialization block with internal block no.Picture block ” ” ”Subroutine ” ” ”STEP block ” ” ”
Function algorithmTest algorithmLoop displayEnd of definition
A,RESTART,name;A,PROBLEM,name;A,LAYOUT,name;A,STEP,name;
Output/correction of:Initialization blockSubroutinePicture blockSTEP block
A,typ,PROGRAM;A,typ,CHECK;A,typ,PICTURE;
Function algorithmTest algorithmLoop display
EI,no;ER,no;LS,no;/Ls,no1,no2;FO;K;F;F:nr;Z;AE;
Correction/scrolling instructions:Insert before line number “no”Replace line number “no”Delete line number ”no”/”no1 ... no2”Formatting (page change only after a full page)Output of 1st page (LAYO and PICTURE only)Scrolling forwardsDirect selection of page “no”Scroll backwardsEnd of output
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 25
Table of page 10 – 24 (continued)
NEMO framing instruction Meaning
L,RESTART,name;L,PROBLEM,name;L,LAYOUT,name;L,STEP,name;
L,typ,PROGRAM;L,typ,CHECK;L,typ,PICTURE;
Deletion of:Initialization blocksSubroutinePicture blockSTEP blockFunction algorithmTest algorithmLoop display
BI;GE,deviceno,protno;WE,type,no,elno,bitno,value;WE,type,no,elno:E,...
Copy screen contents to printerDevice selectionValue input during STEP test
Value input ... input value
END; End of NEMO operations
Summary of TML instructions
a) List of arithmetic comparison and condition operators
= = Equal to/ = Not equal to< = Smaller than or equal to> = Larger than or equal to< Smaller than> Larger than
There is always analog data to the left and right of the comparison operator.
b) List of logic comparison and condition operators
AND ConjunctionAND NOT Inverted conjunctionOR DisjunctionOR NOT Inverted disjunctionEQU EquivalenceEQU NOT Inverted equivalence
There are always binary values or binary results (of comparison operations) to the left or right of theoperator.
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 26
List of the TML data types
Data types (b=binary/a=analog) Extended notation Short notation
1. Local data LAx (x = 0 to 255)LBx (x = 0 to 255)
2. Global data GA.no.xGB.no.xGM.no.xGT.no.xTIME GT.no.xGA.LAy.xGB.LAy.xGM.LAy.xGT.LAy.xTIME GT.LAy.x(y = 0 to 255)
GAxGBxGMxGTxTIME GTxGAxGBxGMxGTxTIME GTx
3. Data from function block
type.no.elnatype.LAx.elnatype.no.elna (index)type.LAx.elna (index)(index = const, LAx, GAx)
.elna
.elna (index) 1)
(index = const, LAx, GAx,elna)
1)1)
ababbbaabbba
a/b
1) .elna(.elna) is only possible in abbreviated notation (pointer must first be set to the function block).
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 27
Data types (b=binary/a=analog) Meaning
4. Code Data types 1 – 3 with supplement ”:Bx” (x = 1 to 6) e.g. ”SUM.1.X1:B3”:B1 – address code:B2 – alarm code:B3 – value fault code:B4 – write protection:B5 – system–internal P code:B6 – K code (for system)
b
5. Basis addresses type.no/type.LAxGlobal blocksGA.no/GA.LAxGB.no/GA.LAxGM.no/GM.LAxGT.no/GT.LAx
TIME GT.no/TIME GT.LAx
6. Binary constants b 0B/1B
7. Analog constants a Numbers with decimal point and exponent8. Digital constants a Numbers without decimal point and without
exponent
9. Error cell ab
ERROR total inquiryERROR: Bx 0 ≤ x ≤ 15 individual inquiry:B0 – object busy:B1 – communication error:B3 – objects cannot be found:B4 – arithmetic error: division by zero:B5 – arithmetic error: floating point overflow:B6 – incorrect type for variable access:B7 – instruction cannot be executed:B8 – user–related error 1:B9 – user–related error 2:B10– storage error acknowledgement:B11 – addressing error in block:B12– PROM write protection violated:B13– code violated:B14– time–out:B15– restart
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 28
TML notation Meaning Parameterexplanation
D,RESTART,name;D,RESTART,name:no;D,PROBLEM,name;D,PROBLEM,name:no;D,type,PROGRAM;
Definition ofInitialization blockUser block with internal block numberSubroutineSubroutine with internal block numberUser function blockCheck blockD,type,CHECK;
TAKE p1,p2,...pn;GIVE q1,q2,...qn;
DE;
Parameter acceptanceReturn of parameters
End of definition
q = LAx, = LBxp = LAx, = LBx
no = 8 to 4094
no = 8 to 4094
ROUTINE(no);END ROUTINE;
Definition: internal subroutineStart of routine “no”End of routine “no”
no = 1 to 255
RETURN;/*comment*/;PAGE;FO;
General instructionsJump to DECommentPage changeCompression to full program pages
expression=:xy1=:xy2:..;Assignment instruction xy = variable
SET type.no;SET type.LAx
MUX GA.no;MUX GB.no;MUX GM.no;MUX GT.no;
MUX GA.LAx;MUX GB.LAx;MUX GM.LAx;MUX GT.LAx;
Basis address selectionData block directData block indirect
Global data block direct
Global data block indirect
IF comparison; orIF Boolean expression
THEN; :instructions :ELSE; :instructions :END IF;
Conditional jump instruction
TRUE branchcompare condition = 1
FALSE branchcompare condition = 0
End of jump instruction
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 29
TML notation Meaning Parameter explanation
type.no.elna=:GAx;type.no.elna=:LAx;
Direct variableaccess/analog data
type.no.elna(index)=:GAx;type.no.elna(index)=:LAx;.elna(index)=:GAx.elna(index)=:LAx
GA.no.elno=:GAxGA.no.elno=:LAx;
LAx=:LAy;const=:LAx;
ANW.8.AHA =: LA7index = const,GAx,LAx,elnaANW.8.FG(LA1) =: LA5
GA.23.155 =: LA4
95 =: LA6
1)
1)
type.no.elna=:LBx;type.no.elna=:GBx;type.no.elna=:GMx;
type.no.elna(index)=:LBx;type.no.elna(index)=:GBx;type.no.elna(index)=:GMx;
.elna(index)=:LBx;
.elna(index)=:GBx;
.elna(index)=:GMx;
GB.no.elno=:LBx;GM.no.elno=:GBx;GT.no.elno=:GMx;
LBa=:LBb=:GBc;const=:LBx;
Direct variable access/binary data
R.8.OG =: LB1;
index = const,GAx,LAx,elnaR.8.UG(LA1) =: GB5;
GM.88.123 =: GB33;
1B =: LB3;
Indirect variable as-signment
type.no=:LAx;––type.LAX.elna––––type.LAX.elna(index)––––.elna(index)––
GA.no=:LAy;––GA.LAy.elno––
GB.no=:LAx;GM.no=:LAx;GT.no=:LAx;––GB.LAx.elno––––GM.LAx.elno––––GT.LAx.elno––
GT.no=:LAx;––TIME GT.LAx.elno––
index = const,GAx,LAx,.elnaTEST.1 =: LA2;TEST.LA2.AH(LA1) =: LA3;GA.12 =: LA2;5 + GA.LA2.11 =: LA3
1)
1)1)
1)
1) .elna may not be used for index in this notation (pointer must first be set to the function block).
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 30
TML notation Meaning Parameter explanation
SEQUENCE analogvariable;STEP x1; :instructions :UNTIL booleanexpr;
WAIT; :instructions :STEP x2 :instructions :OUT; :instructions :END SEQUENCEx;VALUE assignmentinstr.;
Control step instructionControl step variableControl step x
Step is aborted ifcondition is not satisfied
Alternate step if no stepno. or no step conditionhas been satisfied
End of control stepProcessing of stepvariables
0 ≤ x ≤ 225
Subroutine callCALL PROBLEM.name;CALL STEP.name;CALL SYSTEM.name;CALL LAYOUT.name;GIVE p1,p2,...,pn; Parameter transfer p=
LAx/LBxGA.no.x:BxGB.no.x:BxGM.no.x:BxGT.no.x:BxTIME GT.no.xLAx:Bx
type.no.elna(index):Bxtype.LAx.elna(index):Bx
1)1)
ERROR:Bxconstanttype.noq=same as p but without:constant type.no
TAKE q1,q2,...,qn;
CALL ROUTINE(no);
Parameter acceptance
Internal subroutine call
Call of routine no. no = 1 to 255
1) .elna may not be used for index in this notation (pointer must first be set to the function block).
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 31
TML notation Meaning Parameter explanation
IF ERROR:Bx –––
–––.op.ERROR:Bx–––
––– =:ERROR:Bx
sw ERROR:Bx
ERROR–––
–––=:ERROR
IF ERROR/=0;
Error instructions
Inquiry of individual errors
Inquiry of all errors
.op. = AND NOTOR NOTEQU NOT
sw = IFGIVE (for CALL)TAKE (for CALL)
NOT xy –––
–––.op. NOT xy –––
sw NOT xy –––
Inverted binary variable
The following notations are notallowed:
NOT ERROR:BxNOT data codeNOT GT.name.no
xy = Binary variable
.op. = OR/OR NOT= AND/AND NOT= EQU/EQU NOT
sw = IF
DIG (analogvar.)–––DIG (analogexpr.)–––sw DIG (analogvar.)–––
sw DIG (analogexpr.)–––
Digitizing
The following notations are notallowed:
––– =: DIG (analogvariable/–expression)––––––.op.DIG (analogvariable/–expression)–––
sw = FROM= BY= TO= IF
type.no =:–––
GIVE type.no
Basis addresses
type= general blocktype GA/GB/GM/GT/TIME GT
no = block name
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 32
TML notation Meaning Parameter explanation
––.op.TIME GT.no.x––––.op.TIME GT.LAx.x––
sw TIME GT.no.x––sw TIME GT.LAx.x–––
–––=:TIME GT.no.x–––––=:TIME GT.LAx.x––
Global time variable
Time value
Values in seconds:0 ... 32767 s = 546 min = 9.1 h
.op. = + – * /= UND,ODR,XOR
sw = FROM,BY,TO,SEQUENCE,IFGIVE/TAKE (for CALL)
GT.no.x–––GT.LAx.x–––
–––.op.GT.no.x––––––.op.GT.LAx.x–––
sw GT.no.x–––sw GT.LAx.x–––
––– =: GT.no.x––– =: GT.LAx.x
Time status
The following notationsmay not be usedNOT GT.no.x––– –––.op. NOT GT.no.x–––sw NOT GT.no.x––––––=:NOT GT.no.x
.op. = OR NOTAND NOTEQU NOT
sw = IFGIVE/TAKE (for CALL)
TIME typ.no.elna(index)––– 1)
TIME typ.LAx.elna(index)–– 1)
––.op.TIME typ.no.elna(ind) 1)
––.op.TIME typ.LAx.elna(ind) 1)
sw TIME typ.no.elna(index) 1)
sw TIME typ.LAx.elna(index) 1)
–––=:TIME type.no.elna(ind) 1)
–––=:TIME type.LAx.elna(ind) 1)
General time variableTime value
index = const,LAx,GAx,.elna
.op. = : + – * /UND,ODR,XOR
sw = FROM,BY,TO,IF,SEQUENCE,DO,DIGGIVE/TAKE (for CALL)
type.no.elna(index)––– 1)
type.LAx.elna(index)––– 1)
–––.op. type.no.elna(ind) 1)
–––.op. type.LAx.elna(ind) 1)
sw type.no.elna(index) 1)
sw type.LAx.elna(index) 1)
–––=:type.no.elna(index) 1)
–––=:type.LAx.elna(index) 1)
Time status(as for binary variable)
index = const,LAx,GAx,.elna
.op. = OR NOTAND NOTEQU NOT
sw = IF,NOTGIVE/TAKE (for CALL)
1) .elna may not be used for index in this notation (pointer must first be set to the function block).
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 33
10.7.4 Summary of Image/Log Instructions
Image/log instructions Meaning
D,LAYOUT,name;
D,LAYOUT,name:no;
D,type,PICTURE;
/* comment */;
PAGE;
DE;
BILD,no; orBILD,ORPA;
K;
Definition of a new LAYOUT block
Definitionof a new LAYOUT block with internal block number; no = 8 to 4094
Definition of a new loop display block.
Comment
Page change
End of definition
Connecting block for LAYOUT test (due to multiplex parameters).“Picture representation”.
Return to 1st page of instruction list
KO,line,column;KO,GAx,GAy;KO,line,GAy;KO,GAx,column;
Select co–ordinates on VDU for the subsequent output instructions.Line: between 0 and 28/57Column: between 0 and 63/127
SET,type,no;
SET,type,*;
MUX,GA,no;MUX,GB,no;MUX,GM,no;MUX,GT,no;
Address presetting of the data block whose variables are to be out-put in the picture/log
Address presetting of the data block mentioned in the BILD/PROTblock or during selection of the loop display.
Address presetting to a GA–/GB–/GM–/GT data block
MUX,GA,*;MUX,GB,*;MUX,GM,*;MUX,GT,*;
Address presetting of a GA–/GB–/GM–/GT data block(multiplex parameters from BILD block).Not advisable for a loop display
Z1,elna;Z1,elna(index);Z1,GBx;Z1,GMx;Z1,GTx;
Z0;
ZE;
All subsequent output instructions refer to the ”1” state of the switchvariables ”elna”, ”GBx”, ”GMx”, ”GTx”index = const, GAx or elna
All subsequent output instructions refer to the “0” state of the switchvariables.
End of the Z1–/Z0 instruction block.
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 34
Image/log instructions Meaning
MO,elna(a:b:c,a:b:c);
MO,elna(index)(...MO,GBx(...
MO,GMxMO,GTx
Selecting the color mode for the subsequent outputs as afunction of the switch variables (0/1 states).
a = foreground color 0 = blackb = background color 1 = red
2 = green3 = blue4 = yellow5 = orange6 = cyan7 = white
c = foreground blinking (0 no, 1 yes)
VAR,elna,GLP;VAR,elna(index),GLP;VAR,GAx,GLP;VAR,GTx,GLP;
VAR,elna,FP:f:no;VAR,elna(index),FP:f:no;VAR,GAx,FP:f:no;VAR,GTx,FP:f:no;
VAR,elna,BI:f;VAR,elna(index),BI:f;VAR,GBx,BI:f;VAR,GMx,BI:f;VAR,GTx,BI:f;
VAR,elna,SX:f:no;VAR,elna(index),SX:f:no;
Output of an analog variable as floating point nunber and, ifnecessary, as exponentindex = const., GAx or elna
Output of a variable as fixed point number without exponent.f = number of character locations used including sign an
decimal point 1)no= number of characters after the decimal point
Output of a variable as binary valuef = number of character locations used
Output of a S2–/S4–/S16–/FC variable as character string f = number of character locations used
TXH,’textstring’;TXV,’textstring’;
SYH,nri,...,nrx;SYV,nri,...,nrx;
Output of a static horizontal text stringOutput of a static vertical text string
Output of a static horizontal string of symbolsOutput of a static vertical string of symbols
1) The sign “+” is not output with positive number if no = 0. Therefore, a positive number can be output by one decimal positiongreater than a negative number.
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 35
Image/log instructions Meaning
BVU,elna(n,e,l,b);BVU,elna(index)(n,e,l,b);BVO,elna(n,e,l,b);BVO,elna(index)(n,e,l,b);BHL,elna(n,e,l,b);BHL,elna(index)(n,e,l,b);BHR,elna(n,e,l,b);BHR,elna(index)(n,e,l,b);RVU,elna(n,e,l,b);RVU,elna(index)(n,e,l,b);RVO,elna(n,e,l,b);RVO,elna(index)(n,e,l,b);RHL,elna(n,e,l,b);RHL,elna(index)(n,e,l,b);RHR,elna(n,e,l,b);RHR,elna(index)(n,e,l,b);
GAx or GTx is possible instead ofelna or elna(index).
Output of a variable as:Bar from bottom to topBar from bottom to topBar from top to bottomBar from top to bottomBar from left to rightBar from left to rightBar from right to leftBar from right to leftLine from bottom to topLine from bottom to topLine from top to bottomLine from top to bottomLine from left to rightLine from left to rightLine from right to leftLine from right to left
n = home positione = end positionl = lengthb = width
UZ;DA;UZ,var1:var2;
DA,var3:var4;
Output of the current timeOutput of the current dateOutput of a buffered time (parameterization by SYSTEM.ZEIT)Output of a buffered date (parameterization by SYSTEM.ZEIT)var1 = Secondsvar2 = Minutes of the dayvar3 = Daily datevar4 = Yearly date(cf. Chapter SYSTEM.ZEIT)with var1, var2, var3, var4 = elna, elna(index) or any GAx.
UP,PROBLEM,name; Activating a TML subroutine of the PROBLEM typeAutomatic parameter transfer:– for PICTURE: current data record– for LAYOUT: the multiplex parameters of the calling BILDor PROT block in the following sequence: GAX, GBX,GMX,GTX, DSXThe subroutine must use the TAKE instructions to acceptthe parameters.
MUX,GB,ORPA; Pointer presetting to ’system data block’.
Set by the system for one cycle in ZYK4:
GB205 for loop display selectionGB206 for group display selectionGB207 for area display selectionGB208 for overview display selectionGB209 initialization code during image selection
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 36
10.7.5 STEP M Instruction Set (Listed in Tabular Form)
The following list contains the possible STEP M instructions. It is structured according to the follo-wing features:
– General configuration instructions/page change– Hardware inputs/outputs– Flags– Timers– General block outputs– STEP block outputs– Parenthesis– Negation/NO–operation– Branch/subroutine call
Summary of STEP M instructions
General configuration instructions
STEP M instruction Meaning Meaning
for AS 220 operand range for AS 230 operand range
D,STEP,name;
D,STEP,name:no;no=8...4094
/*comment*/PAGE;DE;
Definition of a new STEP M pro-gram blockDefinition of a new STEP M pro-gram block with fixed internal blocknumber
CommentPage changeEnd of definition
Definition of a new STEP M pro-gram blockDefinition of a new STEP M pro-gram block with fixed internal blocknumber
CommentPage changeEnd of definition
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 37
Hardware Inputs/outputs
STEP M instruction
Meaning for AS 220operand range
Meaning for AS 230operand range
GB,no;2)
GB,*;2)
UE,no;
OE,no;
UNE,no;
ONE,no;
=A,no;
SA,no;
RA,no;
–––
–––
No. of AND inputno = 0 to 2047No. of OR inputno = 0 to 2047No. of NAND inputno = 0 to 2047No. of NOR inputno = 0 to 2047No. of ASSIGN outputno = 0 to 1023No. of SET outputno = 0 to 1023No. of RESET outputno = 0 to 1023
Multiplex instruction. Any GB data recordcan be addressed, including ”GB,1 toGB,8”.Subsequent instructions for interconnectionof hardware inputs/outputs refer to the datarecord specified.
Multiplex instruction. The GB data recordspecified in the VS/KS data record is addres-sed.Subsequent instructions for interconnectionof hardware inputs/outputs refer to the datarecord specified.
No. of AND input/outputno = 0 to 255No. of OR input/outputno = 0 to 255No. of NAND input/outputno = 0 to 255No. of NOR input/outputno = 0 to 255No. of ASSIGN outputno = 0 to 255No. of conditional SET output 1)no = 0 to 255No. of conditional RESET output 1)no = 0 to 255
1) Conditional instruction: This instruction is only executed if the result of the last instruction is “1”.
2) An AS 220 operand range can no longer be set if the first command of a STEP program is a multiplex command.A multiplex command can no longer be input if the first command is no multiplex command.
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 38
External/internal flags
STEP M instruction
Meaning for AS 220operand range
Meaning for AS 230operand range
GM,no;2)
GM,*;2)
UM,no;
OM,no;
UNM,no;
ONM,no;
=M,no;
SM,no;
RM,no;
Internal flags:no = 0 ... 15External flags:no = 16 ... 2047
–––
–––
No. of AND flagno = 0 to 2047No. of OR flagno = 0 to 2047No. of NAND flagno = 0 to 2047No. of NOR flagno = 0 to 2047No. of ASSIGN flagno = 0 to 2047No. of SET flagno = 0 to 2047No. of RESET flagno = 0 to 2047
Only external flags in AS 230 operand range
Multiplex instruction. Any GM data recordcan be addressed, including ”GM,1 toGM,8”. Subsequent instructions for interconnectionof flags refer to the data record specified.
Multiplex instruction. The GM data recordspecified in the VS/KS data record is ad-dressed.Subsequent instructions for interconnectionof flags refer to the data record specified.
No. of AND flagno = 0 to 255No. of OR flagno = 0 to 255No. of NAND flagno = 0 to 255No. of NOR flagno = 0 to 255No. of ASSIGN flagno = 0 to 255No. of conditional SET flag 1)no = 0 to 255No. of conditional RESET flag 1)no = 0 to 255
1) Conditional instruction: This instruction is only executed if the result of the last instruction is “1”.
2) An AS 220 operand range can no longer be set if the first command of a STEP program is a multiplex command.A multiplex command can no longer be input if the first command is no multiplex command.
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 39
Timer
STEP Minstruction
Meaning for AS 220operand range
Meaning for AS 230operand range
GT,no;2)
GT,*;2)
UT,no;
OT,no;
UNT,no;
ONT,no;
SVT,no;
RT,no;
–––
–––
Timer states in AS 235 are automati-cally NANDed as they are comple-mentary to AS 220––––––––––––––––––––––––––––
No. of AND timer. UNT,no;no = 0 to 95No. of OR timer ONT,no;no = 0 to 95No. of NAND timer UT,no;no = 0 to 95No. of NOR timer OT,no;no = 0 to 95START of timer no. SVT,no;no = 0 to 95RESET of timer no. RT,no;no = 0 to 95
Multiplex instruction. Any GT data recordcan be addressed, including ”GT,1”. Subsequent instructions for interconnec-tion of timers refer to the data record spe-cified.
Multiplex instruction. The GT data recordspecified in the VS/KS data record is ad-dressed. Subsequent instructions for interconnectionof timers to the data record specified.
No. of AND timerno = 0 to 255No. of OR timerno = 0 to 255No. of NAND timerno = 0 to 255No. of NOR timerno = 0 to 255Conditional START of timer no. 1)no = 0 to 255Conditional RESET of timer no. 1)no = 0 to 255
1) Conditional instruction: This instruction is only executed if the result of the last instruction is “1”.
2) An AS 220 operand range can no longer be set if the first command of a STEP program is a multiplex command.A multiplex command can no longer be input if the first command is no multiplex command.
Caution: The instruction ”SVT,timer” disables the timer concerned. Further access to this timer (i.e. a new “SVT instruction”) is only possible after this timer has been re–enabled by thereset instruction ”RT,timer”.
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 40
Assignments of the timer codes
Bit no. in timer :B0 :B4 :B3Status code Write protect
codeFault code
in AS 230 mode
in AS 220mode
after TIMER definition
when TIMER has been reset
when TIMER is running
when TIMER has elapsed
1
1
0
1
0
0
1
0
0
0
1
1
1
0
0
0
Loading the time value
STEP M instruction Meaning
LT,value;
LMT,value;
LW,type,no,elna;
LW,type,*,elna;
Load time in seconds; value = 0 ... 32767 (9.1 h)
Load time in minutes; value = 0 ... 546 (9.1 h)
Load time in seconds from data record; 1)type = BLOCK NAMEno = DATA RECORD NAMEelna = TIME VARIABLE
Load time in seconds from the data record specified in VS/KS parameterization 1)type = BLOCK NAMEelna = TIME VARIABLE
1) Only parameters of types AT, ETV and PGT are valid
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 41
General block parameter
STEP M instruction Meaning
UB,type,no,elna;
OB,type,no,elna;
UNB,type,no,elna;
ONB,type,no,elna;
UB,type,*,elna;
OB,type,*,elna;
UNB,type,*,elna;
ONB,type,*,elna;
AND block; type = BLOCK TYPEno = BLOCK NAMEelna = NAME OF BINARY INPUT/OUTPUT
OR block
NAND block
NOR block
AND block as specified in VS/KS parameterization
OR block as specified in VS/KS parameterization
NAND block as specified in VS/KS parameterization
NOR block as specified in VS/KS parameterization
VS/KS block outputs
STEP M instruction Meaning
=B,no; 2)
:B,no; 2)
SB,no; 2)
RB,no; 2)
Assignment VS/KS block output no. Set first inquiry
Assignment VS/KS block output no.
Set VS/KS block output no.,conditional 1)
Reset VS/KS block output no., conditional 1)
Parenthesis open/closed
STEP M instruction Meaning
U(;
O(;
);
AND parenthesis open
OR parenthesis open
Parenthesis closed; max. nesting depth: 20
1) Conditional instruction: This instruction is only executed if the result of the last instruction is “1”.
2) no = 1 to 4
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 42
Negation/No operation
STEP M instruction Meaning
NEG;
NOP;
Negation of the preceding result of a logical operation
No Operation (dummy instruction)
Forward jump/subroutine jump (all parentheses must be closed)
STEP M instruction Meaning
SPA,value;
SPB,value;
UP,PROBLEM,name;
UP,STEP,name;
Unconditional jump forwards;value = number of skipped lines;value = 0 to 255, without PAGE
Conditional jump forwards;value = 0 to 255, without PAGE
Calling a TML subroutine of the PROBLEM type;Automatic transfer of the multiplex parameter from the calling VS/KSblock in the following sequence: dedicated VS/KS block and the para-meters from GAX, GBX, GMX, GTX, DSX.The subroutine must accept the parameters using a TAKE instruction.
Calling a STEP subroutine of the STEP type.Automatic transfer/acceptance of the multiplex parameter from thecalling VS/KS block.
Caution: Data records of the AS 230 operand range must be addressed with multiplex commands after a subroutine call.
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 43
10.7.6 Subroutine Calls/Subroutine Definition
Calling program type Subroutine call Subroutine definition
STEP
STEP
LAYOUT
PICTURE
UP,PROBLEM,name;
UP,STEP,name;
UP,PROBLEM,name;
UP,PROBLEM,name;
D,PROBLEM,name;TAKE LA1,...,LA6;LA1 = VS/KS data recordLA2 = GA.xLA3 = GB.xLA4 = GM.xLA5 = GT.xLA6 = general data record
D,STEP,name;
D,PROBLEM,name;TAKE LA1,...,LA5;LA1 = GA.xLA2 = GB.xLA3 = GM.xLA4 = GT.xLA5 = general data record
D,PROBLEM,name;TAKE LA1;LA1 = current data record
TML
RESTARTPROBLEMPROGRAMCHECK3)
1B=:LBx; 2) (see note)CALL STEP.name;GIVE LA1,...,LA6;TAKE LB1;
LA1 = VS/KS data recordLA2 = GA.xLA3 = GB.xLA4 = GM.xLA5 = GT.xLA6 = general data record
D,STEP,name; 1)
TML CALL PROBLEM.name;User–defined parameter transfer/acceptance
D,PROBLEM,name;
Parameter transfer/acceptance according to call
TML CALL ROUTINE(no);no parameter transfer/acceptance no = 1 to 255
ROUTINE (no);
no parameter transfer/acceptanceno = 1 to 255
1) A STEP program can only be tested together with a VS/KS block.(VKE and STATUS output on VDU)
2) STEP cannot be tested directly if it is used as a subroutine of a TML program.
3) A CHECK program must not be called by another program.
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 44
Calling program type Subroutine call Subroutine definition
TML CALL RESTART.name;GIVE LA0,LB0;
Call is made for all RESTARTblocks from the system initia-lization program.
D,RESTART,name;TAKE LA0,LB0;
LA0 = 0: Restart after BAU/NAU/ZRS= 1: Start after clearing= 2: Start after loading= 3: Start after RSOF
if LA0 = 0 and
GB.ORPA.17 = 1B then BAU= 0B then NAU
LB0 corresponds to GB.ORPA.17
Note: The ’binary accumulator’ must be preset with 1B prior to calling a STEP M program from a TML program. If it is not, the correct function of the STEP M program will depend on the random data in the accumulator at the time when the call is made.
Notation :::
1B = : LBx;CALL STEP.name;
::
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 45
P2 = Error code0B = Block has been called1B = Block cannot be found
P5 = Valid status word after subroutine call
P6 = Binary value for the bus status0B = Transfer to status buffer o.k.1B = Status buffer full
P4 = Current data record
P1 = internal group display location number(NRPL)
P2 = old status word from data record (STAT)
P3 = new status word (STAT)
P1 = Time part in 1/256 seconds
P2 = Time part in minutes (daily min.)
P3 = Time part in minutes (weekly min.)
P4 = Day (days of the year)
P5 = Year
SYSTEM.ZEIT
Current time anddate parameters toTML program
CALL SYSTEM.ZEIT;TAKE P1,P2,P3,P4,P5;
CALL SYSTEM.SYB6;GIVE P1;TAKE P2;
CALL SYSTEM.STAT;GIVE P1,P2,P3,P4;TAKE P5,P6;
SYSTEM.SYB6
Call of an internalstandard functionblock
P1 = Data record addressof a function blockwith on line algorithm
SYSTEM.STAT
Output of statusword from userfunction block tobus and group dis-play
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 46
P2 = Old group display/location no. parametersfrom NRPL
CALL SYSTEM.GPUP;GIVE P1,P2,P3;TAKE P4,P5;
CALL SYSTEM.PZEI;GIVE P1;TAKE P2,P3,P4,P5,P6,P7;
SYSTEM.GPUP
SYSTEM.PZEI
P3 = Switch variable0B = all cases except
clear record1B = Clear record
P1 = Entered group display/location no. parameters from SL.PCHE.ANAW
P4 = Internal representation of the group display/location no. entered in NRPL
P5 = Return data0B = Correct job execution1B = Fault in subroutine
Job not executed
Conversion fromgroup display/location no. (NRPLelement) into internal representation(NRGP element)
P1 = User message bufferdata record address
Pointer administra-tion of the user mes-sage buffersSTRT.MEAPSTRT.STAPSTRT.BEAPTime conversion inindividual parts
P2 = Return data0B = Message frame buffer
empty. Invalid transfer parameter
1B = Pointer advanced by one message frame. Valid transfer parameter.
P7 = Transmitting system device code
0 : Reserve1 : OS 2502 : AS 2203 : Reserve4 : AS 230/AS 2355 : AS 231/MS 2366 : OS 252/2627 : Reserve
P6 = Message frame time (millisec.)
P5 = Message frame time (seconds)P4 = Message frame time (minutes)P3 = Message frame time (hours)
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 47
CALL SYSTEM.FNKT;
GIVE P1,P2,P3,P4,P5; (not all required)
Take P6,P7,P8,P9; (not all required)
P1 P2 P3 P4 P5 Function P6 P7 P8 P9
1 X y = SQRT(x) y
2 X y = LN(x) y
3 X Y = ex y
4 TargetSETaddress
Internal tar-get parame-ter no.
Index 1characterin target
Source Write 4 charactersinto Sn string 1)
5 SourceSET ad-dress
Internalsource para-meter no.
Index of1st cha-racter tobe fetchedfromsource
Fetch 4 charactersfrom Sn string 1)
4 fetchedcharactersin S4 repre-sentation
6 Input value S4string
ASCII–decimal con-version
Analognumberoutput
Error code“1” = error
7 Input(number) Convert decimal num-ber into S4 string S4 stringoutput Error code“1” = error
8 Input (SETaddress) Convert SET addressinto external blockname
Output (ex-ternal blockname in S4format)
not relevant
Output (in-ternalblock no.)
Output (in-ternal pa-rameterno.)
9 Input (SETaddress) Convert SET addressinto external blockname
Output (ex-ternal blockname in S4format)
10 Set system to offlinemode
11 Set system to onlinemode
12 Analogvariable Target SETaddress Internalparameterno. of tar-get
Numberrepresen-tation
ASCII output of num-bers in character field Error code
1) Sn must have at least 4 characters as target index.
Character/number
conversion byinternal functions
SYSTEM.FNKT
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 48
CALL SYSTEM.SUBR;
GIVE P0,P1,P2,P3,P4,P5; (not all required)
TAKE P6,P7,P8,P9; (not all required)
SYSTEM.SUBR
Character/number
conversion byinternal
functions
P0 P1 P2 P3 P4 P5 Function P6 P7 P8 P9
2 Minutes ofthe week Seconds Setting the time Return data1B=Ok
4 Day of theyear Year Setting the date Return data1B=Ok
6 Minutes ofthe week Seconds Day oftheyear
Year Synchronous settingof time and date
Return data1B=Ok
8 Determine internal system time not relevant Hour ofthe day Minute ofthe hour Secondsof the mi-nute
10 Determine internal system date not relevant Day ofthemonth
Month Year
14 SET ad-dress ofsearchstartingblock
Search next occupiedblock in type
Return data1B = additio-nal blockfound
BlockSET ad-dress
16 Typename(S4)
Blockname(S4)
Type/block/name (S4)SET addressconversion
Return data1B = blocktype exists
BlockSETaddress
18 SETaddress Convert SET addressinto external type/block name
Return data1B = validname
Typename(S4)
Blockname(S4)
20 Block SETaddress Internalelementnumber
not re-levant
not re-levant
Requiredstatus of Ccode, 1Bcode set.
Set/reset C code inelement 1)
Return data1B = func-tion hasbeenexecuted
22 Block SETaddress Internalelementnumber
not re-levant
not re-levant
Requiredstatus of Bcode, 1Bcode set.
Set/reset B code inelement 1)
Return data1B = func-tion hasbeen execu-ted
1) Only permitted for user function block
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 49
CALL SYSTEM.WRIT;
GIVE P1,P2,P3,P4,P5; (not all required)
P1 P2 P3 P4 P5 Output type1 Number to beoutput Total num-ber of digits Number ofdigits after
decimalpoint
Fixed point number output
2 Number to beoutput Floating point number output
3 FC block SETaddress Index of 1stcharacter tobe output
Total num-ber of digits
Charactersto be output
Output of characters from FC field
4 Characters(S2 represen-tation) to beoutput
Output of 2 characters from LAx
5 Block SETaddress Output type and block name
6 Block SETaddress Output type name
7 Block SETaddress Output block name
8 Clear screen
9 Block SETaddress internalelement number
Output element name
10 Block SETaddress internalelement number
Output type, block and element name
15 Block SETaddress internalelement number
Output type and block name
16 Block SETaddress internalelement number
Output type name
17 Block SETaddress internalelement number
Output block name
20 Block SETaddress internalelement number
Output type, block and element name
SYSTEM.WRIT
Extension ofLAYOUT/PICTURE
instructions
-
Appendix AS 235 System Software
� Siemens AG 1992 C79000–T8076–C416 E2 10 – 50
CALL SYSTEM.BPBT;GIVE P1,P2;TAKE P3;
1.CALL SYSTEM.SFE; GIVE P1; TAKE P4;2.CALL SYSTEM.SFE; GIVE P1,P2,P3; TAKE P4;
SYSTEM.BPBT
SYSTEM.SFE
P1 = Error numberP2 = Message text 1 (S4)P3 = Message text 2 (S4)
Case 1: Error number only
P1 = Error number
Case 2: Error number and message text
PBT labelling in“BE” mode
System errormessage output(I&C alarms)
P3 = BE mode1B = BE has beenselected
Case 1: P1 > 0 Internal elementnumber enteredin the 1stposition
Case 2: P1 = 0 Scrolling as with“TE” input
Case 3: P1 < 0 No PBT labelingcheck for BE mode
P2 = Operator position
Calling SYSTEM.BPBT has the same effect as a TE input.
P4 = Binary error code0B = buffer full
-
�������;�����������������
�� Siemens AG 1992 C79000–T8076–C416 E2 10 – 51
1) The computing time for copying a block depends on the size of the block and can be several 100 ms.
P5 = Error code operator station 2
CALL SYSTEM.PBIL;GIVE P1,P2,P3;TAKE P4,P5;
Caution: Enter previous SET value after program has been executed.
SYSTEM.PBIL
Program–controlledoutput of a PICTUREto operator station 1or 2
P1 = Block SET address
P2 = Operator station code0 No output1 Operator station 12 Operator station 23 Operator stations 1 + 2
P3 = BE code
P4 = Error code operator station 1
P6 = Error code0B = Job terminated1B = Parameter access error
CALL SYSTEM.S16V;GIVE P1,P2,P3,P4;TAKE P5,P6;
P1 = SET address of block AP2 = Int. param. no. of
S16 in A block
P3 = SET address of block B
P4 = Int. param. no. ofS16 in B block
P5 = Comparison result1B = Strings are identical0B = Strings are not identical
Comparing two S16strin