Installation manual
CNC 8055
CNC 8055i
PLC PROGRAMMING EXAMPLE
17.
SOFT: V02.2X
·641·
Main module.
NOT T1 AND NOT M-41 AND NOT M-42 = AUXEND
Input AUXEND will remain low while:
• The "Treatment of the MSTROBE, TSTROBE, STROBE signals" is in progress (timer T1 active)
• A spindle gear change is being performed (M-41, M-42)
----- Keyboard simulation -----
With this example it is possible to simulate the theoretical path of part-program P12 whenever the
operator requests it.
To do this, follow these steps:
• Indicate to the CNC that from now on the keys will come from the PLC.
• Simulate all the necessary steps sending the code of each one of the keys.
• Indicate to the CNC that from now on the keys will be coming from the CNC keyboard, not from
the PLC.
In order to make sending the keys easier, a subroutine is used which utilizes the following
parameters:
ENVIATEC (Send Key) Calling parameter that must be activated whenever a key is to be sent.
CODTECLA (Code of the key) Calling parameter that must contain the code corresponding
to the key being simulated.
ENVIOK (Sent OK) Outgoing parameter indicating that the key code has been sent
successfully.
DFU I-SIMULA = SET M120 = ERA M121 126
Whenever the operator requests the simulation (I-SIMULA), marks M120 through M126 must be
activated....
= MOV TECLAPLC TECLADO = CNCWR (TECLADO, KEYSRC, M100)
...indicate to the CNC that, from now on, the keys will be coming from the PLC (PLCKEY)
= MOV MAINMENU KEYCODE = SET SENDKEY
...and send the code for the "MAIN MENU" key.
M120 AND ENVIOK = RES M120 = RES ENVIOK = SET M121
If the previous key was sent out successfully (SENTOK), flags M120 and SENTOK will be turned
off, the flag for the next stage (M121) is activated ....
= MOV SIMULATE KEYCODE = SET SENDKEY
and the code for the SIMULATE key (F2) is sent out.
M121 AND ENVIOK = RES M121 = RES ENVIOK = SET M122
If the previous key was sent out successfully (SENTOK), flags M121 and SENTOK will be turned
off, the flag for the next stage (M122) is activated ....
= MOV KEY1 KEYCODE = SET SENDKEY
...and the code for the "1" key is sent out.
M122 AND ENVIOK = RES M122 = RES ENVIOK = SET M123
If the previous key was sent out successfully (SENTOK), flags M122 and SENTOK will be turned
off, the flag for the next stage (M123) is activated ....
= MOV KEY2 KEYCODE = SET SENDKEY
...and the code for the "2" key is sent out.
M123 AND ENVIOK = RES M123 = RES ENVIOK = SET M124
If the previous key was sent out successfully (SENTOK), flags M123 and SENTOK will be turned
off, the flag for the next stage (M124) is activated ....