DDCSV macro description - DDCSV2.1 - Standalone CNC Motion Controller - Digital Dream Technology support
View: 34898|Reply: 29
Print Previous Topic Next Topic

DDCSV macro description

[Copy Link]

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
Jump to the specified floor
Landlord
Posted at 2018-2-24 20:14:21 | Only Author |Only larger image Replies reward |Descending browser |Read mode
Last edited by ytliu In 2018-2-24 21:01 Editor

DDCSV system supports macros. Macros support loops, conditional control languages, and common maths function calls.

For user processing files whose size is less than 100K or whose initial character name is sys, the system automatically scans the program structure before processing or emulation so as to implement the loop and branch statement support.

Note: The main program number of macro processing program defaults to 0.

Example:
Processing file: sysuser1.nc
O0000 (main entrance)
...
M98P0001L3 (call subroutine No.1 three times)
...
M30

O0001
...
M99

Reply

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
recommend
 Author| Posted at 2018-2-24 20:15:00 | Only Author
DDCSV macro variable Description:

#0- #49 for each subroutine internal private variables;
#50- #499 is the system internal variable area 1;
#500- #999 is the system parameter area;
#1000- #1999 is the system internal variable area 2;

The chs or eng file defines the system parameters that the user needs to configure, for example:

#1 -t2 -s1 "language setting" -m16 -min = 0.000 -max = 1.000 -i0 "Eng" -i1 "Chinese"

#n n is the parameter number (0-499), n + 500 is the macro variable number of this parameter;
-t is used to specify the type of parameter, t0 is an integer, t1 is a real number, and t2 is a selection type.
-s1 defines the name of the parameter;
-s2 defines the parameter unit;
-m parameter group, m0 that the parameters in the parameter configuration page does not show;
-min minimum parameter
-max maximum parameter
-i The text of the relevant entry is configured through it when the parameter type is selection type;
Reply Support 2 Opposition 0

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
recommend
 Author| Posted at 2018-3-2 07:36:52 | Only Author
Will_D Posted at 2018-3-2 07:09
Few of us have rar. Please use .zip format

Hi!
Sorry, I will use .zip format later

track.zip

565 Bytes, Down times: 2871

Reply Support 1 Opposition 0

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
recommend
 Author| Posted at 2018-2-26 21:46:16 | Only Author
Last edited by ytliu In 2018-2-26 21:48 Editor

Hi JPoepsel!
102 subprogram is used to play back the track of the tool. Before using the 102 subroutine, the track must be recorded, the attachment is an example related to it.

track.rar

420 Bytes, Down times: 2067

Reply Support 0 Opposition 1

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
5#
 Author| Posted at 2018-2-24 20:15:30 | Only Author
Last edited by ytliu In 2018-2-24 21:02 Editor

DDCSV Coordinate System Description:

The coordinate systems in DDCSV system include machine coordinate system, G53 coordinate system and G54-G59 coordinate system.

The machine coordinate system is established by home operation or zero under MACH. Read # 864- # 867 (X, Y, Z, A) to find the position of the tool in the machine coordinate system.

G53 is based on the machine coordinate system. # 800- # 803 (X, Y, Z, A) describes the distance from the origin of the G53 coordinate system to the origin of the machine coordinate system. Adjusting these parameters can reconstruct the G53 coordinate system. Read # 868- # 871 (X, Y, Z, A) to find the position of the tool in the G53 coordinate system.

The G54-G59 coordinate system is based on the G53 coordinate system. # 804- # 807 (G54 X, Y, Z, A), # 808- # 811 (G55 X, Y, Z, A), # 812- # 815 (G58 X, Y, Z, A), # 816- # 819 (G57 X, Y, Z, A), # 820- # 823 G54 X, Y, Z, A) respectively describe the distance from the origin of G54-G59 coordinate system to the origin of G53 coordinate system, and adjust these parameters to reconstruct the G54-G59

coordinate system; Read #840-#843(G54 X、Y、Z、A)、#844-#847(G55 X、Y、Z、A)、#848-#851(G56 X、Y、Z、A)、#852-#855(G57 X、Y、Z、A)、#856-#859(G58 X、Y、Z、A)、#860-#863(G59 X、Y、Z、A)to find the position of the tool in the G54-G59 coordinate system.

#516 describes the system currently working coordinate system, 0 corresponds to the G53 coordinate system, 1-6 corresponds to the G54-G59 coordinate system, 7 corresponds to the machine coordinate system.
Reply Support Opposition

Use props Report

9

Threads

53

Posts

669

Credits

Senior Member

Rank: 4

Credits
669
6#
Posted at 2018-2-25 22:06:23 | Only Author
Many thanks for this information. It is very useful.

One question though
I am still using version 1.1

I am trying to write a tool change macro.

Parameter #268 is "H01 tool offset"

If I set this and others to know values I cannot see the value as parameter #768. Its value is 0
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
7#
 Author| Posted at 2018-2-26 11:15:07 | Only Author
Will_D Posted at 2018-2-25 22:06
Many thanks for this information. It is very useful.

One question though

version 1.1 and version 2.1 is same in macro.

My English is poor. I did not understand the last sentence.Please explain further.
Reply Support Opposition

Use props Report

9

Threads

53

Posts

669

Credits

Senior Member

Rank: 4

Credits
669
8#
Posted at 2018-2-26 18:01:37 | Only Author
Last edited by Will_D In 2018-2-26 19:11 Editor

Your Englisdh is much better than my Chinese!!

Thanks for the reply (and also the tool change macro example - will try this out later )

My question is:
If I set parameter #82 to 20.00 (Safe Z retract Height) in my controller, I can then use #582 in my script as it will equal 20.00

If I set parameter #268 to 10.00 (H01 tool offset) in my controller, I can see that #768 in my script is set to 0.00

Will

{UPDATE}

My mistake. I forget to send the M3 command!! Now all works
Reply Support Opposition

Use props Report

9

Threads

44

Posts

343

Credits

Intermediate Member

Rank: 3Rank: 3

Credits
343
9#
Posted at 2018-2-26 19:48:56 | Only Author
Will_D Posted at 2018-2-26 18:01
Your Englisdh is much better than my Chinese!!

Thanks for the reply (and also the tool change macro ...

Hi ytiu!
Your answer proofs, that at least I was not completely wrong with the reverse engeneering in madmodder.net (see https://madmodder.net/index.php/topic,11598.875.html) ;-)

One question:

In  macro O102 I found the

RDRECODE[#1]

instruction. Have you any informations what it does?

Second (and last) question: Is there any chance to place text on the display (e.g. as hint for the user for manual tool changes)? I know, that comments in the G-Code are displayed (e.g. the line "M5 (Change to tool 1!)" will display the comment), but the possible text size is somewhat small and there is no way to change this comment in macros e.g. depending on the tool number).
Users of Fusio0n360 and other software using a posts for GCode-generation have the alternative to implement the GCode commands in the post (for Fusin360: using Javascript), but implementing it directly on the device is far better for the "value" of the DDCSV ;-)

All the best and thanx again for your answers!

Josef


Reply Support Opposition

Use props Report

1

Threads

12

Posts

871

Credits

Senior Member

Rank: 4

Credits
871
10#
Posted at 2018-3-1 22:17:28 | Only Author
Hello ytliu,

Are there any other commands (like RDRECODE, WRRECODE) available? Could you provide some command list?
For example to send data to MPG RS232 port?

Regards
Lukasz
Reply Support Opposition

Use props Report

9

Threads

53

Posts

669

Credits

Senior Member

Rank: 4

Credits
669
11#
Posted at 2018-3-2 07:09:24 | Only Author
ytliu Posted at 2018-2-26 21:46
Hi JPoepsel!
102 subprogram is used to play back the track of the tool. Before using the 102 subrout ...

Few of us have rar. Please use .zip format
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