P3: Basic PLC Program for SINUMERIK 840D sl
13.13 Block descriptions
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
933
13.13.2
FB 2: Read GET NC variable
Function
The PLC user program can read variables from the NCK area using FB GET. The FB is multi-instance-capable.
FB 2 also includes an Instance DB from the user area.
When FB 2 is called with a positive signal edge change at control input "Req", a job is started, which reads the
NCK variables referenced by ADDR1ADDR8 and then copies them to the PLC operand areas referenced by
RD1 to RD8. Successful completion of the read process is indicated by a logical "1" in status parameter "NDR".
The read process lasts for several PLC cycles (normally 1 ... 2). The block can be called up in cyclic mode only.
Any errors are indicated by Error and State.
In order to reference the NC variables, all required variables are first selected with the "NC VAR selector" tool
and generated as STL source in a data block. A name must then be assigned to this DB in the symbol table.
"DB name.S7 name" is transferred as the actual parameter of the NCK variable address (Addr1 to Addr8) when
FB 2 is called.
Variable addressing
For some NC variables, it is necessary to select area no. and/or line or column from the NCVAR selector. For
these variables it is possible to select a basic type,
i. e. area/column/row is filled with "0" by default.
The contents of the area number, line and column specified by the NC VAR selector are checked for a "0" in the
FB. If a "0" is present, the value is transferred to the input parameter. The user must supply the required
parameters (UnitX/ColumnX/LineX) before calling FB GET.
FB PUT.
NCK variables within one group can be combined in a job:
The same rules apply to channels 3 to 10 as illustrated as examples in the above table in groups 1 and 2.
NOTICE
FB 2 can read NC variables only if basic program parameter NCKomm ="1" has been set (in
OB 100: FB 1, DB 7). The call is permitted only in cyclic program OB1. An assignment for all
parameters with Req = 0 is also permitted in OB 100.
When channelspecific variables are read, only variables from one and the same channel
may be addressed via Addr1 to Addr8 in a job (FB 2 call).
In areas V and H, different logic axis numbers must not be assigned in one job. (Failure to
observe this rule results in Error:= TRUE, State:= W#16#02).
Area
Group 1
C[1]
N
B
A
T
Group 2
C[2]
N
B
A
T
Group 3
V[.]
H[.]
Note
Especially when reading several long strings, the number of usable variables can be less
than 8.
Содержание 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 ...