P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
970
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
13.13.5
FB 5: GETGUD read GUD variable
Function
The PLC user program can read a GUD variable (GUD = Global User Data) from the NCK or channel area using
the FB GETGUD.
The FB has multi-instance capability. The call is permitted only in cyclic program OB1. An assignment for all
parameters with Req = 0 is also permitted in OB 100. Capital letters must be used for the names of GUD
variables.
Every FB 5 call must be assigned a separate instance DB from the user area.
A job is started when FB 5 is called by means of a positive edge change at control input Req. This job includes
the name of the GUD variable to be read in parameter "Addr" with data type "STRING". The pointer to the name
of the GUD variables is assigned symbolically to the "Addr" parameter with <DataBlockName>.<VariableName>.
Additional information about this variable is specified in parameters "Area", "Unit", "Index1" and "Index2" (see
table of block parameters).
When parameter "CnvtToken" is activated, a variable pointer (token) can be generated for this GUD variable as
an option. This pointer is generated via the NC-VAR selector for system variables of the NC. Only this method of
generating pointers is available for GUD variables. Once a pointer has been generated for the GUD variable,
then it is possible to read and write via FB 2 and FB 3 (GET, PUT) with reference to this variable pointer. This is
the only method by which GUD variables can be read. When FB 2 or FB 3 is parameterized, only parameter
Addr1 ... Addr8 need to be parameterized for this GUD variable pointer. GUD variable fields are an exception. In
these fields Line1 to Line8 must also be parameterized with the field device from these variables. The successful
completion of the read process is displayed by the status parameter "Done"=TRUE.
The read process extends over several PLC cycles (generally 1 to 2).
U
I 7.6;
//Manual error acknowledgment
U
M 1.0;
//Error pending
R
M 0.0;
//Terminate job
CALL FB 4, DB 126 (
Req :=
M0.0,
PIService :=
PI.SELECT,
Unit :=
1,
// CHAN 1
Addr1 :=
STR.Path,
Addr2 :=
STR.PName,
//Main-program selection
//Addr1:=STR.Path_WST,
//Addr2:=STR.PName_WST,
//Workpiece-program selection
Error :=
M1.0,
Done :=
M1.1,
State :=
MW2);
Содержание 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 ...