EasyManua.ls Logo

Fagor CNC 8060 - Page 245

Fagor CNC 8060
900 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Installation manual
CNC 8060
CNC 8065
PLC PROGRAMMING.
4.
(REF: 1402)
·245·
Directing instructions.
EXTERN
External subroutine definition.
The subroutines defined in the "C" language file used by the program must be defined as
external at the beginning of the program before the DEF instructions and the modules: CY1,
PRE and PEt. With the EXTERN instruction, those subroutines may be defined one by one.
It is defined with EXTERN followed by a blank space and the name of the subroutine with
up to 24 characters.
DEF, PDEF
Symbol definition.
Symbols are always programmed at the beginning of the program, before the modules CY1,
PRE and PEt. Since the PLC project may consist of several files and the symbols must be
defined before they are used, we recommend to define them in the first file of the PLC project.
However, the symbols may be defined in any file as long as they are used in that file or in
later files.
The PLC allows to define a number of symbols for easier programming and later
understanding of the PLC program. These symbols are programmed using the DEF o PDEF
instruction followed by the name of the symbol, a constant or PLC resource. The PLC allows
associating a symbol may be associated with any decimal or hexadecimal number or PLC
resource such as inputs (I), outputs (O), marks (M), registers (R), register bits, counters (C)
and timers (T).
Symbols will consist of a sequence of up to 20 characters with capital letters (A..Z) and digits
(0..9). Symbols may also begin with the "/" character; in that case, the next character must
be a letter. The name may have a "_" character, but it cannot be its first character. Words
reserved for instructions cannot be used in symbols.
Duplicate symbols cannot be defined; but several symbols may be assigned to the same
resource. Once a symbol has been associated with a resource or numeric value, it is possible
to use the name of the resource, the number or its associated symbol.
Accessing the PDEF symbols from a part-program or from an application.
Accessing the symbols defined with the PDEF instruction from a part-program, MDI or
external application is done using variables as follows. Consulting this variable from the part-
program interrupts block preparation.
V.PLC.symbol Access from a part-program or MDI.
PLC.symbol Access from an external application.
The variables may be read or written depending on the resource assigned to the symbol
defined with PDEF.
EXTERN SUMA
EXTERN TEMPERATURE
DEF The DEF instruction may be used to define an unlimited number of symbols to
be used only from the PLC.
PDEF The PDEF instruction may be used to define up to 100 symbols that can be used
at the PLC itself, in a part-program or in an external application. Symbols
exceeding this limit will be ignored and the CNC will issue the corresponding
warning.
The symbols associated with a constant can only be used inside the PLC
program; they can be accessed neither from the part-program nor from an
external application. The symbols associated with a constant cannot be
monitored, used in a trace of the logic analyzer or accessed from external
variables.
PDEF COOL I12
PDEF CONSTANT $FFFF3
DEF DATA_D1 372893
DEF DATA_D3 -437289
DEF /FAN I23

Table of Contents

Other manuals for Fagor CNC 8060

Related product manuals