上海维宏电子科技股份有限公司
Weihong Electronic Technology Co., Ltd.
Specialized, Concentrated, Focused 63
5 Named Parameters
For a common user, the machining workpiece operations and other basic operations provided by
the controller can meet his demands, such as: tool calibration, center calibration, canned cycle, etc.
While for an advanced user who needs to modify some operating details, write operating
programs and customize canned cycles, the controller provides a group of fast and convenient
named parameters. With these parameters, it is not only convenient for the user to modify or write
operation programs and customize the content of canned cycle in public.dat to meet the machining
demand, but also convenient to write programs directly in the program edit operation interface.
Example 1, Use named parameters to compile a subprogram of tool coolant and tool change, as
follows:
O1000
’subprogram of tool coolant and tool change
M901 H=#COOLANT_START_PORT P1
G04 P10
IF(#ENABLE_CTP) G53 G00 G90 X=#CTP_POS
.
X Y=#CTP_POS
.
Y Z=#CTP_POSZ
’move to
the position of tool change
G00 G90 Z10
’or lift the cutter directly for tool change
M05
M17
Example 2, Use named parameters to modify the content of G86 canned cycle from without
retract amount parameter in the system to with retract amount parameter, as follows:
O686
#FC50=#CANNEDCYCLE_BACK
IF (! #FC13) G90 G65 P786
IF (#FC13) G91 G65 P786 L=#FC11
M17
O786
G00 X=#FC1 Y=#FC2
G90 G00 Z=#FC4
G90 G01 Z=#FC4-ABS (#FC5) F=#FC7
G65 P886 L=INT(ABS(#FC4-#FC3
)
/ABS
(
#FC5
)
)
-1
G90 G01 Z=#FC3 F=#FC7
M05
G90 G00 Z=#FC4
IF (!#FC12)G90 G00 Z=#FC14
M03
IF (#FC13) G91
M17
O886
Summary of Contents for Ncstudio
Page 74: ...RMB 21 00 ...