Save current coords to file - DDCSV2.1 - Standalone CNC Motion Controller - Digital Dream Technology support
12Next
Return to List Add thread
View: 25566|Reply: 18
Print Previous Topic Next Topic

Save current coords to file

[Copy Link]

1

Threads

4

Posts

19

Credits

Newbie Member

Rank: 1

Credits
19
Jump to the specified floor
Landlord
Posted at 2018-11-26 20:34:59 | Only Author Replies reward |Descending browser |Read mode
Hello.

I need to write script for scanning surface by touch probe.
May I save touching coordinates to file?

It is possible?
Will it possible in new firmware versions?


Reply

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
recommend
Posted at 2019-5-4 08:49:49 | Only Author
this is script for scanning surface by touch probe.You can modify the parameters in this file (#2038-#2047) to customize it. You can also add these parameters to the parameter file (such as eng) so that you can modify it on the parameter page.

scanning_surface.nc content:
O0001(Probe subroutine)
G90G0Z#2044
M101
G91G01Z-#2045F#2046
M102
G04P0
RecordCoords[#2047,#699,#700,#701,#702]
G90G0Z#2043
M99

O0000
#2038=5;Steps every
#2039=0;X-axis start at
#2040=0;Y-axis start at
#2041=100;X-axis end at
#2042=50;Y-axis end at
#2043=3;Clearance height
#2044=0.5;Start probing
#2045=1;Max probe distance
#2046=50robe feedrate
#2047=1;Record file serial number

ClearCoords[#2047]

G0Z#2043
G0X#2039Y#2040

IF [#2041-#2039]>=0 GOTO1
#1=-#2038
GOTO2
N1 #1=#2038
N2 IF [#2042-#2040]>=0 GOTO3
#2=-#2038
GOTO4
N3 #2=#2038
N4 #3=[#2041-#2039]/#1
#4=[#2042-#2040]/#2
#6=0

N5 #6=#6+1
#5=0
N6 #5=#5+1
M98P0001
IF #5>#3 GOTO7
G91G0X#1
GOTO6
N7 IF #6>#4 GOTO8
#1=-#1
G91G0Y#2
GOTO5
N8 G90G0X#2039Y#2040
M99



scanning_surface.zip

580 Bytes, Down times: 2128

Reply Support 2 Opposition 0

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
Sofa
Posted at 2018-11-26 21:07:58 | Only Author
Currently, this function is not supported by the system. If you need to save the coordinates to a file, does the file name have a fixed name? Can you provide more detailed examples?
Reply Support Opposition

Use props Report

1

Threads

4

Posts

19

Credits

Newbie Member

Rank: 1

Credits
19
Bench
 Author| Posted at 2018-12-13 14:58:51 | Only Author
File name does not matter. I need to add current coordinates to a file by G-code command. I can write a script in a loop to get the coordinate cloud of the object. Format of records - comma delim X,Y,Z then new line. Next G-Code append next line in file.
Reply Support Opposition

Use props Report

1

Threads

4

Posts

19

Credits

Newbie Member

Rank: 1

Credits
19
Floor
 Author| Posted at 2018-12-13 15:08:22 | Only Author
Autoleveling, like this:
https://youtu.be/6WNE3E1ZZYY?t=530
Reply Support Opposition

Use props Report

1

Threads

4

Posts

19

Credits

Newbie Member

Rank: 1

Credits
19
5#
 Author| Posted at 2019-3-12 22:10:21 | Only Author
UP. Any suggestions?
Reply Support Opposition

Use props Report

9

Threads

53

Posts

669

Credits

Senior Member

Rank: 4

Credits
669
6#
Posted at 2019-3-13 18:23:55 | Only Author
Welcome back ytliu, we have missed you
Reply Support Opposition

Use props Report

7

Threads

43

Posts

195

Credits

Registered member

Rank: 2

Credits
195
7#
Posted at 2019-3-14 03:21:42 | Only Author
Wiil, He is not back check the date on the post! Support is now zero!
Richard
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
8#
Posted at 2019-3-14 07:02:49 | Only Author
I can provide you with a macro function, such as recordc. When using it in G code, the system will append the current coordinate information to a specific file. I don't know if this will meet your requirements.
Reply Support Opposition

Use props Report

2

Threads

25

Posts

408

Credits

Intermediate Member

Rank: 3Rank: 3

Credits
408
9#
Posted at 2019-3-14 11:31:55 | Only Author
Hi, ytliu! Glad to see you

For me appending coorinate information in file (incremental, until file exists or with createNew/reinit macro) is enough to perform simple scanning operations. All other things (like coordinate formats, etc) could be done via external conversion. It's useful both for creating height maps (like one topic starter is requested, e.g. for external compensation of PCB unevenness), or even full-fledged point clouds to use CNC as an express 3d scanner (e.g. for later engraving on complex surfaces).

Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
10#
Posted at 2019-3-14 12:46:38 | Only Author
Sorry,  due to the illness of my wife , I did not respond in time recentely.
Hi 71taa,Thank you for your suggestion. Could you explain your ideas more detail?
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