Siemens SINUMERIK 840Di Function Manual page 1059

Basic machine
Hide thumbs Also See for SINUMERIK 840Di:
Table of Contents

Advertisement

Call example
Reading of a GUD variable with the name "GUDVAR1" as an integer variable
(see also table in FB 2: Assignment of NC data type in SIMATIC data type).
Call and parameterization of FB 5 with instance DB 111:
DATA_BLOCK DB GUDVAR
END_STRUCT;
BEGIN
END_DATA_BLOCK
DATA_BLOCK DB 111
FB 5
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 a variable.
Function FC "VariablenCall" :
Power Line Basic PLC Program (P3)
Function Manual, 08/2005 Edition, 6FC5397-0BP10-0BA0
STRUC
GUDVar1 : STRING[32] := 'GUDVAR1';
GUDVar1T :
STRUCT
SYNTAX_ID :
area_and_unit
:
column :
line :
block type :
NO. OF LINES
:
type :
length :
END_STRUCT;
I 7.7;
S
M 100.0;
V
M 100.1;
R
M 100.0;
V
I 7.6;
V
M 102.0;
R
M 100.0;
Call fb 5, db 111(
Req :=
Addr :=
Area :=
Unit :=
//Assignment to symbol table
//Name is defined by user
BYTE ;
byte;
word;
word;
byte;
BYTE ;
byte;
byte;
//Unassigned user DB, as instance for
FB 5
VOID
//Unassigned machine control panel key
//Activate req.
//Done completed message
//Terminate job
//Manual error acknowledgment
//Error pending
//Terminate job
M 100.0,
GUDVAR.GUDVar1,
B#16#2,
B#16#1,
Detailed description
2.12 Block descriptions
//Starting edge for
reading
//Channel variable
//Channel 1
2-147

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents