Working with variables - DDCSV3.1 Standalone CNC Motion Controller - Digital Dream Technology support
View: 4635|Reply: 4
Print Previous Topic Next Topic

Working with variables

[Copy Link]

1

Threads

1

Posts

5

Credits

Newbie Member

Rank: 1

Credits
5
Jump to the specified floor
Landlord
Posted at 2021-3-15 04:47:16 | Only Author Replies reward |Descending browser |Read mode
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!
Reply

Use props Report

0

Threads

61

Posts

200

Credits

Intermediate Member

Rank: 3Rank: 3

Credits
200
Sofa
Posted at 2021-3-26 10:59:25 | Only Author
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.
Reply Support Opposition

Use props Report

1

Threads

6

Posts

21

Credits

Newbie Member

Rank: 1

Credits
21
Bench
Posted at 2021-8-18 17:05:41 | Only Author
真没味,外国别的就答,自已人问一个屁都不放
Reply Support Opposition

Use props Report

1

Threads

6

Posts

21

Credits

Newbie Member

Rank: 1

Credits
21
Floor
Posted at 2021-8-18 17:08:14 | Only Author
#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
明明这样的宏程序运行得蛮
Reply Support Opposition

Use props Report

1

Threads

6

Posts

21

Credits

Newbie Member

Rank: 1

Credits
21
5#
Posted at 2021-8-18 17:09:21 | Only Author
问一个内部参数#451等怎么用,给个内部参数表,这个也不答,那个也不答,
Reply Support Opposition

Use props Report

You need to log in before you can reply Login | Register now

This forum Credits Rules

Shenzhen Digital Dream Numerical Technology Co., Ltd. support
Adress:507,A Building,Leibo Industry Zone,No. 22 Jinxiu East Road,Kengzi Street,Pingshan district,Shenzhen City,P.R. of China
Phone:13244704799
E-mail:info@ddcnc.com

TEL

0755-87654321

Wchat

Website designed by DigitalDream Technology Support
Quick Reply Back to top Back to list