EasyManua.ls Logo

Fagor 8035-T - Page 421

Fagor 8035-T
470 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 8035
PLC PROGRAMMING EXAMPLE
Main module.
13.
(SOFT M: V15.3X)
(S
OFT T: V16.3X)
·421·
= MOV CNCKEY KEYBOARD = CNCWR (KEYBOARD, KEYSRC, M100)
.. and the CNC is "told" that from now on the keys will be coming from CNC keyboard (CNCKEY),
not from the PLC.
--- Subroutine used to send a key ---
SENDKEY =SET M100 =SET M101 =SET M102 =RES SENDKEY
To send a key (SENDKEY), set to "1" internal marks M100 through M102 and reset the SENDKEY
flag to "0".
M100 = CNCWR (KEYCODE, KEY, M100)
Sends to the CNC the code of the key to be simulated (KEYCODE). If this command is not executed
correctly (M100=1), the PLC will try again on the next cycle scan.
M101 AND NOT M100 = CNCRD (KEY, LASTKEY, M101)
If the previous command was executed correctly, (M100=0), it reads the last key accepted by the
CNC (LASTKEY).
M102 AND NOT M101 AND CPS LASTKEY EQ KEYCODE
If the previous command was executed correctly (M101=0) and the CNC accepted the key sent to
it (LASTKEY = KEYCODE), .....
= RES M102 = SET SENTOK
... the flag is turned off (M102=0) and the key is considered to be sent out successfully
(SENTOK=1)...
= NOT M101
... But if the CNC did not accept the key sent to it, it waits until it does (M101=1).
End of subroutine.
END
End of the program.

Table of Contents

Related product manuals