Specifications
AP - 26 Applications Ver. 0002
;-- EXAMPLE OF A PLC PROGRAM FOR A SET CHANGE AT THE MAIN SPINDLE (C AXIS) ---
;
; Information of the resources being used:
;
; I79 = “Drive OK” spindle drive ("C")
;
; PLC parameter P28 (R700) = 3.33172, set SERCOS identifier Fagor Diagnostics,
; because, in this case, at the spindle, SERCOSID = 3
;
CY1
;
END
;
PRG
REA
;
;---------- DRIVE STATUS --------
;
DRSTAFS = B1R104
DRSTASS = B0R104 ; Spindle drive status
DRSTAF3 = B1R105
DRSTAS3 = B0R105 ; "C" axis drive status
;
; The DRSTAFS and DRSTASS signals behave like the DRSTAF3 and DRSTAS3 signals
;
CPS R104 GE 1 = M104 ; Spindle OK
CPS R105 GE 1 = M105 ; "C" axis OK
;
M104 AND M105 ; Drive OK (by software)
AND I79 ; Drive OK (by hardware)
= M200 ; Drives OK.
;
CPS R104 GE 2 = M114 ; Spindle drive under power
CPS R105 GE 2 = M115 ; "C" axis drive under power
;
I1 AND M200 = /EMERGEN ; Emergency to the CNC
/EMERGEN AND /ALARM = O1 ; Emergency contact to the electrical cabinet
;
;---------- "C" AXIS ----------
;
M2047 = AND R700 $FF R45 ; Mask to get GV21 and GV25
; GV21: Active parameter table
; GV25: Active gear ratio
;
DFU CAXIS = SET M251 ; "C" axis request
;
M115 AND M251 AND NOT M262
AND NOT SERPLCAC ; Free user channel
= SET M252 ; Write permission for parameter table at the drive
;
DFU M252 = MOV $77 R41
= CNCWR(R41,SETGES,M1000) ; Selects parameter table 7 at the drive
;
CPS R45 GE $77 AND NOT CAXIS
= SET M261 ; End of "C" axis mode.
;
M115 AND M261 AND NOT M252
AND NOT SERPLCAC
= SET M262 ; Write permission for parameter table at the drive
;
DFU M262
= MOV $00 R41
= CNCWR(R41,SETGES,M1000) ; Selects parameter table 0 at the drive
;