Schneider Electric PL7 Micro/Junior/Pro - Appendices Reference manual
Reklama
Reklama
Reference manual
PL7Micro/Junior/Pro
Appendices
TLX DR PL7 xxE eng
2
Related Documentation
Related Documentation
At a Glance This manual is made up of three volumes: l Volume 1: Description of the PL7 software l General l l
Ladder language
Instruction List language
Structured Text language l l l
Grafcet language
DFB function blocks l l Functional modules
Volume 2: Detailed description of the instructions and functions l l Basic instructions l Advanced instructions l Bit objects and system words
Volume 3: Appendices l l l
Differences between PL7-2/3 and PL7-Micro/Junior
Checklist
List of reserved words
In conformance with the IEC standard 1131-3 l l l
OLE Automation server
Performance characteristics
TLX DR PL7 xxE
3
Related Documentation
4
TLX DR PL7 xxE
Table of Contents
About the book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 1
Differences between PL7-2/3 and PL7 Micro/Junior . . . . . . . . 11
Chapter 2
Memory aids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5
6
Chapter 3
Reserved words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Chapter 4
Compliance with IEC standard 1131-3 . . . . . . . . . . . . . . . . . . . 55
Chapter 5
OLE Automation Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.1
OLE Automation server operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.2
Accessing the PL7 OLE Automation server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.3
Chapter 6
Instruction times. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
6.1
6.2
Boolean instruction performance characteristics. . . . . . . . . . . . . . . . . . . . . . . . 129
Instructions on the program and monitoring structures . . . . . . . . . . . . . . . . . . . 138
Instructions on tables of words, double words and floating points . . . . . . . . . . 144
6.3
Boolean instruction performance characteristics. . . . . . . . . . . . . . . . . . . . . . . . 160
Instructions on the program and monitoring structures . . . . . . . . . . . . . . . . . . . 172
Instructions on tables of words, double words and floating points . . . . . . . . . . 178
7
8
6.4
Review of the memory usage of the modules on MIcro. . . . . . . . . . . . . . . . . . . 203
Memory usage for the modules on Premium . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Method for calculating the number of instructions . . . . . . . . . . . . . . . . . . . . . . . 225
Index
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
About the book
At a Glance
Document Scope This manual gives additional information for programming Micro, Premium and
Atrium PLCs.
Validity Note This publication has been updated to incorporate the functions of PL7 V4.3.
However, previous versions of PL7 can still be implemented.
Revision History
Rev. No.
1
2
Changes
First version
For PL7 V4.3
User Comments We welcome your comments about this document. You can reach us by e-mail at
TLX DR PL7 43F
9
About the book
10
TLX DR PL7 43F
Differences between PL7-2/3 and
PL7 Micro/Junior
1
Introduction
Contents of this section
This section describes the differences in objects and instructions between PL7-2/
PL7-3 software and PL7 Micro/PL7 Junior software
What's in this
Chapter?
This Chapter contains the following Maps:
Topic
Immediate values and labels
Bits
Words
Function blocks
Bit and word tables
Optional function blocks
Instructions
Delimiters
Page
11
TLX DR PL7 xxE
PL7-2/3 and PL7 Micro/Junior difference
Immediate values and labels
Immediate values
Objects
Base 10 integer
Base 2 integer
Base 16 integer
Floating point
Character string
Table showing differences between PL7-2/3 and PL7-Micro/Junior
PL7-2/3
1234
L’10011110’
H’ABCD’
-1.32e12
(PL7-3)
M’aAbBcC’
PL7 Micro/Junior
1234
2#10011110
16#ABCD
-1.32e12
‘aAbBcC’
Labels
Objects
Label
Table showing differences between PL7-2/3 and PL7-Micro/Junior
PL7-2/3
Li i = 0 to 999
PL7 Micro/Junior
%Li i = 0 to 999
12
TLX DR PL7 xxE
PL7-2/3 and PL7 Micro/Junior difference
Bits
Input bits in rack Table showing differences between PL7-2/3 and PL7-Micro/Junior
Objects
Input bit in rack
Input bit in an indexed rack
Remote input bit
Indexed remote input bit
PL7-2/3
Ixy,i
Ixy,i(Wj) (PL7-3)
RIx,y,i (PL7-3)
RIx,y,i(Wj) (PL7-3)
PL7 Micro/Junior
%Ixy.i
%Ixy.i[%MWj]
%I\chemin\mod.voie
-
Output Bits in rack
Table showing differences between PL7-2/3 and PL7-Micro/Junior
Objects
Output Bit in rack
Output Bit in indexed rack
Remote output bit
Indexed remote output bit
PL7-2/3
Oxy,i
Oxy,i(Wj) (PL7-3)
ROx,y,i (PL7-3)
ROx,y,i(Wj) (PL7-3)
PL7 Micro/Junior
%Qxy.i
%Qxy.i[%MWj]
%Q\chemin\mod.voie
-
I/O error bits in rack
Objects
Module error bit
Channel bit
Table showing differences between PL7-2/3 and PL7-Micro/Junior
PL7-2/3
Ixy,S / Oxy,S
-
PL7 Micro/Junior
%Ixy.MOD.ERR
%Ixy.i.ERR
Remote I/O error bit
Table showing differences between PL7-3 and PL7-Micro/Junior
Objects
Module error bit
Channel bit output channel tripped bit output channel reactivation bit
PL7-3 (only)
-
RDx,y,i/ERRORx,y,i
TRIPx,y,i
RSTx,y,i
PL7 Micro/Junior
%I\chemin\mod.MOD.ERR
%I\chemin\mod.voie.ERR
-
-
TLX DR PL7 xxE
13
PL7-2/3 and PL7 Micro/Junior difference
Internal bits and system bits
Objects
Internal bit
Indexed internal bit
System bit
Table showing differences between PL7-2/3 and PL7-Micro/Junior
PL7-2/3
Bi
Bi(Wj) (PL7-3)
SYi
PL7 Micro/Junior
%Mi
%Mi[%MWj]
%Si
Step bits Table showing differences between PL7-2/3 and PL7-Micro/Junior
Objects
Step bit
Macro-step bit
Step i bit of macro-step j
Input step bit of macro-step j
Output step bit of macro-step j
PL7-2/3
Xi
XMj (PL7-3)
Xj,i (PL7-3)
Xj,I (PL7-3)
Xj,O (PL7-3)
PL7 Micro/Junior
%Xi
%XMj
%Xj.i
%Xj.IN
%Xj.OUT
Word bits
Objects
Bit j of internal word i
Bit j of indexed internal word i
Bit j of constant word i
Bit j of indexed constant word i
Bit j of register i
Bit k of common word j of station i
Bit j of system word i
Table showing differences between PL7-2/3 and PL7-Micro/Junior
PL7-2/3
Wi,j
Wi(Wk),j (PL7-3)
CWi,j
CWi(Wk),j (PL7-3)
IW/OWxy,i,j
COMi,j,k
COMXi,j,k (X = B, C, D)
SWi,j
PL7 Micro/Junior
%MWi:Xj
%MWi[%MWk]:Xj
%KWi:Xj
%KWi[%MWk]:Xj
%IW/%QWxy.i:Xj
%NWi.j:Xk
%NXWi.j:Xk
%SWi:Xj
14
TLX DR PL7 xxE
PL7-2/3 and PL7 Micro/Junior difference
Words
Internal words Table showing differences between PL7-2/3 and PL7-Micro/Junior
Objects
Single length internal word
Indexed single length internal word
Double length internal word
Indexed double length internal word
Real internal word
Indexed real internal word
PL7-2/3
Wi
-
-
Wi(Wj) (PL7-3)
DWi (PL7-3)
DWi(Wj) (PL7-3)
PL7 Micro/Junior
%MWi
%MWi[%MWj]
%MDi
%MDi[%MWj]
%MFi
%MFi[%MWj]
Constant words Table showing differences between PL7-2/3 and PL7-Micro/Junior
Objects
Single length constant word
PL7-2/3
CWi
Indexed single length constant word
Double length constant word
CWi(Wj)
CDWi (PL7-3)
Indexed double length constant word CDWi(Wj) (PL7-3)
Real constant word
Indexed real constant word
-
-
PL7 Micro/Junior
%KWi
%KWi[%MWj]
%KDi
%KDi[%MWj]
%KFi
%KFi[%MWj ]
Register words Table showing differences between PL7-2/3 and PL7-Micro/Junior
Objects
Single length input register word
Double length input register word
Single length output register word
Double length output register word
Remote input register word
Remote output register word
PL7-2/3
IWxy,i
-
OWxy,i
-
RIWx,y,i (PL7-3)
ROWx,y,i (PL7-3)
PL7 Micro/Junior
%IWxy.i
%IDxy.i
%QWxy.i
%QDxy.i
%IW\chemin\mod.voie
%QW\chemin\mod.voie
TLX DR PL7 xxE
15
PL7-2/3 and PL7 Micro/Junior difference
Other words Table showing differences between PL7-3 and PL7-Micro/Junior
Objects
System word
Common word j of station
Status word from a remote discrete module
Status word from a remote discrete module channel
PL7-3 (only)
SWi
COMi,j COMXi,j (where
X=B,C,D)
STATUSAx,y,i (PL7-3)
STATUSBx,y,i (PL7-3)
STSx,y,i (PL7-3)
PL7 Micro/Junior
%SWi
%NW{i}j %NW{[r.]i}j r= network number
-
%IW\chemin\mod.voie.ERR
16
TLX DR PL7 xxE
PL7-2/3 and PL7 Micro/Junior difference
Function blocks
Timer
Objects
Address
Preset value (word)
Current value (word)
Timer running (bit)
Timer elapsed (bit)
Table showing differences between PL7-2/3 and PL7-Micro/Junior
PL7-2/3
Ti
TI,P
Ti,V
Ti,R
Ti,D
PL7 Micro/Junior
%Ti
%Ti.P
%Ti.V
%Ti.R
%Ti.D
Monostable Table showing differences between PL7-2/3 and PL7-Micro/Junior
Objects
Address
Preset value (word)
Current value (word)
Monostable running (bit)
PL7-2/3
Mi
Mi,P
Mi,V
Mi,R
PL7 Micro/Junior
%MNi
%MNi.P
%MNi.V
%MNi.R
Up/Down
Counter
Table showing differences between PL7-2/3 and PL7-Micro/Junior
Objects
Address
Preset value (word)
Current value (word)
Counting overrun (bit)
Preset achieved (bit)
Down counting overrun (bit)
PL7-2/3
Ci
Ci,P
Ci,V
Ci,E
Ci,D
Ci,F
PL7 Micro/Junior
%Ci
%Ci.P
%Ci.V
%Ci.E
%Ci.D
%Ci.F
TLX DR PL7 xxE
17
PL7-2/3 and PL7 Micro/Junior difference
Register
Objects
Address
Input word (word)
Output word (word)
Full register (bit)
Empty register (bit)
Table showing differences between PL7-2/3 and PL7-Micro/Junior
PL7-2/3
Ri
Ri,I
Ri,O
Ri,F
Ri,E
PL7 Micro/Junior
%Ri
%Ri.I
%Ri.O
%Ri.F
%Ri.E
Text Block
Objects
Address
Table showing differences between PL7-2/3 and PL7-Micro/Junior
PL7-2/3
TXTi
PL7 Micro/Junior
No text block
Drum Table showing differences between PL7-2 and PL7-Micro/Junior
Objects
Address
Number of active steps (word) activity time of the current step (word)
16 order bits (word)
Final step in progress (bit)
PL7-2
Di (PL7-2)
Di,S
Di,V
Di,Wj
Di,F
PL7 Micro/Junior
%DRi
%DRi.S
%DRi.V
%DRi.Wj
%DRi.F
Fast Counter/
Timer
Objects
Address
Preset value (word)
Current value (word)
External reset (bit)
Preset achieved (bit)
Counting running (bit)
Table showing differences between PL7-2 and PL7-Micro/Junior
PL7-2
FC (PL7-2)
FC,P
FC,V
FC,E
FC,D
FC,F
-
-
-
PL7 Micro/Junior
-
-
-
18
TLX DR PL7 xxE
PL7-2/3 and PL7 Micro/Junior difference
Real time clock Table showing differences between PL7-2 and PL7-Micro/Junior
Objects
Address
"WEEK" or "YEAR" type day selection MTWTFSS (word)
Starting setpoint (word)
End setpoint (word)
Current value < setpoint (bit)
Current value = setpoint (bit)
Current value > setpoint (bit)
<
=
>
PL7-2
H (PL7-2)
VD
BGN
END
-
-
-
-
-
PL7 Micro/Junior
-
-
TLX DR PL7 xxE
19
PL7-2/3 and PL7 Micro/Junior difference
Bit and word tables
Bit strings
Objects
Internal bit string
Input bit string
Output bit string
Grafcet step bit string
Macro-step bit string
Table showing differences between PL7-2/3 and PL7-Micro/Junior
PL7-2/3
Bi[L]
Ixy,i[L] (PL7-3)
Oxy.i[L] (PL7-3)
Xi[L] (PL7-3)
XMi[L] (PL7-3)
PL7 Micro/Junior
%Mi:L
%Ixy.i:L
%Qxy.i:L
%Xi:L
-
Character strings
Objects
String
Table showing differences between PL7-2/3 and PL7-Micro/Junior
PL7-2/3
-
PL7 Micro/Junior
%MBi:L (with i pair)
Word tables Table showing differences between PL7-2/3 and PL7-Micro/Junior
Objects
Internal word table
Indexed internal word table
Double internal word table
Indexed double internal word table
Constant word table
Indexed constant word table
Constant double word table indexed double constant word table
Real table
Indexed real table
Constant real table
Indexed constant real table
Remote input element table
Remote output element table
Indexed remote input element table
Indexed remote output element table
PL7-2/3
Wi[L]
Wi(Wj)[L]
DWi[L] (PL7-3)
DWi(Wj)[L] (PL7-3)
CWi[L]
PL7 Micro/Junior
%MWi:L
%MWi[%MWj]:L
%MDi:L
%MDi[%MWj]:L
%KWi:L
CWi(Wj)[L] %KWi[%MWj]:L
-
-
CDWi[L] (PL7-3)
CDWi(Wj)[L] (PL7-3)
%KDi:L
%KDi[%MWj]:L
%MFi:L
%MFi[%MWj]:L
-
-
RIx,y,i[L]
ROx,y,i[L]
(PL7-3)
(PL7-3)
%KFi:L
%KFi[%MWj]:L
RIx,y,i(Wj)[L] (PL7-3) -
ROx,y,i(Wj)[L] (PL7-3) -
-
-
20
TLX DR PL7 xxE
PL7-2/3 and PL7 Micro/Junior difference
Optional function blocks
OFB Table showing differences between PL7-3 and PL7-Micro/Junior
Objects
Address
OFB Element
Indexed OFB Element
OFB element table
Indexed OFB element table
PL7-3 (only)
< OFB >i
< OFB >i , <element>
< OFB >i , <element> (Wj)
< OFB >i , <element> [L]
< OFB >i , <element> (Wj)[L]
-
-
-
PL7 Micro/Junior
-
-
TLX DR PL7 xxE
21
PL7-2/3 and PL7 Micro/Junior difference
Instructions
Bit instructions
Objects
Logical inversion
AND
OR
Exclusive OR
Rising edge
Falling edge
Set to 1
Set to 0
Table showing differences between PL7-2, PL7-3 and PL7-Micro/Junior
PL7-2
-
AND
OR
XOR
-
-
-
-
*
+
-
PL7-3
NOT
RE
FE
SET
RESET
PL7 Micro/Junior
NOT
AND
OR
XOR
RE
FE
SET
RESET
Word and double word instructions
Objects
Addition
Subtraction
Multiplication
Division
Comparison
Remainder of a division
Square root
Absolute value logical AND logical OR exclusive logical OR
Logical complement
Incrementation
Decrementation
Logical shift left
Logical shift right
Rotate shift left
Rotate shift right
Table showing differences between PL7-2, PL7-3 and PL7-Micro/Junior
OR
XOR
CPL
-
-
-
-
SLC
SRC
-
*
PL7-2
+
/
>,>=,<,<=,=,<>
MOD
-
-
AND
OR
XOR
CPL
INC
DEC
SHL
SHR
SLC
SRC
-
*
PL7-3
+
/
>,>=,<,<=,=,<>
REM
SQRT
-
AND
ABS
AND
OR
XOR
CPL
INC
DEC
SHL
-
*
PL7 Micro/Junior
+
/
>,>=,<,<=,=,<>
REM
SQRT
SHR
ROL
ROR
22
TLX DR PL7 xxE
Floating point instructions
Byte string instructions
PL7-2/3 and PL7 Micro/Junior difference
Table showing differences between PL7-3 and PL7-Micro/Junior
Objects
Addition
Subtraction
Multiplication
Division
Square root
Absolute value
Equality test
Strict superiority test
Strict inferiority test
Other tests
PL7-3
ADDF
SUBF
MULF
DIVF
SQRTF
-
EQUF
SUPF
INFF
-
-
*
PL7 Micro/Junior
+
/
SQRT
ABS
=
>
<
>=, <=, <>
Table showing differences between PL7-3 and PL7-Micro/Junior
Objects
Rotate shift
PL7-3
SLCWORD
PL7 Micro/Junior
-
Conversion instructions
Table showing differences between PL7-2, PL7-3 and PL7-Micro/Junior
Objects
BCD Binary file conversion
Binary BCD file conversion
ASCII Binary file conversion
Binary ASCII file conversion
Gray Binary file conversion
Floating point Integer conversion
Integer Floating point conversion
BCD Floating point conversion
Floating point BCD conversion
ASCII Floating point conversion
Floating point ASCII conversion
PL7-2
BCD
BIN
ATB
BTA
-
-
-
-
-
-
-
PL7-3
DTB
BTD
ATB
BTA
GTB
FTB
FTF
DTF
FTD
ATF
FTA
PL7 Micro/Junior
BCD_TO_INT
INT_TO_BCD
STRING_TO_INT or
STRING_TO_DINT
INT_TO_STRING or
DINT_TO_STRING
GRAY_TO_INT
REAL_TO_INT or
REAL_TO_DINT
INT_TO_REAL or
DINT_TO_REAL
BCD_TO_REAL
REAL_TO_BCD
STRING_TO_REAL
REAL_TO_STRING
TLX DR PL7 xxE
23
PL7-2/3 and PL7 Micro/Junior difference
Table instructions
Table showing differences between PL7-3 and PL7-Micro/Junior
Objects
Arithmetic operations
Logic operations
Addition of words from a table
PL7-3
+, -, *, /, REM
AND, OR, XOR
+
Searching for the first different word EQUAL
Searching for the first equivalent word SEARCH
PL7 Micro/Junior
+, -, *, /, REM
AND, OR, XOR, NOT
SUM
EQUAL
FIND_EQU
Program instructions
Interruption
Instructions
Table showing differences between PL7-3 and PL7-Micro/Junior
Objects
Jump
Calling the subroutine
Return of subroutine
Stopping the application
Conditional sequence
Iterative sequence
PL7-3
JUMP Li
-
RET
HALT
IF/THEN/ELSE
WHILE/DO
PL7 Micro/Junior
JUMP %Li
CALL SRi SRi
RETURN
HALT
IF/THEN/ELSE/END_IF
WHILE/DO/END_WHILE
Table showing differences between PL7-3 and PL7-Micro/Junior
Objects
Test
Masking
Unmasking
Acknowledgment
Setting an IT on a module
PL7-3
READINT
MASKINT
DMASKINT
ACKINT
SETIT
PL7 Micro/Junior
-
MASKEVT
UNMASKEVT
-
-
Explicit I/O instructions
Table showing differences between PL7-3 and PL7-Micro/Junior
Objects
Reading discrete inputs
Writing discrete outputs
Reading registers
Writing registers
Reading words
Writing words
PL7-3
READBIT
WRITEBIT
READREG
WRITEREG
READEXT
WRITEEXT
-
-
-
-
-
PL7 Micro/Junior
-
24
TLX DR PL7 xxE
Function block instructions
PL7-2/3 and PL7 Micro/Junior difference
Table showing differences between PL7-2, PL7-3 and PL7-Micro/Junior
Objects
Preset
Start
Task activation
Reset to zero
Task deactivation
Counting
Down counting
Storing in a register
Removal from register
Receiving a message
Sending a message
Sending/Receiving a message
Execution of an OFB
Reading telegrams
PL7-3
PRESET Ti / Ci
PL7 Micro/Junior
PRESET %Ti / %Ci
START Ti / Mi
START CTRLi
START %Ti / %MNi
-
RESET Ci / Ri / TXTi RESET %Ci / %Ri
RESET CTRLi -
UP Ci
DOWN Ci
PUT Ri
GET Ri
UP %Ci
DOWN %Ci
INPUT TXTi
OUTPUT TXTi
EXCHG TXTi
EXEC < OFBi >
READTLG
PUT %Ri
-
-
-
GET %Ri
-
-
TLX DR PL7 xxE
25
PL7-2/3 and PL7 Micro/Junior difference
Delimiters
Differences Table showing differences between PL7-2/3 and PL7-Micro/Junior
Objects
Assignment
Left bracket for indexing
Right bracket for indexing
Table length
(
)
PL7-2/3
->
[length]
[
]
PL7 Micro/Junior
:=
:length
26
TLX DR PL7 xxE
Memory aids
2
Introduction
Contents of this section
This section contains memory aids for PL7 language instructions
What's in this
Chapter?
This Chapter contains the following Maps:
Topic
Boolean instructions
ST Instructions
LD and IL function blocks
ST function blocks
ST control structures
Full arithmetic (single and double length)
Arithmetic on floating points
Digital conversions
Bit tables
Instructions on tables
Floating point table instructions
"Orpheus" instructions
Explicit exchanges
Time management instructions
Timing instructions
Data storage instructions
Character string instructions
Multi-tasking and events
Communication
Page
TLX DR PL7 xxE
27
Memory aids
Boolean instructions
Memory aid Quick memory-aid for boolean instructions
Boolean instructions LD
Accumulator or network intialization
IL
LD TRUE
Direct (read) test, invert, rising edge, falling edge
And logic
P
P
P
N
N
N
LD
LDN
LDR
LDF
AND ANDN ANDR ANDF
AND( AND(N AND(R AND(F
Inversion
Or exclusive logic
(direct, invert, rising edge, falling edge)
Write (direct, inverse)
-
-
Set
Clear
Operate block
(contents: see following pages)
Horizontal block comparison
(contents: see following pages)
S action
OPERATE
COMPARE comparaison
R
N
XOR XORN
XORR XORF
ST
STN
S
R
[action]
LD [comparison]
AND [comparison]
AND( [comparison]
OR [comparison]
OR( [comparison]
XOR [comparison]
28
TLX DR PL7 xxE
Boolean instructions LD
Vertical comparison block
MemoryPusH
MemoryReaD
MemoryPOP
COMPARE
EN
>
=
<
<>
-
IL
MPS
MRD
MPP
Memory aids
TLX DR PL7 xxE
29
Memory aids
ST Instructions
Memory aid Quick memory-aid for ST instructions
Instructions
Assignment
OR boolean
AND boolean
OR boolean exclusive
Inversion
Rising edge, falling edge
Set on 1, set on 0
ST
:=
OR
AND
XOR
NOT
RE, FE
SET, RESET
30
TLX DR PL7 xxE
LD and IL function blocks
Memory aid
Function blocks
IEC timers
PL-3 timer
Up/Down Counter
Monostable
Register
Drum
Quick memory-aid for LD and IL function blocks
LD
%TMi
IN Q
IL
IN
structure BLK..END_BLK
-
E
%Ti
C
D
R
R
%Ci
S
E
D
F CU
CD
R
S
CU
CD
structure BLK..END_BLK
S
%MNi
R
S
structure BLK..END_BLK
R
%Ri
I
O
F
E
R
U
%DRi
F
R
I
O
STN
structure BLK..END_BLK
R
U
structure BLK..END_BLK
Memory aids
TLX DR PL7 xxE
31
Memory aids
ST function blocks
Memory aid Quick memory-aid for ST function blocks
Function blocks
IEC timer
PL-3 timer
Up/Down Counter
Monostable
Register
Drum
ST
START%TMi
DOWN%TMi
PRESET%Ti
START%Ti
STOP%Ti
RESET%Ci
PRESET%Ci
UP%Ci,DOWN%Ci
START%MNi
RESET%Ri
PUT%Ri
GET%Ri
RESET%DRi
UP%DRi
32
TLX DR PL7 xxE
Memory aids
ST control structures
Memory aid Quick memory-aid for ST control structures
Control structures
Conditional action
Conditional iterative action
Conditional iterative action
Repetitive action
Loop output instruction
ST
IF...THEN...ELSIF...THEN..ELSE...END_IF;
WHILE...DO...END_WHILE;
REPEAT...UNTIL...END_REPEAT;
FOR...DO...END_FOR;
EXIT
TLX DR PL7 xxE
33
Memory aids
Full arithmetic (single and double length)
Memory aid Quick memory-aid for full arithmetic instructions
Full arithmetic (single and double length)
Transfer or initialization
Comparisons
Addition, subtraction, multiplication, division, division remainder
ET, OU, OU exclusive, complement
Absolute value, Square root
Increment
Decrement
Left shift
Right shift
Rotate shift left
Rotate shift right
LD/IL/ST
:=
= <> <= < > >=
+ - * / REM
AND OR XOR NOT
ABS, SQRT
INC
DEC
SHL
SHR
ROL
ROR
34
TLX DR PL7 xxE
Arithmetic on floating points
Memory aid Quick memory-aid for floating point arithmetic instructions
Arithmetic on floating points
Transfer or initialization
Comparisons
Addition, subtraction, multiplication, division, integer part
Absolute value, square root
Logarithm, exponentials
Sine, cosine, tangent
Arc sine, arc cosine, arc tangent
Degree <--> radian conversion
LD/IL/ST
:=
= <> <= < > >=
+ - * / TRUNC
ABS, SQRT
LOG, LN, EXPT, EXP
SIN, COS, TAN
ASIN, ACOS, ATAN
DEG_TO_RAD, RAD_TO_DEG
Memory aids
TLX DR PL7 xxE
35
Memory aids
Digital conversions
Memory aid Quick memory-aid for digital conversion instructions
Digital conversions
BCD conversion to single length integers
GRAY conversion to single length integers
Single length integer conversion to BCD
Single length integer conversion to floating point
Double length integer conversion to floating point
Floating point conversion to single length integers
Floating point conversion to double length integers
32 bit BCD conversion to 32 bit integers
32 bit integer conversion to 32 bit BCD
32 bit BCD conversion to 16 bit integers
16 bit integer conversion to 32 bit BCD
Extracting the least significant word from a double word
Extracting the most significant word from a double word
Concatenation of 2 single words
LD/IL/ST
BCD_TO_INT
GRAY_TO_INT
INT_TO_BCD
INT_TO_REAL
DINT_TO_REAL
REAL_TO_INT
REAL_TO_DINT
DBCD_TO_DINT
DINT_TO_DBCD
DBCD_TO_INT
INT_TO_DBCD
LW
HW
CONCATW
36
TLX DR PL7 xxE
Bit tables
Memory aid Quick memory-aid for instructions on bit tables
Bit tables
Transfer or initialization
Copy of a bits table in a bits table
AND between two tables
OR between two tables
OR exclusive between two tables
Negation in a table
Copy of a bits table in a word table
Copy of a bits table in a double word table
Copy of a word table in a bits table
Copy of a double word table in a bits table
Calculation of table length
LD/IL/ST
:=
COPY_BIT
AND_ARX
OR_ARX
XOR_ARX
NOT_ARX
BIT_W
BIT_D
W_BIT
D_BIT
LENGTH_ARX
Memory aids
TLX DR PL7 xxE
37
Memory aids
Instructions on tables
Memory aid Quick memory aid for instructions on tables
Instructions on tables
Transfer or initialization
Arithmetic operations between tables
Logic operations between tables
Arithmetic operations between a table and an integer
LD/IL/ST
:=
+ - * / REM
AND OR XOR
+ - * / REM
Logic operations between a table and an integer
Table elements complement
Sum of all the table elements
AND OR XOR
NOT
SUM
Comparison of two tables EQUAL
Search for the first table element which is equal to certain value FIND_EQW, FIND_EQD
Search for the first table element which is equal to certain value from a set position FIND_EQWP, FIND_EQDP
Search for the first table element which is greater than a certain value
Search for the first table element which is less than a certain value
Search for the greatest value in a table
Search for the smallest value in a table
Number of occurrences of value within a table
Left rotation shift of a table
Right rotation shift of a table
Table sort (increasing or decreasing direction)
Calculation of table length
FIND_GTW, FIND_GTD
FIND_LTW, FIND_LTD
MAX_ARW, MAX_ARD
MIN_ARW, MIN_ARD
OCCUR_ARW, OCCUR_ARD
ROL_ARW, ROL_ARD
ROR_ARW, ROL_ARW
SORT_ARW, SORT_ARD
LENGTH_ARW, LENGTH_ARD
38
TLX DR PL7 xxE
Floating point table instructions
Memory aid Quick memory aid for instructions on floating point tables
Floating point table instructions
Transfer and intialization
Sum of all the table elements
Comparison of two tables
Search for the first table element which is equal to certain value
Search for the first table element which is greater than a certain value
Search for the first table element which is less than a certain value
Search for the greatest value in a table
Search for the smallest value in a table
Number of occurrences of a certain value within a table
Left rotation shift of a table
Right rotation shift of a table
Table sort (increasing or decreasing direction)
Calculation of table length
LD/IL/ST
:=
SUM_ARR
EQUAL_ARR
FIND_EQR
FIND_GTR
FIND_LTR
MAX_ARR
MIN_ARR
OCCUR_ARR
ROL_ARR
ROR_ARR
SORT_ARR
LENGTH_ARR
Memory aids
TLX DR PL7 xxE
39
Memory aids
"Orpheus" instructions
Memory aid Quick memory aid for "Orpheus" instructions
"Orpheus" instructions
Left shift on the word with shifted bit retrieval
Right shift on the word with sign extension and shifted bit retrieval
Right shift on the word, with filling using 0 and shifted bit retrieval
Up/down counting with overshoot signaling
Left rotation shift
Right rotation shift
LD/IL/ST
WSHL_RBIT, DSHL_RBIT
WSHR_RBIT, DSHR_RBIT
WSHRZ_C, DSHRZ_C
SCOUNT
ROLW, ROLD
RORW, RORD
40
TLX DR PL7 xxE
Explicit exchanges
Memory aid Quick memory aid for explicit exchanges
Explicit exchanges
Read %M parameters using a logic channel
Read status %M using a logic channel
Restore %M parameters using a logic channel
Save %M parameters using a logic channel
Write command %M using a logic channel
Write %M parameters using a logic channel
LD/IL/ST
READ_PARAM
READ_STS
RESTORE_PARAM
SAVE_PARAM
WRITE_CMD
WRITE_PARAM
Memory aids
TLX DR PL7 xxE
41
Memory aids
Time management instructions
Memory aid Quick memory aid for time management instructions
Time management instructions
Dater
Comparisons
Transfer
Reading of date and code for last PLC stop
Reading of system date
System date update
Add time period to a complete date
Add time period to a time of day
Date string conversion
Day of the week
Interval between two dates
Interval between two complete dates
Interval between two times of day
Complete date string conversion
Remove time period from a complete date
Remove time period from a time of day
Duration string conversion
Time of day string conversion
Format duration to hours-mn-secs
LD/IL/ST
SCHEDULE
= <> <= < > >=
:=
PTC
RRTC
WRTC
ADD_DT
ADD_TOD
DATE_TO_STRING
DAY_OF_WEEK
DELTA_D
DELTA_DT
DELTA_TOD
DT_TO_STRING
SUB_DT
SUB_TOD
TIME_TO_STRING
TOD_TO_STRING
TRANS_TIME
42
TLX DR PL7 xxE
Timing instructions
Memory aid Timing instructions quick memory aid
Timing instructions
Timing on trigger event
Timing on trigger event
Pulse timing
Rectangular signal generator
LD/IL/ST
FTON
FTOF
FTP
FPULSOR
Memory aids
TLX DR PL7 xxE
43
Memory aids
Data storage instructions
Memory aid Data storage instructions rapid memory aid
Data storage instructions
PCMCIA card storing zone setting
PCMCIA card data writing
PCMCIA card data reading
DATA Archiving card storing zone setting
DATA Archiving card data writing
DATA Archiving card data reading
LD/IL/ST
SET_PCMCIA
WRITE_PCMCIA
READ_PCMCIA
SET_PCM_EXT
WRITE_PCM_EXT
READ_PCM_EXT
44
TLX DR PL7 xxE
Character string instructions
Memory aid Character string instructions rapid memory aid
Character string instructions
Comparisons
Transfer
Converting a double integer into a string
Converting a single integer into a string
Converting a string into a double integer
Converting a string into a single integer
Floating point string conversion
Floating point conversion into a string
Two string concatenation
Deleting a substring
Searching for a different initial character
Searching for a substring
Inserting a substring
Extracting the left part of a string
String length
Extracting a substring
Replacing a substring
Extracting the right part of a string
LD/IL/ST
= <> <= < > >=
:=
DINT_TO_STRING
INT_TO_STRING
STRING_TO_DINT
STRING_TO_INT
STRING_TO_REAL
REAL_TO_STRING
CONCAT
DELETE
EQUAL_STR
FIND
INSERT
LEFT
LEN
MID
REPLACE
RIGHT
Memory aids
TLX DR PL7 xxE
45
Memory aids
Multi-tasking and events
Memory aid Multi-tasking and event rapid memory aid
Multi-tasking and events
Task activation / deactivation
Adjusting the task cycle time
Global event masking.
Global event unmasking.
LD/IL/ST
%Si position
%SWi position
MASKEVT
UNMASKEVT
46
TLX DR PL7 xxE
Communication
Memory aid Communication instructions rapid memory aid
Communication
Stop request for function in action
Send / receive data
Character string read request
Send / receive character string request
Send a character string:
Receiving a telegram
Basic language object reading
Send / receive UNI-TE requests
Send a telegram
Basic language object writing
Shifting a byte to the right in a table
Swapping bytes in a word table
Reading Modbus+ common data
Writing Modbus+ common data
Calling the modem
Immediate server
Writing 1 K messaging
Reading 1 K messaging
LD/IL/ST
CANCEL
DATA_EXCH
INPUT_CHAR
OUT_IN_CHAR
PRINT_CHAR
RCV_TLG
READ_VAR
SEND_REQ
SEND_TLG
WRITE_VAR
ROR1_ARB
SWAP
READ_GDATA
WRITE_GDATA
CALL_MODEM
SERVER
WRITE_ASYN
READ_ASYN
Memory aids
TLX DR PL7 xxE
47
Memory aids
48
TLX DR PL7 xxE
Reserved words
3
Reserved words
List of reserved words
The following reserved words must not be used as symbols.
Words from
A to C
ABS
ACCEPT
ACOS
ACTION
ACTIVATE_PULSE
ACTIVE_TIME
ADD
ADDRESS
ADD_DT
ADD_TOD
ADR
AND
ANDF
ANDN
ANDR
AND_ARX
ANY
ANY_BIT
ANY_DATE
ANY_INT
ANY_NUM
List of reserved words
ANY_REAL
ARRAY
AR_D
AR_DINT
AR_F
AR_INT
AR_R
AR_W
AR_X
ASIN
ASK
ASK_MSG
ASK_VALUE
ASSIGN_KEYS
AT
ATAN
AUX
BCD_TO_INT
BIT_D
BIT_W
BLK
BLOCK
BODY
BOOL
BOTTOM
BTI
BTR
BY
BYTE
C
CAL
CALC
CALCN
CALL
CALL_COIL
CANCEL
CASE
CD
CHART
CH_M
CLK
CLOSE
CLOSED_CONTACT
COIL
COMMAND
COMMENTS
COMP4
COMPCH
CONCAT
CONCATW
CONF
CONFIGURATION
CONSTANT
CONTROL_LEDS
COPY_BIT
COS
CTD
CTU
CTUD
CU
TLX DR PL7 xxE
49
Reserved words
Words from
D to E
D
DATE
DATE_AND_TIME
DAT_FMT
DAY_OF_WEEK
DA_TYPE
DEACTIVATE_PULSE
DEC
DELETE
DELTA_D
DELTA_DT
DELTA_TOD
DINT
DINT_TO_REAL
DINT_TO_STRING
DISPLAY_ALRM
DISPLAY_GRP
DISPLAY_MSG
DIV
DMOVE
List of reserved words
DO
DOWN
DR
DRUM
DS
DSHL_RBIT
DSHRZ_C
DSHR_RBIT
DSORT_ARD
DSORT_ARW
DT
DTS
DWORD
D_BIT
E
EBOOL
ELSE
ELSIF
EMPTY
EMPTY_LINE
END
ENDC
ENDCN
END_ACTION
END_BLK
END_BLOCK
END_CASE
END_COMMENTS
END_CONFIGURATION
END_FOR
END_FUNCTION
END_FUNCTION_BLOCK
END_IF
END_MACRO_STEP
END_PAGE
END_PHRASE
END_PROG
END_PROGRAM
END_REPEAT
END_RESOURCE
END_RUNG
END_STEP
END_STRUCT
END_TRANSITION
END_TYPE
END_VAR
END_WHILE
EQ
EQUAL
EQUAL_ARR
ERR
EVT
EXCHG
EXCH_DATA
EXIT
EXP
EXPT
50
TLX DR PL7 xxE
Reserved words
Words from
F to J
F
FALSE
FAST
FBD
FE
FIFO
FIND
FIND_EQ
FIND_EQD
FIND_EQDP
FIND_EQR
FIND_EQW
FIND_EQWP
FIND_GTD
FIND_GTR
FIND_GTW
FIND_LTD
FIND_LTR
Words from
L to M
L
LAD
LANGAGE
LANGUAGE
LD
LDF
LDN
LDR
LE
LEFT
LEN
LENGTH_ARD
LENGTH_ARR
LENGTH_ARW
LENGTH_ARX
List of reserved words
FIND_LTW
FOR
FPULSOR
FROM
FTOF
FTON
FTP
FUNC
FUNCTION
FUNCTION_BLOCK
F_B
F_EDGE
F_TRIG
GE
GET
GET_MSG
GET_VALUE
GLOBAL_COMMENT
GR7
GRAY_TO_INT
GT
GTI
H
HALT
HALT_COIL
HASH_COIL
I
IF
IL
HW
H_COMPARE
H_LINK
IN
INC
INCJUMP
INDEX_CH
List of reserved words
LIFO
LIMIT
LINT
LIST
LIT
LN
LOCATION
LOG
LREAL
LT
LW
LWORD
M
MACRO_STEP
MAIN
MASKEVT
MAST
MAX
MAX_ARD
MAX_ARR
MAX_ARW
MAX_PAGES
MAX_STEP
MCR
MCR_COIL
MCS
MCS_COIL
MID
MIN
MIN_ARD
INFO
INITIAL_STEP
INIT_BUTTONS
INPUT
INPUT_CHAR
INSERT
INT
INTERVAL
INT_TO_BCD
INT_TO_REAL
INT_TO_STRING
ITB
ITS
JMP
JMPC
JMPCN
JUMP
JUMP_COIL
MIN_ARR
MIN_ARW
MN
MOD
MONO
MOVE
MPP
MPS
MRD
MS
MUL
MUX
M_CH
M_MACRO_STEP
TLX DR PL7 xxE
51
Reserved words
Words from
N to P
List of reserved words
N
N1
NAME
NB_ACTIVE_STEPS
NB_ACTIVE_TIME
NB_BLOCKS
NB_COMMON_WORDS
NB_CONSTANT_WORDS
NB_CPT
NB_DRUM
NB_INTERNAL_BITS
NB_INTERNAL_WORDS
NB_MACRO_STEPS
NB_MONO
NB_PAGES
NB_REG
NB_TIMER
NB_TM
NB_TRANSITIONS
NE
NIL
NO
NON_STORED
NOP
NOT
NOT_ARX
NOT_COIL
NOT_READABLE
NO_GR7
NO_PERIOD
N_CONTACT
O
OCCUR
OCCUR_ARD
OCCUR_ARR
OCCUR_ARW
OF
ON
OPEN
Words from
Q to R
Q
QUERY
R
R1
RCV_TLG
RE
READ
READ_EVT_UTW
READ_ONLY
READ_PARAM
READ_STS
READ_VAR
READ_WRITE
REAL
REAL_TO_DINT
List of reserved words
REAL_TO_INT
REAL_TO_STRING
REG
REM
REPEAT
REPLACE
REQ
RESET
RESET_COIL
RESOURCE
RESTORE_PARAM
RET
RETAIN
RETC
RETCN
OPEN_CONTACT
OPERATE
OR
ORF
ORN
ORR
OR_ARX
OTHERS
OUT
OUTIN_CHAR
OUTPUT
OUT_BLK
P
P0
P1
PAGE
PAGE_COMMENT
PANEL_CMD
PERIOD
PHRASE
PHRASE_COMMENT
PID
PID_MMI
PLC
POST
PRESET
PRINT_CHAR
PRIO0
PRIO1
PRIORITY
PRL
PROG
PROGRAM
PROG_LANGAGE
PROG_LANGUAGE
PT
PTC
PUT
PV
PWM
P_CONTACT
RETURN
RET_COIL
RIGHT
ROL
ROLD
ROLW
ROL_ARD
ROL_ARR
ROL_ARW
ROL_DWORD
ROL_WORD
ROR
RORD
RORW
ROR_ARD
ROR_ARR
ROR_ARW
ROR_DWORD
ROR_WORD
RRTC
RS
RTB
RTC
RTS
RUNG
R_EDGE
R_TRIG
52
TLX DR PL7 xxE
Reserved words
Words from
T to W
T
TAN
TASK
TASKS
THEN
TIME
TIMER
TIME_OF_DAY
TM
TMAX
TMOVE
TO
TOD
TOF
TOFF
TON
Words from
S to S
S
S1
SAVE
SAVE_PARAM
SCHEDULE
SD
SEARCH
SECTION
SEL
SEMA
SEND
SENDER
SEND_ALARM
SEND_MBX_ALARM
SEND_MBX_MSG
SEND_MSG
List of reserved words
SEND_REQ
SEND_TLG
SERVO
SET
SET_COIL
SFC
SHIFT
SHL
SHOW_ALARM
SHOW_MSG
SHOW_PAGE
SHR
SHRZ
SIN
SINGLE
SINT
List of reserved words
TOP
TP
TRANSITION
TRANS_TIME
TRUE
TRUNC
TYPE
TYPES
T_S_AND_LINK
T_S_OR_LINK
U
UDINT
UINT
ULINT
UNMASKEVT
UNTIL
SL
SLCWORD
SMOVE
SOFT_CONFIGURATION
SORT
SORT_ARD
SORT_ARR
SORT_ARW
SQRT
SR
ST
STANDARD
START
STD
STEP
STI
STN
STOP
STR
STRING
STRING_TO_DINT
STRING_TO_INT
STRING_TO_REAL
STRUCT
SUB
SUB_DT
SUB_TOD
SUM
SU_TYPE
SWAP
S_T_AND_LINK
S_T_OR_LINK
UP
USINT
USORT_ARD
USORT_ARW
UTIN_CHAR
VAR
VAR_ACCESS
VAR_EXTERNAL
VAR_GLOBAL
VAR_INPUT
VAR_IN_OUT
VAR_OUTPUT
VAR_PUBLIC
VERSION
V_COMPARE
V_LINK
W
WHILE
WITH
WORD
WRITE
WRITE_CMD
WRITE_PARAM
WRITE_VAR
WRTC
WSHL_RBIT
WSHRZ_C
WSHR_RBIT
W_BIT
TLX DR PL7 xxE
53
Reserved words
Words X, Y, and
Misc
List of reserved words
XM
XM_MONO
XM_MULTI
XOR
XORF
XORN
XORR
XOR_ARX
YES
*_TO_* * = Letter
SRi
AUXi
EVTi
XMi i = integer
54
TLX DR PL7 xxE
Compliance with IEC standard
1131-3
4
Introduction
Contents of this section
This section describes compliance with IEC standard 1131-3: "Programmable
Controllers"
What's in this
Chapter?
This Chapter contains the following Maps:
Topic
Compliance with IEC standard 1131-3
Common elements
IL language elements
ST language elements
Common graphics elements
LD language elements
Implementation-dependent parameters
Error situations
Page
TLX DR PL7 xxE
55
Compliance with IEC standard 1131-3
Compliance with IEC standard 1131-3
Introduction to
IEC standard
1131-3
IEC Standard 1131-3 "Programmable controllers – Part 3: Programming languages" specifies the syntax and semantics of software elements used for programming programmable controllers.
This standard contains the description of 2 text languages, IL (Instruction List) and
ST (Structured Text); of 2 graphic languages, LD (Ladder Diagram) and FDB
(Function Block Diagram); and a graphic formalism, SFC (Sequential Function
Chart) which is used to structure the internal organization of a programmed sequence.
PL7 programming software is used to program a programmable controller in accordance with the IEC standard. PL7 implements a sub-assembly of language elements defined by the standard, and defines extensions which are authorized within the framework of this standard.
The IEC standard 1131-3 does not define the interactivity rules for software supplied by a manufacturer claiming compliance with the standard. This allows marked flexibility for the introduction and entry of programming elements for the convenience of the user.
The elements of the standard implemented in PL7, information relating to implementation and error detection are all summarized in the compliance tables.
56
TLX DR PL7 xxE
Compliance with IEC standard 1131-3
Common elements
General Description of the characteristics common to languages which comply with IEC
1131-3
The following table lists implementations in PL7 languages. This information is in regard to tables of characteristics described in the IEC 1131-3 standard. This is for characteristics common to all PL7 languages.
Table of characteristics
4
4
4
4
4
4
2
3
1
2
1
1
1
1
Table No.
1
6
6
6
6
6
7
6
6
4
5
Characteristics common to all languages:
6
7
4
5
2
3
8
1
8
1a
6
7
3
4
1
2
2
1
4a
5a
6a
1
Characteristic No.
1
2
3a
Description of characteristics
Character set required (see paragraph 2.1.1 of 1131-3)
Lower case characters
Number sign (#)
Dollar sign ($)
Vertical line (|)
Index delimiters Left and right square brackets "[ ]"
Upper case and numbers
Upper and lower case, numbers, integrated character underlining
Comments
Text integers (Note 1)
Text integers (Note 1)
Text integers with exponents
Literals in base 2 (Note 1)
Literals in base 16 (Note 1)
Zero and One Booleans
TRUE and FALSE Booleans
Text character string features
$$ Dollar sign
$’ Apostrophe
$L or $l Change line
$N or $n New line
$P or $p Change page
$R or $r Cursor return
$T or $t Tabulation
Time period text with t# short prefix (Note 2)
TLX DR PL7 xxE
57
Compliance with IEC standard 1131-3
17
17
17
18
18
15
15
15
15
15
15
15
15
16
10
10
10
10
10
10
Table No.
10
10
10
10
18
17
18
19
14
15
16
Characteristic No.
1
10
12
13
4
5
6
1
2
3
7
8
VAR
VAR_INPUT
VAR_OUTPUT
VAR_IN_OUT
VAR_EXTERNAL
VAR_GLOBAL
CONSTANT
AT
2
3
5
2
3
5
Description of characteristics
BOOL -1 bit-
REAL -32 bits-
TIME -32 bits- (Note 3)
DATE -32 bits- (Note 3)
TIME_OF_DAY -32 bits- (Note 3)
DATE_AND_TIME -64 bits- (Note 3)
STRING
BYTE -8 bits-
WORD -16 bits-
DWORD -32 bits-
Prefix I for Input
Prefix Q for Output
Prefix M for Memory
Prefix X, bit size
No prefix, bit size
Prefix B, byte size (8 bits)
Prefix W, word size (16 bits)
Prefix D, size of double word (32 bits)
Key words (Note 4)
Declaration of directly represented non-volatile variables (addresses) (Note
4)
Declaration of symbolic variables slots (symbols of addresses) (Note 4)
Automatic attribution of symbolic variables to memory (function block variables) (Note 4)
Initialization of directly represented non-volatile variables (addresses) (Note
4)
Slot assignation of initial values and symbolic variables (symbols on addresses) (Note 4)
Initialization of symbolic variables (function block variables) (Note 4)
58
TLX DR PL7 xxE
Compliance with IEC standard 1131-3
Table No.
21
Characteristic No.
1
29
29
29
29
25
25
29
29
29
29
29
32
23
23
25
25
23
23
23
23
23
23
23
23
21
22
22
23
33
33
5
6
3
4
1
2
3
4
7
8
9
Inputread
Inputwrite
Outputread
Outputwrite
1
1
2
10
11
8
9
6
7
4
5
2
3
4
1
2
3
2
Description of characteristics
Overloaded PL7 functions are as follows;
ABS, EQUAL, ROL, ROR, SHL, SHR, SQRT, SUM
In general, PL7 functions belong to this category.
BCD_TO_INT conversion function (Note 6)
INT_TO_BCD conversion function (Note 6)
ABS function: absolute value
SQRT function: square root
LN function: natural logarithm
LOG function: logarithm in base 10
EXP function : natural exponential
SIN function: sine in radians
COS function: cosine in radians
TAN function: tangent in radians
ASIN function: arc sine
ACOS function: arc cosine
ATAN function: arc tangent
SHL function: left shift
SHR function: right shift
ROR function: right rotation
ROL function: left rotation
LEN function: string length
LEFT function: n the most characters to the left
RIGHT function: n the most characters to the right
MID function: n characters from a given position
CONCAT function: string concatenation (Note 7)
INSERT function: inset one string into another
DELETE function: delete characters
REPLACE function: replace with other characters
FIND function: search for one string within another
(Note 8)
RETAIN qualifier for function block internal variables.) (Note 9) (Note 4)
RETAIN qualifier for function block output (Note 9) (Note 4)
TLX DR PL7 xxE
59
Compliance with IEC standard 1131-3
46
46
46
46
46
40
41
41
42
43
45
45
45
46
46
38
39
40
Table No.
33
37
37
37
Characteristic No.
4a
1
2a
3a time diagrams
19
1
2
1
2
2l
1
2
2
11
12
1
2c
3
4
5c
6c
7
Description of characteristics
Declaring (literal) function block input/output. (Note 4)
Pulse timer: TP (Note 10)
Engagement timer: TON (Note 10)
Trigger timer: TOF (Note 10)
TP, TON, TOF
Usage of directly represented variables (addresses)
Step, graphical form
Note: A step number replaces a step identifier
Step, textual format used in Grafcet source format only
Transition condition in ST language
Transition condition in LD language
Action declaration in LD language
Action block
Concatenated action blocks
Action N qualifier (not memorized)
Action P1 qualifier (Pulse rising edge)
Action P0 qualifier (Pulse falling edge)
Simple sequence, alternating between step/transition
Divergence in "or": the user ensures that transition conditions are mutually exclusive.
Convergence in "or"
Divergence in "and", Convergence in "and"
Sequence jump in a divergence in "or"
Sequence loop: return to previous step
Directional arrows
Note: Directional arrows rise and descend
60
TLX DR PL7 xxE
Compliance with IEC standard 1131-3
49
49
49
49
50
Table No.
48
3
5a
6a
Characteristic No.
40
41
42
43
44
45
46
7
5b
Description of characteristics
Grafcet language fulfils the conditions required for the minimum level of compliance with SFC 1131-3
Graphic presentation
RESOURCE...ON...END_RESOURCE construction
Periodic TASK construction in RESOURCE
PROGRAM declaration with PROGRAM-to-TASK association
Declaration of variables directly represented in VAR_GLOBAL
Pre-emptive scheduling in multi-tasking model
TLX DR PL7 xxE
61
Compliance with IEC standard 1131-3
62 l l l l
Note: l Note 1: The underlining characters (_) inserted between figures in numerical text are not accepted.
l Note 2: This text is only visible in the source application for expressing l configured task times.
Note 3: This type of data has not yet been set up for the user to be able to see.
Nevertheless, this table specifies how their internal representation takes up the memory.
l l
Note 4: These key words are only used in the sources generated by PL7 and by the PL7-2 and PL7-3 application conversion tool.
Note 5: Effects of limited conversions:
DINT_TO_STRING: If the string receiving the result is less than 13 characters,
%S15 is sectioned and re-positioned.
INT_TO_STRING: If the string receiving the result is less than 7 characters,
%S15 is sectioned and re-positioned.
STRING_TO_DINT and STRING_TO_INT: If the string is not fully convertible, the result is undetermined and %S18 is re-positioned.
DATE_TO_STRING: If the string receiving the result is less than 11 characters,
%S15 is sectioned and re-positioned.
DT_TO_STRING: If the string receiving the result is less than 20 characters, l
%S15 is sectioned and re-positioned.
TIME_TO_STRING: If the string receiving the result is less than 15 characters,
%S15 is sectioned and re-positioned.
TOD_TO_STRING: If the string receiving the result is less than 9 characters,
%S15 is sectioned and re-positioned.
REAL_TO_STRING: If the string receiving the result is less than 15 characters,
%S15 is sectioned and re-positioned.
STRING_TO_REAL: If the string is not convertible to integers, the result is worth
"1#NAN" (16#FFC0_0000) and %S18 is re-positioned.
REAL_TO_INT: If the integer is not convertible within the limits of [-32768,
=32767], the result is worth –32768 and both %S18 and %SW17 X0 are repositioned.
REAL_TO_DINT: If the integer is not convertible within the limits of [-
2147483648, =+2147483647], the result is worth -2147483648 and both %S18 and %SW17 X0 are repositioned.
INT_TO_REAL: Conversion is always possible.
DINT_TO_REAL: Conversion is always possible.
Note 6: With the INT type not being formally implemented, but used all the same, these functions are used to change the format of a WORD coding.
Note 7: CONCAT function limitations on concatenating 2 strings.
Note 8: This paragraph applies to predefined PL7 function blocks.
Note 9: The RETAIN qualifier is implicit.
Note 10: Timers TP, TON and TOF respect the table 38 time graphs, but offer a I/O interface different to that of 1131-3.
TLX DR PL7 xxE
Compliance with IEC standard 1131-3
IL language elements
General Description of the characteristics of IL language elements which comply with IEC
1131-3
The following table lists implementations in PL7 languages. This information is in regard to tables of characteristics described in the IEC 1131-3 standard.
54
54
54
52
52
52
53
Table of characteristics
Table No.
51
52
52
52
52
Characteristics of IL language elements:
11
12
13
18
20
21
3
3
4
5
6
1
2
Characteristic No.
Instruction fields
Description of characteristics
Label, operator, operand, comment
LD
ST
S and R
AND
OR
XOR
JMP
RET
)
Usage of input operators for starting function blocks in IL
IN (see Note)
IN (see Note)
IN (see Note)
Note: PT operator has not been set up.
TLX DR PL7 xxE
63
Compliance with IEC standard 1131-3
ST language elements
General Description of the characteristics of ST language elements which comply with IEC 1131-3
The following table lists implementations in PL7 languages. This information is in regard to tables of characteristics described in the IEC 1131-3 standard.
This language is separately but fully used in ST modules. An ST sub-assembly is also used in IL and LD language OPERATE and COMPARISON blocks.
55
55
55
56
56
55
55
55
55
56
56
56
56
56
Table of characteristics
55
55
55
Table No.
55
55
55
Characteristics of ST language elements:
1
3
16
17
11
12
13
15
7
8
4
6
9
4
5
6
7
9
10
2
3
Characteristic No.
1
Description of characteristics
Between brackets
Function evaluation
- Negation
NOT Complement
JMP
* Multiplication
/ Division
+ Addition
- Subtraction
<, >, <=, >= Comparison
= Equate
<> Does not equate
AND for the "and" boolean
XOR for the "exclusive or" boolean
OR for the "or" boolean
:= Assignment
RETURN structure
IF structure "if... then... elsif... then... else... end_if"
FOR structure "for... to... do... end_for" (see Note)
WHILE structure "while... do... end_while"
REPEAT structure "repeat ... until... end_repeat"
EXIT structure
Note: Set-up of FOR loop with an implicit step of 1 (by 1).
64
TLX DR PL7 xxE
Compliance with IEC standard 1131-3
Common graphics elements
General Description of the characteristics of common graphics elements which comply with
IEC 1131-3
The following table lists implementations in PL7 languages. This information is in regard to tables of characteristics described in the IEC 1131-3 standard.
Table of characteristics
58
58
58
57
57
57
58
Table No.
57
57
57
Characteristics of common graphics elements:
4
5
8
8
10
12
2
4
6
Characteristic No.
2
Description of characteristics
Horizontal graphic lines
Vertical graphic lines
Horizontal graphic line / vertical graphic line junction point
Graphic crossing of lines without connections
Connected and unconnected graphic corners
Blocks with connected graphic lines
Unconditional jump in LD language
Conditional jump in unconditional LD language
Conditional return in LD language
Unconditional return in LD language
TLX DR PL7 xxE
65
Compliance with IEC standard 1131-3
LD language elements
General Description of the characteristics of LD language elements which comply with IEC
1131-3
The following table lists implementations in PL7 languages. This information is in regard to tables of characteristics described in the IEC 1131-3 standard.
Table of characteristics
61
62
62
62
62
60
61
61
61
Table No.
59
59
60
Characteristics of LD language elements:
2
3
7
1
4
3
5
2
1
2
1
Characteristic No.
1
Description of characteristics
Left power rail
Right power rail
Horizontal link
Vertical link
Open contact
Closed contact
Positive transition contact detector
Negative transition contact detector
Coil
Negated coil
SET (latch) coil
RESET (unlatch) coil
66
TLX DR PL7 xxE
Compliance with IEC standard 1131-3
Implementation-dependent parameters
General Description of PL7 parameters which depend on implementation.
The following table lists implementations in PL7 languages. This information is in regard to tables of characteristics described in the IEC 1131-3 standard.
Table of characteristics
Characteristics of IL language elements:
Parameters
Procedure for processing errors
Nationally used characters
Maximum identifier length
Maximum comment length
Duration value format
TIME type value format
PL7 limitations and behavior
Many errors can be indicated on execution by the way that bits and system words are arranged.
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔ
ÕÖØÙÚÛÜàáâãäåæçèéêëìí îïñòóôõöøùúûüßÿ
#, $, |
32
222
Note 1
Note 1
Note 2 More detail on the presentation of seconds in
TIME_OF_DAY and DATE_AND_TIME types
Maximum number of table indexes
Maximum table size
Maximum default length of STRING variables
Maximum authorized length for STRING variables
1 (Note 3) depends on the indexed zone (Note 3) does not apply
255
Maximum number of hierarchical levels
Logical or physical configuration
3
Logic configuration depends on the indexed zone (Note 3) Maximum interval of index values
Initialization of system input Variables are initialized by the system: l l to the initial value specified by the user, if need be if not to zero cf table 22, characteristic 1 Effect of conversions on more detail
Maximum number of types and function block instances Not the maximum number (limits are linked to the volume of the application)
Program size limit
More detail on time elapsed associated with a step
Maximum program code volume = 64 Kbytes
100ms
TLX DR PL7 xxE
67
Compliance with IEC standard 1131-3
Parameters
Maximum number of steps per chart
PL7 limitations and behavior
96 on 3710 PLCs
128 on 3720 PLCs
1024 on 57xx V3.0 PLCs
Maximum number of transitions per chart and per step) 1024 transitions per chart
11 transition per step 1
Action control mechanism
Maximum number of action blocks per step
Qualifiers P0, P1 and N1
3 types of action are possible: on activation (P1), continue (N1) and on deactivation (P0)
Active step is highlighted
The overshoot time varies, and is never zero
Graphic representation of state of step
Time for overshooting a transition (disabling of upstream steps, and enabling of downstream steps)
Depth of divergent and convergent constructions
List of PLCs that can be programmed by PL7
Maximum number of tasks
Limit given by entry grid
TSX MICRO, TSX PREMIUM
1 periodic or cyclic task
1 periodic task
8 event tasks for 37 10 PLCs
16 event tasks for 37 20 PLCs
32 event tasks for 57 10 PLCs
64 event tasks for 57 20/30 PLCs from 1 ms to 225 ms
Pre-emptive scheduling Task interval formats
Pre-emptive or non-pre-emptive scheduling
Maximum length of an expression
Partial evaluation of boolean expressions
Maximum length of command structures ST variable no variable
Value of command variable after complete execution of a
FOR loop
Graphic/semi-graphic representation
Restrictions on network topology
The command variable value equals the limit value + 1
(as the step is 1)
Graphic representation
An LD network may extend over a maximum of 16 columns and 7 lines
68
TLX DR PL7 xxE
Compliance with IEC standard 1131-3
Note: l Note 1: This type of data has not yet been set up for the user to be able to see.
Nevertheless, this table details their value formats in the IEC 1131-3 format.
TIME : from T#0 to T#429496729.5s
l
TIME_OF_DAY: from TOD#0:0:0 to TOD#23:59:59
DATE_AND_TIME: from DT#1990-01-01:0:0:0 to DT#2099-12-31:23:59:59
DATE: from D#1990-01-01 to D#2099-12-31DT#2099-12-3
Note 2: Rounding is done as follows: from x.0 s to x.4 s, you round to x s and l from x.5 s to x.9 s you round to x+1 s.
Note 3: All types of directly represented variable can be indexed positively and negatively within the limit of their respective maximums defined in configuration.
TLX DR PL7 xxE
69
Compliance with IEC standard 1131-3
Error situations
General Description of PL7 parameters which depend on implementation.
The following table lists implementations in PL7 languages. This information is in regard to tables of characteristics described in the IEC 1131-3 standard.
Table of characteristics
Error situations
Type conversion errors
Error situations:
The digital result exceeds the format for the data type
Position of specified characters is invalid
The result exceeds the maximum string length
Edge effects during transition evaluation
Execution delays are not respected
Other task scheduling conflicts
Division by 0
Data type invalid for an operation
FOR or WHILE iteration failure to be finished
PL7 limitations and behavior
Indicated during execution via the arrangement of a system bit: cf Common elements table: table 22, characteristic 1
Indicated during execution by the data type repositioning the system bit %S18
Indicated during execution via the arrangement of system bit %S18
Indicated during execution via the string arranging system bit %S15
Detected during programming
Indicated on execution via the arrangement of system bit
%S19
Detected during configuration
Detected during programming if possible, if not it is indicated during execution via the arrangement of system bit
%S18
On the occurrence of a fault, the PLC overruns the watchdog and the programming unit concerned is then indicated
70
TLX DR PL7 xxE
OLE Automation Server
5
Introduction
Contents of this section
This section describes how the OLE Automation server works
What's in this
Chapter?
This Chapter contains the following Sections:
Section
5.1
5.2
5.3
Topic
Introduction
Implementation
OLE Functions
Page
TLX DR PL7 xxE
71
OLE Automation Server
5.1
Introduction
Introduction
Subject of this sub-section
What's in this
Section?
This sub-section makes some general points concerning the OLE Automation server
This Section contains the following Maps:
Topic
Introduction to the OLE Automation server
OLE Automation server operating modes
Page
72
TLX DR PL7 xxE
OLE Automation Server
Introduction to the OLE Automation server
Introduction The OLE Automation Server PL7 functionality offers the possibility of executing the
PL7 in a programmed, non-interactive mode (i.e. without operator intervention) for applications external to the PL7. You use PL7 OLE Automation Server client application terminology.
PLC
Server
Client
Applications clients
PL7
*.stx
Conforming fully with the standard defined by Microsoft in its OLE package to respond to this need, PL7 now features a standard, public interface, which is independent of the client application programming language.
l l l l
The characteristic principles are: automation of repetitive tasks delegation to PL7 of processing tasks that only it can handle access to application information contained in the *.stx files more generally, development of higher level integrator type function, with encapsulation of PL7 specific implementation details.
TLX DR PL7 xxE
73
OLE Automation Server
Context of use The OLE Automation server PL7 functionality is built into PL7 Pro. It is installed and used under the same installation and use conditions as PL7. The OLE Automation server is supported by the Microsoft OLE Automation run-time provided with
Windows 95, 98 and NT
Note: To create an OLE server client application, you must know one of the l l l following OLE Automation programming languages:
Microsoft Visual Basic, version 5.0 or above
Microsoft Visual C++, version 4.2 or above
Microsoft VBA in Excel, version 5.0 or above.
74
TLX DR PL7 xxE
OLE Automation Server
OLE Automation server operating modes
General
Description
In addition to the PL7 operating mode known up until the present which is designated as "interactive", where the PL7 reacts to operator inputs only, there is now the OLE automation server operating mode where the PL7 can also react to commands transmitted from an OLE client application.
Operating mode selection is dependen on the PL7 start procedure: l Interactive mode is initialized during PL7 start via Windows (Start menu/
Programs/ Modicon Telemecanique/PL7 Pro.).
l Server mode is selected if the OLE Automation PL7 server is invoked in the programming of an OLE client application. An instance can not change the current mode.
Each time a client application invokes the OLE Automation PL7 server, a specific
PL7 instance is started, independently of any other instances which may be in progress. Any number of PL7 instances in server mode or interactive mode can be running on the same terminal. The instances are all completely independent of each other and so can each run in their own context.
For all of these instances the same denial rules concerning concurrent access to an
STX application or a PLC apply, these being: an STX application or a PLC can only be handled by one instance at a time.
This rule was developed for the OLE Automation PL7 server which can open an already open STX application but not save it. In the same way, it can perform a PLC
—> PC transfer, on explicit demand, from a reserved PLC.
A client application can instantiate several competing "OLE Automation PL7 servers".
TLX DR PL7 xxE
75
OLE Automation Server
5.2
Implementation
Introduction
Subject of this sub-section
What's in this
Section?
This sub-section describes the procedure for implementation of the OLE Automation server
This Section contains the following Maps:
Topic
Installation of OLE Automation
Accessing the PL7 OLE Automation server
Server start in local mode (COM mode)
Server start in remote mode (DCOM)
Implementing the server in remote mode
PL7 Server execution modes
Input points: OLE Function
Page
76
TLX DR PL7 xxE
OLE Automation Server
Installation of OLE Automation
Description l l
Installation of the PL7 product OLE Automation Server is transparent for the user, as it self-installs during PL7 installation.
The installation includes: l Four OLE Automation client examples, complete with source code and README file supplied with the software.
These examples are: l l a "minimal" visual C++ 4.2 client: the minimum needed to be able to write an
OLE client.
a "complete" visual C++ 4.2 client, which makes use of all the available input points.
l a visual Basic 5.0 client, which makes use of all the available input points.
l an Excel client.
A *.h file which defines the value of the error codes generated by the server.
A TLB interface file for a Visual C++ client.
TLX DR PL7 xxE
77
OLE Automation Server
Accessing the PL7 OLE Automation server
Local access
The PL7 OLE Automation server offers two ways to access its utilities.
The client application and the PL7 OLE Automation server are on the same terminal.
Remote access via DCOM
The client application and the PL7 Automation server are on two separate terminals which are linked by the TCP/IP network:
Client station Server station
DCOM
78
TLX DR PL7 xxE
OLE Automation Server
Server start in local mode (COM mode)
Introduction COM mode (Component object Model) defines an interface for communication between applications. It provides independence from the development tools.
Server start in local mode (COM mode)
To start the server in local mode, follow the procedure below:
1
2
3
4 declare an object " A " on the client application to communicate with the server application
Execute a Createdispatch function on object " A " from the client application in order to instantiate the server application
Save PL7Pro as OLE server in the register base for correct operation in server mode
(the link between the client application and the server application is created if the latter is referenced in the register base).
The client application can now interrogate the server application via the interface accessed through object "A".
E.g.: OpenStx("C:\appli.stx).
TLX DR PL7 xxE
79
OLE Automation Server
Server start in remote mode (DCOM)
Introduction The PL7 server runs according to the information present in its register base. It can be located on the client machine or on a remote machine.
DCOM mode is an extension of COM (Component Object Model) mode. COM mode is used for a client application and a server application to communicate with each other on one machine.
DCOM mode is used for two remote machines to communicate with one another. It replaces inter-process communication protocols with network protocols.
Illustration of OLE Automation operation in remote server mode:
Driver choice
PL7Servur
Client
PC a
Client
Client
PC b
COM run-time
Security provider
DCE RPC
Protocol stack
Driver choice
PL7Server
PC c
COM run-time
Security provider
DCE RPC
Protocol stack
Component
DCOM network protocol
80
TLX DR PL7 xxE
Configuration utility
OLE Automation Server
To establish communication between two machines, we use a configuration utility called, "DCOMCNFG.EXE".
By default, the utility "DCOMCNFG.EXE" included in Windows 95. The user must connect to the following Internet address: " http://www.microsoft.com " and search on this site to download this utility. This allows the server to operate in
DCOM when running Windows 95.
TLX DR PL7 xxE
81
OLE Automation Server
Implementing the server in remote mode
Example of use
Procedure
Let’s suppose a machine A (Windows NT 4) installed with a PL7Pro server.
The machine user must log in as "administrator" in order to manage access rights.
The client is machine B (Windows 95).
Follow the procedure outlined below:
1 Start DCOMCNFG on machine B: l Select the «Default Properties» tab to view the following information: l l
[X] "Enable Distributed COM on this computer"
Default Authentication Level: CONNECT l l Default Impersonation Level: Identify
On the «Default Security» tab, check the option: l l [X] Enable remote connection
On the «Application» tab: l Select PL7Pro server "PL7 server", then "properties"
2 Start DCOMCNFG on machine A: l Select the «Default Properties» tab to view the following information: l l
[X] «Enable Distributed COM on this computer
Default Authentication Level: CONNECT l Default Impersonation Level: Identify
3 Machine B, the "Client" can control PL7Pro server" located on machine A.
4 Select the «Default security» tab, and add the users who are to have write authorization on the machine.
For more information
There are Newsgroups on the Internet, where you can ask questions about DCOM.
82
TLX DR PL7 xxE
OLE Automation Server
PL7 Server execution modes
Introduction
Execution modes
The OLE Automation PL7 server has two execution modes which can be chosen dynamically during execution (see SetHMIServer ) l l
Execution mode without HMI. The PL7 is started as a "background task", with no display or possibility of operator input. It is the mode used typically, for example, to automate repetitive tasks or to access application information contained in an stx file.
Application mode with HMI. The PL7 is started as an "interactive" PL7 with display and the possibility of operator input but it remains receptive to commands from its client application. This mode has been developed to view the program or configuration elements of an application contained in an stx file using external tools such as DIAG Viewer.
Note: Utilities for displaying programs, tools, and modules can only be executed in the mode with HMI.
The OLE Automation PL7 server in HMI mode is subject to monitoring of user rights. It is set in "Read Only" user profile, which corresponds to its code display and PL7 I/O module display role.
When not in HMI mode the OLE Automation PL7 server is not subject to monitoring of user rights but the application cannot be modified with the utilities provided.
TLX DR PL7 xxE
83
OLE Automation Server
Input points: OLE Function
Introduction
Execution context l l l l
There are four types of input points:
Execution context
API monitoring
Read information
Application element display
Input points
Name
OpenStx
SaveStx
CloseStx
Set DriverAndAddress
SetServerHMI
GetPL7HMI
GetMessageError
Description
Opening an application
Saving the active application
Closing the active application
Setting the driver and the address of the accessed PLC
Making the OLE Automation PL7 server interactive or noninteractive
Giving the status: open or closed application, local – online mode , API status
Reads the error message associated with the error code
API monitoring Input points
Name
ConnectPLC
DisconnectPLC
SenCommandToPLC
DownloadToPLC
UploadFromPLCM
Description
Enters online mode
Exits online mode
Command sent to the PLC (RUN, STOP INIT)
Loading the active application into a PLC
Copies a PLC application into the active application
84
TLX DR PL7 xxE
OLE Automation Server
Read information Input points
Name
ExportScyFile
ExportFefFile
GetSymbol
GetSTXAppIdentity
GetPLCAppIdentity
GetServerVersion
Application element display
Input points
Name
SetPosPL7Window
ShowProgram
CloseProgram
ShowIOModule
CloseIOModule
ShowDFB
CloseDFB
OpenTool
Description
Exports the symbols in the active application as an scy file
Exports the active application as an fef file
Reads the symbol and the comment associated with an address
Reads the general application information contained in an
STX file
Reads the general application information contained in a
PLC
Reads the server version
Description
Sets the PL7 display characteristics (position and form)
Opens an editor on a given program module
Closes a program editor
Opens an editor on a given I/O module
Closes a given I/O module editor
Opens an editor on a given DFB code
Closes a editor on the given DFB code
Opens any MDI tool without context
Note: The input points concerning application element display do not work if the server is not in HMI mode.
TLX DR PL7 xxE
85
OLE Automation Server
5.3
OLE Functions
Introduction
Subject of this sub-section
What's in this
Section?
This sub-section describes the OLE functions of the OLE Automation server
This Section contains the following Maps:
Topic
OpenStx
CloseStx
OpenStxWithMaj
ExportScyFile
ExportFeFile
ExportFefFileWithConfiguration
DisconnectPLC
ConnectPLC
SaveStx
DownloadDataToPLC
DownloadToPLC
UploadFromPLC
UploadDataFromPLC
UploadFromPLCWithSymbol
GetSymbol
SetServerHMI
SetDownloadFunction
GetPL7State
GetSTXAppIdentity
GetPLCAppIdentity
SendCommandToPLC
SetDriverAndAddress
OpenTool
SetPosPL7Windows
ShowProgram
CloseProgram
86
Page
TLX DR PL7 xxE
Topic
ShowIOModule
CloseIOModule
ShowDFB
CloseDFB
GetMessageError
GetServerVersion
ImportScyFile
OLE Automation Server
Page
TLX DR PL7 xxE
87
OLE Automation Server
OpenStx
General
Description
This function is used to open the stx file application type.
Syntax: integer OpenStx(String lpAppPathName) l l l l
Input:
Enter the string of characters containing the name of the file that needs to be opened.
Function called:
OpenStation : Station management function (gesta.dll).
Nominal context:
The PL7 server is active.
When there is an error:
SRV_ERR_GEN_FILENOTFOUND
SRV_ERR_OPEN_BADZIP
SRV_ERR_OPEN_BADFILE There is a problem reading the stx file
SRV_ERR_OPEN_NOK_COMPATIBLE The processor is not compatible with the PL7 being open.
SRV_ERR_OPEN_OPEN
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_DRIVE FULL
The file has not been found. Open Station
There is a problem with opening the file
An application is already open
The Path Name is empty
There is an error on opening the application
There is no more free disk space for opening the application l Output:
Short type feedback code. Either 0 on a successful opening, or error code.
88
TLX DR PL7 xxE
OLE Automation Server
CloseStx
General
Description
This function is used to close the current application
Syntax: integer CloseStx( integer p_bWithoutSave) l l l l
Input:
If an application has been modified, it can be closed without having to notify the user ( p_bWithoutSave a TRUE ).
Function called:
CloseStation : Station management function (gesta.dll).
Nominal context:
The PL7 server is active and an application is open.
When there is an error:
SRV_ERR_GEN_NOTOPEN
SRV_ERR_CLOSE_NOTSAVE
No application is open.
The application has been modified, and changes must be saved before closing.
l Output:
Short type feedback code. Either 0 on a successful closing, or error code.
TLX DR PL7 xxE
89
OLE Automation Server
OpenStxWithMaj
General
Description
This function is used to export the active application along with its configuration to a fef file.
Syntax:
OpenStxWithMaj integer (NameFile string, WithNewCat integer) l l l l
Input: l Enter 1 character string containing the name and the path of the stx file that you wish to open.
l An integer which indicates whether or not it is necessary to update the catalog files (0 for no update necessary or 1 for update necessary).
Function called:
OpenStation: Station management function (gesta.dll).
Nominal context: l The PL7 server is active, l PL7 is in offline mode.
Errors:
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_DRIVEFULL
SRV_ERR_OPEN_OPEN
SRV_ERR_GEN_FILENOTFOUND
SRV_ERR_OPEN_BADZIP
Error occurred while the function was being executed.
The name of the dat file is incorrect or empty.
No free space on disk available to open the application.
An application is already open.
The file could not be found.
Problem encountered when extracting zip file.
l l
Output:
Short return code. Either 0 for a successfully opened station, or an error code.
Limitations:
Once an import has been successful, a PL7 server without an HMI cannot operate with an HMI without first saving the open application.
90
TLX DR PL7 xxE
OLE Automation Server
ExportScyFile
General
Description
This function is used to export symbols in the enabled application under the scy file format.
Syntax: integer ExportScyFile(String p_psScyFile) l l l l
Input:
Enter the character string containing the scy file name.
Function called:
ExportScyFile : Station management function (gesta.dll).
Nominal context:
The PL7 server is active. An application is open.
When there is an error:
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_NOTOPEN
Error on creation of sourcesymbol file.
No application is open.
SRV_ERR_GEN_PARAM_EMPTY p_ psScyFile is empty.
SRV_EXPORT_ERRFILE A write error has occurred in the source file.
l Output:
Short type feedback code. Is either 0 on a successful export, or error code.
TLX DR PL7 xxE
91
OLE Automation Server
ExportFefFile
General
Description
This function is used to export the active application under the fef file format.
Syntax: integer ExportFefFile(String p_psNamefile) l l l l
Input:
Enter the character string containing the fef file name.
Function called:
ExportFefFile : Station management function (gesta.dll).
Nominal context:
The PL7 server is active. An application is open.
When there is an error:
SRV_ERR_GEN_ACTION Error on creation of source application file.
SRV_ERR_GEN_PARAM_EMPTY No application is open.
SRV_ERR_GEN_PARAM_EMPTY p_ psNamefile is empty.
SRV_EXPORT_ERRFILE A write error has occurred in the source file.
l Output:
Short type feedback code. Is either 0 on a successful export, or error code.
92
TLX DR PL7 xxE
OLE Automation Server
ExportFefFileWithConfiguration
General
Description
This function is used to export the active application along with its configuration to a fef file.
Syntax:
ExportFefFileWithConfiguration integer (FefFile string) l l l l
Input:
Enter 1 character string containing the name and the path of the scy file that you wish to export.
Function called:
ExportFefFileWithConf: Station management function (gesta.dll).
Nominal context: l The PL7 server is active, l PL7 is in offline mode, and the station is open.
Errors:
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_NOTOPEN
SRV_EXPORT_ERRFILE
Error occurred while the function was being executed.
The name of the dat file is incorrect or empty.
No STX application open.
Unable to create the export file.
l Output:
Short return code. Either 0 for a successful export, or an error code.
TLX DR PL7 xxE
93
OLE Automation Server
DisconnectPLC
General
Description
This function is used to carry out disconnection between the PLC and the PL7.
Syntax: integer ExportFefFile(String p_psNamefile) l l l
Function called:
DisconnectStation : Station management function (gesta.dll).
Nominal context:
The PL7 server is active.
Output:
Short feedback code type. Either shows 0 on a successful disconnection, or error code (SRV_ERR_GEN_ACTION).
94
TLX DR PL7 xxE
OLE Automation Server
ConnectPLC
General
Description
This function is used to connect up to a PLC.
Syntax: integer ConnectPLC(String p_lpDriver, String p_lpAddress) l l l l
Enter:
Enter the two character strings containing the driver and the PLC address.
Function called:
ConnectStation : Station management function (gesta.dll).
Nominal context:
The PL7 server is active. Wherever parameters consist of empty strings, the server carries out the function using the driver and/or the current address.
When there is an error:
SRV_ERR_GEN_CONNECT
SRV_ERR_GEN_COMMUNICATION
SRV_ERR_GEN_RESERVED
SRV_ERR_PLC_BLANK
SRV_ERR_PC_BLANK
SRV_ERR_DIFFERENCE_PLC_STX
SRV_ERR_GEN_ADDRESS
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_DRIVER
SRV_ERR_GEN_NOTOPEN
SRV_ERR_GEN_PROTECTEDAPPLI
SRV_COMPATIBLE_PLC
Connection was unsuccessful.
There is a communication problem between the PL7pro and the PLC
The PLC has been reserved, and therefore cannot be connected to.
The PLC does not contain any applications, and therefore connection cannot take place.
No applications are open, and therefore connection cannot take place.
The application which is open and the application contained in the PLC are different, and it is therefore impossible for connection to take place.
The parameter address is invalid.
An error has occurred on carrying out the function.
The parameter driver is invalid.
No application is open.
Protected application.
There is a compatibility problem with the PLC.
l Output:
Short type feedback code. Either 0 on a successful connection, or error code.
TLX DR PL7 xxE
95
OLE Automation Server
SaveStx
General
Description
This function is used to save the application which is open.
Syntax: integer SaveStx(String p_lpStxFile) l l l l
Enter:
Enter a character string containing the path and the name of the file to be saved.
Function called:
SaveStx : Station management function (gesta.dll).
Nominal context:
The PL7 server is active. An application is open and PL7 is in offline mode.
When there is an error:
SRV_ERR_SAVEDENIED
SRV_ERR_SAVEERRZIP
SRV_ERR_SAVEERRREN
SRV_ERR_GEN_NOTOPEN
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_ACTION
SRV_ERR_PLC_CONNECT
Access to the file has been refused
An error has occurred on compacting the application
Renaming has not been allowed
No application is open p_ lpStxFile is empty.
There is an error on saving the application
Saving can only be carried out in offline mode.
l Output:
Short type feedback code. Either 0 on a successful save, or error code.
96
TLX DR PL7 xxE
OLE Automation Server
DownloadDataToPLC
General
Description
This function is used to download a file containing words to the PLC.
Syntax:
DownLoadDataToPLC integer (Driver string, Address string, NameFile string) l l l l
Input:
Enter the 3 character strings containing the driver, the PLC address and the complete name of the dat file.
Function called: l l l
DownloadData: Station management function (gesta.dll).
Nominal context:
The PL7 server is active,
PL7 is in offline mode,
If the parameters (driver and address) are empty strings, the server executes the function with the current driver and/or address.
Errors:
SRV_ERR_DOWNLOAD_CART
SRV_ERR_COMPATIBLE_PLC
SRV_ERR_PC_BLANK
SRV_ERR_GEN_ADDRESS
SRV_ERR_GEN_DRIVER
SRV_ERR_GEN_RESERVED
SRV_ERR_GEN_COMMUNICATION
SRV_ERR_PLC_CONNECT
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_PROTECTEAPPLI
SRV_ERR_TRFDATA_READDS
Problem of compatibility of cartridge between the open application and the PLC.
Problem of compatibility between the open application and the PLC.
No application is open.
The p_IpAddress parameter is incorrect.
The p_IpDriver parameter is incorrect.
The PLC is reserved. It is therefore impossible to connect to the PLC.
Communication problem between PL7pro and the PLC.
You have to be in offline mode to download.
Error occurred while the function was being executed.
The name of the dat file is incorrect or empty.
The application is read-protected. It is not possible to connect to the PLC.
Communication error.
TLX DR PL7 xxE
97
OLE Automation Server
SRV_ERR_TRFDATA_NODATA
SRV_ERR_TRFDATA_READWRITE
SRV_ERR_TRFDATA_INFOFILE
SRV_ERR_TRFDATA_RUNREFUSED
SRV_ERR_TRFDATA_READOBJ
SRV_ERR_TRFDATA_WRITEOBJ
SRV_TRFDATA_OVERFLOW
SRV_TRFDATA_BORNENOCORRECT
Numerical variables not configured or incorrectly read. The file has not been created.
Problem with dat file.
Problem with dat file.
The PLC has refused the request to change to RUN (RUN/STOP input set to STOP).
Numerical variable read or write error.
Numerical variable read or write error.
Caution, the range of values was too large.
An overflow has occurred.
The minimum and maximum values are incorrect.
l Output:
Short return code. Either 0 for a successful download, or an error code.
98
TLX DR PL7 xxE
OLE Automation Server
DownloadToPLC
General
Description
This function is used to download an application into the PLC memory.
Syntax: integer DownloadToPLC(String p_lpDriver, String p_lpAdresse) l l l l
Enter:
Enter the two character strings containing the driver and the PLC address.
Function called:
DownloadStation : Station management function (gesta.dll).
Nominal context:
The PL7 server is active. An application is open and PL7 is in offline mode.
Wherever parameters consist of empty strings, the server carries out the function using the driver and/or the current address.
When there is an error:
SRV_ERR_DOWNLOAD_CART
SRV_ERR_COMPATIBLE_PLC
SRV_ERR_GEN_ADDRESS
SRV_ERR_GEN_DRIVER
SRV_ERR_GEN_NOTOPEN
SRV_ERR_GEN_RESERVED
SRV_ERR_GEN_COMMUNICATION
SRV_ERR_PLC_CONNECT
SRV_ERR_PLC_ACTION
There is a memory cartridge compatibility problem between the application which is open and the PLC.
There is a compatibility problem between the
PLC and the application which is open.
The p_lpAdresse parameter is invalid.
The p_lpDriver parameter is invalid.
No application is open.
The PLC has been reserved.
Communication problem.
The PLC has already been connected.
An error has occurred while downloading.
l Output:
Short type feedback code. Either 0 on a successful download, or error code.
TLX DR PL7 xxE
99
OLE Automation Server
UploadFromPLC
General
Description
This function is used to copy an application in a PLC over to the memory.
Syntax: integer UploadFromPLC(String p_lpDriver, String p_lpAdresse, integer p_iReservedMode) l l l l
Input:
Enter the two character strings containing the driver and the PLC address. An integer ( p_iReservedMode ) which can be used to upload onto a reserved PLC.
Function called:
UploadStation : Station management function (gesta.dll).
Nominal context:
The PL7 server is active. There are no applications open and the PL7 is in offline mode. If parameters consist of empty strings, the server carries out the function using the driver and/or the current address.
When there is an error:
SRV_ERR_UPLOAD_TRANSFER
SRV_ERR_UPLOAD_ABORT
SRV_ERR_UPLOAD_RESERVED
SRV_ERR_UPLOAD_NOAPPLI
SRV_ERR_GEN_ADDRESS
SRV_ERR_GEN_ACTION
SRV_ERR_PLC_CONNECT
SRV_ERR_GEN_DRIVER
SRV_ERR_GEN_COMMUNICATION
SRV_ERR_PLC_CONNECT
SRV_OPEN_NOT_COMPATIBLE
There is a problem in transferring the application contained in the PLC
Transfer is put on hold.
The application has been reserved.
The PLC is empty.
Invalid address.
An error has occurred in carrying out the function.
There is a connection error.
Invalid driver.
There is a communication error.
The PLC has already been connected.
Compatibility problem.
l Output:
Short type feedback code. Either 0 on a successful upload, or error code.
100
TLX DR PL7 xxE
OLE Automation Server
UploadDataFromPLC
General
Description
TLX DR PL7 xxE
This function is used to upload a file containing words contained in the PLC.
Syntax:
UpLoadDataFromPLC integer (Driver string, Address string, ValMin integer, ValMax integer,
NameFile string) l l l l
Input: l Enter the 3 character strings containing the driver, the PLC address and the l complete name of the dat file,
Enter the 2 integers for the minimum and maximum values you wish to retrieve.
Function called: l l l
UploadData: Station management function (gesta.dll).
Nominal context:
The PL7 server is active,
PL7 is in offline mode,
If the parameters (driver and address) are empty strings, the server executes the function with the current driver and/or address.
Errors:
SRV_ERR_COMPATIBLE_PLC
SRV_ERR_GEN_ADDRESS
SRV_ERR_GEN_DRIVER
SRV_ERR_GEN_RESERVED
SRV_ERR_GEN_COMMUNICATION
SRV_ERR_PLC_CONNECT
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_PROTECTEAPPLI
SRV_ERR_TRFDATA_READDS
SRV_ERR_TRFDATA_NODATA
Problem of compatibility between the open application and the PLC.
The p_IpAddress parameter is incorrect.
The p_IpDriver parameter is incorrect.
The PLC is reserved. It is therefore impossible to connect to the PLC.
Communication problem between PL7pro and the PLC.
You have to be in offline mode to download.
Error occurred while the function was being executed.
The name of the dat file is incorrect or empty.
The application is read-protected. It is not possible to connect to the PLC.
Communication error.
Numerical variables not configured or incorrectly read. The file has not been created.
101
OLE Automation Server
SRV_ERR_TRFDATA_READWRITE
SRV_ERR_TRFDATA_INFOFILE
SRV_ERR_TRFDATA_RUNREFUSED
SRV_ERR_TRFDATA_READOBJ
SRV_ERR_TRFDATA_WRITEOBJ
SRV_TRFDATA_OVERFLOW
SRV_TRFDATA_BORNENOCORRECT
Problem with dat file.
Problem with dat file.
The PLC has refused the request to change to RUN (RUN/STOP input set to STOP).
Numerical variable read or write error.
Numerical variable read or write error.
Caution, the range of values was too large.
An overflow has occurred.
The minimum and maximum values are incorrect.
l Output:
Short return code. Either 0 for a successful upload, or an error code.
102
TLX DR PL7 xxE
OLE Automation Server
UploadFromPLCWithSymbol
General
Description
TLX DR PL7 xxE
This function is used to upload an application with the associated symbols contained in the PLC.
Syntax:
UpLoadFromPLCWithSymbol integer (Driver string, Address string, ReserveMode integer) l l l l
Input:
Enter the 2 character strings containing the driver and the PLC address. An integer ( p_IReserveMode ) allowing a PLC to PC transfer to be performed on a reserved PLC.
Function called: l l l
UploadStationWithSymbol: Station management function (gesta.dll).
Nominal context:
The PL7 server is active,
PL7 is in offline mode,
If the parameters (driver and address) are empty strings, the server executes the function with the current driver and/or address.
Errors:
SRV_ERR_COMPATIBLE_PLC
SRV_ERR_GEN_ADDRESS
SRV_ERR_GEN_DRIVER
SRV_ERR_GEN_RESERVED
SRV_ERR_GEN_COMMUNICATION
SRV_ERR_PLC_CONNECT
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_PROTECTEAPPLI
SRV_OPEN_NOK_COMPATIBLES
SRV_ERR_UPLOAD_NOAPPLI
Problem of compatibility between the open application and the PLC.
The p_IpAddress parameter is incorrect.
The p_IpDriver parameter is incorrect.
The PLC is reserved. It is therefore impossible to connect to the PLC.
Communication problem between PL7pro and the PLC.
You have to be in offline mode to download.
Error occurred while the function was being executed.
The name of the dat file is incorrect or empty.
The application is read-protected. It is not possible to connect to the PLC.
The server does not support the level of STX application to be opened.
An error occurred while the application was being transferred.
103
OLE Automation Server
SRV_ERR_UPLOAD_READINFOSYMB
SRV_ERR_UPLOAD_WRITEINFOSYMBOL Write error. If the disk is on which the dat file is saved is saturated.
SRV_ERR_UPLOAD_INVALIDSYMB On-board symbol database in the PLC invalid.
SRV_ERR_UPLOAD_INVALIDVERSION
Communication error while reading data from the on-board database..
The version of the on-board symbol database is not supported by this version of
PL7.
SRV_ERR_UPLOAD_SYMBERR
SRV_ERR_UPLOAD_NBSYMBERR_NOCO
RRECT
SRV_ERR_UPLOAD_SYMBFILE
Internal error in on-board symbol database.
Inconsistency in objects stored in the compressed database
SRV_ERR_UPLOAD_READSYMBFILE
SRV_ERR_UPLOAD_PBMEM
Problem reading from the database in the
PLC.
Error reading from the database in the PLC.
The memory is saturated. The operation cannot be completed in the normal way.
SRV_ERR_UPLOAD_ABORTSYMB
SRV_ERR_UPLOAD_CHECKSYMB
SRV_ERR_UPLOAD_DIFFSYMB
Reading of on-board symbol database abandoned.
A difference has been detected between the on-board "checksum" and the recalculated
"checksum".
A difference has been detected between the information transferred and the recalculated information.
l Output:
Short return code. Either 0 for a successful upload, or an error code.
104
TLX DR PL7 xxE
OLE Automation Server
GetSymbol
General
Description
This function is used to give the symbol and comment associated with an address.
Summary: integer GetSymbol(String p_lpRepere, String* p_bsSymbole, String* p_bsComment) l l l l
Input:
Enter the character string containing the address to be modified or completed.
Function called:
GetSymbol : Station management function (gesta.dll).
Nominal context:
The PL7 server is active. An application is open and in offline mode.
When there is an error:
SRV_ERR_ADDRESSSYNTAX
SRV_ERR_GEN_NOTOPEN
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_ADDRESS
SRV_ERR_GEN_ACTION the character string entered as a parameter does not match an address.
No application is open.
p_lpRepere is empty.
Error has occurred on carrying out the function.
Invalid address.
Error has occurred in carrying out the function.
l Output:
Short type feedback code. Either 0 on a successful upload, or error code.
l l
Two character strings:
The associated symbol ( p_bsSymbol ).
The associated comment ( p_bsComment )
TLX DR PL7 xxE
105
OLE Automation Server
SetServerHMI
General
Description
This function can be used to display (or not display) the PL7 server. It switches from one operating mode to another. i.e. switch from a PL7 Pro server without HMI to a
PL7 Pro server with HMI, and vice versa.
Syntax: integer SetServerHMI (integer p_bHMI) l l l l
Input:
A Boolean (HMI display or non-display).
Function called:
SetIHMServer : Windows application function (sawinapp.cpp).
Nominal context:
The PL7 server is active.
When there is an error:
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_MODIFAPPLI
Error has occurred on carrying out the function.
Application is in the process of being modified.
l Output:
Short type feedback code. Either 0 on a successful upload, or error code.
106
TLX DR PL7 xxE
OLE Automation Server
SetDownloadFunction
General
Description
This function is used to authorize or block the transfer of an application to the PLC via the server.
Syntax:
SetDownloadFunction Boolean (Download integer) l l l l
Input:
Enter 1 integer (value 0 or 1) to activate or deactivate transfer of the application to the PLC,
Nominal context: l The PL7 server is active, l PL7 is in offline mode.
Output:
TRUE.
Limitations:
This function only prohibits the transfer when used in server mode.
TLX DR PL7 xxE
107
OLE Automation Server
GetPL7State
General
Description
This function is used to obtain the state of the server.
Syntax: integer GetPL7State(String* p_lpStation, String * p_lpConnection) l l l
Function called:
GetPL7State : Station management function (gesta.dll).
Nominal context:
The PL7 server is active.
When there is an error:
SRV_ERR_GEN_ACTION An error has occurred on carrying out the function.
l Output:
Short feedback code type. Either 0 on a successful upload, or error code.
l l
Two character strings inform the user on:
The state of the station (open or closed).
The mode state (on- or offline). In online mode, the state of the PLC (run or stop) is indicated.
108
TLX DR PL7 xxE
OLE Automation Server
GetSTXAppIdentity
General
Description
This function is used to find out general information about an application.
Syntax: integer GetSTXAppIdentity(String p_lpNameStx, VARIANT FAR* p_pVarInfo) l l l l
Enter:
Enter the character string ( p_1pNameStx ) containing the name of the application.
Function called:
IdentAppliForm : Station management function (gesta.dll).
Nominal context:
The PL7 server is active.
When there is an error:
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_ACTION
SRV_ERR_APPLIINFO_NOK p_ lpNameStx is empty.
An error has occurred on carrying out the function.
Invalid information l Output:
Short feedback code type. Either 0 on a successful upload, or error code.
Displayed information:
6
7
4
5
2
3
0
1
8
9
10
11
Station name,
Application version number,
Date and time of modification
Station application ID,
ID concerning local inputs/outputs configuration,
ID concerning remore inputs/outputs configuration,
PL7 code ID
Grafcet ID,
Constants ID,
Symbol ID,
ID for reservations,
The comment associated with the application.
TLX DR PL7 xxE
109
OLE Automation Server
GetPLCAppIdentity
General
Description
110
This function is used to find out general information about an application in a PLC.
Syntax: integer GetPLCAppIdentity(String p_lpDriver, String p_lpAdresse, VARIANTFAR* p_pvInfoAppli) l l l l
Enter:
Enter the two character strings containing the driver and the PLC address.
Function called:
IdentAppliOnPlcForm : Station management function (gesta.dll).
Nominal context:
The PL7 sever is enabled and in offline mode.
When there is an error:
SRV_ERR_APPLIINFO_NOK
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_ADDRESS
SRV_ERR_COMPATIBLE_PLC
SRV_ERR_PLC_BLANK
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_DRIVER
SRV_ERR_GEN_COMMUNICATION
Invalid information
An error has occurred on carrying out the function.
Invalid address.
Compatibility problem between the API and PL7 software.
There are no applications in the PLC.
A problem has occurred while storing application information.
The p_lpDriver parameter is invalid.
There is a communication error.
4
5
6
2
3
0
1 l Output:
Short feedback code type. Either 0 on a successful upload, or there is a code error.
Displayed information:
Station name,
Application version number,
Date and time of modification
Station application ID,
ID concerning local inputs/outputs configuration,
ID concerning remote inputs/outputs configuration,
PL7 code ID
TLX DR PL7 xxE
7
8
9
10
11
Grafcet ID,
Constants ID,
Symbol ID,
ID for reservations,
The comment associated with the application.
OLE Automation Server
TLX DR PL7 xxE
111
OLE Automation Server
SendCommandToPLC
General
Description
This function is used to send a command to the PLC.
Syntax: integer SendCommandToPLC(integer p_iCommand)) l l l l
Enter:
The type of command that is to be executed
There are 3 possible types: l SRV_COMMAND_INIT: Command to initialize PLC l SRV_COMMAND_STOP: Command to stop PLC l SRV_COMMAND_RUN: Command to run PLC
Function called:
StationCommand : Station management function (gesta.dll).
Nominal context:
The PL7 server is active. An application is open, and PL7 is online and in STOP mode.
When there is an error:
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_NOTOPEN
SRV_ERR_COMMAND_NOTINLOCAL
SRV_COMMAND_ERRINIT
Invalid command.
There are no applications open.
The server is in offline mode.
INIT function cannot be carried out as PLC is already in RUN mode.
l Output:
Short feedback code type. Either 0 on a successful upload, or there is a code error.
112
TLX DR PL7 xxE
OLE Automation Server
SetDriverAndAddress
General
Description
This function is used to change the driver and the address for the current station.
Syntax: integer SetDriverAndAddress(String p_lpDriver, String p_lpAddress) l l l l
Enter:
Enter the two character strings containing the driver and the PLC address.
Function called:
DriverAndAddress : Station management function (gesta.dll).
Nominal context:
The PL7 server is active. An application is open and in offline mode. If parameters are not fully completed or are invalid, their current values remain unchanged.
When there is an error:
SRV_ERR_GEN_ADDRESS
SRV_ERR_GEN_DRIVER
SRV_ERR_PLC_CONNECT
SRV_ERR_PLC_ACTION
The address put into the parameter is invalid.
The driver in the parameter is invalid.
The server is in online mode.
An error has occurred on carrying out the function.
The parameters are empty.
SRV_ERR_PARAM_EMPTY l Output:
Short feedback code type. Either 0 on a successful upload, or there is a code error.
TLX DR PL7 xxE
113
OLE Automation Server
OpenTool
General
Description
This function is used to open the tools present in the character string placed in the parameters.
Syntax: integer OpenTool(String p_lpListTool)) l l l l
Enter:
The character strings containing the list of tools that the server must open.
Formatting example: tools1;tools2;tools3
Function called:
OpenTool : Station management function (gesta.dll).
Nominal context:
The PL7 server with HMI is enabled. An application is open.
When there is an error:
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_NOTOPEN
SRV_ERR_GEN_WITHIHM
SRV_ERR_GEN_OPENEDTVDATA l Output:
Short feedback code type.
A tool cannot be opened.
Empty parameter.
No application is open.
Function available using PL7 server in HMI mode.
The "Animation Table" tool cannot be opened.
114
TLX DR PL7 xxE
OLE Automation Server
SetPosPL7Windows
General
Description
This function is used to set the position of the PL7 window.
Syntax: integer PosPL7Windows(integer CoordX, integer CoordY, integer CoordCX,integer
CoordCY) l l l l
Enter:
Th X-Y coordinates for the window.
Function called:
MoveWindow : mfc. function
Nominal context:
The PL7 server with HMI is enabled.
When there is an error:
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_WITHIHM
Command failed.
Empty parameter.
Function available using PL7 server in HMI mode.
l Output:
Short feedback code type.
TLX DR PL7 xxE
115
OLE Automation Server
ShowProgram
General
Description
This function is used to open the programs present in the parameter string placed in the parameters.
Syntax: integer ShowProgram(String p_lpListProgram)) l l l l
Enter:
Enter the character strings containing the list of programs that the server must open.
Formatting example: mast\lad1;mast\lit2;evt\evt0;sr1;mast\prl
Function called:
ShowProgram : Station management function (gesta.dll).
Nominal context:
The PL7 server with HMI is enabled.
An application is open.
When there is an error:
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_NOTOPEN
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_WITHIHM
Command failed.
There are no applications open.
Empty parameter.
Function available using PL7 server in HMI mode.
The module cannot be opened.
SRV_ERR_GEN_SHOWPROGRAM l l
Output:
Short feedback code type. Either 0 on a successful upload, or there is a code error.
Limitations:
This function is not able to open a non-instanced DFB. To display a noninstanced DFB code, the ShowDFB function must be used.
116
TLX DR PL7 xxE
OLE Automation Server
CloseProgram
General
Description
This function is used to close the programs present in the character string placed in the parameters.
Syntax: integer CloseProgram(String p_lpListProgram) l l l l
Enter:
The character strings containing the list of programs that the server must close.
Formatting example: mast\lad1;mast\lit2;evt\evt0;sr1;mast\prl.
Function called:
CloseProgram : Station management function (gesta.dll).
Nominal context:
The PL7 server with HMI is enabled.
An application is open.
When there is an error:
SRV_ERR_GEN_NOTOPEN
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_WITHIHM
There are no applications open.
Close failed.
Empty parameter.
Function available using PL7 server in HMI mode.
The module cannot be closed.
SRV_ERR_GEN_CLOSEPROGRAMM l l
Output:
Short feedback code type. Either 0 on a successful upload, or there is a code error.
Limitations:
This function cannot close a DFB which is open.
TLX DR PL7 xxE
117
OLE Automation Server
ShowIOModule
General
Description
This function is used to open the input/output modules present in the character string placed in the parameters.
l l l l
Enter:
The character strings containing the list of modules that the server must open.
The formatting for the character string is rack,module; rack,module
Formatting example: 0,0;0,1;1,2
Function called:
ShowIOModule : Station management function (gesta.dll).
Nominal context:
The PL7 server with HMI is enabled.
An application is open.
When there is an error:
SRV_ERR_GEN_NOTOPEN
SRV_ACTION_NOK
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_WITHIHM
There are no applications open.
There is a problem with enabling user rights.
Empty parameter.
Function available using PL7 server in HMI mode.
l l
Output:
Short feedback code type. Either 0 on a successful upload, or there is a code error.
Limitations:
An IO module is opened in offline mode, while the module configuration screen is open. If the user changes from offline to online mode, the server does not switch from the configuration screen to the debugging screen. The user can either operate the PL7 Pro directly or open/close the module using a client.
118
TLX DR PL7 xxE
OLE Automation Server
CloseIOModule
General
Description
This function is used to close the input/output modules present in the character string placed in the parameters.
Syntax
CloseIOModule(String p_lpListIOModule) integer.
l l l l
Enter:
The character strings containing the list of modules that the server must open.
formatting example: 0,0;0,1;1,2
Function called:
CloseIOModule : Station management function (gesta.dll).
Nominal context:
The PL7 server with HMI is enabled.
An application is open.
When there is an error:
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_NOTOPEN
SRV_ERR_GEN_WITHIHM
Close command failed.
Empty parameter.
There are no applications open.
Function available using PL7 server in HMI mode.
l l
Output:
Short feedback code type. Either 0 on a successful upload, or there is a code error.
Limitations:
This function does not close the configuration editor which is open using the
ShowIOModule function.
TLX DR PL7 xxE
119
OLE Automation Server
ShowDFB
General
Description
This function is used to display the code for one or many DFBs present in the character string placed in the parameters. Opening a DFB using this application does not require instancing.
Syntax integer ShowDFB(String p_lpListeDFB) l l l l
Enter:
The character strings containing the list of DFBs that the server must open.
Function called:
ShowDFB : Station management function (gesta.dll).
Nominal context:
The PL7 server with HMI is enabled.
An application is open.
When there is an error:
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_NOTOPEN
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_WITHIHM
Empty parameter
There are no applications open
A problem has occurred while opening a DBF.
Function available using PL7 server in HMI mode.
l Output:
Short feedback code type. Either 0 on a successful upload, or there is a code error.
120
TLX DR PL7 xxE
OLE Automation Server
CloseDFB
General
Description
This function is used to close the one or several DFBs present in the character string placed in the parameters.
Syntax integer CloseDFB(String p_lpListeDFB) l l l l
Enter:
The character strings containing the list of DFBs that the server must close.
Function called:
CloseDFB : Station management function (gesta.dll).
Nominal context:
The PL7 server with HMI is enabled.
An application is open.
When there is an error:
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_NOTOPEN
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_WITHIHM
Empty parameter
There are no applications open
A problem has occurred while opening a DBF.
Function available using PL7 server in HMI mode.
l Output:
Short feedback code type. Either 0 on a successful upload, or there is a code error.
TLX DR PL7 xxE
121
OLE Automation Server
GetMessageError
General
Description
This function is used to associate an error message with and according to the error code placed in the parameters.
Syntax
String GetMessageError(integer p_iCodeError) l l l
Enter:
The error code for one of the departments to return.
Nominal context:
The PL7 server is active.
Output:
A character string corresponding to the error label.
122
TLX DR PL7 xxE
OLE Automation Server
GetServerVersion
General
Description
This function is used to find out the version number for the PL7 Pro server.
Syntax
String GetServerVersion() l l
Nominal context:
The PL7 server is active.
Output:
A character string corresponding to the version number label for the PL7 Pro server.
TLX DR PL7 xxE
123
OLE Automation Server
ImportScyFile
General
Description
This function is used to import symbols into the active application from a scy file.
Syntax:
ImportScyFile integer (ScyFile string) l l l l
Input:
Enter 1 character string containing the name and the path of the scy file that you wish to import.
Function called:
ImportScyFile: Station management function (gesta.dll).
Nominal context: l The PL7 server is active, l PL7 is in offline mode, and the station is open.
Errors:
SRV_ERR_GEN_ACTION
SRV_ERR_GEN_PARAM_EMPTY
SRV_ERR_GEN_NOTOPEN
SRV_ERR_SRC_FILE
Error occurred while the function was being executed.
The name of the dat file is incorrect or empty.
No STX application open.
Problem with source file.
l l
Output:
Short return code. Either 0 for a successful import.
Limitations:
Once an import has been successful, a PL7 server without an HMI cannot operate with an HMI without first saving the open application.
124
TLX DR PL7 xxE
Instruction times
6
At a Glance
Aim of this chapter
What's in this
Chapter?
This chapter describes the PL7 language instruction times. Thus it can be used to calculate the execution time for an application and the memory size occupied.
This Chapter contains the following Sections:
Section
6.1
6.2
6.3
6.4
Topic
General information
Instruction times on Micro PLCs instruction times on Premium PLCs
Advanced functions
Page
125
TLX DR PL7 xxE
Instruction times
6.1
General information
Calculation principles
Application program execution time
The execution time of the program can be calculated using the tables on the following pages to find the sum of all program instruction times.
Note: The time calculated is the maximum time.Operate blocks and subroutines are only processed if the condition of execution (logical equation determining the execution of a block or subroutine) is true, therefore it is possible that the actual time will be much shorter than the maximum time calculated.
Calculating the complete cycle time incorporates parameters which are specific to the PLC (overhead time, I/O Exchange time etc.). For the complete calculation procedure refer to the appropriate PLC operation manual (chapter on performance).
126
TLX DR PL7 xxE
Application memory size
Instruction times
The size of the application is equal to the sum of the following elements:
Element
Program
Advanced functions
Configured PL7 objects
Configured input/output module
Comments
Calculation method
Calculate the sum of each program instruction, and multiply by the appropriate coefficient corresponding to the language in use
(see next page)
See
Memory size for advanced functions, p. 213
See
See Review of the memory usage of the modules on MIcro,
and
Memory usage for the modules on Premium, p. 206
The program comments occupy 1 byte per character.
In the tables on the following pages, the information on sizes refers to the instruction code size.
To find out the total size of an instruction or a program, use a multiplier coefficient that takes into account information typical of each language.
Language
Ladder Language
Structured Text
Instruction List
Grafcet
Size
Total size = 1.7 x Code size
Total size = 1.6 x Code size
For the Micro PLC: Total size = 1.4 x Code size
For the Premium PLC: Total size = 1.6 x Code size
Chart size (in words) = 214 = 17 * number of chart steps = 2 * total number of configured steps + 4 * number of programmed actions
Note: The figures given in the following tables are average estimates, calculated using one application type. It is not possible to provide exact figures, as PL7 optimizes memory use according to the structure and contents of the application.
The chapter
Description of the memory zones, p. 201 gives a reminder of the
various memory areas taken up by the application.
TLX DR PL7 xxE
127
Instruction times
6.2
Instruction times on Micro PLCs
At a Glance
Aim of this section
What's in this
Section?
This section describes the time taken by instructions executed on Micro PLCs.
This Section contains the following Maps:
Topic
Boolean instruction performance characteristics
Instruction times for the function blocks
Integer and floating point arithmetic
Instructions on the program and monitoring structures
Digital conversions
Instructions on a string of bits
Instructions on tables of words, double words and floating points
Time management instructions
Instructions on strings of characters
Application-specific and Orphee functions
Explicit input/output instructions
Page
128
TLX DR PL7 xxE
Instruction times
Boolean instruction performance characteristics
Performance characteristics
LD IL
The table below shows the performance characteristics of the boolean instructions.
ST Objects Execution time (
µ s)
37 05/
08/10
37 20
RAM
37 20 card
0,25 0,13 0,19
Size
In word s
1
P
N
LD
LDN
LDR,
LDF
%M1 (1)
%M1[%MW2]
%MW0:X0 (2)
%IWi.j:Xk (3)
%MW0[%MW8]:X0
%KW0[%MW8]:X0
%M1
%M1[%MW2]
0,25
13.10
6.06
77.04
16.29
87.27
0.50
13.01
0,13
12.85
5.75
69.25
15.55
79.05
0.25
12.75
0,19
12.85
5.75
69.25
15.55
79.05
0.38
12.75
2
7
8
12
4
8
1
7
AND,
ANDN , AND (, AND (N , idem OR idem LD,LDN
ANDR, ANDF, AND (R, AND (F, idem OR idem LDR,LDF
P
N
TLX DR PL7 xxE
XOR
XORN
XORR,
XORF
%M1
%M1[%MW2]
%MW0:X0
%IWi.j:Xk
%MW0[%MW8]:X0
%KW0[%MW8]:X0
%M1
%M1[%MW2]
1.25
26.94
12.86
83.84
0.63
26.08
11.88
75.38
33.33
31.48
104.31
94.98
2.25
27.28
1.13
26.13
0.94
26.26
12.06
75.56
31.66
95.16
1.69
26.44
14
18
9
19
5
13
10
14
129
Instruction times
LD IL ST Objects
Operate block
Horizontal comparison block
ST
STN
S
R
%M1 (1)
%M1[%MW2]
S
%MW0:X0
%NW{i}.j:Xk (3)
R
%MW0[%MW8]:X0
Multiple coils on ladder, «cost» of the second and subsequent coils
[ action]
[ LD
[comparison]] block executed
Not executed
0.50
13.10
5.88
76.86
16.41
0.25
0.74
5.55
Additional comparison time 0.00
between 2 %MWi 12.38
Vertical operate block
Convergence
Untracked divergence of a convergence
[ )]
[ ]
[ )] block executed
Ladder, 1 divergence
0.25
0.25
[MPS, MPP,
MRD]
List MPS+MPP
List MRD
0.75
0.25
Execution time (
µ s)
37 05/
08/10
37 20
RAM
37 20 card
0.25
12.85
5.60
69.10
15.65
0.13
0.75
5.40
0.00
11.85
0.13
0.13
0.38
0.13
0.38
12.85
5.60
69.10
15.65
0.19
0.75
5.40
0.00
11.85
0.19
0.19
0.56
0.19
4
1
1
3
1
1
1
0
8
1
4
8
2
7
Size
In word s
Legend
1. This applies to all forcible object bits: %I, %Q, %X, %M, %S,
2. other objects of the same kind: Output bits of function block %Tmi.Q …, Extract bits of system words %SWi:Xj
3. other objects of the same kind: Extract bits of shared words %NW{i}j:Xk, extract bits of I/O %IWi.j.Xk, %QWi.j.Xk words, extract bits of %KW, error bits %Ii.j.ERR.
130
TLX DR PL7 xxE
Instruction times
Instruction times for the function blocks
IEC timer The table below describes the instruction times for the IEC timer function block
LD IL ST Condition s
Execution time (
µ s)
3705/08/10 3720 start timer 43.39
41.11
Size
(words)
3 rising edge on IN falling edge on IN
IN =1
IN =0
IN %TM1
(rising edge)
START
%TM1
IN %TM1
(falling edge)
DOWN
%TM1
IN %TM1
(=1)
IN %TM1
(=0) stop timer 17.47
timer active timer inactive
18.74
17.40
17.01
17.99
16.67
PL7-3 timer The table below describes the instruction times for the PL7-3 timer function block
LD IL ST Condition s
Execution time (
µ s)
3705/08/10 3720
Size
(words)
E =0
START
%T1
STOP
%T1
RESET
%T1 start stop reset
12.63
12.94
12.15
12.15
3 timer active timer inactive
17.55
17.00
TLX DR PL7 xxE
131
Instruction times
Upcounter/ downcounter
Monostable
Register
The table below describes the instruction times for the upcounter/downcounter function block
LD IL ST Condition s
Execution time (
µ s)
3705/08/10 3720
Size
(words) reset, R=1 R %C8 (=1) RESET
%C8 preset, S=1 S %C9 (=1) PRESET
%C9 rising edge on CU
CU %C8
(rising edge) reset preset
UP %C8 up rising edge on CD inactive inputs
CD %C9
(rising edge)
R/S/CU/CD inactive bit
DOWN
%C9 down no action
18.69
20.42
19.92
19.92
13.27
17.92
19.73
19.10
19.10
12.81
3
The table below describes the instruction times for the monostable function block
LD rising edge on S
S=1
IL
S %MN0, rising edge
S %MN0,
S =1/0
ST
START
%MN0
Conditions Execution time (
µ s)
3705/08/10 3720 start 35.08
33.16
active monostable
11.64
11.17
Size
(words)
3
The table below describes the instruction times for the register function block
LD edge on I
IL ST Conditions Execution time (
µ s)
21.90
21.27
Size
(words)
3 edge on O
R=1 inactive inputs
I %R2
(edge)
O %R2
(edge)
R %R1
(=1)
I/O/R, inactive bit
PUT %R2 store
GET %R2 remove from
RESET
%R2 storage reset no action
21.90
16.90
12.61
21.27
16.02
12.19
132
TLX DR PL7 xxE
Drum
Instruction times
The table below describes the instruction times for the drum
LD edge on U
R=1
IL
U %DR0
R %DR1
ST
UP %DR1
RESET
%DR2
Conditions up, fixed per command bit reset, fixed
Execution time (
µ s) Size
(words)
181.37
169.13
3
19.30
19.30
174.15
162.03
inactive inputs
R/U, inactive bit per command bit
19.30
no action, fixed 175.92
19.30
164.00
per command bit
19.30
19.30
TLX DR PL7 xxE
133
Instruction times
Integer and floating point arithmetic
Corrections according to object type
The following time and size pages are given for objects of type %MW0, %MD0 or
%MF0.
The table below gives corrections which should be applied to the values given in the arithmetic instruction times table if different types of objects are used.
Type of Object Object position
Single length immediate value
-
Type of correction
Execution time (
µ s)
3705/08/10 3720
1.10
Size in word s
0
Double length immediate value
Words, double
Words or indexed floating points
-
After the := sign
Value to be subtracted from value mentioned for %MW
Value to be subtracted from value mentioned for %MD or
%MF
Value to be added
Value to be added
1.20
0.75
10.52
11.20
1
10.05
10.60
0
4
5 First operation, when the first operand is not indexed, or assignment
Second operand if the first operand is equally indexed
-
Value to be added
Value to be added
13.37
70.98
12.60
63.50
5
2 %KWi,
%KWi[%MWj]
%KDi, %KFi shared words, input/output words
134
TLX DR PL7 xxE
Instruction times
Correction according to the context of the operation
This table describes the corrections to be made to the values given in the arithmetic instruction times table according to the context of the operation.
Context of the operation
Type of Object Type of correction
Execution time (
µ s)
3705/08/10 3720
Size
37xx
The operation is in at least the second position in the statement
E.g: %MW2 in:=%MW0*%MW1*
%MW2
Operation with result of an operation in parentheses or more urgent
E.g:
%MW0+%MW2+(...)
%MW Value to be added to value mentioned for
%MW
%MD or %MF Value to be added to value mentioned for
%MD or %MF
%MW Value to be added to value mentioned for
%MW
%MD or %MF Value to be added to value mentioned for
%MD or %MF
0.69
0.99
2.86
3.60
0.55
0.75
2.55
3.15
0
0
1
1
TLX DR PL7 xxE
135
Instruction times
Table of instruction times
The table below shows the arithmetic instruction times.
ST Objects Conditions Execution time (
µ s)
3705/08/10 3720 object after the := sign
%MW0
%MD0,%MF0
/
:= %MW0
%MD0 and %MF0
=, <>, <=, <, >, >= %MW0
%MD0
%MF0
AND, OR, XOR %MW0
+, -
*
/, REM
%MD0
%MW0
%MD0
%MF0
%MW0
%MD0
%MF0
%MW0
ABS, -object
NOT
SQRT
INC, DEC
%MD0
%MF0
%MW0
%MD0
%MF0
%MW0
%MD0
%MW0
%MD0
%MF0
%MW0
%MD0
4.81
6.45
4.46
5.15
4.50
5.70
4.30
4.85
9.75
39.63
58.26
10.69
205.21
62.47
7.20
9.97
8.94
10.71
29.06
7.29
9.21
7.29
9.21
62.83
13.01
6.69
7.80
17.02
85.73
165.04
4.86
5.20
9.10
36.50
56.90
10.08
201.38
60.25
6.95
9.53
8.50
10.26
28.39
6.90
8.55
6.90
8.55
61.20
12.50
6.45
7.40
16.70
85.25
158.40
4.40
4.75
3
3
3
3
3
3
3
3
3
3
3
3
4
3
4
4
2
2
3
3
3
3
3
3
2
2
2
2
Size
(words)
37xx
136
TLX DR PL7 xxE
TLX DR PL7 xxE
ST Objects
SHL, SHR, ROL,
ROR
%MW0
%MD0
LN
LOG
EXP
EXPT
TRUNC
COS
SIN
TAN
ACOS
ASIN
ATAN
DEG_TO_RAD
RAD_TO_DEG
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
Instruction times
Conditions for 1 bit for 1 bit per supplementary bit
Execution time (
µ s)
3705/08/10 3720
17.74
20.58
0.063
1371.60
1458.00
1155.60
2988.00
204.00
2829.60
2840.40
2937.60
4082.40
4082.40
2786.40
852.00
720.00
17.05
19.15
1270.00
1350.00
1070.00
2490.00
170.00
2620.00
2630.00
2720.00
3780.00
3780.00
2580.00
710.00
600.00
3
3
3
3
3
3
3
3
3
3
3
3
3
5
5
Size
(words)
37xx
137
Instruction times
Instructions on the program and monitoring structures
Instruction time on the program
The table below shows the instruction time on the program.
ST Execution time (
µ s)
3705/08/10 3720
Jump %Li
Maskevt
Unmaskevt
SRi
Return
41.93
12.21
40.27
48.68
42.18
38.20
10.80
37.10
42.88
38.33
3
1
1
3
3
Size (words)
37xx
138
TLX DR PL7 xxE
Instruction times
Performance of the monitoring structures
The table below shows the instruction times of the monitoring structure type.
ST
<cond>
Execution time (
µ s)
3705/08/10 condition evaluation
3720
Size (words)
37xx forcible bit comparison if <cond > then
<action> end_if; condition true condition false
(jump) see LD %M1 boolean instruction see comparisons =,<,> etc.
the times and sizes below should be added to those of the action contained in the structure
3.60
5.55
If <cond> then <action1> else <action2> end_if; condition true 9.15
3.30
5.40
8.70
2
4
5.40
condition false 5.55
while <cond> do.<action> end_while go into the loop with loop iteration exiting the loop
9.15
5.55
repeat <action> until <cond> end_repeat go into the loop with loop iteration
5.55
last entry 3.60
for <word1:=word2>to <word3> do <action> end_for
8.58
input in the for, executed only once go into the loop with loop iteration exit the loop
29.38
20.42
8.70
5.40
5.40
3.30
8.25
27.35
19.40
2
2
15
TLX DR PL7 xxE
139
Instruction times
Digital conversions
Performance times
The table below shows the digital conversion instruction times.
ST
BCD_TO_INT
INT_TO_BCD
GRAY_TO_INT
INT_TO_REAL
DINT_TO_REAL
REAL_TO_INT
REAL_TO_DINT
DBCD_TO_DINT
DBCD_TO_INT
DINT_TO_DBCD
INT_TO_DBCD
Execution time (
µ s)
3705/08/10 3720 RAM
25.03
21.66
24.55
21.15
36.98
40.90
33.32
58.75
36.55
40.75
32.55
58.55
44.59
1 324.85
1 265.54
1 124.85
564.85
44.05
1 065.15
925.70
825.15
445.15
3720 card
24.55
21.15
36.55
40.75
32.55
58.55
44.05
1 134.70
986.15
879.10
474.40
5
5
3
5
5
3
3
3
3
3
3
Size (words)
37xx
140
TLX DR PL7 xxE
Instruction times
Instructions on a string of bits
Initializing a table of bits
This table shows the instruction times of a table of bits.
ST
%M30:8:= 0
%M30:16:= 1
%M30:24:= 2
%M30:32:= 2
Size (bit)
8
16
24
32
Execution time (
µ s)
3705/08/10 3720
RAM
19.38
20.38
18.88
19.88
24.25
25.25
23.35
24.35
3720 card
Size (words)
37xx
18.88
19.88
23.35
24.35
6
6
6
6
Copying a table of bits into a table of bits
This table shows the instruction times for copying a table of bits into another table of bits.
ST Size (bit)
%M30:8:= %M20:8 8
%M30:16:= %M20:16 16
%M30:24:= %M20:24 24
%M30:32:= %M20:32 32
%M30:16:=
COPY_BIT(%M20:16)
16
32
128
Execution time (
µ s)
3705/08/10 3720
RAM
25.54
26.16
33.41
35.91
281.63
440.82
1261.22
24.79
25.41
32.26
34.76
230.00
360.00
3720 card
24.79
25.41
32.26
34.76
244.95
383.40
1030.00
1096.95
Size
(words)
37xx
6
6
6
6
9
9
9
TLX DR PL7 xxE
141
Instruction times
Logic instructions on a table of bits
ST
The table below shows the logic instruction times on a table of bits.
Size
(bits)
Execution time (
µ s)
3705/08/10 3720 RAM 3720 card
AND_ARX, OR_ARX, XOR_ARX
%M0:16:= AND_ARX(%M30:16,%M50:16)
%M0:32:= AND_ARX(%M30:32,%M50:32)
%M0:128:=
AND_ARX(%M30:128,%M50:128)
NOT_ARX
%M0:16:= NOT_ARX(%M30:16)
16
32
128
16
32
128
397.42
620.97
1 887.74
281.63
440.82
1261.22
320.00
500.00
1 520.00
230.00
360.00
1030.00
340.80
532.50
1 618.80
244.95
383.40
1096.95
12
12
12
9
9
9
Size
(words)
37xx
Copying a table of bits into a table of words
ST
The table below shows the instruction times for copying a table of bits into a table of words.
%MW1:= %M30:8
%MW1:= %M30:16
%MD2:= %M30:24
%MD2:= %M30:32
%MW1:4:= BIT_W(%M40:80,0,17,2)
%MD1:4:= BIT_D(%M30:80,0,33,0)
Size
(bits)
8
16
24
32
17
33
Execution time (
µ s)
3705/08/10 3720 RAM 3720 card
14.84
16.34
14.54
16.04
501.43
379.53
14.36
15.86
14.23
15.73
390.00
530.00
14,36
15.86
14.23
15.73
415.35
564.45
5
5
5
16
16
Size
(words)
37xx
5
142
TLX DR PL7 xxE
Instruction times
Copying a table of words into a table of bits
ST
This table shows the instruction times for copying a table of words into a table of bits.
%M30:8:= %MW1
%M30:16:= %MW2
%M30:24:= %MD1
%M30:32:= %MD3
%M30:32:= W_BIT(%MW200:2,0,2,0)
%M30:32:= D_BIT(%MD0:1,0,2,0)
Size
(bits)
8
16
24
32
32
32
Execution time (
µ s)
3705/08/10 3720 RAM 3720 card
19.28
20.28
21.20
22.20
488.68
567.33
18.68
19.68
20.37
21.37
370.00
460.00
18.68
19.68
20.37
21.37
394.05
489.90
5
5
5
Size
(words)
37xx
5
16
16
TLX DR PL7 xxE
143
Instruction times
Instructions on tables of words, double words and floating points
Initializing a table of words with one word
The table below shows the instruction times for initializing a table of words with one word.
ST
%MW0:10:= %MW100
%MD0:10:= %MD100
Size (of the table of words)
10 words
Execution time (
µ s)
3705/08/10 3720
RAM
47,46 42,15 per word 0,34
10 double words 81,27 per double word
0,20
74,45
2,87
3720 card
Size
(words)
37xx
42,15
0,20
74,45
2,65
7
7
2,65
Copying a table of words into a table of words
This table shows the instruction times for copying a table of words into another table of words.
ST Size (of the table of words)
Execution time (
µ s)
3705/08/10 3720
RAM
%MW0:10:=%MW20:10; 10 words per word
95,80
0,77
%MD0:10:=%MD20:10; 10 double words 111,13 per double word 1,54
85,35
0,50
97,65
1,00
3720 card
Size
(words)
37xx
85,35
0,50
97,65
1,00
9
9
144
TLX DR PL7 xxE
Instruction times
Arithmetic and logic instructions between 2 tables of words
The table below shows the arithmetic and logic instruction times between two tables of words.
ST Size (of the table of words)
Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
Size
(words)
37xx
+, -
%MW0:10:=
%MW10:10 + %MW20:10;
%MD0:10:=
%MD10:10+%MD20:10;
10 words per word
10 double words per double word
*
%MW0:10:=
%MW10:10 * %MW20:10;
%MD0:10:=
%MD10:10 * %MD20:10;
10 words per word
10 double words per double word
/, REM
%MW0:10:=
%MW10:10 / %MW20:10;
%MD0:10:=
%MD10:10 / %MD20:10;
10 words per word
10 double words per double word
AND, OR, XOR
%MW0:10:=%MW10:10
AND %MW20:10;
%MD0:10:=%MD10:10 AND
%MD20:10;
10 words per word
10 double words per double word
168,04
7,13
239,17
13,84
189,32
9,27
710,35
61,64
151,95
6,35
214,40
175,40
8,70
603,80
147,40
5,85
215,90
12,40
151,95
6,35
214,40
12,25
175,40
8,70
603,80
51,20
147,40
5,85
215,90
12,40
14
14
14
14
224,76 181,40 181,40 14
13,14 9,30 9,30
2 192,38 2 157,35 2 157,35 14
209,16
163,69
6,66
240,14
13,94
12,25
51,20
206,55 206,55
14
14
TLX DR PL7 xxE
145
Instruction times
Arithmetic and logic instructions between 1 table of words and 1 word
The table below shows the arithmetic and logic instruction times between 1 table of words and 1 word.
ST Size (of the table of words)
Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
Size
(words
)
37xx
+, -
%MW0:10:=%MW10:10 +
%MW20; or %MW0:10:= %MW20 +
%MW10:10
%MD0:10:=%MD10:10 +
%MD20;
10 words 119,12 per word 2,87
10 double words per double word
159,68
6,57
108,55
2,65
147,45
6,25
108,55
2,65
147,45
6,25
12
12
*
%MW0:10:=
%MW20*%MW10:10;
10 words 166,86 per word 7,94
132,45
5,05
132,45
5,05
12
%MD0:10:=
%MD20*%MD10:10;
10 double words per double word
587,01
49,18
522,95
43,80
522,95
43,80
12
/, REM
%MW0:10:=%MW10:10 /
%MW30;
10 words 196,69 per word 10,86
155,85
7,30
155,85
7,30
15
%MD0:10:=
MD10:10 / %MD30
AND, OR, XOR
%MW0:10:=%MW10:10 AND
%MW20;
%MD0:10:=%MD20 AND
%MD10:10;
10 words 117,20 per word 2,64
10 double words per double word
587,01
6,47
NOT
10 double words per double word
2 230,17 2 173,95 2 173,95 12
213,66 208,90 208,90
106,45
2,40
522,95
6,15
106,45
2,40
522,95
6,15
12
12
146
TLX DR PL7 xxE
Instruction times
ST Size (of the table of words)
%MW0:10:=NOT(%MW10:10); 10 words
Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
110,28 per word 2,96
100,25
2,75
100,25
2,75
Size
(words
)
37xx
9
%MD0:10:=NOT(%MD10:10) 10 double words per double word
126,39
4,50
114,00
4,05
114,00
4,05
9
Addition function on the table
The table below shows the instruction times for addition on a table.
ST
%MW20:=SUM(%MW0:10);
Size (of the table of words)
10 words
Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
74,30 69,00 69,00
Size
(words
)
37xx
10
2,35
76,90
2,35
76,90 10 %MD20:=SUM(%MD0:10); per word 2,44
10 double words
83,58
3,17 per double word
%MF20:=SUM_ARR(%MF0:10); 10 double words per double word
1634
2,95
1257
2,95
1257 10
TLX DR PL7 xxE
147
Instruction times
Table comparison function
Find function
The table below shows the instruction times for table comparison.
ST Size (of the table of words)
Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
%MW20:=
EQUAL(%MW0:10;%MW10:10);
10 words 103,78 per word 1,13
93,50
0,90
93,50
0,90
Size
(words
)
37xx
11
103,40 11 %MD20:=
EQUAL(%MD0:10;%MD10:10);
10 double words per double word
%MF20:=
EQUAL_ARR(%MF0:10;%MF10:
10);
10 double words per double word
116,17
2,23
741
103,40
1,75
570
1,75
607 11
The table below shows the instruction times for finding in a table.
ST Size (of the table of words)
Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
340,00 250,00 266,25
Size
(words
)
37xx
15 %MW20:=
FIND_EQW(%MW0:10,%KW0)
%MD20:=
FIND_EQD(%MD0:10, %KD0)
%MF20:=
FIND_EQR(%MF0:10,%KF0)
%MF20:=
FIND_EQRP(%MF0:10, %KF0)
%MD20:=
FIND_GTR(%MF0:10, %KF0)
%MD20:=
FIND_LTR(%MF0:10, %KF0)
10 words max poss
10 double words, max poss
10 double words
10 double words
10 double words
10 double words
350,00
833
845
836
836
260,00
648
650
643
643
276,90
690,12
692,25
684,79
684,79
16
15
15
15
15
148
TLX DR PL7 xxE
Finding highest and lowest values
Instruction times
This table describes the instruction times for finding the highest and lowest values in a table.
ST
%MW20:=
MAX_ARW(%MW0:10)
Size (of the table of words)
Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
10 words 350,00 260,00 276,90
Size
(words)
37xx
9
%MD20:=
MAX_ARD(%MD0:10)
10 double words
%MF20:=MAX_ARR(%MF0:10); 10 double words
%MF20:=MIN_ARR(%MF0:10) 10 double words
410,00 300,00
1366
1270
1051
977
319,50
1119,31
1040,50
9
9
9
Calculating the number of occurrences
This table shows instruction times for the number of occurrences of a value in a table of words.
ST Size (of the table of words)
Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
Size
(words
)
37xx
250,00 266,25 15 %MW20:=
OCCUR_ARW(%MW0:10,
%KW0)
10 words
%MD20:=
OCCUR_ARD(%MD0:10, %KD0)
10 double words
%MF20:=
OCCUR_ARR(%MF0:10, %KF0)
10 double words
350,00
370,00
1265
270,00
973
287,55 16
1036,24 16
TLX DR PL7 xxE
149
Instruction times
Rotate shift The table below shows the rotate shift instruction times.
ST
ROL_ARW(word or value,%MWj:10)
Size (of the table of words)
10 words
Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
550,00 400,00 426,00
Size
(words
)
37xx
9
ROL_ARD(%MDi,%MDj:10)
ROL_ARR(%MFi,%MFj:10)
10 double words
10 double words
590,00
585
430,00
450
457,95
479,25
9
9
Sort instruction The table below shows the instruction times for sorting the elements in a table.
ST Size (of the table of words)
Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
Size
(words
)
37xx
SORT_ARW(%MWi,%MWj:10)
SORT_ARD(%MDi,%MDj:10)
SORT_ARR(%MFi,%MFj:10)
10 words max poss
5 double words, max poss
10 double words
970,00
610,00
1863
700,00
450,00
1433
745,50
479,25
9
9
1526,14 9
150
TLX DR PL7 xxE
Instruction times
Time management instructions
Instructions on date, hour and period management
The table below shows the date, hour and period instruction times.
ST
%MW2:4:= ADD_DT(%MW2:4,%MD8)
Execution time (
3705/08/10
4 400.00
µ s) Size
(words)
3720 RAM 3720 card 37xx
3 300.00
3 514.50
13
%MD2:= ADD_TOD(%MD2,%MD8)
%MB2:11:=
DATE_TO_STRING(%MD40)
%MW5:= DAY_OF_WEEK()
2 100,00
1 370,00
220,00
1 550,00 1 650,75 9
900,00 958,50 9
280,00 298,20 5
%MD10:= DELTA_D(%MD2, %MD4)
%MD10:=
DELTA_DT(%MD2:4,%MW6:4)
1 520,00
3 170,00
%MD10:=
DELTA_TOD(%MD2,%MD4)
%MB2:20:=
DT_TO_STRING(%MW50:4)
2 330,00
2 050,00
%MW2:4:= SUB_DT(%MW2:4,%MD8) 4 750,00
%MD2:= SUB_TOD(%MD2,%MD8) 2 330,00
1 560,00 %MB2:15:=
TIME_TO_STRING(%MD40)
%MB2:9:=
TOD_TO_STRING(%MD40)
%MD100:= TRANS_TIME(%MD2)
1 270,00
500,00
1 130,00 1 203,45 9
2 300,00 2 449,50 13
1 700,00 1 810,50 9
1 450,00 1 544,25 11
3 500,00 3 727,50 13
1 700,00 1 810,50 9
1 200,00 1 278,00 9
800,00
500,00
852,00
532,50
9
7
TLX DR PL7 xxE
151
Instruction times
Real-time clock access
The table below shows the real time clock instruction times.
ST
RRTC(%MW0:4)
WRTC(%MW0:4)
PTC(%MW0:5)
SCHEDULE(%MW0,%MW1,%MW2,%
MD10,%MD12,%M0)ÿ
Execution time (
3705/08/10
93,60
µ s) Size
(words)
3720 RAM 3720 card 37xx
84,80 84,80 5
248,61
97,98
1430
230,85
88,60
1100
230,85
88,60
1171,5
5
5
5
152
TLX DR PL7 xxE
Instruction times
Instructions on strings of characters
Assigning and copying strings of characters
The table below shows the instruction times for assigning and copying strings of characters
ST
%MB0:8:=%MB10:8
Size
(characters)
Execution time (
µ s)
3705/08/10 3720 RAM 3720 card
Size
(words)
37xx
9
%MB0:8:=’abcdefg’
8 characters 105.16
per character 1.65
8 characters 120.72
per character 4.15
93.80
1.30
110.20
3.85
93.80
1.30
110.20
3.85
11
0.5
Word conversions<-> strings of characters
This table describes the instruction times for converting words and strings of characters.
ST Execution time (
µ s)
3705/08/10 3720 RAM 3720 card
97.69
91.95
91.95
Size
(words)
37xx
7 %MW1:=
STRING_TO_INT(%MB0:7)
%MB0:7:=
INT_TO_STRING(%MW0)
104.36
96.70
96.70
7
Double word conversions<-> strings of characters
This table describes the instruction times for converting double words and strings of characters.
ST Execution time (
µ s)
3705/08/10 3720 RAM 3720 card
1 070.53
965.62
965.62
Size
(words)
37xx
7 %MD1:=
STRING_TO_DINT(%MB0:13)
%MB0:13:=
DINT_TO_STRING(%MD0)
322.29
295.35
295.35
7
TLX DR PL7 xxE
153
Instruction times
Floating point conversions<-> strings of characters
This table describes the instruction times for converting for floating points into strings of characters.
ST
%MF1:=
STRING_TO_REAL(%MB0:15)
Execution time (
µ s)
3705/08/10 3720 RAM 3720 cards
1 783.70
1 634.53
1 634.53
7
Size
(words)
37xx
%MB0:15:=
REAL_TO_STRING(%MF0)
741.75
681.20
681.20
7
Character string manipulation instructions
This table describes the instruction times for manipulating strings of characters
ST Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
1 170.00
770.00
820.05
Size
(words)
37xx
15 %MB10:20:=
CONCAT(%MB30:10,%MB50:10)
%MB10:20:= DELETE(%MB10:22,2,3); 950.00
600.00
639.00
15
860.00
520.00
553.80
13 %MW0:=
EQUAL_STR(%MB10:20,%MB30:20); (the fifth character differs)
%MW0:= FIND(%MB10:20,%MB30:10);
%MB10:20:=
INSERT(%MB30:10,%MB50:10,4);
%MB10:20:= LEFT(%MB30:30,20);
%MW0:= LEN(%MB10:20);
%MB10:20:= MID(%MB30:30,20,10);
%MB10:20:=
REPLACE(%MB30:20,%MB50:10,10,10);
%MB10:20:= RIGHT(%MB30:30,20);
1 610.00
1 270.00
920.00
770.00
1 080.00
1 450.00
1 480.00
1 000.00
1 065.00
800.00
852.00
570.00
340.00
700.00
870.00
950.00
607.05
362.10
745.50
926.55
1 011.75
13
17
13
9
15
19
13
154
TLX DR PL7 xxE
Instruction times
Application-specific and Orphee functions
Communication functions
The table below shows the communication function instruction times.
ST Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
2182 1818 1936 SEND_REQ(%KW0:6,15,%MW0:1,
%MW10:10,%MW30:4)
SEND_TLG(%KW0:6,1,%MW0:5,%MW30:) 1636 1364 1452
Size
(words)
37••
21
15
Operator dialog function
The table below shows the operator dialog instruction times.
ST Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
SEND_MSG(ADR#1.0,%MW0:2,%MW10:2) 2 240
SEND_ALARM(ADR#1.0,%MW0:2,%MW10
:2)
2 240
2 000
2 000
2208
2208
GET_MSG(ADR#1.0,%MW0:2,%MW10:2)
GET_VALUE(ADR#1.0,%MW0,%MW10:2)
ASK_MSG(ADR#1.0,%MW0:2,%MW10:2,%
MW20:2)
ASK_VALUE(ADR#1.0,%MW0,%MW10:2,
%MW20:2)
DISPLAY_ALRM(ADR#1.0,%MW0,%MW10
:2)
2 240
1 120
2 240
2 240
1 120
2 000
1 000
2 000
2 000
1 000
2 208
1 104
2 208
2 208
1 104
DISPLAY_GRP(ADR#1.0,%MW0,%MW10:
2)
DISPLAY_MSG(ADR#1.0,%MW0,%MW10:
2)
CONTROL_LEDS(ADR#1.0,%MW0:2,%M
W10:2)
ASSIGN_KEYS(ADR#1.0,%MW0:2,%MW1
0:2)
PANEL_CMD(ADR#1.0,%MW0:2,%MW10:
2)
1 120
1 120
2 240
2 240
2 240
1 000
1 000
2 000
2 000
2 000
1 104
1 104
2 208
2 208
2 208
19
17
23
Size
(words)
37••
19
19
21
17
17
17
19
19
19
TLX DR PL7 xxE
155
Instruction times
Process control function
The table below shows the process control function instruction times.
ST Condition Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
Size
(words)
37••
1100 1172 24 PID("PIDS1",’Unit’,%IW3.5,%M
W12,%M16,%MW284:43) deval_mm i=0 deval_mm i=1
1320
1080
600 PWM(%MW11,%Q2.1,%MW385
:5)
SERVO(%MW12,%IW3.6,%Q2.
2,%Q2.3,
%MW284:43,%MW390:10)
PID_MMI(ADR#0.0.4,%M1,%M2
:5, %MW410:62)
EN=1
960
1140
900
500
800
950
958,5
532,5
852
1012
11
19
20
Data storage The table below shows the instruction times for the data storage functions.
ST Execution time (
µ s)
SET_PCMCIA (for 1600 words)
WRITE_PCMCIA (for 1600 words)
READ_PCMCIA (for 1600 words)
3705/08/
10
3720
RAM
1000
2000
2000
3720 card
24
24
24
Size
(words)
37••
156
TLX DR PL7 xxE
Instruction times
Orphee function The table below shows the process control function instruction times.
ST
DSHR_RBIT(%MD102,16,%M
D204,%MD206)
DSHRZ_C(%MD102,16,%MD
204,%MD206)
WSHL_RBIT(%MW102,8,%M
W204,%MW206)
WSHR_RBIT(%MW102,8,%M
W204,%MW206)
Condition Execution time (
µ s)
3705/08/
10
3720 RAM 3720 card
660 480 511
Size
(words)
37••
13 write 10 words request to copy 10 words exchange
10 words
20 bytes
410
300
390
310
220
280
330
234
298
13
13
13
WSHRZ_C(%MW102,8,%MW
204,%MW206)
SCOUNT(%M100,%MW100,%
M101,%M102,%MW101,
%MW102,%M200,%M201,%M
W200,%MW201)
20 bytes
20 bytes
300
510
220
410
234
437
13
25
TLX DR PL7 xxE
157
Instruction times
Explicit input/output instructions
Performance times
This table shows the explicit input/output instruction times.
ST Execution time (
µ s)
3705/08/10 3720 RAM 3720 card
Size
(words)
37xx
Read_Sts %CHi.MOD
Any application except the processor communication channel
Read_Sts %CHi
Analog input
Analog output
Counting module CTZ
Write_Param %CHi
Analog input
Counting module CTZ
Read_Param %CHi
Analog input
Counting module CTZ
Save_Param %CHi
Analog input
Counting module CTZ
Restore_Param %CHi
Analog input
Counting module CTZ
Write_Cmd %CHi
Discrete output
30
180
90
110
790
1127
260
338
1234
1370
550
1160
50
30
180
70
95
570
1080
290
295
1220
1220
510
1080
47
32
216
74
104
790
1083
316
300
1240
1240
535
1097
52
2
6
6
6
6
6
6
158
TLX DR PL7 xxE
Instruction times
6.3
instruction times on Premium PLCs
At a Glance
Aim of this section
What's in this
Section?
This section describes the times for instructions carried out on Premium PLCs.
This Section contains the following Maps:
Topic
Boolean instruction performance characteristics
Instruction times for the function blocks
Integer and floating point arithmetic
Instructions on the program and monitoring structures
Digital conversions
Instructions on a bit string
Instructions on tables of words, double words and floating points
Time management instructions
Character string instructions
Application-specific and Orphee functions
Explicit input/output instructions
DFB function block
Page
TLX DR PL7 xxE
159
Instruction times
Boolean instruction performance characteristics
P57 1•/2• processor instruction times
LD IL
The table below shows the boolean instruction times for the P57 1•/2• processors.
ST Objects Execution time (
µ s)
57 1• ram
57 1• card
57 1• ram >
4 K
0,37 0,50
57 1• card
> 4 K
57 2• ram
57 2• card
0,06 0,21
57 2• ram >
4 K
57 2• card
> 4 K
Size
(word s)
1
P
N
LD
LDN
LDR,
LDF
%M1 (1)
%M1[%MW2]
%MW0:X0 (2)
%IWi.j:Xk (3)
%MW0[%MW8]
:X0
%KW0[%MW8]:
X0
%M1
%M1[%MW2]
0,50 0,62 0,62 0,87 0,19 0,21 0,25 0,42 1
1,50 2,25 1,50 2,25 0,62 1,25 0,62 1,25 6
1,12 1,62 1,12 1,62 0,37 0,83 0,37 0,83 4
1,75 2,50 1,75 2,50 0,62 1,25 0,62 1,25 6
2,25 3,37 2,25 3,37 0,94 1,87 0,94 1,87 9
2,25 3,37 2,25 3,37 0,94 1,87 0,94 1,87 9
0,87 1,12 1,00 1,37 0,25 0,42 0,31 0,62 2
1,87 2,75 1,87 2,75 0,69 1,46 0,69 1,46 7
AND,
ANDN, AND (, AND (N, same as OR same as LD,LDN
P
N
ANDR, ANDF, AND (R, AND
(F, same as OR same as LDR,LDF
160
TLX DR PL7 xxE
Instruction times
LD IL
XOR
XORN
ST Objects
%M1
%M1[%MW2]
%MW0:X0
%IWi.j:Xk
Execution time (
57 1• ram
57 1• card
µ s)
57 1• ram >
4 K
57 1• card
> 4 K
57 2• ram
57 2• card
57 2• ram >
4 K
57 2• card
> 4 K
Size
(word s)
2,12 2,75 2,37 3,25 0,56 1,04 0,69 1,46 5
3,37 4,75 3,37 4,75 0,94 2,29 0,94 2,29 12
3,37 4,62 3,37 4,62 0,75 2,08 0,75 2,08 10
4,00 5,50 4,00 5,50 1,00 2,50 1,00 2,50 12
%MW0[%MW8]
:X0
%KW0[%MW8]:
X0
4,50
4,50
6,37
6,37
4,50
4,50
6,37
6,37
1,31
1,31
3,12
3,12
1,31
1,31
3,12
3,12
15
15
,
XORR
XORF
ST
STN
S
R
%M1
%M1[%MW2]
%M1 (1)
%M1[%MW2]
3,62
5,62
1,00
1,62
4,75
8,00
1,25
2,37
3,87
5,62
1,12
1,62
5,25
8,00
1,50
2,37
0,81
1,69
0,37
0,75
1,87
3,96
0,46
1,29
0,94
1,69
0,44
0,75
2,29
3,96
0,62
1,29
9
19
2
6
S
R
%MW0:X0 multiple ladder coils, «cost» of the second and subsequent coils
1,25 1,75 1,25 1,75 0,50 0,83 0,50 0,83 4
%NW{i}.j:Xk (3) 1,87 2,62 1,87 2,62 0,75 1,25 0,75 1,25 6
%MW0[%MW8]
:X0
2,37 3,50 2,37 3,50 0,75 1,92 0,75 1,92 9
0,62 0,75 0,75 1,00 0,31 0,25 0,37 0,42 1 operate block
[ action] executed block 0,25 0,50 0,25 0,50 0,12 0,42 0,12 0,42 2 not executed between 2
%MWi
0,50 0,75 0,50 0,75 0,12 0,42 0,12 0,42 2
1,62 11,85 1,62 2,25 0,56 1,04 0,56 1,04 5 vertical operate block
Converge nce
[ )]
Untracked divergenc e of a convergen ce
[ ]
[MPS,
MPP,
MRD]
[ )] executed block
Ladder, 1 divergence
MPS+MPP list
MRD List
0,37
0,37
1,12
0,37
0,13
0,50
1,50
0,50
0,37
0,37
1,12
0,37
0,50
0,50
1,50
0,50
0,06
0,06
0,19
0,06
0,21
0,21
0,62
0,21
0,06
0,06
0,19
0,06
0,21
0,21
0,62
0,21
1
1
3
1
TLX DR PL7 xxE
161
Instruction times
Legend
1. This applies to all forcible bit objects: %I, %Q, %X, %M, %S,
2. other objects of the same kind: output bits of function block %Tmi.Q etc, extract bits of %SWi:Xj system words
3. other objects of the same kind: extract bits of shared words %NW{i}j:Xk, extract bits of I/O %IWi.j.Xk, %QWi.j.Xk words, extract bits of %KW, %Ii.j.ERR error bits.
162
TLX DR PL7 xxE
Instruction times
P57 3•/4• processor instruction times
LD IL
The table below shows the boolean instruction times for the P57 3•/4• processors.
ST Objects Execution time (
µ s)
57 3• ram
57 3• card
57 3• ram >
4 K
0,04 0,17
57 3• card >
4 K
57 4• ram
0,02
57 4•
> 4K
Size in word s
1
P
N
LD
LDN
LDR,
LDF
%M1 (1)
%M1[%MW2]
%MW0:X0 (2)
%IWi.j:Xk (3)
0,12
0,42
0,25
0,42
%MW0[%MW8]:X0 0,62
%KW0[%MW8]:X0 0,62
%M1
%M1[%MW2]
0,17
0,46
0,17
1,00
0,67
1,00
1,50
1,50
0,33
1,17
0,17
0,42
0,25
0,42
0,62
0,62
0,21
0,46
0,33
1,00
0,67
1,00
1,50
1,50
0,50
1,17
0,06
0,21
0,12
0,21
0,31
0,31
0,08
0,23
0,08
0,21
0,12
0,21
0,31
0,31
0,10
0,23
2
7
9
9
4
6
1
6
AND,
ANDN, AND (, AND (N, same as OR same as LD,LDN
P
N
ANDR, ANDF, AND (R, AND (F, same as OR same as LD,LDN
XOR
XORN
XORR,
XORF
%M1
%M1[%MW2]
%MW0:X0
%IWi.j:Xk
0,37
0,62
0,50
0,67
%MW0[%MW8]:X0 0,87
%KW0[%MW8]:X0 0,87
%M1
%M1[%MW2]
0,54
1,12
0,83
1,83
1,67
2,00
2,50
2,50
1,50
3,17
0,46
0,62
0,50
0,67
0,87
0,87
0,62
1,12
1,17
1,83
1,67
2,00
2,50
2,50
1,83
3,17
0,19
0,31
0,25
0,33
0,44
0,44
0,27
0,56
0,23
0,31
0,25
0,33
0,44
0,44
0,31
0,56
15
15
9
19
5
12
10
12
TLX DR PL7 xxE
163
Instruction times
LD IL ST Objects
S
R
ST
STN
S
R
%M1 (1)
%M1[%MW2]
%MW0:X0
%NW{i}.j:Xk (3)
0,50
0,33
0,50 multiple ladder coils, «cost» of the second and subsequent coils
%MW0[%MW8]:X0 0,62
0,21
Execution time (
µ s)
57 3• ram
57 3• card
57 3• ram >
4 K
0,25 0,33 0,29
1,00
0,67
1,00
0,75
0,17
0,50
0,33
0,50
0,50
0,25 operate block [ action] executed block not executed
0,25
0,50
0,50
0,75
0,08
0,08 vertical operate block
Convergence
Untracked divergence of a convergence
[ )]
[ ]
[ )] between 2 %MWi executed block
Ladder, 1 divergence
1,62
0,37
0,37
11,85 0,37
0,13
0,50
0,04
0,04
[MPS,
MPP,
MRD]
MPS+MPP list
MRD List
1,12
0,37
1,50
0,50
0,12
0,04
0,33
0,33
0,83
0,17
0,17
0,50
0,17
57 3• card >
4 K
0,50
57 4• ram
0,12
1,00
0,67
1,00
1,50
033
0,25
0,17
0,25
0,25
0,10
0,04
0,04
0,19
0,02
0,02
0,06
0,02
0,04
0,04
0,19
0,02
0,02
0,06
0,02
0,15
0,25
0,17
0,25
0,25
0,12
57 4•
> 4K
2
6
4
6
9
1
Size in word s
2
2
5
1
1
3
1
Legend
1. This applies to all forcible bit objects: %I, %Q, %X, %M, %S,
2. other objects of the same kind: output bits of function block %Tmi.Q etc, extract bits of %SWi:Xj system words
3. other objects of the same kind: extract bits of shared words %NW{i}j:Xk, extract bits of I/O %IWi.j.Xk, %QWi.j.Xk words, extract bits of %KW, %Ii.j.ERR error bits.
164
TLX DR PL7 xxE
Instruction times
Instruction times for the function blocks
IEC timer
LD rising edge on
IN falling edge on IN
IN =1
IN =0
IL
The table below describes the instruction times for the IEC timer function block
ST Conditions start timer
Execution time (
µ s)
571• 572•
29 8,0
573•
5,4
574•
3,7
Size
(word s)
3 IN %TM1 (rising edge)
IN %TM1
(falling edge)
IN %TM1 (=1)
IN %TM1 (=0)
START
%TM1
DOWN
%TM1 stop timer 9 timer active 12 timer inactive 10
2,6
3,5
3,3
1,7
2,3
2,2
1,2
1,6
1,5
PL7-3 timer
LD IL
E =0
The table below describes the instruction times for the PL7-3 timer function block
ST Conditions Execution time (
µ s)
571• 572• start
573• 574•
Size
(word s)
3 START
%T1
STOP
%T1
RESET
%T1 stop reset
7
7
2,8
3,1
2,0
2,2
1,4
1,6 timer active 11 timer inactive
3,4 2,3 1,7
TLX DR PL7 xxE
165
Instruction times
Upcounter/ downcounter
LD IL
The table below describes the instruction times for the upcounter/downcounter function block
ST Condition s
Execution time (
µ s)
571• 572• 573• 574•
Size
(words) reset, R=1 R %C8 (=1) RESET
%C8 preset, S=1 S %C9 (=1) PRESET
%C9 rising edge on CU
CU %C8
(edge reset preset
UP %C8 up rising edge on CD inactive inputs
CD %C9
(edge
R/S/CU/CD inactive bit
DOWN
%C9 down no action
11
12
12
12
7
3,4
3,6
3,7
3,7
2,5
2,3
2,4
2,5
2,5
1,7
1,7
1,7
1,8
1,8
1,2
3
Monostable
LD rising edge on S
S=1
IL
S %MN0, rising edge
S %MN0,
S =1/0
The table below describes the instruction times for the monostable function block
ST
START
%MN0
Conditions Execution time (
µ s)
571• 572• start 24 7,2
573•
4,9
574•
3,4
Size
(words)
3 active monostable
6 2,2 1,5 1,1
Register The table below describes the instruction times for the register function block
LD IL edge on I I %R2
(edge edge on O O %R2
(edge)
R=1 R %R1
(=1) inactive inputs
I/O/R, inactive bit
ST Conditions Execution time (
µ s)
571• 572•
PUT %R2 store 13 3,9
GET %R2 remove from
RESET
%R2 strorage reset no action
13
9
6
3,9
3,3
2,6
573•
2,6
2,6
2,3
1,8
574•
1,8
1,8
1,6
1,3
Size
(words)
3
166
TLX DR PL7 xxE
Drum
LD edge on U
R=1 inactive inputs
IL
U %DR0
R %DR1
The table below describes the instruction times for the drum
ST
UP %DR1
RESET
%DR2
Conditions up, fixed per command bit reset, fixed
Execution time (
µ s)
571• 572•
124
25
35
25
573•
24
25
118 33 23
R/U, inactive bit per command bit
25 no action, fixed 120
25
34
25
23 per command bit
25 25 25
574•
16
25
15
25
16
25
Instruction times
Size
(words)
3
TLX DR PL7 xxE
167
Instruction times
Integer and floating point arithmetic
Corrections according to object type
Object type
Single length immediate value
Double length immediate value
Words, double
Words or indexed floating points
%KWi,
%KWi[%MWj]
%KDi, %KFi shared words, input/output words
After the := sign
First operation, when the first operand is not indexed, or assignment
Second operand if the first operand is also indexed
-
The times and volumes below are given for objects of the %MW0, %MD0 or %MF0 type.
This table describes the corrections which should be applied to the values given in the arithmetic instruction times table if other object types are used.
Object position
-
-
Type of correction
Execution time (
µ s)
57 1• ram
57 1• card
57 2• ram
57 2• card
-0,12 -0,12 -0,12 0,00 Value to be subtracted from or added to value mentioned for
%MW
Value to be subtracted from or added to value mentioned for
%MD or %MF
-0,12 0,00 -0,19 0,21
Value to be added
Value to be added
1,12
1,12
1,75
1,75
0,56
0,56
1,04
1,04
57 3• ram
57 3• card
-0,08 0,00
-0,12 0,17
0,37
0,37
0,83
0,83
57 4•
Size
(words
)
-0,04 0
-0,06 1
0,19
0,19
5
5
Value to be added
Value to be added
1,12
0,62
1,75
0,87
0,56
0,25
1,04
0,42
0,37
0,17
0,83
0,33
0,19
0,08
5
2
168
TLX DR PL7 xxE
Instruction times
Correction according to the context of the operation
This table describes the corrections to be made to the values given in the arithmetic instruction times table according to the context of the operation.
Context of the operation
Object type
The operation is in at least the second position in the statement
E.g.: %MW2 in:=%MW0*%MW
1*%MW2
%MW
%MD or
%MF
Operation with result of an operation in parentheses or more urgent
E.g.:
%MW0+%MW2+
(...)
%MW
%MD or
%MF
Type of correction
Value to be added to value mentioned for %MW
Value to be added to value mentioned for %MD or %MF
Execution time (
µ s)
57 1• ram
57 1• card
57 2• ram
57 2• card
57 3• ram
57 3• card
57 4•
Size
(words)
0,50 0,62 0,19 0,33 0,12 0,25 0,06 1
0,62 0,75 0,31 0,46 0,21 0,33 0,10 1
Value to be added to value mentioned for %MW
Value to be added to value mentioned for %MD or %MF
0,37
0,50
0,37
0,50
0,12
0,25
0,12
0,25
0,08
0,17
0,08
0,17
0,04
0,08
1
1
TLX DR PL7 xxE
169
Instruction times
Table of instruction times
ST
The table below shows the arithmetic instruction times.
Objects Conditions object after the := sign
%MW0
Execution time (
µ s)
57 1• ram
57 1• card
57 2• ram
0,6
0,7
0,9
1,0
0,2
0,4
57 2• card
0,4
0,4
57 3• ram
0,2
0,2
%MD0
-
%MW0+(...or
%MW0 before
*,/ or REM)
-
%MW0+(...or
%MW0 before
*,/ or REM)
0,7
1,0
1,0
1,2
0,4
0,6
0,4
0,5
0,2
0,4
:=
=, <>, <=, <,
>, >=
AND, OR,
XOR
+, -
*
/, REM
%MF0
%MW0
%MD0
%MF0
%MW0
%MD0
/ %MF0
ABS, -object %MW0
%MD0
NOT
%MF0
%MW0
%MD0
%MF0
%MW0
%MD0 and
%MF0
%MW0
%MD0
%MF0
%MW0
%MD0
%MW0
%MD0
1,0
0,6
0,7
2,5
2,1
34
3,3
0,2
0,4
2,1
0,2
0,4
0,4
0,2
0,4
2,5
2,0
9,3
0,3
0,4
2,6
0,2
44
7,2
149
47
0,9
1,0
10
0,9
1,0
1,0
0,9
1,0
48
6,5
29
1,4
1,5
24
0,9
44
6,9
148
46
0,6
0,7
9
0,6
0,7
0,7
0,6
0,7
48
6,3
29
1,0
1,5
24
0,6
1,2
0,9
1,0
0,6
0,2
0,4
0,5
0,4
0,4
0,4
0,2
0,2
2,5
2,3
34
3,4
0,4
0,4
2,1
0,4
0,4
0,4
0,4
0,4
2,5
2,2
9,3
0,6
0,6
2,6
0,4
1,9
1,5
21
2,5
0,2
0,2
1,6
0,2
0,2
0,2
0,2
0,2
1,9
1,5
6,3
0,2
0,3
1,9
0,2
57 3• card
0,3
0,3
0,3
0,3
0,3
0,3
0,3
2,0
1,6
21
2,6
0,3
0,3
1,7
0,3
0,3
0,3
0,3
0,3
2,0
1,6
6,4
0,5
0,5
2,0
0,3
57 4•
Size
(words)
0,08
0,12
0,12
0,21
0,21
0,08
0,12
1,4
1,2
15
1,8
0,08
0,12
1,2
0,1
0,1
0,10
0,15
1,4
0,08
0,12
0,08
0,12
1,4
1,2
4,7
2
2
2
2
2
2
2
3
2
2
3
3
3
3
2
2
3
3
3
2
2
2
3
3
4
2
170
TLX DR PL7 xxE
Instruction times
ST
SQRT
INC, DEC
SHL, SHR,
ROL, ROR
LN
LOG
EXP
EXPT
TRUNC
COS
SIN
TAN
ACOS
ASIN
ATAN
DEG_TO_R
AD
RAD_TO_D
EG
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
%MF0
%MW0
%MD0
%MF0
%MW0
%MD0
%MW0
%MD0
Objects Conditions
117
0,7 for 1 bit for 1 bit
1,0
2,0
2,1 per additional bit 0,042
Execution time (
µ s)
57 1• ram
57 1• card
57 2• ram
19
62
19
62
3,5
10,2
117
1,0
1,2
2,9
3,0
2,8
0,4
0,6
0,8
0,9
%MF0
%MF0
%MF0
%MF0
847
900
713
1 747
1 753
1 813
2 520
2 520
847
900
713
1 747
1 753
1 813
2 520
2 520
2,2
2,2
6,4
2,2
2,2
2,2
2,7
3,4
1 720 1 720 2,1
1 640 1 640 61
103
392
142
537
32
86
380 522 86
2,8
0,4
0,5
1,5
1,5
57 2• card
3,7
10,3
96
2,2
2,2
2,7
3,4
2,2
2,2
6,4
2,2
2,1
68
36
96
2,1
0,2
0,4
0,5
0,6
57 3• ram
2,1
5,7
2,1
0,3
0,3
1,2
1,2
57 3• card
2,2
5,8
57 4•
1,5
4,4
1,5
0,12
0,21
0,27
0,31
2
7
7
3
2
3
3
Size
(words)
1,6
1,6
4,7
1,6
1,6
1,6
2,0
2,5
1,6
43
23
61
61
1,6
1,6
4,7
1,6
1,6
1,6
2,0
2,5
1,6
49
26
69
69
1,5
1,5
4,0
1,5
1,5
1,5
1,8
2,2
1,4
32
17
45
46
TLX DR PL7 xxE
171
Instruction times
Instructions on the program and monitoring structures
Instruction times on the program
ST
The table below shows the instruction times on the program.
Jump %Li
Maskevt
Unmaskevt
SRi
Return
Execution time (
µ s)
57 1• ram
1,2
57 1• card
1,6
57 2• ram
0,8
15,5
15,7
1,9
0,6
15,5
15,7
2,2
0,9
5,8
6,0
1,4
0,2
57 2• card
0,6
5,8
6,0
1,2
0,4
57 3• ram
0,5
4,0
4,2
1,0
0,2
57 3• card
0,5
4,0
4,2
0,8
0,3
57 4•
0,3
2,8
3,0
0,5
0,1
3
1
1
2
2
Size (words)
57• •
172
TLX DR PL7 xxE
Instruction times
Instruction times for the monitoring structures
The table below shows the instruction times for the monitoring structure-types.
ST
<cond> forcible bit comparison
Execution time (
µ s)
57 1• ram
57 1• card
57 2• ram condition evaluation see LD %M1 boolean instruction see comparisons =,<,> .etc.
57 2• card
57 3• ram
57 3• card
57 4•
Volume (words)
57• • if <cond > then
<action> end_if; true condition the times and volumes below should be added to those of the action contained in the structure
0,2 0,5 false condition
(jump)
0,5
If <cond> then <action1> else <action2> end_if;
0,7
0,1
0,1
0,4
0,4
0,1
0,1
0,3
0,3
0,04
0,04
2 true condition false condition while <cond> do.<action> end_while
0,7
0,5
1,2
0,7
0,2
0,1
0,8
0,4
0,2
0,1
0,7
0,3
0,08
0,04
4
0,2 0,8 0,2 0,7 0,08 2 go into the loop with loop iteration
0,7 exit the loop 0,5 repeat <action> until <cond> end_repeat go into the loop with loop iteration
0,5
1,2
0,7
0,7 last entry go into the loop with loop iteration
0,2 0,5 for <word1:=word2>to <word3> do <action> end_for input in the for, executed only once
1,2 1,7
3,5 5,0 exit the loop 1,7 2,5
0,1
0,1
0,1
0,5
1,2
0,6
0,4
0,4
0,4
0,8
2,5
1,2
0,1
0,1
0,1
0,3
0,8
0,4
0,3
0,3
0,3
0,7
2,0
1,0
0,04
0,04
0,04
0,17
0,42
0,21
2
15
TLX DR PL7 xxE
173
Instruction times
Digital conversions
Instruction times The table below shows the instruction times for the digital conversions.
ST Execution time (
µ s)
57 1• ram 57 4•
Volume
(words)
57• •
BCD_TO_INT(%MW0)
INT_TO_BCD(%MW0)
GRAY_TO_INT(%MW0)
INT_TO_REAL(%MW0)
DINT_TO_REAL(%MD0) 24
REAL_TO_INT(%MF0) 41
REAL_TO_DINT(%MF0) 33
DBCD_TO_DINT(%MD0) 612
17
14
27
28
DBCD_TO_INT(%MD0) 537
DINT_TO_DBCD(%MD0) 512
INT_TO_DBCD(%MW0) 274
28
28
24
42
57 1• card
17
14
33
840
737
702
376
4,7
1,5
1,7
1,6
57 2• ram
3,3
2,8
1,7
231
203
193
104
4,9
1,7
1,8
1,7
57 2• card
3,4
3,0
1,8
233
204
195
104
2,7
1,4
1,6
1,5
57 3• ram
1,9
1,7
1,6
178
156
149
80
2,8
1,6
1,7
1,6
57 3• card
2,1
1,9
1,7
179
157
150
80
1,2
1,1
1,2
138
1,5
1,3
1,9
1,0
121
115
62
5
5
5
3,0
3,0
3,0
5
3,0
3,0
3,0
3,0
174
TLX DR PL7 xxE
Instruction times
Instructions on a bit string
Initializing a bit table
ST
This table shows the instruction times for initializing a bit table.
Size (bit)
%M30:8 := 0
%M30:16 := 1
%M30:24 := 2
%M30:32 := 2
8
16
24
32
Execution time (
µ s)
57 1• ram
3,6
57 1• card
4,5
57 2• ram
2,4
5,6
12
14
6,5
14
16
4,4
5,6
7,6
57 2• card
3,2
5,2
6,8
8,8
57 3• ram
1,6
3,0
3,7
5,1
57 3• card
2,3
3,7
4,8
6,1
57 4•
0,8
1,5
2,4
3,1
Size (words)
57• •
7
7
12
12
Copying a bit table into a bit table
ST
This table shows the instruction times for copying a bit table into another bit table.
%M30:8 := %M20:8 8
%M30:16 := %M20:16 16
%M30:24 := %M20:24 24
%M30:32 := %M20:32 32
%M30:16 :=
COPY_BIT(%M20:16)
16
32
128
Size
(bit)
Execution time (
µ s)
22
27
173
263
818
57 1• ram
6,9
8,1
57 1• card
7,9
9,1
23
28
237
360
1 122
14
19
65
99
309
57 2• ram
5,4
6,6
16
21
66
100
312
57 2• card
6,0
7,3
10
13
50
76
238
57 3• ram
3,6
4,4
11
14
50
77
239
57 3• card
4,2
5,1
57 4•
1,8
2,2
5,4
7,0
39
59
184
17
17
17
8
8
13
13
Size
(words)
57• •
TLX DR PL7 xxE
175
Instruction times
Logic instructions on a bit table
The table below shows the logic instruction times for a bit table.
ST
AND_ARX, OR_ARX, XOR_ARX
%M0:16:=
AND_ARX(%M30:16,%M50:16)
%M0:32:=
AND_ARX(%M30:32,%M50:32)
%M0:128:=
AND_ARX(%M30:128,%M50:128)
NOT_ARX
%M0:16:= NOT_ARX(%M30:16)
16
32
128
16
32
128
Size
(bits)
Execution time (
µ s)
57 1• ram
57 1• card
57 2• ram
233
368
1 178
173
263
818
319
504
1 616
237
360
1 122
88
139
445
65
99
309
57 2• card
89
140
449
66
100
312
57 3• ram
68
107
343
50
76
238
57 3• card
68
107
344
50
77
239
57 4•
52
83
265
39
59
184
Size
(words)
57• •
24
24
24
17
17
17
Copying a bit table into a word table
ST
This table shows the instruction times for copying bit tables into a word table.
%MW1:= %M30:8
%MW1:= %M30:16
%MW2:= %M30:24
%MD2:= %M30:32
%MW1:4:=
BIT_W(%M40:80,0,17,2)
%MD1:4:=
BIT_D(%M30:80,0,33,0)
Size
(bits)
Execution time (
µ s)
8
16
24
32
17
57 1• ram
4,5
7,5
11
14
231
57 1• card
5,2
8,2
11
14
317
10
13
87
57 2• ram
3,4
6,4
10
13
88
57 2• card
3,9
6,9
57 3• ram
2,2
4,2
6,8
8,8
67
57 3• card
2,7
4,7
7,2
9,2
68
1,1
2,1
3,8
4,8
52
Size
(words
)
57 4• 57• •
6
6
6
6
23
33 325 446 123 124 95 95 73 23
176
TLX DR PL7 xxE
Copying a word table into a bit table
ST
Instruction times
This table shows the instruction times for copying word tables into a bit table.
%M30:8:= %MW1
%M30:16:= %MW2
%M30:24:= %MD1
%M30:32:= %MD3
%M30:32:=
W_BIT(%MW200:2,0,2,0)
%M30:32:=
D_BIT(%MD0:1,0,2,0)
Size
(bits)
Execution time (
µ s)
8
16
24
32
32
57 1• ram
3,6
5,6
12
14
231
57 1• card
4,4
6,4
13
15
317
57 2• ram
2,5
4,5
6,1
8,1
87
57 2• card
3,0
5,0
6,9
8,9
88
57 3• ram
1,7
3,0
4,3
5,7
67
57 3• card
2,2
3,5
5,1
6,4
68
Size
(words
)
57 4• 57• •
0,8
1,5
3,1
3,7
52
6
6
11
11
23
32 275 377 104 105 80 80 62 23
TLX DR PL7 xxE
177
Instruction times
Instructions on tables of words, double words and floating points
Initializing a table of words with one word
ST
This table shows the instruction times for initializing a table of words with one word.
%MW0:10:= %MW100
%MD0:10:= %MD100
Size (of the table of words)
Execution time (
µ s)
10 words per word
10 double words per double word
57 1• ram
34
0,16
53
1,98
57 1• card
35
0,16
54
1,98
57 2• ram
14
0,15
19
0,57
57 2• card
15
0,15
20
0,57
57 3• ram
10
0,12
13
0,37
57 3• card
11
0,12
14
0,37
57 4•
6,7
0,08
8,8
0,26
Size
(words)
57• •
10
10
Copying a table of words into a table of words
This table shows the instruction times for copying a table of words into another table of words.
ST Size (of the table of words)
Execution time (
57 1• ram
%MW0:10:=%MW20:10; 10 words 63 per word 0,28
69 %MD0:10:=%MD20:10; 10 double words per double word
0,79
57 1• card
65
0,28
71
0,79
µ s)
57 2• ram
25
0,31
29
0,71
57 2• card
26
0,31
30
0,71
57 3• ram
17
0,24
20
0,53
57 3• card
19
0,24
22
0,53
Size
(word s)
57 4• 57• •
12
0,15
14
0,36
15
15
178
TLX DR PL7 xxE
Instruction times
Arithmetic and logic instructions between 2 tables of words
ST
The table below shows the arithmetic and logic instruction times between two tables of words.
Size (of the table of words)
Execution time (
µ s)
57 1• ram
57 1• card
57 2• ram
+, -
%MW0:10:=
%MW10:10 + %MW20:10;
%MD0:10:=
%MD10:10+%MD20:10;
10 words 110 per word 4,7
10 double words
154 per double word
8,9
112
4,7
156
8,9
41
1,8
60
3,6
57 2• card
43
1,8
62
3,6
57 3• ram
28
1,3
41
2,5
57 3• card
30
1,3
43
2,5
57 4•
19
0,9
28
1,7
Size
(words)
57• •
23
23
*
%MW0:10:=
%MW10:10 * %MW20:10;
%MD0:10:=
%MD10:10 * %MD20:10;
10 words 127 per word 6,4
441 10 double words per double word
37,6
129
6,4
444
37,6
47
2,4
153
12,9
50
2,4
155
12,9
33
1,7
104
8,7
35
1,7
106
8,7
23
1,2
73
6,2
23
23
/, REM
%MW0:10:=
%MW10:10 / %MW20:10;
%MD0:10:=
%MD10:10 / %MD20:10;
10 words 133 135 49 per word 7,0
10 double words
7,0 2,6
1 639 1 642 395 per double word
157 157 37
52
2,6
397
37
34
1,8
248
23
36
1,8
250
23
24
1,4
172
16
23
23
AND, OR, XOR
%MW0:10:=%MW10:10
AND %MW20:10;
%MD0:10:=%MD10:10
AND %MD20:10;
10 words 108 per word 4,5
10 double words
155 per double word
9
111
4,5
158
9
40
1,7
61
4
43
1,7
63
4
28
1,2
42
3
30
1,2
44
3
19
0,8
29
2
23
23
TLX DR PL7 xxE
179
Instruction times
Arithmetic and logic instructions between 1 table of words and 1 word
The table below shows the arithmetic and logic instruction times between 1 table of words and 1 word.
ST Size (of the table of words)
Execution time (
57 1• ram
+, -
%MW0:10 :=%MW10:10 +
%MW20; or %MW0:10:= %MW20 +
%MW10:10
%MD0:10:=%MD10:10 +
%MD20;
10 words 86 per word 2,8
10 double words per double word
112
5,2
57 1• card
88
2,8
114
5,2
µ s)
57 2• ram
30
0,8
41
1,9
*
%MW0:10:=
%MW20*%MW10:10;
10 words per word
113
5,6
115
5,6
38
1,6
57 2• card
32
0,8
43
1,9
40
1,6
57 3• ram
21
0,5
28
1,3
26
1,1
57 3• card
22
0,5
30
1,3
27
1,1
57 4•
14
0,4
19
0,9
18
0,7
Size
(words)
57• •
18
18
18
134 90 92 64 18 %MD0:10:=
%MD20*%MD10:10;
10 double words per double word
381
32
/, REM
%MW0:10 :=%MW10:10 /
%MW30;
10 words 140 per word 8,4
383
32
142
8,4
132
11
46
2,4
%MD0:10:=
MD10:10 / %MD30
10 double words per double word
1 585 1 587 375
152 152 35
AND, OR, XOR
%MW0:10:=%MW10:10
AND %MW20;
10 words 86 per word 2,8
88
2,8
30
0,8
11
48
2,4
377
35
32
0,8
7,4
31
1,6
235
22
21
0,5
7,4
33
1,6
236
22
22
0,5
5,3
21
1,1
163
15
14
0,4
18
18
18
180
TLX DR PL7 xxE
Instruction times
ST
%MD0:10:=%MD20 AND
%MD10:10;
Size (of the table of words)
Execution time (
10 double words per double word
57 1• ram
381
4,2
57 1• card
383
4,2
µ s)
57 2• ram
132
1,5
NOT
%MW0:10:=NOT(%MW1
0:10);
%MD0:10:=NOT(%MD10:
10)
10 words 74 per word 1,9
84 10 double words per double word
2,9
75
1,9
86
2,9
26
0,5
31
1,0
57 2• card
134
1,5
28
0,5
33
1,0
57 3• ram
90
1,0
18
0,4
22
0,7
1,0
19
0,4
23
0,7
57 3• card
92 64
57 4•
Size
(words)
57• •
18
0,7
12
0,2
15
0,5
15
15
Addition function on the table
ST
The table below shows the instruction times for the addition function on the table.
%MW20:=SUM(%MW0:10);
%MD20:=SUM(%MD0:10);
Size (of the table of words)
Execution time (
57 1• ram
10 words 51 per word 1,6
58 10 double words per double word
2,1
57 1• card
53
1,6
59
2,1
µ s)
57 2• ram
17
0,4
19
0,6 0,6
57 2• card
18
0,4
20
0,4
57 3• ram
12
0,3
13
57 3• card
12
0,3
14
0,4
8
0,2
9
0,3
57 4•
Size
(words
)
57• •
16
16
TLX DR PL7 xxE
181
Instruction times
Table comparison function
ST
The table below shows the table comparison instruction times.
%MW20:=
EQUAL(%MW0:10;%MW10:10);
Size (of the table of words)
Execution time (
57 1• ram
10 words 67 per word 0,6
57 1• card
69
0,6
µ s)
57 2• ram
26
0,4
57 2• card
28
0,4
57 3• ram
18
0,3
57 3• card
20
0,3
Size
(words
)
57 4• 57• •
13
0,2
27
76 31 33 22 23 15 27 %MD20:=
EQUAL(%MD0:10;%MD10:10);
10 double words per double word
74
1,2 1,2 0,9 0,9 0,7 0,7 0,5
Find function
ST
The table below shows the find in a table instruction times.
%MW20:=
FIND_EQW(%MW0:10,%KW0)
%MD20:=
FIND_EQD(%MD0:10, %KD0)
Size (of the table of words)
Execution time (
57 1• ram
150 10 words, max poss
10 double words, max poss
163
57 1• card
206
223
µ s)
57 2• ram
57
61
57 2• card
57
62
57 3• ram
44
47
57 3• card
44
48
Size
(word s)
57 4• 57• •
34
37
14
15
182
TLX DR PL7 xxE
This table describes the instruction times for finding the highest and lowest values in a table.
Instruction times
Finding highest and lowest values
ST Size (of the table of words)
Execution time (
57 1• ram
10 words 163
57 1• card
223
µ s)
57 2• ram
61
57 2• card
62
57 3• ram
47
57 3• card
48
57 4•
37
Size
(words
)
57• •
12 %MW20:=
MAX_ARW(%MW0:10)
%MD20:=
MAX_ARD(%MD0:10)
10 double words
194 266 73 74 56 57 44 12
Calculating the number of occurrences
This table shows the instruction times for the number of occurrences of a value in a table of words.
ST
%MW20:=
OCCUR_ARW(%MW0:10, %KW0)
%MD20:=
OCCUR_ARD(%MD0:10, %KD0)
Size
(of the table of words)
Execution time (
µ s)
57 1• ram
163
57 1• card
223
57 2• ram
61 10 words
10 double words
175 240 66
57 2• card
62
67
57 3• ram
47
51
57 3• card
48
51
Size
(word s)
57 4• 57• •
37
39
14
15
Rotate shift
ST
The table below shows the rotate shift instruction times.
Size (of the table of words)
Execution time (
57 1• ram
10 words 250
57 1• card
343
µ s)
57 2• ram
94
57 2• card
95
57 3• ram
73 ROL_ARW(word or value,%MWj:10)
ROL_ARD(%MDi,%MDj:10) 10 double words
269 369 102 102 78 79
57 3• card
73 56
Size
(word s)
57 4• 57• •
12
61 12
TLX DR PL7 xxE
183
Instruction times
Sort instruction The table below shows the instruction times for sorting the elements in a table.
ST Size (of the table of words)
Execution time (
SORT_ARW(%MWi,%MWj:10) 10 words max poss
SORT_ARD(%MDi,%MDj:10) 5 double words, max poss
57 1• ram
450
275
57 1• card
618
377
µ s)
57 2• ram
170
104
57 2• card
172
105
57 3• ram
131
80
57 3• card
132
80
Size
(words
)
57 4• 57• •
101
62
12
12
Calculation of length
ST
LENGTH_ARW(tab_word)
LENGTH_ARD(tab_dword)
LENGTH_ARW(tab_reel)
LENGTH_ARW(tab_bit)
The table below shows the instruction times for calculating the length of a table.
Size (of the table of words)
Execution time (
µ s)
57 1• ram
31
31
31
31
57 1• card
43
43
43
43
57 2• ram
12
12
12
12
57 2• card
12
12
12
12
9
9
9
9
57 3• ram
9
9
9
9
57 3• card
7
7
7
7
Size
(words)
57 4• 57• •
6
6
6
6
184
TLX DR PL7 xxE
Instruction times
SUM_ARR
FIND_EQR
FIND_EQRP
FIND_GTR
FIND_LTR
MAX_ARR
MIN_ARR
OCCUR_ARR
ROL_ARR
ROR_ARR
SORT_ARR
EQUAL_ARR
Floating point tables
ST
The table below shows the instruction times on a floating point table.
Size (of the table of words)
Execution time (
µ s)
57 1• ram
794
390
57 1• card
942
535
57 2• ram
186
83
57 2• card
207
93
10 integers
10 integers, median poss
10 integers, median poss
10 integers, median poss
10 integers, median poss
10 integers
10 integers
10 integers
10 integers
10 integers
10 integers
10 integers
391
390
390
648
601
598
273
264
896
344
536
535
535
889
825
821
374
363
1 229
472
83
83
83
160
148
147
67
65
220
84
93
93
93
179
164
164
75
72
245
94
57 3• ram
132
59
57 3• card
149
67
Size
(words)
57 4• 57• •
98
44
59
59
59
114
105
104
48
46
156
60
67
67
67
128
118
118
54
52
176
68
44
44
44
85
78
78
35
34
116
45
TLX DR PL7 xxE
185
Instruction times
Time management instructions
Instructions for date, hour and period management
ST
The table below shows the instruction times for date, hour and period management.
Execution time (
µ s)
57 1• ram
1 951 %MW2:4:=
ADD_DT(%MW2:4,%MD8)
%MD2:= ADD_TOD(%MD2,%MD8) 1 025
%MB2:11:=
DATE_TO_STRING(%MD40)
606
%MW5:= DAY_OF_WEEK() 88
%MD10:= DELTA_D(%MD2, %MD4) 731
1 506 %MD10:=
DELTA_DT(%MD2:4,%MW6:4)
%MD10:=
DELTA_TOD(%MD2,%MD4)
%MB2:20:=
DT_TO_STRING(%MW50:4)
1 113
707
%MW2:4:=
SUB_DT(%MW2:4,%MD8)
2 344
%MD2:= SUB_TOD(%MD2,%MD8) 1 113
%MB2:15:=
TIME_TO_STRING(%MD40)
%MB2:9:=
TOD_TO_STRING(%MD40)
794
519
%MD100:= TRANS_TIME(%MD2) 331
57 1• card
2 677
1 407
832
121
1 004
2 067
1 527
970
3 216
1 527
1 089
712
455
57 2• ram
737
387
229
33
276
569
421
267
886
421
300
196
125
57 2• card
744
391
231
34
279
574
424
269
893
424
303
198
126
57 3• ram
568
298
176
26
213
438
324
206
682
324
231
151
96
57 3• card
571
57 4•
440
300
177
26
214
441
325
207
685
325
232
152
97
231
137
20
165
339
251
159
528
251
179
117
75
Size
(words)
57• •
19
9
12
5
9
19
9
17
19
9
12
12
7
186
TLX DR PL7 xxE
Instruction times
Real-time clock access
ST
The table below shows the instruction times for the real-time clock.
Execution time (
µ s)
RRTC(%MW0:4)
WRTC(%MW0:4)
PTC(%MW0:5)
SCHEDULE(%MW0,%MW1,%MW2,
%MD10,%MD12,%M0)ÿ
69
74
88
57 1• ram
88
70
75
89
57 1• card
89
25
26
30
57 2• ram
30
25
27
30
57 2• card
30
17
18
21
57 3• ram
21
17
19
21
57 3• card
21 14
11
12
14
57 4•
Size
(words)
57• •
8
8
8
8
Timer functions
ST
FTON
FTOF
FTP
FPULSOR
The table below shows the instruction times for the timer functions.
Execution time (
µ s)
57 1• ram
53
53
53
181
57 1• card
53
53
53
249
57 2• ram
28
28
28
69
57 2• card
32
32
32
69
57 3• ram
21
21
21
53
57 3• card
24
24
24
53
57 4•
12
12
12
41
Size
(words)
57• •
TLX DR PL7 xxE
187
Instruction times
Character string instructions
Character string assignment and copying
ST
The table below describes the instruction times for assigning and copying character strings
%MB0:8:=%MB10:8
%MB0:8:=’abcdefg’
Size
(characters)
Execution time (
57 1• ram
8 characters 66 per character 0,39
57 1• card
67
0,39
µ s)
57 2• ram
27
0,30
8 characters 85 per character 2,37
85
2,37
29
0,68
57 2• card
27
0,30
29
0,68
57 3• ram
18
0,23
20
0,47
57 3• card
19
0,23
20
0,47
Size
(words)
57 4• 57• •
14
0,16
14
0,36
15
14
0,5
Converting words <-> strings of characters
ST
This table describes the instruction times for converting words and character strings.
Execution time (
µ s) Size
(words)
57 4• 57• • 57 1• ram
69
57 1• card
71
57 2• ram
23
57 2• card
23
57 3• ram
16
57 3• card
16 12 10 %MW1:=
STRING_TO_INT(%MB0:7)
%MB0:7:=
INT_TO_STRING(%MW0)
74 75 23 23 15 16 12 10
188
TLX DR PL7 xxE
Instruction times
Converting double word<-> character strings
ST
This table describes the instruction times for converting double words and character strings.
Execution time (
µ s) Size
(words)
57 4• 57• • 57 1• ram
706
57 1• card
707
57 2• ram
237
57 2• card
237
57 3• ram
160
57 3• card
160 115 10 %MD1:=
STRING_TO_DINT(%MB0:13)
%MB0:13:=
DINT_TO_STRING(%MD0)
215 216 66 67 44 45 33 10
Converting character string<-> floating points
ST
This table describes the instruction times for converting floating points into character strings.
Execution time (
µ s) Size
(words)
57 4• 57• • 57 1• ram
1 912
57 1• card
1 913
57 2• ram
344
57 2• card
344
57 3• ram
237
57 3• card
237 155 10 %MF1:=
STRING_TO_REAL(%MB0:15)
%MB0:15:=
REAL_TO_STRING(%MF0)
500 501 140 140 96 96 63 10
TLX DR PL7 xxE
189
Instruction times
Instructions for manipulating character strings
ST
This table describes the instruction times for manipulating character strings
Execution time (
µ s) Size
(words)
57 4• 57• • 57 1• ram
%MB10:20:=
CONCAT(%MB30:10,%MB50:10)
%MW0:=
FIND(%MB10:20,%MB30:10);
%MB10:20:=
INSERT(%MB30:10,%MB50:10,4);
494
%MB10:20:= DELETE(%MB10:22,2,3); 400
%MW0:=
EQUAL_STR(%MB10:20,%MB30:20);
(the fifth character differs)
338
650
519
%MB10:20:= LEFT(%MB30:30,20);
%MW0:= LEN(%MB10:20);
%MB10:20:= MID(%MB30:30,20,10);
%MB10:20:=
REPLACE(%MB30:20,%MB50:10,10,1
0);
%MB10:20:= RIGHT(%MB30:30,20);
369
219
444
556
606
57 1• card
678
549
463
892
712
506
300
609
763
832
57 2• ram
187
151
128
246
196
139
83
168
210
229
57 2• card
188
152
129
248
198
141
83
169
212
231
57 3• ram
144
116
98
189
151
107
64
129
162
176
57 3• card
144
117
99
190
152
108
64
130
163
177
111
90
76
146
117
83
49
100
125
137
24
21
19
19
26
19
12
21
28
19
Extracting words The table below shows the instruction times for extracting words
ST Execution time (
µ s) Size
(words)
57 4• 57• •
LW
HW
CONCATW
57 1• ram
32
32
32
57 1• card
44
44
44
57 2• ram
12
12
12
57 2• card
12
12
12
9
9
57 3• ram
9
9
9
57 3• card
9
7
7
7
190
TLX DR PL7 xxE
Instruction times
Application-specific and Orphee functions
Communication functions
The table below shows the instruction times for the communication functions.
ST Execution time (
µ s) Size
(words)
57• • 57 1• ram
57 1• card
57 2• ram
57 2• card
57 3• ram
57 3• card
SEND_REQ: instruction execution time, time to be added in the communication system
SEND_REQ(%KW0:6,15,%MW0:1,
%MW10:10,%MW30:4)
1 250 1 715 472 476 364 366
57 4•
282 33
SEND_TLG: processing is simultaneous with the instruction, no time needs to be added in the communication system
SEND_TLG(%KW0:6,%MW0:5,%MW
30:2)
938 1 287 354 357 273 274 211 24
SERVER for 120 octets
WRITE_ASYN for 500 words
3 825 4 244 2 225 2 229 1 677 1 679 1 427 16
2 975 3 301 1 731 1 734 1 305 1 306 1 110 16
READ_ASYN for 500 words 2 975 3 301 1 731 1 734 1 305 1 306 1 110 16
TLX DR PL7 xxE
191
Instruction times
Dialog operator function
ST
The table below shows the instruction times for the dialog operator.
Execution time (
µ s)
57 1• ram
57 1• card
57 2• ram
SEND_MSG(ADR#1.0,%MW0:2,%MW10:2) 1250 1715 472
SEND_ALARM(ADR#1.0,%MW0:2,%MW10:2) 1250 1715 472
GET_MSG(ADR#1.0,%MW0:2,%MW10:2)
GET_VALUE(ADR#1.0,%MW0,%MW10:2)
1250 1715 472
625 858 236
ASK_MSG(ADR#1.0,%MW0:2,%MW10:2,%M
W20:2)
ASK_VALUE(ADR#1.0,%MW0,%MW10:2,%M
W20:2)
1250 1715 472
1250 1715 472
DISPLAY_ALRM(ADR#1.0,%MW0,%MW10:2) 625
DISPLAY_GRP(ADR#1.0,%MW0,%MW10:2) 625
858
858
236
236
DISPLAY_MSG(ADR#1.0,%MW0,%MW10:2) 625
CONTROL_LEDS(ADR#1.0,%MW0:2,%MW1
0:2)
858 236
1250 1715 472
ASSIGN_KEYS(ADR#1.0,%MW0:2,%MW10:2) 1250 1715 472
PANEL_CMD(ADR#1.0,%MW0:2,%MW10:2) 1250 1715 472
476
238
238
238
476
476
476
57 2• card
476
476
476
238
476
57 3• ram
364
364
364
182
364
364
182
182
182
364
364
364
Size
(words)
57 4• 57• • 57 3• card
366
366
366
183
366
282
282
282
141
282
25
25
25
20
32
366
183
183
183
366
366
366
282
141
141
141
282
282
282
27
20
20
20
25
25
25
192
TLX DR PL7 xxE
Instruction times
Process control function
The table below shows the instruction times for the process control functions.
ST
PID("PIDS1",’Unit’,%IW3.5,%MW12,
%M16,%MW284:43)
PWM(%MW11,%Q2.1,%MW385:5)
SERVO(%MW12,%IW3.6,%Q2.2,%
Q2.3, %MW284:43,%MW390:10)
PID_MMI(ADR#0.0.4,%M1,%M2:5,
%MW410:62)
Condi tion
Execution time ( deval_ mmi=0 deval_ mmi=1
57 1• ram
688
563
313
500
57 1• card
943
772
429
686
µ s)
57 2• ram
260
213
118
189
EN=1 625 858 236
57 2• card
262
214
119
191
238
57 3• ram
200
164
91
145
182
57 3• card
201
165
91
146
183
Size
(words)
57 4• 57• •
155
127
70
113
141
32
17
31
30
Data storage
ST
SET_PCMCIA
WRITE_PCMCIA
READ_PCMCIA
The table below shows the instruction times for the data storage functions.
Condition Execution time (
µ s) fixed per word
57 1• ram
57 1• card
350
0,4
57 2• ram
57 2• card
70
0,3
57 3• ram
57 3• card
40
0,2
Size
(words)
57 4• 57• •
30
0,2 fixed per word fixed per word
350
0,8
350
0,7
70
0,3
70
0,4
40
0,3
40
0,3
30
0,2
30
0,4
TLX DR PL7 xxE
193
Instruction times
Orphee function The table below shows the instruction times for the process control functions.
ST Execution time (
µ s) Size
(words)
57 4• 57• • 57 1• ram
DSHL_RBIT(%MD102,16,%MD204,%MD206) 200
DSHR_RBIT(%MD102,16,%MD204,%MD206) 319
57 1• card
274
437
57 2• ram
76
120
57 2• card
76
122
57 3• ram
58
93
57 3• card
58
93
45
72
17
17
DSHRZ_C(%MD102,16,%MD204,%MD206) 194
WSHL_RBIT(%MW102,8,%MW204,%MW206) 138
WSHR_RBIT(%MW102,8,%MW204,%MW206) 181
WSHRZ_C(%MW102,8,%MW204,%MW206) 138
SCOUNT(%M100,%MW100,%M101,%M102,
%MW101,%MW102,%M200,%M201,%MW20
0, %MW201)
263
266
189
249
189
360
73
52
69
52
99
74
52
69
52
100
56
40
53
40
76
57
40
53
40
77
44
31
41
31
59
17
17
17
17
38
194
TLX DR PL7 xxE
Instruction times
Explicit input/output instructions
Performance times
ST
This table shows the explicit input/output instruction times.
Execution time (
µ s)
57 1• ram
57 1• card
57 2• ram
57 2• card
57 3• ram
57 3• card
Size
(words)
57 4• 57• •
Read_Sts %CHi.MOD
Any application except the processor communication channel
Read_Sts %CHi
Discrete input
Discrete output
Analog input
Analog output
CTY 2A/4A counting module
CTY 2C counting module
CFY 11/22 step by step module
CAY 21/41 axis command module
Write_Param %CHi
Analog input
Analog output
CTY 2A/4A counting module
CTY 2C counting module
CFY 11/22 step by step module
CAY 21/41 axis command module
Read_Param %CHi
Analog input
Analog output
CTY 2A/4A counting module
CTY 2C counting module
CFY 11/22 step by step module
CAY 21/41 axis command module
Save_Param %CHi
552 651 291 292 220 220 2
296
386
334
327
327
311
448
334
317
426
363
354
354
335
505
363
180
227
201
197
197
189
254
201
181
227
201
197
197
189
255
201
136
171
151
148
148
142
192
151
136
171
151
148
148
142
192
151
117
145
129
127
127
122
163
129
6
499
474
603
400
577
461
574
540
731
444
691
522
274
265
302
233
297
260
275
265
303
234
298
260
207
200
229
176
225
196
207
200
230
176
226
196
174
169
190
150
187
166
6
115
115
334
349
393
386
118
118
363
381
435
426
75
75
201
209
230
227
75
75
201
209
230
227
56
56
151
157
173
171
56
56
151
157
173
171
49
49
129
134
148
145
6
TLX DR PL7 xxE
195
Instruction times
ST Execution time (
µ s)
Analog input
Analog output
CTY 2A/4A counting module
CTY 2C counting module
CFY 11/22 step by step module
CAY 21/41 axis command module
Restore_Param %CHi
Analog input
Analog output
CTY 2A/4A counting module
57 1• ram
635
640
752
379
421
421
57 1• card
787
795
470
470
57 2• ram
306
306
1 049 271
417 223
243
243
CTY 2C counting module
CFY 11/22 step by step module
CAY 21/41 axis command module
Write_Cmd %CHi
Discrete output
Analog inputs
467
467
608
349
588
480
288
531
531
739
381
707
548
308 176
Input forcing
Input recalibration
Analog outputs
134
691
138
895
86
303
Forcing 143 147 92
Smove %CH1.0(%MW1,%MW2,%MW3,%MD4,%MD5,%MW6)
CFY 11/22 step by step module 617 755 304
CAY 21/41 axis command module 608 739 303
262
262
303
209
299
267
57 2• card
307
307
274
223
243
243
263
263
304
209
300
268
176
86
304
92
305
304
198
198
230
157
227
202
133
65
231
69
231
230
57 3• ram
232
233
209
168
183
183
57 3• card
233
233
211
168
183
183
Size
(words)
57 4• 57• •
191
191
160
143
155
155
6
198
198
230
157
227
202
133
65
232
69
231
230
167
167
190
134
188
170
114
0
56
186
0
60
190
190
6
6
19
196
TLX DR PL7 xxE
Instruction times
DFB function block
Size occupied by the DFB type
The following formula is used to calculate the size occupied by the DFB type:
DFB type size = Size of DFB variables and parameters + DFB Code size
Size of DFB variables and parameters
The size of the DFB variables and parameters is calculated as follows:
Size of DFB variables and parameters = 110 + sum of variable and parameter descriptors + sum of sizes occupied by each variable or parameter with:
Descriptor of'a variable or of'a parameter = 5.5 + (Number of characters in the name of the variable or parameter)/2 and
Size occupied by each variable or parameter:
Type
EBOOL
BOOL
WORD
DWORD
REAL
AR_X
AR_W
AR_D
AR_R
STRING
3
3
3
3
3
2
2
IN
0,5
0,5
1
3
3
3
3
3
2
2
2
2
IN/OUT
2
OUT
0,5
0,5
1
2
2
0.5*N
N
2*N
2*N
0.5*N
PUBLIC
0,5
0,5
1
2
2
0.5*N
N
2*N
2*N
0.5*N
N = number of'table elements or character string length (STRING)
PRIVATE
0,5
0,5
1
2
2
0.5*N
N
2*N
2*N
0.5*N
TLX DR PL7 xxE
197
Instruction times
DFB code size The size of the DFB variables and parameters is calculated as follows:
DFB size code = 11 + sum of each of the instruction sizes(1)
(1) The following volumes, depending on the variable or parameter contained in the'instructions, are to be added to the instruction size:
Nature
IN
IN/OUT
OUT,
PUBLC
PRIVATE
Type
EBOOL
BOOL, WORD, DWORD, REAL
AR_X,AR_W,AR_D,AR_R,STRING
EBOOL
BOOL, WORD, DWORD, REAL
AR_X,AR_W,AR_D,AR_R,STRING
EBOOL
BOOL, WORD, DWORD, REAL
AR_X,AR_W,AR_D,AR_R,STRING
0
0
3
3
0,5
0
3
3
Volume
0,5
Indexed object:
Nature
IN
IN/OUT
OUT,
PUBLIC,
PRIVATE
Type
AR_X,AR_W,AR_D,AR_R
AR_X,AR_W,AR_D,AR_R
AR_X,AR_W,AR_D,AR_R
Volume
7
7
6
Size occupied by
' DFB usage
Calling'one instance of the DFB with no parameter = 6 words
Calculation for a parameter
Nature
IN
IN/OUT
OUT,
Type
EBOOL, BOOL, WORD, DWORD, REAL
AR_X,AR_W,AR_D,AR_R, STRING
EBOOL, WORD, DWORD, REAL
BOOL, AR_X,AR_W,AR_D,AR_R
All types
Volume same assignment:=
14
10
14 same assignment:=
Using'one variable of'one instance: add one word per report
198
TLX DR PL7 xxE
Instruction times
Execution time The total DFB execution time is given by the following formula:
Total time of'DFB execution = DFB maximum transmission rate code + Sum of times of'access to DFB variables and parameters + DFB call (no parameter) + Sum of time of'access for each parameter
The following table gives the execution time in
µ s.
574• Element Type 571• ram
13,0
571• card
16,3 Projection for DFB code
Accessing a DFB variable or parameter (1)
Indexed objects
IN EBOOL
BOOL,WORD,DWORD,REAL
AR_X,AR_W,AR_D,AR_R,STRING
IN/OUT
OUT,
PUBLIC,
PRIVAT
E
EBOOL
BOOL,WORD,DWORD,REAL
AR_X,AR_W,AR_D,AR_R,STRING
Non-indexed objects
IN, IN/
OUT
AR_X,AR_W,AR_D,AR_R,
0,2
0
1,4
1,4
0,2
0
0
2,8 3,5
OUT,
PUBLIC,
PRIVAT
E
IN
AR_X,AR_W,AR_D,AR_R,
DFB call (no parameter)
Calculating by parameter (1)
EBOOL
BOOL,WORD,DWORD,REAL
2,1
3,8
2,6
4,8
AR_X,AR_W,AR_D,AR_R,STRING
IN/OUT EBOOL,WORD,DWORD,REAL
OUT same:= same:=
3,5
2,8
4,4
3,5
BOOL,AR_X,AR_W,AR_D,AR_R,STRING 3,5
All types same:=
4,4
0
0
0,3
0
1,7
1,7
0,3
572• ram
4,8
0
0
0,09
0
0,5
0,5
0,09
1,0
0,8
1,5
1,5
1,0
1,5
572• card
4,8
0
0
0,12
0
0,8
0,8
0,12
0,9
1,1
1,8
1,9
1,4
1,9
573• ram
3,4
0
0
0,06
0
0,4
0,4
0,06
0,7
0,5
1,0
1,0
0,7
1,0
573• card
3,8
0
0
0,10
0
0,6
0,6
0,10
0,7
0,9
1,4
1,6
1,1
1,6
1,1
0,2
0,2
0,3
0,3
0,2
0,3
0
0
0,02
0
0,1
0,1
0,02
(1) value to add relating to operations applying to %M-type objects.
TLX DR PL7 xxE
199
Instruction times
6.4
Advanced functions
At a Glance
Aim of this section
What's in this
Section?
This section gives the amount of memory occupied by the advanced functions, and the method of calculating the number of instructions.
This Section contains the following Maps:
Topic
Description of the memory zones
Object memory size
Review of the memory usage of the modules on MIcro
Memory usage for the modules on Premium
Memory size for advanced functions
Method for calculating the number of instructions
Page
200
TLX DR PL7 xxE
Instruction times
Description of the memory zones
Recap l l
The application is divided into several memory zones: l bit memory zone: l this zone is specific to the TSX 37 PLCs and is restricted to 1280 bits l this zone is part of the data memory zone for the TSX 57 PLCs, data memory zone (words), application memory zone, comprising: l l the configuration, the program, l the constants.
The bit memory and data zones are always stored in the internal RAM while the application memory zone can be stored in the internal RAM or on the memory card.
TLX DR PL7 xxE
201
Instruction times
Object memory size
Description This table shows the memory size occupied by each type of PL7 language object.
Object type
Grafcet steps (%Xi, %Xi.T)
%Mi
Words (%MWi)
Constants (%KWi)
%NWi
%Ti
%TMi
%MNi
%Ci
%Ri (length lg)
%DRi
Bit memory (in words)
0,5
0,5
Data (in words)
1
1
5
4
1
4
3
6+lg
6
Application (in words)
1,25
2
1
2
2
2
49
Grafcet interpreter data = 355 + 2 x No. of active configured steps + (No. of valid configured transitions) / 2
202
TLX DR PL7 xxE
Instruction times
Review of the memory usage of the modules on MIcro
General
Processors
Note: This information is for a specific processor version. They can be subject to
‘slight’ variations according to how the product develops.
The tables below give the size occupied in each of the zones and a fixed size to be added to the memory usage the first time an application-specific function is used, for each module type.
The table below gives the memory usage for the TSX 37 processor modules.
Processors
TSX 37-05/08/10
TSX 37-21
TSX 37-22
Using FAST task (TSX 37)
Using first event (TSX 37)
Bit memory
(words)
70
70
70
Data
(words)
1560
1570
2110
260
520
Application zone
(words)
920
930
1280
All or nothing modules
The table below gives the memory usage for the all or nothing modules.
The all or nothing family
8 discrete inputs
16 discrete inputs
4 discrete outputs
8 discrete outputs
8I/8O discrete
16I/12O discrete
32I/32O discrete
2
4
4
16
32
4
8
Bit memory
(words)
12
12
12
20
20
Data
(words)
12
12
40
40
40
100
142
Application zone
(words)
40
50
TLX DR PL7 xxE
203
Instruction times
Analog modules The table below gives the memory usage for the analog modules.
Analog family Bit memory
(words)
Data (words) Application zone
(words)
4 analog input module
AEZ414
Additional cost for the first 4-analog input family module
8 analog input module
AEZ801/AEZ802
Additional cost for the first 8-analog input family module
Analog output module
ASZ200
ASZ401
Additional cost for the first analog output family module
0
0
0
0
156
212
52
100
56
120
72
120
40
59
120
Counting modules
The table below gives the memory usage for the counting modules.
Counting family
CTY1A
CTY2A
Additional cost for the first counting channel
Additional cost for the first down counting channel
Additional cost for the first channel in
CPT/DCPT
Bit memory
(words)
16
32
Data (words) Application zone
(words)
108
212
64
106
144
144
144
204
TLX DR PL7 xxE
Instruction times
Communication modules
The table below gives the memory usage for the communication modules.
Communication family
STZ010
SCP111/SCP112/SCP114
(on UC UTW)
FPP 20 on UC (Channel 0 UTW)
MDM 10
0
0
0
0
Bit memory
(words)
Data (words) Application zone (words)
36
40
168
763
40
2528
755
12880
TLX DR PL7 xxE
205
Instruction times
Memory usage for the modules on Premium
General
Processors
Note: This information is for a specific processor version. They can be subject to
«slight» variations according to product developments.
The tables below give the size occupied in each of the zones and a fixed size to be added to the memory usage the first time an application-specific function is used, for each module type.
The table below gives the memory usage for the TSX 57 processor modules.
Processors
P 57-1•
P 57-2•/3•/4•
Using FAST task (TSX 57)
Additional cost for first module in configuration
P 57-1•: per process control loop
Additional cost for first loop
P 57-2•/3•/4•: per process control loop
Additional cost for first loop
Bit memory
(words)
70
70
Data (words) Application zone (words)
4714
4714
1720
1784
520
600
500
500
25000
5000
206
TLX DR PL7 xxE
Discrete modules
Instruction times
The table below gives the memory usage for the all or nothing modules.
Discrete family Bit memory
(words)
Single discrete input family
8 discrete inputs
16 discrete inputs
32 discrete inputs
64 discrete inputs
Additional cost for the first input family module
Single discrete output family
8 discrete outputs
16 discrete outputs
32 discrete outputs
64 discrete outputs
Additional cost for the first output family module
Discrete event input family
16 discrete inputs (DEY 16FK)
Additional cost for the first input family module
Discrete Input/Output family safety
12I/4O or 12I/4O(PAY)
Additional cost for the first DIS EVT input family module
Mixed discrete input/output family
16 inputs/12 outputs (DMY 28FK)
Additional cost for the first family module
Mixed discrete
Reflex 16 I/12 O (DMY 28RFK)
Additional cost for the first reflex mixed discrete family module
4
8
16
32
4
8
16
32
8
16
16
32
Data (words) Application zone (words)
110
160
280
550
100
130
230
430
220
128
304
976
100
110
120
190
570
100
110
120
190
610
130
680
200
1320
152
1432
656
5596
TLX DR PL7 xxE
207
Instruction times
Analog modules The table below gives the memory usage for the analog modules.
Analog family Bit memory
(words)
Data (words) Application zone (words)
Analog input families
AEY414
AEY800
AEY1600
Additional cost for the first analog input family module (AEY 414/800/1600)
AEY810
AEY1614
Additional cost for the first analog input family module (AEY 810/1614)
AEY420
Additional cost for the first analog input family module (AEY 810/1614)
Analog output family
ASY410
Additional cost for the first ASY410 analog output module
ASY800
Additional cost for the first ASY800 analog output module
4
8
16
8
16
4
4
8
430
840
1670
888
1768
476
430
744
160
240
430
2990
248
432
3056
168
2080
160
1700
248
1760
Counting modules
The table below gives the memory usage for the counting modules.
Counting family
CTY2A module
CTY4A module
Additional cost for the first configured counting channel
CTY2C module
Additional cost for the first configured counting channel
Bit memory
(words)
32
64
48
Data (words) Application zone (words)
410
800
170
250
1740
672 184
1992
208
TLX DR PL7 xxE
Servo-motor modules
Step by step modules
Instruction times
The table below gives the memory usage for the servo-motor modules.
Servo-motor family (words) (words)
CAY•1
CAY•2
CAY33 channel 3
Additional cost for the first CAY•1 configured channel
Additional cost for the first CAY•2/33 configured channel
Additional cost for the first CAY•33 configured channel 3
Bit memory
(words)
78
78
78
520
376
264
140
232
170
2130
3600
3600
The table below gives the memory used for the step by step modules.
Step by step family Bit memory
(words)
Data
(words)
CFY11
CFY21
Additional cost for the first configured step by step channel
29
58
323
646
Application zone
(words)
104
152
2368
TLX DR PL7 xxE
209
Instruction times
Communication modules
The table below gives the memory usage for the communication modules.
Communication module family
SCY21600 (Channel 0 UTW) on SCY21600 (Channel 1 UTW)
Additional cost for the first channel configured in UTW
ETY 110
Additional cost for the first ETY 110 configured channel
ETY 120
Additional cost for the first ETY 120 configured channel
ETY 210
Additional cost for the first ETY 210 configured channel
IBY 100
1
1
Bit memory
(words)
1
1
1
1
Data
(words)
230
450
431
48
434
450
Application zone
(words)
80
40
1280
256
1984
136
1368
400
3424
40
Communication sub-modules
The table below gives the memory usage for the communication sub-modules.
Communication sub-module Bit memory
(words)
1
Data
(words)
60
Application zone
(words)
580 SCP111/ SCP112/ SCP114 (UTW) on UC (Channel 0 UTW)
FPP 20 on UC (Channel 0 UTW)
FPP 10 on UC (Channel 0 UTW)
1
1
60
40
580
870
AS-i module The table below gives the memory usage for the AS-i module.
AS-i family Bit memory
(words)
Data
(words)
SAY
Additional cost for the first ASi channel
3 373
Application zone
(words)
176
2272
210
TLX DR PL7 xxE
Weighing modules
TBX remote input/output modules
Instruction times
The table below gives the memory usage for the weighing modules.
Weighing family
AWY001
Additional cost for the first configured weighing channel
Bit memory
(words)
1
Data (words) Application zone (words)
170 120
3920
The table below gives the memory usage for the TBX remote input/output modules.
Remote input/output family
Discrete inputs
Additional cost for the first configured base
Discrete outputs
Additional cost for the first configured base
Programmable
Additional cost for the first configured base
Latch'state
Additional cost for the first configured base
AES 400
ASS 200
AMS 620
Additional cost for the first configured base
8
8
8
2
2
4
Bit memory
(words)
8
Data (words) Application zone (words)
152 88
1400
176
160
160
270
270
508
88
1320
88
2304
88
1400
104
104
112
3968
TLX DR PL7 xxE
211
Instruction times
Momentum modules
Remote X bus modules
The table below gives the memory usage for the Momentum modules
Momentum family
Inputs
Additional cost for the first configured base
Output
Additional cost for the first configured base
Mixed
Additional cost for the first configured base
Bit memory
(words)
16
16
16
Data (words) Application zone (words)
96 72
1384
112
104
72
1256
72
1424
The table below gives the memory usage for the remote X bus module.
Remote X bus
TSX REY 200 module
Bit memory
(words)
0
Data (words) Application zone (words)
0 56
212
TLX DR PL7 xxE
Instruction times
Memory size for advanced functions
Description
Example
Numerical conversions
The tables below show the size of the code taken into the application (application zone) for each advanced function (OF) when one is called.
Functions in the same family share code (shared code). This shared code is taken into the PLC the first time a function from this family is called. The code specific to a function is taken in the first time this function is called.
l l
The first time a function of the numerical conversion family is called, with the case of DBCD_TO_DINT, the code is taken into the application zone: l Shared code = 154 words l OF DBCD_TO_INT code = 149 words
When another function of the numerical conversion family is called, in the case of l l
DINT_TO_DBCD, the code is taken into the application zone:
OF DINT_TO_DBCD code = 203 words
If a function in the digital conversion family already called is called
(DBCD_TO_DINT or DINT_TO_DBCD): no code taken in
The table below gives the memory usage for advanced conversion functions.
Numerical conversions OF
Converting a 32 bit BCD number into a 32 bit integer
Converting a 32 bit BCD number into a 16 bit integer
Converting a 32 bit integer into a BCD 32 bit number
Converting a 16 bit integer into a BCD 32 bit number
DBCD_TO_DINT
DBCD_TO_INT
DINT_TO_DBCD
INT_TO_DBCD
Extracting the least significant word from'a double word LW
Extracting the most significant word from'a double word HW
Forming 'a double word with 2 words CONCATW shared code
203
75
33
33
Code size
(in words)
203
149
33
154
TLX DR PL7 xxE
213
Instruction times
Instructions for bit strings
The table below gives the memory used for advanced bit string functions.
Bit strings
Logic AND between two tables
Copying a bit table into a double word table
Copying a bit table into a word table
Copying a bit table into a bit table
Copying a double word table into a bit table
Add-in at one of a table
Logic OR between two tables
Copying a word table into a bit table
Exclusive OR between two tables
Length in number of'elements
OF
AND_ARX
BIT_D
BIT_W
COPY_BIT
D_BIT
NOT_ARX
OR_ARX
W_BIT
XOR_ARX
LENGTH_ARX shared code
157
209
195
209
20
427
Code size
209
248
205
146
196
214
TLX DR PL7 xxE
Instruction times
Instructions for
Word table
The table below gives the memory usage for advanced conversion functions on word tables.
Instructions for word tables OF Code size
(in words)
75 Searching for the first element in a table equal to one value
Searching for the first element in a table greater than one value
Searching for the first element in a table less than one value
Searching for the highest value in a table
Searching for the smallest value in a table
Number of times a value occurs in a table
Rotate shift on the left of a table
Rotate shift on the right of a table
Table sorting (ascending or descending)
Partial search for the first element of'a table equal to one value
Length in number of'elements
FIND_EQW
FIND_GTW
FIND_LTW
MAX_ARW
MIN_ARW
OCCUR_ARW
ROL_ARW
ROR_ARW
SORT_ARW
FIND_EQWP
LENGTH_ARW shared code
75
78
78
74
145
150
144
164
77
20
162
TLX DR PL7 xxE
215
Instruction times
Instructions for tables of double words
The table below gives the memory used for advanced conversion functions on tables of double words
Instructions for double word tables OF Code size
(in words)
79 Searching for the first element in a table equal to one value
Searching for the first element in a table greater than one value
Searching for the first element in a table less than one value
Searching for the highest value in a table
Searching for the smallest value in a table
Number of times a value occurs in a table
Rotate shift on the left of a table
Rotate shift on the right of a table
Table sorting(ascending or descending)
Partial search for the first element of'a table equal to one value
Length in number of'elements
FIND_EQD
FIND_GTD
FIND_LTD
MAX_ARD
MIN_ARD
OCCUR_ARD
ROL_ARD
ROR_ARD
SORT_ARD
FIND_EQWP
LENGTH_ARW shared code
80
95
95
78
163
170
178
77
20
162
216
TLX DR PL7 xxE
Instruction times
Instructions for floating point tables
The table below gives the memory usage for advanced conversion functions on floating point tables.
Instructions for floating point tables OF Code size
(in words)
152
134
Sum of the elements of'a table of real values
Searching for the first element equal to one value in a table
SUM_ARR
FIND_EQR
Searching for the first element equal to one a value in a table starting from'a row
Searching for the first element greater than a value in a table
FIND_EQRP
FIND_GTR
Searching for the first element less than a value in a table FIND_LTR
Searching for the greatest value in a table MAX_ARR
Searching for the smallest value in a table
Number of times a value occurs in a table
Rotate shift on the left of a table
Rotate shift on the right of a table
Table sorting (ascending or descending) comparing 2 tables of real values
Table sorting (ascending or descending)
MIN_ARR
OCCUR_ARR
ROL_ARR
ROR_ARR
SORT_ARR
EQUAL_ARR
LENGTH_ARR shared code
135
134
167
173
271
173
134
161
162
132
20
124
TLX DR PL7 xxE
217
Instruction times
Time management instructions
The table below gives the memory usage for advanced time management functions.
Dates, hours and periods
Adding a period to a complete date
Adding a period to a time of day
Converting a date into a string
Day of the week
Deviation between two dates
Deviation between two complete dates
Deviation between two times of day
Converting data completely into a string
Subtracting a period from a complete date
Subtracting a period from a time of day
Converting a period into a string
Converting a time of day into a string
Transferring a period into the form of hours-mins-secs
Real-time clock function
OF
ADD_DT
ADD_TOD
Code size
519
188
DATE_TO_STRING 150
DAY_OF_WEEK
DELTA_D
99
374
DELTA_DT
DELTA_TOD
DT_TO_STRING
547
110
266
SUB_DT 548
SUB_TOD 186
TIME_TO_STRING 413
TOD_TO_STRING 156
TRANS_TIME
SCHEDULE
211
700 shared code 1703
Instructions for character strings
The table below gives the memory usage for advanced character string functions.
Dates, hours and periods
Instructions for character strings
OF Code size code size
Concatenating two strings
Deleting a sub-string
Searching for the first different character
Finding a sub-string
Inserting a sub-string
Extracting from the left of a string
String length
Extracting a sub-string
Replacing a sub-string
Extracting from the right of a string
CONCAT
DELETE
EQUAL_STR
FIND
INSERT
LEFT
LEN
MID
REPLACE
RIGHT shared code
38
70
44
365
279
212
225
287
55
418
218
TLX DR PL7 xxE
Orphee functions
The table below gives the memory usage for Orphee functions.
Orphee functions
Move to the left on 32, recovering moved bits
Move to the right on 32 with sign extension, recov. moved bits
Move to the right on 32 with 0 filling, recov. moved bits
Move to the left on 16, with moved bit recovery
Move to the right on 16 with sign extension, recov. moved bits
Move to the right on 16 with 0 filling, recov. moved bits
OF
DSHL_RBIT
DSHR_RBIT
DSHRZ_C
WSHL_RBIT
WSHR_RBIT
WSHRZ_C shared code
Up/down counting with overshoot signaling
Rotating to the left of'a word
Rotating to the right of a word
Rotating to the left of a double word
Rotating to the left of a double word
SCOUNT
ROLW
RORW
ROLD
RORD
Instruction times
617
41
49
49
Code size
152
152
133
91
103
90
173
Time delay functions
The table below gives the memory usage for the time delay functions.
Time delay functions OF
Pulse output
Trigger time delay
Time delay trigger
Time delay pulse
FPULSOR
FTOF
FTON
FTP
Code size
(in words)
215
272
217
245
TLX DR PL7 xxE
219
Instruction times
Logarithmic, exponential and trigonometric functions
The table below gives the memory usage for logarithmic, exponential and trigonometric functions.
OF Logarithmic, exponential and trigonometric functions
Natural logarithm
Decimal logarithm
Exponential
Exponentiation of'a real by an integer
Whole part
Cosine of an angle in radians
Sine of an angle in radians
Tangent of an angle in radians
Arc cosine (result between 0 and pi)
Arc sine (result between -pi/2 and pi/2)
Arc tangent (result between -pi/2 and pi/2)
Converting degrees into radians
Converting radians into degrees
NL
LOG
EXP
EXPT
TRUNC
COS
SIN
TAN
ACOS
ASIN
ATAN
DEG_TO_RAD
RAD_TO_DEG shared code
0
0
257
247
392
0
0
0
523
128
0
0
0
0
Code size
(in words)
Process control functions
The table below gives the memory usage for process control functions.
Process control functions OF
Mixed PID regulator
Pulse width modulation of a numerical value
PID output stage for discrete valve command
Dedicated operator dialog management on CCX17 of the PID
PID
PWM
SERVO
PID_MMI
Code size
(in words)
1800
600
1200
4400 shared code 573
220
TLX DR PL7 xxE
Instruction times
Dialog operator functions
The table below gives the memory usage for the operator dialog functions.
Operator dialog functions OF
Blocking entry of a variable on CCX17 Ask_msg,
Blocking entry of a variable on msg contained in CCX17 Ask_value,
Dynamic command key assigning
Command of LED control
Assign_keyS,
Control_leds,
Displaying an alarm contained in the CCX17 Display_alarm,
Displaying a group of messages contained in the CCX17 Display_GRP,
Displaying a message contained in the CCX17
Multiple entry of a variable on CCX17
Display_MSG,
GET_MSG,
Multiple entry of a variable on msg contained in CCX17 GET_VALUE,
Sending a command to the CCX17 PANEL_CMD,
Displaying an alarm msg contained in the PLC memory SEND_alarm,
Displaying a message contained in the PLC memory Send_msg shared code
46,5
46,5
46,5
46,5
46,5
46,5
573
Code size
(in words)
46,5
46,5
46,5
46,5
46,5
46,5
TLX DR PL7 xxE
221
Instruction times
Communication functions
The table below gives the memory usage for the communication functions.
Communication functions OF
Reading standard language objects
Writing standard language objects
Sending/receiving UNI-TE requests
Sending and/or receiving data
Sending a character string
Reading request for a character string
Sending and/or receiving a character string
Sending a telegram
Receiving a telegram
Request to stop a function in progress
Right shift of 1 octet in a table of octets
Immediate server
Write 1K of message handling
Read 1K of message handling
READ_VAR
WRITE_VAR
SEND_REQ
DATA_EXCH
PRINT_CHAR
INPUT_CHAR
OUT_IN_CHAR
SEND_TLG
RCV_TLG
CANCEL shared code
ROR1_ARB
SERVER shared code shared code
READ_ASYN shared code
32
936
32
920
506
235
32
648
438
375
476
625
Code size
(in words)
617
500
531
219
172
Movement command functions
The table below gives the memory usage for advanced movement functions.
Movement command functions OF
1 axis automatic movement command
Multi-axis automatic movement command
SMOVE
XMOVE
Code size
(words)
24
32
222
TLX DR PL7 xxE
Data storage
User-defined exchange function
Instruction times
The table below gives the memory usage for the data storage functions.
Data storage OF
Initializing the zone for'storage on the PCMCIA card
Write data on the PCMCIA card
Read data on the PCMCIA card
SET_PCMCIA
WRITE_PCMCIA
READ_PCMCIA shared code
Code size
(words)
24
24
24
288
The table below gives the memory usageage for the user-defined exchange functions.
User-defined exchanges OF
Read status parameters
Read adjustment parameters
Update adjustment parameters
Save adjustment parameters
Restore adjustment parameters
READ_STS
READ_PARAM
WRITE_PARAM
Update command parameters WRITE_CMD
(1) OF specific, the code is counted in the volume of the I/O module.
0
SAVE_PARAM 0
RESTORE_PARAM 0
0
0
0
Code size
(words)
TLX DR PL7 xxE
223
Instruction times
DFB of diagnostics
The first time one of the diagnostics’ DFBs is programmed, 200 words are reserved in the application program zone.
The table below shows the size of the code taken into the application for each type of diagnostics’ DFB (in the program zone) and the size occupied per instance in the data and program zones.
Diagnostics’ DFB (sizes in words) DFB type size DFB type code size
IO_DIA
ALRM_DIA
800
608
64
40
NEPO_DIA
TEPO_DIA
EV_DIA
MV_DIA
ASI_DIA
15184
10896
1144
2616
7912
128
128
48
80
304
Data size per instance
72
48
136
136
56
88
312
224
TLX DR PL7 xxE
Instruction times
Method for calculating the number of instructions
General This method is used to calculate the number of basic (assembler level) Boolean or numeric instructions.
Calculating the number of
Boolean instructions l l l
The number of the following elements is taken into account in this calculation: unitary Boolean operations: load (LD), AND, OR, XOR,ST,etc closing brackets (or ladder convergences: vertical convergence links) comparison (AND[...], OR[...]...) blocks and operate ([...])
The operators NOT, RE and FE should not be counted as a boolean instruction.
Example:
LD %M0
AND (%M1
OR %M2
)
ST %M3
= 5 boolean instructions
Calculating the number of
Numeric instructions l l l l l l
The number of the following elements is taken into account in this calculation: assignments (:=) load of the first value after:= arithmetic instructions (+, -, *, /, <, =,...), operations on words or tables of words, double words, floating points) logic instructions on words functions(OF, EQUAL,…) irrespective of the number of parameters function blocks (or function block instruction)
Example:
%MW0:=(%MW1+%MW2)*%MW3; counted instructions:
:=
%MW1 (corresponds to the load instruction in the accumulator )
+
* i.e. 4 instructions.
TLX DR PL7 xxE
225
Instruction times
Example Example of program comprising 65% boolean and 35% numeric:
%M0
%M1
%M2
%M3 %M4
%M10 %M11 %M12 %M13
%M14 %M15 %M16
%M20 %M21
%M22 %M23
%M5
%M6
%M17
%M10 %M11 %M12
%M18
%M30 %M31 %M32 %M33
%M13 %M14 %M15
%M16
%M34
%M0
%M7
%M1
%M8
%M2 %M3
%M10 %M11 %M12
%M15 %M16
%M13
%M4 %M5 %M6
%M17 %M18 %M19
%M20
%M35
%M30
226
TLX DR PL7 xxE
Instruction times
%M0 %M1
Example (continued)
%M5 %M6 %M7 %M8
%M11 %M12 %M13 %M14
%M9
%M15 %M16
%M0 %M1
%M2
%M3 %M4 %M5 %M6
%M7
%M8
%M9
%M10
R
%M11
R
%M0 %M1 %M2
%M20 %M21 %M22
%M3
%M23
%M24
%M26
%M25
%M27
%M4 %M5 %M6
%M28
%M29
%M7 %M8 %M9 %M10
%M40
%M41
%M42
%M3
%M4
%M10
%M17
TLX DR PL7 xxE
227
Instruction times
Example (continued)
%M0
%M2
%M4
%M6
%M8 %M10 %M11
%M9 %M12
%M1
%M3
%M6
%M2
%M4
%M7
%M8
%M9
%M5
%M1
%M3
%M5
%M7
%M13
%M10
%M11
228
TLX DR PL7 xxE
Example (continued)
%M1
%M3
%M6
%M2
%M4
%M12
%M13 %M7
%M8
%M9
%M5 %M14
%M15
%M0
%M3
%M1
P
%M2
N
%M4
P
%M5
%M10 %M11 %M12
P
%M13 %M14
%M6
%M7
%M8 %M9
Instruction times
%M10
%M11
%M20
%M21
S
%M22
TLX DR PL7 xxE
229
Instruction times
Example (continued)
COMPARE
%MW3:=%MW5+1
COMPARE
%MW3< =1000
COMPARE
%MW3:=%MW5+1
COMPARE
%MW3<>%MW4
OPERATE
%MW2:=%MW3+%MW5+%KW0/2
OPERATE
%MW100:=%MW18-%KW10
OPERATE
INC%MW10
OPERATE
%MW2[%MW100]:=%MW3+%MW50*1
OPERATE
%MW100:=%MW78+SHL[%MW3,4]
OPERATE
%MW2:=%MW3*%MW5-%KW0
OPERATE
%MW2[%MW200]:=%MW3+%MW50*1
OPERATE
%MW100:=%MW78+ABS[%MW3]
230
TLX DR PL7 xxE
TLX DR PL7 xxE
Example (continued)
Instruction times
OPERATE
%MW0:=16#FFFF
OPERATE
%MW2:=2
OPERATE
%TM0.P:%MW88+%MW89-1
OPERATE
%MW4:=%KW0+4
OPERATE
%MW5:=%KW0+5
OPERATE
%MW6:=%MW10/1024
OPERATE
%MW10[%MW0]:=%KW10[%MW0]+1
OPERATE
%MW11:=%MW10+1
OPERATE
%MW12:=%MW0*3+4
OPERATE
%MW13:=%KW13+%MW2+%MW3-1
OPERATE
%MW15:=15
OPERATE
%MW16:=1+%MW70+%MW71+%MW72
231
Instruction times
232
Example (continued)
OPERATE
%MW20:=%SW10-1
OPERATE
%MW21:=ROL[%MW0.7]
OPERATE
%MW22:=%MW0+3*%MW1-1
OPERATE
%MW23:=0
OPERATE
%MW24:=1
OPERATE
%MW25:=%MW87/1024+22
OPERATE
%MW26:=%MW0+%MW25+1
%M0
OPERATE
%MW0:=%MW1+%MW2+%MW3+%MW
(1)
R
%C0
C E
%MN0
S M
MODE: TON
TB: 1min
R
MN.P: 9999
MODIF: Y
S
C.P: 9999
CU
MODIF: Y
CD
D
F
%TM0
IN TM
MODE: TON
TB: 1min
Q
TM.P: 9999
MODIF: Y
(1):%MW0:=%MW1+%MW2+%MW3+%MW4+%MW5+%MW6+%MW7+%MW8+
%MW9+%MW10+1
Memory Usage
Boolean without edge
Boolean with edge
Operate block
Function block
Simple arithmetic (+,-
,:=,AND,etc)
Indexed arithmetic
*, /
Immediate values
Total
4
6
24
346
Number of instructions
187
4
31
3
111
%
54,05%
1,16%
8,96%
0,87%
32,08%
1,16%
1,73%
64,16%
35,84%
100,00%
TLX DR PL7 xxE
Index
C
D
E
ExportFefFileWithConfiguration, 93
G
I
TLX DR PL7 43F
A C
O
S
U
233
Index
234
TLX DR PL7 43F
Atsisiųsti
Reklama