Siemens SINUMERIK 828D Function Manual page 975

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

U
I 7.7;
S
M 100.0;
U
M 100.1;
R
M 100.0;
U
I 7.6;
U
M 102.0;
R
M 100.0;
CALL FB 5, DB 111 (
Req
Area
Unit
Index1
Index2
CnvtToken
VarToken
Error
Done
State
RD
);
After a successful FB-5 call the writing can be done via the returned address of the FB 5 parameter ("VarToken")
with the help of FB3.
CALL FB 3, DB 112 (
Req
NumVar
Addr1
Error
Done
State
SD1
Call example 2
Read a GUD variable from channel 1 with the name "GUD_STRING" (type definition of the variables: STRING
with length 30 bytes). The user-defined variable should be converted in a 10-byte variable pointer for subsequent
writing with the FB 3.
Call and parameterization of FB 5 with instance DB 111:
// Data block for GUD variable
DATA_BLOCK DB_GUDVAR
STRUCT
GUDVarS : STRING[32] := 'GUD_STRING';
GUDVarSToken :
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
//Unassigned machine control panel key
//Activate req.
//Done completed message
//Terminate job
//Manual error acknowledgment
//Error pending
//Terminate job
:= M 100.0,
//Starting edge for reading
:= B#16#2,
//Channel variable
:= B#16#1,
//Channel 1
:= 0,
//No field index
:= 0,
//No field index
:= TRUE,
//Conversion into 10-byte token
:= DB_GUDVAR.GUDVar1Token,
:= M 102.0,
:= M 100.1,
:= MW 104
:= P#DB99.DBX0.0 DINT 1
:= M 200.0,
:= 1,
//Write 1 GUD variable
:= DB_GUDVAR.GUDVar1Token,
:= M 102.0,
:= M 100.1,
:= MW 104
:= P#DB99.DBX0.0 DINT 1);
//Assignment to symbol table
P3: Basic PLC Program for SINUMERIK 840D sl
// free memory area
//Name is defined by user
13.13 Block descriptions
975

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents