PLC Subroutines Manual
50
6FC5397-0FP40-0BA0, 08/2013
Relevant PLC machine data
None
Example for calling subroutine 48
3.22
Subroutine 49 - GearChg1_Auto (automatic spindle gear change)
Purpose
Subroutine 49 is used to automatically change the gear for the analog spindle with 2-level gear detection signals.
During a gear change, the spindle oscillates and the PLC outputs the gear change signal. When the PLC detects that the
desired gear level has been reached, the gear change has been completed.
You cannot use this subroutine together with subroutine 50.
Local variable definition
Table 3-23
Inputs
Name
Type
Description
D_CHG
WORD
Gear change delay time (unit: 0.01 s)
D_MON
WORD
Gear change monitoring time (unit: 0.01 s)
D_S0
WORD
Spindle stop delay time (unit: 0.01 s)
T_GC
WORD
Monitor time for whole gear change process, must > D_CHG + D_MON + D_S0 (unit:
0.01 s)
S_hold
BOOL
Signal of zero spindle velocity (NO)
S_alarm
BOOL
Spindle alarm (NO)
LGi
BOOL
Low detection switch (NO)
HGi
BOOL
High detection switch (NO)
Table 3-24
Outputs
Name
Type
Description
LGo
BOOL
Low gear output
HGo
BOOL
High gear output
LG_LED
BOOL
Status display for the low gear
HG_LED
BOOL
Status display for the high gear
Assigned global variables
HGom
BOOL
M248.0
Signal indication of high gear stage output
LGom
BOOL
M248.1
Signal indication of low gear stage output
HGcmd
BOOL
M248.2
High gear level command
LGcmd
BOOL
M248.3
Low gear level command
SPhold
BOOL
M248.4
Spindle stops and ready for oscillation