Installation manual
CNC 8035
8.
PLC PROGRAMMING
Directing instructions
(SOFT M: V15.3X)
(S
OFT T: V16.3X)
·300·
DEF
Symbol definition. Allows a symbol to be associated with any PLC variable, it being possible to
reference this variable throughout the program by means of the variable name or by means of the
associated symbol.
Example:
DEF EMERG I1
Assigns the EMERG symbol to input 11, so any reference throughout the program to EMERG
will be interpreted by the PLC as a reference to I1.
It is also possible to associate a symbol to any number which can be given in decimal, with or without
a sign, or hexadecimal format preceded with the "$" sign.
This option, among other applications, makes programming and later understanding of the PLC
program much easier when trying to control the CNC by simulating its keyboard from the PLC
program.
Example:
DEF HELP $FFF2
Assigns the “HELP” symbol to the code for the HELP key.
() = MOV HELP R101
Assigns the code corresponding to the “HELP” key to register R101.
CNCWR (R101, KEY, M101)
Indicates to the CNC that the key whose code is stored in register R101 and corresponds
to the HELP key.
The PLC allows up to 400 symbol definitions which must always be programmed at the beginning
of the program, before any other instruction, be this directing or executing.
A symbol will be made up with up to 8 characters, and must not coincide with any of the words
reserved for instructions, nor be formed by the characters space” “, equal “=”, open and close
parentheses “( )”, comma "," and semicolon “;”.
Duplicate symbols cannot be defined; but several symbols may be assigned to the same resource.
Example:
DEF EMRGOUT O1
DEF SALEMRG O1
The symbols associated to specialized marks and register (M> 2047 y R > =500) are pre-defined
in the PLC and, therefore, it is not necessary to define them, nevertheless and if required, the PLC
allows a different symbol to be assigned to them.
REA, IMA
Indicate to the PLC that the consultations defined below will be made on the real (REA) or image
(IMA) values of I, O, M resources.
Counters, timers and registers do not have image values, so their real values will always be
evaluated.
Action instructions (=O32) will always update the real values of PLC resources.