Siemens SINUMERIK 840Di Function Manual page 1018

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

Advertisement

Detailed description
2.12 Block descriptions
2.12.2
FB 2: Read GET NC variable
Description of functions
The PLC user program can read variables from the NCK area using FB GET.
FB 2 also includes an Instance DB from the user area (capable of multi-instances with SW
V3.7 and higher).
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 NC-
VAR selector. A basic type can be selected for these variables, i.e., area/column/line are
preset to "0".
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.
Here unit corresponds to the area number.
Note
After communication between the PLC and NC (read/write NC variables, FB2, 3, 5, or PI
general services, FB4) has been aborted by POWER OFF, the start jobs must be deleted in
the first OB1 run after cold restart or reset (signal: Req = 0).
FB 2 can read NC variables only if basic program parameter NCKomm ="1" has been set (in
OB 100: FB 1, DB7).
When channel-specific variables are read, only the variables of one channel may be
addressed in a job (FB 2 call) via Addr1 to Addr8.
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).
2-106
Power Line Basic PLC Program (P3)
Function Manual, 08/2005 Edition, 6FC5397-0BP10-0BA0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents