DDCSV macro description - DDCSV2.1 - Standalone CNC Motion Controller - Digital Dream Technology support
View: 34920|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
#
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: 2873

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: 2070

Reply Support 0 Opposition 1

Use props Report

1

Threads

2

Posts

7

Credits

Newbie Member

Rank: 1

Credits
7
26#
Posted at 2022-4-21 02:25:00 | Only Author
Hey good afternoon!

I have a DDCS 3.1 and I really need help because I can't configure the functions that my machine has.

When I click RESET on the command, I need it to trigger an external relay that releases the brake of a motor. When the motor goes into alarm, it must activate the RESET and necessarily deactivate the motor brake relay.

Is this possible configuring only the DDCS or is it possible to do this through a macro?

I also have a spindle turning function for 2 sides and the M3 works correctly in my inverter but the M4 does not... is it possible to configure the M8 to trigger an external relay that can turn my inverter the other way?

Thank you very much and I hope I can solve this problem
Reply Support Opposition

Use props Report

6

Threads

8

Posts

62

Credits

Registered member

Rank: 2

Credits
62
25#
Posted at 2022-1-23 04:52:08 | Only Author
Hi!
How to recofigure M-code in DDCSV2.1 ?

I wish to change M-code for my own needs.
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
24#
 Author| Posted at 2018-11-17 06:39:20 | Only Author
Thank you for the information provided.
Reply Support Opposition

Use props Report

9

Threads

44

Posts

343

Credits

Intermediate Member

Rank: 3Rank: 3

Credits
343
23#
Posted at 2018-11-14 00:18:57 | Only Author
Hi all!

Concerning the default value of the Serial Output when enabled with parameter #108:
The value for #109 in the eng (rus...) file is defined as

#109 -t0 -s1 "M Bus IO default status" -m7 -min=0 -max=4294967295

But it seems, that the t0 type input with integer numbers is only possible for 16 bit unsigned values so that the maximum value, which can be set when using the parameter setting page is 65535.
Changing  to

#109 -t0 -s1 "M Bus IO default status" -m7 -min=0.000 -max=4294967295.000

does not realy help. To conclude: it is not possible to set the default values for the 3ed and 4th byte of the serial stream. Not so important, but may be changed in a future version.

BTW: The 0V..1.5V output peak for TRX was my fault. I exidently got the neighbouring cable and the values there did only exist caused by a cross-talk effekt ;-(

Josef
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
22#
 Author| Posted at 2018-11-13 18:15:08 | Only Author
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
21#
 Author| Posted at 2018-11-12 23:18:52 | Only Author
Hello 71taa

      Currently DDCSV2.1 only supports simple serial protocol, and can not use macro program to control sending and receiving.
       The DM500 Handheld CNC Motion Controller supports the MODBUS communication protocol, and the data transfer can be controlled by a macro program to meet your needs, you can try it.

Reply Support Opposition

Use props Report

2

Threads

25

Posts

408

Credits

Intermediate Member

Rank: 3Rank: 3

Credits
408
20#
Posted at 2018-11-12 16:13:44 | Only Author
Interesting info, hope to try it soon.

One of examples - periodical sending of current coordinates to external serial device. E.g. to scan heights on reference points, etc.
So If I'd like to send current coordinates of X (just for example, purely for education needs) via current scheme ("signal bits") following information could be helpfull:
1. Are there bitwise operators being supported by the G-code intepreter? AND or XOR for example. I know Fanuc supports them, does DDCSV supports them too?
2. Ability to apply bitwise operator to the contents of the macro variable containing coordinate piece?
3. Bit format of the internal coordinate representation. Though it could be reverse engineered if it's possible to apply bitwise operator to the macro variable ;)
4. Frequency of packet sending
5. Port parameters (baud rate, bit configuration)

If DDCSV have no control on packet sending I'll need to reserve some bits for status indication (e.g. packet ready/finished), so speed parameters are crucial here (as several packets are needed to send a single coordinate piece, and to send all three/four - it's even more time).
Reply Support Opposition

Use props Report

9

Threads

44

Posts

343

Credits

Intermediate Member

Rank: 3Rank: 3

Credits
343
19#
Posted at 2018-11-12 15:58:13 | Only Author
Good morning!

During weekend I figured out how to deal with the serial interface. I got it enabled and could decode the cylic output with my osciloscope as described by ytilu. BUT: The voltage range of TRX is from 0.0V to 1.5V relative to GND, not as expected from -12V to 12V. I don't think, this is normal, is it?

Josef
Josef
Reply Support Opposition

Use props Report

9

Threads

44

Posts

343

Credits

Intermediate Member

Rank: 3Rank: 3

Credits
343
18#
Posted at 2018-10-29 18:56:20 | Only Author
What a pitty - I hoped to be able to connect th microcontroller directly ;-)
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
17#
 Author| Posted at 2018-10-29 16:12:36 | Only Author
Serial port interface uses Max3232 device
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