Save current coords to file - On 2 Page - DDCSV2.1 - Standalone CNC Motion Controller - Digital Dream Technology support
Author: cnc-kursk
Print Previous Topic Next Topic

Save current coords to file

[Copy Link]

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
Landlord
Posted at 2018-11-26 21:07:58 | All floors
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

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
Sofa
Posted at 2019-3-14 07:02:49 | All floors
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

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
Bench
Posted at 2019-3-14 12:46:38 | All floors
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

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
Floor
Posted at 2019-3-15 17:09:18 | All floors
Hi,71taa!
Thank you for your proposal. After I have integrated the opinions of Mr. cnc-kursk, I will confirm the solution and ask for your suggestions.
Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
5#
Posted at 2019-5-3 20:34:02 | All floors
In the attachment, I added two macro functions:
1.RecordCoords[], which can append 4 floating point numbers to the specified file on the USB flash drive. The first parameter is the file serial number, and the next 4 parameters are the recorded data.
E.g:
RecordCoords[3,10.2,5.3,0,0]
"10.2000, 5.3000, 0.0000, 0.0000" will be added to the "ProbeMap3.txt" file of the USB flash drive.
2.ClearCoords[], used to clear the contents of the coordinate file.
E.g:
ClearCoords[2]
The contents of the "ProbeMap2.txt" file of the USB flash drive will be erased.

I think that using these two macro functions, as well as the macro variables associated with the coordinate system, should be able to implement the function of plane probe.



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 get the position 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 get the position in G53.

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 (G56 X, Y, Z, A), # 816- # 819 (G57 X, Y, Z, A), # 820- # 823 (G58 X, Y, Z, A) , # 824- # 827 (G59 X, Y, Z, A) respectively describe the distance from the origin of G54-G59 coordinate system to the origin of G53 coordinate system, and you can adjust these parameters to reconstruct the G54-G59;

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 get the position in G54-G59.

#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.

Reading #699-#702 can get the coordinates in the current workpiece coordinate system.

test.zip

294 Bytes, Down times: 628

install.zip

586.4 KB, Down times: 647

Reply Support Opposition

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
6#
Posted at 2019-5-4 08:49:49 | All floors
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: 1398

Reply Support 2 Opposition 0

Use props Report

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
7#
Posted at 2019-5-6 18:38:33 | All floors
thank you. If the DDCS processing speed is sufficient, I am going to try to increase the auto level function on the DDCSV.
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