Getting the current axes coordinates - On 2 Page - DDCSV2.1 - Standalone CNC Motion Controller - Digital Dream Technology support
Author: Nikolay81
Print Previous Topic Next Topic

Getting the current axes coordinates

[Copy Link]

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
Jump to the specified floor
Landlord
Posted at 2018-10-17 18:48:54 | All floors Replies reward |Descending browser |Read mode
Last edited by Nikolay81 In 2018-10-17 18:50 Editor

Please tell me how you can get the current coordinates of the axes in G54
This is needed to create more convenient postprocessors.

For example, I write:
G90
G1X0.1F1000
M110(move axies and press START)
(Manually move the axis to a saved position.)
G4P0
#21=#451 (getting x coordinates)
#22=#452 (getting y coordinates)
#23=#453 (getting z coordinates)
G4P0
G0 X50 Y50 Z10
G1 X#21 Y#22 Z#23 F1000 (Now, the axes should return to the saved position.)
M110(Right?)
G0X0Y0Z0
#21=0
#22=0
#23=0

I tried the variables # 451- # 453; # 572- # 574; # 804- # 806; # 864- # 866. They do not work.
Please tell me in which variables the information about the current position of the axes is stored.
And in which variables, it is better to save it (# 21- # 23 are used in slib.nc).
Reply

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
Sofa
 Author| Posted at 2018-10-19 21:28:41 | All floors
Last edited by Nikolay81 In 2018-10-19 21:34 Editor

Many thanks for your help. Have a good trip.
Reply Support Opposition

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
Bench
 Author| Posted at 2018-10-29 22:30:54 | All floors
Last edited by Nikolay81 In 2018-10-29 22:53 Editor

Many thanks Ytliu.
How can the settings values be used in G-code, for example:
G1 X100 F # 80 (should work similarly to G0)
What variables are not busy (that is, available to the user) except # 21 - # 24?
Reply Support Opposition

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
Floor
 Author| Posted at 2018-10-30 17:43:05 | All floors
ytliu Posted at 2018-10-30 06:42
#0-#49 is a subroutine local variable that you can use at will. If you need to use system parameters ...

Thanks Ytliu.
And the value of the system parameters can be read from the G-code, or not?
For example, I need to read the value of the parameter #80 to use it for F.
Option G1 X10 F # 80 does not work.
If I write the line #2401=#80 at the end of the "eng" file, and then execute the code G1 X10 F#2401 - this does not work either.
Is there a way to find out the value of #80 from G-code?
Perhaps through slib.nc is this possible?
Reply Support Opposition

Use props Report

15

Threads

139

Posts

517

Credits

Senior Member

Rank: 4

Credits
517
5#
 Author| Posted at 2018-10-30 19:29:20 | All floors
Many thanks to Ytliu. Now everything is clear.
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