Title: Working with variables [Print This Page] Author: vbogom Time: 2021-3-15 04:47 Title: Working with variables Last edited by vbogom In 2021-3-15 04:48 Editor
It is required to use variables in g-code. The documentation has an example of declaring a variable:
#1=SIN[30.0]
But there are no examples of their use.
I tried using different options, like this:
#1=20.0
G00Y#1
But it doesn't work that way.
Tell me the correct way to use variables.
Thanks! Author: ShaniaDDream Time: 2021-3-26 10:59
Hi Vbogom. We don’t supply macro list for DDCS V3.1 now. It can only supply basic service.
If you need to use macro list and self-define your controller, we advise you to use the controller DDCS-Expert. Author: awdesq Time: 2021-8-18 17:05
真没味,外国别的就答,自已人问一个屁都不放Author: awdesq Time: 2021-8-18 17:08
#1 = 6 ; 刀个柄径
#8 = 6 ; 刀刃直径
#6 = 1500 ; 工件总长度
#7 = 3 ; 有多少块PCB
#2 = [#6-480*#7]/2+15-[30-4.5]+#1/2 ; 装件前移动到该坐标
#3 = 50 ; 钻孔进给速度
#4 = 100 ; 铣孔进给速度
#5 = 6 ; 每次8个孔,要钻多少次
G17 G90 G54 G40
; 移动坐标,等待装工件
G90 G00 Z20.0
G90 G00 X-#2 Y4.1
M110
#12 = 6 ; 要钻6次,每次8个孔
WHILE #12 NE 0 DO 3
#12 = #12 - 1
#11 = 8 ; 每次钻多少个孔
WHILE #11 NE 0 DO 2
#11 = #11 - 1 ; 变量自减
G00 Z20.0 ; 抬刀
G91 G00 X30-[9-#1]/2 ; 移动到要打的孔中心
G90 G00 Z1.0 ; 接近
#10 = 8 ; 分多少次打孔
S6000 F#3 M03 ; 设进给转速
WHILE #10 NE 0 DO 1 ; 从Z=1到Z=-3钻孔,分10次并断屑
#10 = #10 - 1 ; 变量自减
G91 G01 Z-0.5
G04 P100
END 1
G91 G01 X[9-#8]/2 ; 进给到孔右边缘
G03 I-[9-#8]/2 F#4 ; 铣孔
END 2
G90 G00 Z20.0
G90 G00 X-#1/2
M110 ; 开始下一批八个孔
END 3
明明这样的宏程序运行得蛮Author: awdesq Time: 2021-8-18 17:09
问一个内部参数#451等怎么用,给个内部参数表,这个也不答,那个也不答,
Welcome Digital Dream Technology support (http://bbs.ddcnc.com/)