P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
974
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
Call example 1
Read a GUD variable from channel 1 with the name "GUDVAR1" (type definition of the variables: INTEGER).
The user-defined variable should be converted in a 10-byte variable pointer for the subsequent writing with the
F3 (see also the table "Assignment of the data types" in "FB 2: Read GET NC variable [Page 933] ").
Call and parameterization of FB 5 with instance DB 111:
// Data block for GUD variable
DATA_BLOCK DB_GUDVAR
//Assignment to symbol table
STRUCT
GUDVar1 : STRING[32] := 'GUDVAR1';
//Name is defined by user
GUDVar1Token :
STRUCT
SYNTAX_ID : BYTE ;
area_and_unit : BYTE ;
column : WORD ;
line : WORD ;
block type : BYTE ;
NO. OF LINES : BYTE ;
type : BYTE ;
length : BYTE ;
END_STRUCT;
END_STRUCT;
BEGIN
END_DATA_BLOCK
//Unassigned user DB, as instance for FB 5
DATA_BLOCK DB 111
FB 5
BEGIN
END_DATA_BLOCK
//Unassigned user DB, as instance for FB 3
DATA_BLOCK DB 112
FB 3
BEGIN
END_DATA_BLOCK
//A user-defined channel variable from channel 1 must be read
//with conversion into a variable pointer to allow subsequent
//writing of this variable.
Function FC "VariablenCall" : VOID
Содержание SINUMERIK 828D Turning
Страница 34: ...Basic Functions 34 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 146: ...A3 Axis Monitoring Protection Zones 2 6 Data lists Basic Functions 146 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 328: ...F1 Travel to fixed stop 6 5 Data lists Basic Functions 328 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 816: ...K2 Axis Types Coordinate Systems Frames 10 9 Data lists Basic Functions 816 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1198: ...P4 PLC for SINUMERIK 828D 14 6 Function interface Basic Functions 1198 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1752: ...Appendix 20 2 Overview Basic Functions 1752 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1774: ...Glossary Basic Functions 1774 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...