G21 + G20 checkbox / LED

Here is where you can request new features or special features.

G21 + G20 checkbox / LED

Postby Robertspark » Fri Oct 27, 2017 12:44 pm

I know uccnc is unitless, however I was wondering if G20 + G21 could be added to the available list of Gcodes so that they could be used to toggle a checkbox (or LED) which could then be used by macros to check for metric or inch correction for meters / min or, inch per minute or feet per minute which can be applied within the macros directly by users.

Note this is just a checkbox (or LED) toggle, we already have G50 + G51 should you wish to rescale the gcode.

G20 / G21 would do nothing other than toggle the checkbox or led unless you had a macroloop or macro which was looking for the status of that checkbox or LED within the screenset (general settings tab).

Thanks,
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: G21 + G20 checkbox / LED

Postby ger21 » Fri Oct 27, 2017 12:51 pm

I think that would open up all types of problems, as you'd inevitably end up converting some things, but not all.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: G21 + G20 checkbox / LED

Postby Robertspark » Fri Oct 27, 2017 12:57 pm

We already have 50 and G51 so what would not be converted?
Feedrate and spindle speed can be corrected via multiplier.

What have I missed?

(just asking for a means to provide a G20 / G21 indicator that the gcode has been picked up, it will do nothing within uccnc without a macro or macro loop doing something).

The only "confusion" is that people may think it will automatically scale according to the G21 / G21 setting which it won't
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: G21 + G20 checkbox / LED

Postby ger21 » Fri Oct 27, 2017 1:13 pm

Robertspark wrote:The only "confusion" is that people may think it will automatically scale according to the G21 / G21 setting which it won't


That's what I thought you were attempting to do. :D

What do G50/G51 do? They are not listed in the manual.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: G21 + G20 checkbox / LED

Postby Robertspark » Fri Oct 27, 2017 1:18 pm

Gerry,

They are in the manual, just you need to look in the one in the development version documentation folder (your screenset won't have them because they were newer than your screenset) [you have the same problem that everyone else has with a custom screenset not being able to easiliy keep up with the development version functions (added LED's etc)

screenshot of manual below
Attachments
2017-10-27 14_21_48-UCCNC_usersmanual - PDF-XChange Editor.png
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: G21 + G20 checkbox / LED

Postby ger21 » Fri Oct 27, 2017 2:07 pm

I don't have the development version installed here at work. I would have seen it at home.

Yes, there were significant additions added recently. I had been staying up to date until the new DRO''s were added. These will require a major re-design of my screenset, which I don't have time for right now.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: G21 + G20 checkbox / LED

Postby cncdrive » Fri Oct 27, 2017 3:11 pm

Gerry is right, that making the G20/G21 work like a macro would be very hard to impossible.
The G20/21 is just as hard to implement as easy it looks. I know because it works very similar to G50/51, just while G51/G51 works with setable ratio the G20/21 works with a fixed ratio.
G20/21 also introduced another issue that if there are fixed setable units of mm and inches then the base unit also have to be clearly defined,
and this is because if the base unit (the steps per and others) are unitless then you can't make a conversion, because you don't know what the base unit is.

And G20/21 requires a continous back and forth calculation of coordinates just like the G50/G51, because these g-codes can be programmed any time, not only on the beginning of the g-code, but anywhere in the g-code is why it is not as easy as it looks for first sight.
So, these g-codes are really not as easy as they look.

I could call a macro with the G20/21, it would not be a problem to implement that, but I think implementing G20/G21 in a macro very far from easy, so the question is if it would do any good if I implement it...
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: G21 + G20 checkbox / LED

Postby Robertspark » Fri Oct 27, 2017 3:16 pm

:oops: probably not recommended then, I'll just keep working in metric (was trying to make the macros adaptable / more flexible).
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: G21 + G20 checkbox / LED

Postby ger21 » Fri Oct 27, 2017 3:51 pm

was trying to make the macros adaptable / more flexible).


Macos should be unitless, just like UCCNC, so I'm not sure what you would want to do? I know that all of my macros in my screenset work with both imperial and metric units. Units are units....
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: G21 + G20 checkbox / LED

Postby Robertspark » Fri Oct 27, 2017 4:31 pm

I guess the thing that I spotted was this relating to G96
http://linuxcnc.org/docs/devel/html/gco ... de:g96-g97

G96 D- S- - selects constant surface speed of S feet per minute (if G20 is in effect) or meters per minute (if G21 is in effect). D- is optional.

Normally from my experiance imperial cnc is in inches per minute, but this one threw up ft/min..... hence thought if I had a G20 indicator that the correct units could be selected

I was looking at creating a macro to mimic G96 to do with turning.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Next

Return to Feature Request

Who is online

Users browsing this forum: No registered users and 5 guests