PS4 Sucosoft S40 h1309g.pdf

(1160 KB) Pobierz
Sucosoft S40
Sucosoft S40
Language Elements for
PS4-200, PS4-300 and PS416
08/00 AWB27-1309-GB
645968100.007.png 645968100.008.png
Data Types
Keyword
Data type, number of bits and default value
BOOL
Boolean number; takes on values 1 or 0
corresponding to “TRUE” or “FALSE”,
1 bit, default value 0
SINT
Short integer with value range 128 to +127,
8 bit, default value 0
INT
–32 768 to +32 767, 16 bit, default value 0
DINT
Double Integer; double whole number in the
value range –2 147 483 648 to +2 147 483 647,
32 bit, default value 0
USINT
Unsigned short integer with value range 0 to
255, 8 bit, Default value 0
UINT
Unsigned Integer; whole number with no sign
with the value range 0 to 65 535, 16 bit,
default value 0
UDINT
Unsigned Double Integer;
double whole number with no sign with the
value range 0 to 4 294 967295,
32 bit, default value 0
REAL
Real number, 32 bit, default value 0.0
TIME
Time duration, Default value T#0s
DATE
Calendar date, Default value D#1900-01-01
TIME_
OF_DAY
Time, Default value TOD#00:00:00
DATE_
AND_TIME
Date and time, Default value
DT#1900-01-01-00:00:00
STRING
String of variable length, (empty string)
BYTE
8-bit pattern, default value 0
WORD
16-bit pattern, default value 0
DWORD
32-bit pattern, default value 0
Integer; whole number with value range
645968100.009.png
 
Variable Types
Keyword
Use
VAR
Local variable; only valid within the POU in which it was
declared.
VAR_GLOBAL
Global variable that is declared in a program. It is
known in this program and all POUs that were called by
this program. It must be declared as VAR_EXTERNAL in
all invoked POUs.
VAR_EXTERNAL
If a global variable is used within an FB, it must be
declared as VAR_EXTERNAL.
VAR_INPUT
If a variable is only to be read within a POU (FB, FU), it
must be declared as an input variable.The variable
must not be changed in this POU. Input variables can
be used for transferring parameters in an FU or FB.
VAR_OUTPUT
Output variable that is declared in the FB in which it is
supplied as a return value. It is made available for other
POUs.
VAR_IN_OUT
An IN_OUT variable is read by the FB, processed and
output under the same name.Since an operation on an
IN_OUT variable has a direct effect on the contents of
the transferred variable, this must not be of a type that
does not permit write operations, (e.g. INPUT or
variable with the attribute CONSTANT).
TYPE
Use the keyword “TYPE” to declare derived data types.
These data types are derived from elementary data
types.
645968100.001.png
Operand Overview
The PLC operands are displayed as directly represented variables.
I
Digital input
Q
Digital output
M
Marker
IA
Analog input
QA
Analog output
IC
Counter input
IS
Status data (diagnostics)
SD
Data sent to intelligent Suconet K stations
RD
Data received from intelligent Suconet K stations
IP 1)
Digital input (direct peripheral access)
QP 1)
Digital output (direct peripheral access)
IPA 2)
Analog input (direct peripheral access)
QPA 2)
Analog output (direct peripheral access)
IPC 2)
Counter input (direct peripheral access)
1) for PS4-200 and PS4-300
2) only for PS4-300
645968100.002.png 645968100.003.png
Operand Overview
Symbols for “Size”
Symbol
Meaning
X or no
Symbol
Bit; Size 1 bit;
Default data type BOOL;
Example: %IX0.0.0.0.0 or %I0.0.0.0.0
B
Byte; Size 8 bit;
Default data type BYTE;
Example: %IB0.0.0.0
W
Word; Size 16 bit;
Default data type WORD;
Example: %QW0.0.0.2
D
Double word; Size 32 bit;
Default data type DWORD;
Example: %QD0.0.0.4
Notation
5-digit notation of Boolean, 4-digit notation of byte and word operands. The
first three digits are reserved for the topology configuration of the PLC
concerned, here shown as 0.0.0.
Examples:
Bit address of input 1.2:
Byte address of output byte 3:
645968100.004.png 645968100.005.png 645968100.006.png
 
Zgłoś jeśli naruszono regulamin