DDCSV macro description - On 2 Page - DDCSV2.1 - Standalone CNC Motion Controller - Digital Dream Technology support
Author: ytliu
Print Previous Topic Next Topic

DDCSV macro description

[Copy Link]

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
11#
 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: 1888

Reply Support 1 Opposition 0

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
12#
 Author| Posted at 2018-3-2 07:38:39 | Only Author
Hi Lukasz!
DDCSV through RS232 protocol bus IO expansion, the current version does not support communication with the serial MPG.

Output data packet 7 bytes, including three parts:
1. Data packet header 2 bytes "0x90 0xeb"
2. Output IO word 4 bytes, 0 bit -31 bit are mapped to # 1032- # 1063 macro variables
3. the checksum, XOR result of the first 6 bytes

Input data packet 7 bytes, including three parts:
1. Data packet header 2 bytes "0x90 0xeb"
2. Input IO words 4 bytes, 0 bit -31 bit are mapped to # 1000- # 1031 macro variables
3. the checksum, XOR result of the first 6 bytes

Bus output IO signal Instructions for use:
Change the IO status by assigning the relevant macro IO bus output
Example:
# 1032 = 1; set bus IO channel 0 to logic '1'

Bus input IO signal instructions:
M100 bus input IO instruction
#1100 Bus input IO channel number
#1101 Bus input IO expectations value
#1102 waiting time (ms),if <= 0, infinite waiting for the signal to reach the desired value; if> 0,   if the signal does not reach the expected value within the specified time,paused.

Example:
(If channel 2 is logic '1', subsequent codes are executed; otherwise, pauses after 1s.)
# 1100 = 2
# 1101 = 1
# 1102 = 1000
M100
...
Reply Support Opposition

Use props Report

1

Threads

12

Posts

871

Credits

Senior Member

Rank: 4

Credits
871
13#
Posted at 2018-3-2 15:49:26 | Only Author
Dear ytliu,

This is the best information of a day !!! This is what I was expecting. And after some quick check - IT WORKS
Thank you for a great support.

Regards
Lukasz
Reply Support Opposition

Use props Report

9

Threads

53

Posts

669

Credits

Senior Member

Rank: 4

Credits
669
14#
Posted at 2018-3-2 19:19:23 | Only Author
ytliu Posted at 2018-3-2 07:36
Hi!
Sorry, I will use .zip format later

Many thanks for the zip
Reply Support Opposition

Use props Report

0

Threads

1

Posts

8

Credits

Newbie Member

Rank: 1

Credits
8
15#
Posted at 2018-4-17 21:58:02 | Only Author
Hello
I tried to use a subroutine, but it does not work
Could you help me
1: does not work
N150 G1 G91 X100 F1000
N160 M97 P500
N200 M02
N500 G1 Y100
N510 M99

2: does not work
O000
G1 G91 X100 F1000
M98 P0001 L5
M02
O0001
G1 Y100
M99

3:does not work
O0000 and O0001 in the different files

What's wrong?
Reply Support Opposition

Use props Report

9

Threads

44

Posts

343

Credits

Intermediate Member

Rank: 3Rank: 3

Credits
343
16#
Posted at 2018-10-22 15:57:15 | Only Author
Last edited by JPoepsel In 2018-10-22 19:24 Editor
ytliu Posted at 2018-3-2 07:38
Hi Lukasz!
DDCSV through RS232 protocol bus IO expansion, the current version does not support commu ...

Hi ytliu!

You mentioned how to read/write 32 bits by the RS232 IO expansions.
Well, I'm just planning to do automatic tool changing with the DDCSV using M8/9 M10/M11. This two IO-pins may be enough, but when I plan a self-sufficient tool change e.g. by a tool change carousel, the tool changer needs the desired tool number… So I'm thinking about adding an ESP32 (or something similar) controlling the tool changer and communicating by serial IO with the DDCSV. Do you think, that may work (of course with some macros)?
The Question: you mentioned how the IO bits are mapped to the internal variables, but did not mention how to start writing/reading over the serial port. If I understand it right, M100 will do the job for reading (I understood, that  M100 will wait for a specific bit change but I guess, all 32 bits will be updated to the internal variables with this instruction), but you did not mention how to SEND bits. Or does M100 first send and then read the bits all together?

Would be great to get some hints.

Josef

P.S.: Silly Question: Is the "serial port" the one feed out on the MPG conector or the internal one as it can be seen here: http://bmuessig.eu/ ?
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-22 20:34:28 | Only Author
Last edited by ytliu In 2018-10-22 20:42 Editor

Hi JPoepsel.
the "serial port" is the one feed out on the MPG conector.

Sorry, I am still on a business trip, and I will sort out the relevant information when I go back.

Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
18#
 Author| Posted at 2018-10-28 09:31:33 | Only Author
You need to design an IO expansion board similar to the one below and write the expansion board program according to the serial protocol described earlier. Then install the files in the attachment to the controller.


The attachment is an extended M command installation package.
M200: set bus outport channel 0 to logic '1'
M201: set bus outport channel 0 to logic '0'
M202: set bus outport channel 1 to logic '1'
M203: set bus outport channel 1 to logic '0'
...
...
M222: set bus outport channel 11 to logic '1'
M223: set bus outport channel 11 to logic '0'

M300-M315 corresponds to the level detection of 0-7 bus inport channel, no corresponding level will keep waiting.

IO扩展板.png (748.42 KB, Down times: 448)

IO扩展板.png

install.zip

10.25 KB, Down times: 533

Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
19#
 Author| Posted at 2018-10-28 09:58:26 | Only Author
Last edited by ytliu In 2018-10-28 10:26 Editor

When #108(M Bus IO command response) is set to 1 (yes), DDCSV periodically generates an output IO instruction packet according to the #1032-#1063 macro variable and sends it. In addition, DDCSV will periodically receive the bus input IO instruction packet and update the #1000-#1031 macro variable according to it. The #1000-#1031 update is real-time, which means that as soon as the bus input IO packet is received, #1000-#1031 will be updated.
Reply Support Opposition

Use props Report

9

Threads

44

Posts

343

Credits

Intermediate Member

Rank: 3Rank: 3

Credits
343
20#
Posted at 2018-10-29 15:46:17 | Only Author
Hi ytliu!

Hope, your trip was successful!
Thank you for your reply! This is, was I expected… So, with this information the DDCSV is ready to become a general purpose controller and the way is open to do a bunch of “special” things, I never thought of when buying it. Thank you again!
One last question (yes, I know, I can measure it by myself, but it is easier for me to ask you than to loosen several screws ;-)): Is the serial IO 3,3V, 5V or 12V?

Regards

Josef

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