34
Z ;timer H1 is on yet
NI003 ;emergency input is 0 yet
G015 ;goes to the beginning of the cycle
Z ;emergency circuitry is OK
D405 ;cancels emergency status flag PLC ->
NC
D412 ;cancels Z- limit flag
D413 ;cancels Z+ limit flag
D414 ;cancels Y- limit flag
D415 ;cancels Y+ limit flag
D416 ;cancels X- limit flag
D417 ;cancels X+ limit flag
D440 ;cancels FUNCTION HOLD
D417 ;cancels BLOCK HOLD
D460 ;cancels calling module :013
:016 ;label of an internal cycle; waiting for the
;emergency circuitry to be OK
I412 ;waiting for the acknowledgement of
the ;machine on button from the NC (NC
-> PLC)
G016 ;goes to the begining of the cycle
Z
D401 ;acknowledgement of the machine on
button PLC ;-> NC
R ;end of initialization
subroutines written in PLC
Spindle start/stop module
:005
=5 ;module is called by M05
SRH052 ;M5 feedback to the NC
0
C052 ;0V output to the spindle command
signal
1
W ;waiting for 100 msec
:025
NI450 ;has spindle reached the commanded speed?
G025 ;waiting for I450=1
Z
D452 ;S command signal off
10
W ;waiting for 1 sec
D001 ;spindle drive off
D002 ;coolant off
R ;M05 executed returns to NC
Z
U001 ;if not M5 spindle on
=3
D000 ;M3 direction
U453 ;bipolar spindle drive + command
signal
E
U000 ;M4 direction