Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-13 Thread John Dammeyer
WARNING! The following message does not conform to CoC as it's wordy and 
useless.
=
So I got to use that halfway between points operation today.  

To set Y=0.0 between the fixed and movable jaws of the vise holding hollow 
round stock with my LED indicator 0.2" diameter touch probe.
  
Before that, using a 1-2-3 block as a reference on the top of the vise I had 
created a tool table with 6 tools using this link:
https://gnipsel.com/linuxcnc/g-code/gen05.html
Screen shot of the tool table.  That document is printed on both sides of the 
page and will become a permanent fixture by the mill.

Once I had the center of the round piece I was able to touch off using the 
center drill and a thin piece of paper.  Then put a dimple into the piece.  
Next a tool change to the #21 drill.  I went to XY Zero (using button that now 
works)   And then used the jog and MPG to sneak up to Z Zero.  And sure 
enough when the drill bit tip was just clear of the dimple from the center 
drill the DRO said 0.000.  Tool offset working.

A hand drill operation and then a tool change to #6.

One hand on ESTOP, one hand on my heart I ran my tapping demo and watched the 
tap move over from the tool change position to XY Zero and then down to 0.1" 
above.  And then the spindle came on and down it went. And up it came.  And 
then the vise moved to the finish position and I unclamped a piece with a 
perfect 10-32 tapped hole.

Scary but successful.  Thanks everyone for the help.  My spiral taps have 
arrived so I might just try something in steel.  

John Dammeyer


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-13 Thread Les Newell

That's so wrong on so many levels really.  Either continue the previous section or throw 
up a "Repeated Section" warning or error.  If it knows to ignore it then it 
also has the ability to do throw up an error.



The LinuxCNC ini format is based on the old Windows ini format, which 
also does not allow repeated sections. The ini format was originally 
designed for a single file and in that case repeated sections don't 
really make sense. #include is a later addition.



Should that not be for the Y axis with the G92Y...?
Y/2 (runs code G92Y[#5421 / 2])



Yes, it should. I just copied/pasted the previous line and changed the 
parameter number. I forgot to change the sxis as well.



Les



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread John Dammeyer
OK.  First of all thank you to Les and Andy.

I've moved the MDI_COMMANDs from the layout2.inc that were part of the HB04 
installation into the .INI file under the [HALUI] section.

In the process I discovered what two of the buttons on the pendant did. (Never 
bothered trying them out).   I now have a better idea of how to deal with the 
other macro buttons on the pendant.

I also, on the MDI command line tried out the 
G92Y[#5421 / 2] 
after first setting the 0 of a spot drill over the solid edge of the vise.  
Then moving with the jog and MPG wheel to center (again by eye) the spot drill 
over the edge of the movable jaw.

Next a 
G1 Y0 F10 
and sure enough a nice slow (safe) move to what looked like the mid-point 
between the two jaws.  I'll set up a couple of buttons the way Les has and 
won't need to use the Shumatech DRO-350 anymore for finding mid points.

Been a good day.
Thanks again.
John



> -Original Message-
> From: Les Newell [mailto:les.new...@fastmail.co.uk]
> Sent: July-12-21 9:57 AM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> 
> > My issue was I have the HB04 Pendant
> 
> I had one of those on my router. The MPG died shortly after I received
> it so I ended up throwing it in a corner in disgust. I'd recommend
> feeding the MPG though a low pass filter component (ilowpass would
> work), otherwise motion gets pretty jerky. I submitted a better low pass
> filter some time back but it looks like it was never added to the source
> tree.
> 
> In my case I have hardware buttons. My front panel has quite a few
> buttons, connected to LCNC over Modbus.
> In your [HALUI] section the first MDI_COMMAND line is
> halui.mdi-command-00, the second is halui.mdi-command-01 and so on. You
> just need to make sure you keep track of the line numbers. The lines for
> my zero and /2 buttons are as follows:
> MDI_COMMAND = G92X0
> MDI_COMMAND = G92Y0
> MDI_COMMAND = G92Z0
> MDI_COMMAND = G92X[#5420 / 2]
> MDI_COMMAND = G92Y[#5421 / 2]
> 
> I didn't have enough buttons on my front panel for Z/2 and I can't say
> I've ever needed it.
> 
> Les
> 
> On 12/07/2021 17:34, John Dammeyer wrote:
> > Can you post the code that creates the buttons?  I think that's the main 
> > issue here.  As mentioned before, there are all sorts of G-
> Code subroutines in the nc_files folder but getting away from using the 
> 'command line' so to speak is the general idea.
> >
> > My issue was I have the HB04 Pendant.  I also have in the pyvcp-panel.xml 
> > file hal pins described.
> >  
> >  RIDGE
> >  6
> > 
> > "rapid-to-Z-home"
> > "Rapid to Z Home"
> > ('Fixed',16)
> > 
> > 
> > "rapid-to-XY-home"
> > "Rapid to XY Home"
> > ('Fixed',16)
> > 
> >  
> >
> >
> > In the postgui_call_list.hal I had
> > #net remote-rapid-to-Z-home halui.mdi-command-16 <= pyvcp.rapid-to-Z-home
> > #net remote-rapid-to-XY-home halui.mdi-command-17 <= pyvcp.rapid-to-XY-home
> >
> >  From what I understood from the documentation I then add two lines
> > # add halui MDI commands here (max 64)
> > # MDI_COMMAND = G0 Z0
> > # MDI_COMMAND = G0 X0 Y0
> >
> > Which are assigned mdi-command-16 and -17 because the layout2.inc for the 
> > HB04 has
> >
> > [HALUI]
> > # these are examples, edit as required:
> > # a halui hal pin is created for each MDI_COMMAND below
> > # halui.mdi-command-00, halui.mdi-command-01,... etc
> > MDI_COMMAND=G0 X0 Y0 Z0
> > MDI_COMMAND=(debug, example: mdi-01)
> > MDI_COMMAND=(debug, example: mdi-02)
> > #03 M110: clears notifications
> > ...
> > #15
> > MDI_COMMAND= G10 L20 P0 C0
> >
> > However that didn't work.  So I postponed work on that for other stuff.  
> > But I would like to get it working and I would like to create
> a few more buttons.
> >
> > John
> >
> >
> >> -Original Message-
> >> From: Les Newell [mailto:les.new...@fastmail.co.uk]
> >> Sent: July-12-21 8:20 AM
> >> To: emc-users@lists.sourceforge.net
> >> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> >>
> >> It's pretty easy to do this in g-code. There is no need to get involved
> >> with HAL programming.
> >> Here is one way I 

Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread Leonardo Marsaglia
Well,  is there a spot where I can find some examples, of that what you
> mentioned?
>

As the guys pointed out early, there are several simpler solutions to
implement the DRO functionality you're looking for.

Nevertheless you can take a look here to see some source code to have a
starting point to make your own components in case you need it:
https://github.com/LinuxCNC/linuxcnc/tree/master/src/hal/components

Some are pretty simple and understandable, others look like chinese to me
LOL.

El lun, 12 jul 2021 a las 18:59, R C () escribió:

>
> On 7/12/21 8:59 AM, Leonardo Marsaglia wrote:
> >> That was actually what I was looking for, a button "like that", and
> >> wondered if I just didn't see/find it.
> >>
> >> Yeah I can see some "convenient" functionality in that,  but being able
> >> to go "half way" between two points, even with some iteration would
> >> help, to get that started
> >>
> >> (It would be really easy, math wise, once you have something like that,
> >> to find the center of a circular hole,  or a rectangle, or anything
> >> symmetrical, basically)
> >>
> >> I wonder, in hal, with a plugin, if you can just move the tool/spindle,
> >> and the DRO screen shows where it is going. For example,  for finding
> >> the center of a circular hole, you'd only need to find the edge in 3
> >> spots, and then just "go there".
> >>
> >>
> >> I'd love to figure out how to write a plugin like that.
> >>
> > Well If you want to use an electronic probe tool to automatically stop at
> > contact I think the use of HAL is unavoidable since the probe input is a
> > part of the MOTION component of LinuxCNC. You'll also have to make fancy
> > G-CODE as John said with this approach since you're gonna need to deal
> with
> > digital outputs and delays to make the routine.
> right, and I don't know if I want to go that route, if there's a simpler
> one.
> >   If you plan to externalize
> > the probing or if you plan to use a wiggle edge finder, you can still use
> > HAL to manually set the points with a button as we talked earlier.
>
> that was orinallt the 'question' I had in mind.  Something simple with a
> few buttons, that can do some simple calculations.  But if it's already
> there, I just haven't found it yet.
>
> I am not that experienced using LCNC/Axis,  and don't have a lot of time
> to  'play' with it  (it's that paycheck commitment thing :)  )
>
> >
> > As Andy suggests, there are plenty of GUI(ed) ways to do this also, but
> I'm
> > so comfortable with HAL that I really don't mess around too much at GUI
> > level. (That's a big to do on my list)
> >
> > If you have some C programming knowledge I think you will be more than
> alright making your custom component to try this.
>
> Actually,  been programming in C for a few decades, on all kinds of
> platforms. Question, as always is,  where to get started?  Is there some
> sort of "skeleton", a frame  that shows what it should look like, with
> some  trivial functionality?
>
> For example,  if you want to write a linux daemon, you can use a
> "skeleton", that basically show  some of that,  and with already
> existing coding skills,  you can write your own functioning daemon.
>
> So if there is something like that for  LCNC/Axis,  I'd give that a shot.
>
>
> >   I myself am pretty far
> > from being a programmer and I could do a lot of custom components with
> the HAL
> > Component Generator 
> for
> > the machines I have here.
> >
> > Any help you need please feel free to ask :)
>
> Well,  is there a spot where I can find some examples, of that what you
> mentioned?
>
>
> Ron
>
>
> >
> > El lun, 12 jul 2021 a las 5:20, andy pugh ()
> escribió:
> >
> >> (Nothing quoted, as this is general info)
> >>
> >> If you have a probe, then there is a hole centre macro that ships with
> >> LinuxCNC, "probe-hole.ngc"
> >> That will work without any config changes.
> >> There is a fairly complete set of probe routines included in the
> >> distribution which are included in the QTDragon and Woodpecker QTVcp
> >> GUIs at least.
> >> (There is a lot going on with QTVcp, it seems, and it is passing me by)
> >>
> >> In the venerable "Axis" interface you can spoof a fair bit of what is
> >> being talked about here in the touch-off dialog as it will accept
> >> mathematical expressions in the box.
> >> So, you can type in the current DRO reading and halve it ( 1.234 / 2
> >> ). I believe that any valig G-code expression will work: (sin[60] / 2
> >> for example)
> >>
> >> It would be handy to be able to use axis letters in there, and feels
> >> like an easy thing to add. I would not be at all surprised to find
> >> that some of the newer GUIs allow exactly that.
> >>
> >> This touch-off behaviour will be GUI-specific, and I doubt that anyone
> >> is intimately familiar with more than a couple of GUIs.
> >>
> >> --
> >> atp
> >> "A motorcycle is a bicycle with a pandemonium attachment and is
> >> designed for the especial use of

Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread John Dammeyer
> > On 7/12/21 9:20 AM, Les Newell wrote:
> > > It's pretty easy to do this in g-code. There is no need to get
> > > involved with HAL programming.
> > > Here is one way I do it on my mill. I have buttons for the following:
> > > Zero X (runs code G92X0)
> > > Zero Y (runs code G92Y0)
> > > Zero Z (runs code G92Z0)
> > > X/2 (runs code G92X[#5420 / 2])


> > > Y/2 (runs code G92X[#5421 / 2])


Should that not be for the Y axis with the G92Y...?
Y/2 (runs code G92Y[#5421 / 2])


> >
> >
> > what does the "#5420" do/mean?
> > > Say I want to find the centre of X. I find one X edge using a probe or
> > > eyeball as required then zero X. Move to the other side and hit X/2.
> > > X0 is now in the centre.
> > > If you have an electronic probe this plugin works quite well
> > > .
> > >
> > > Les





___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread John Dammeyer
http://linuxcnc.org/docs/html/gcode/overview.html#sub:numbered-parameters

It's a good idea to read and study this document.

John Dammeyer


> -Original Message-
> From: R C [mailto:cjv...@gmail.com]
> Sent: July-12-21 3:10 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> 
> 
> On 7/12/21 9:20 AM, Les Newell wrote:
> > It's pretty easy to do this in g-code. There is no need to get
> > involved with HAL programming.
> > Here is one way I do it on my mill. I have buttons for the following:
> > Zero X (runs code G92X0)
> > Zero Y (runs code G92Y0)
> > Zero Z (runs code G92Z0)
> > X/2 (runs code G92X[#5420 / 2])
> > Y/2 (runs code G92X[#5421 / 2])
> 
> 
> 
> what does the "#5420" do/mean?
> 
> 
> Ron
> 
> >
> > Say I want to find the centre of X. I find one X edge using a probe or
> > eyeball as required then zero X. Move to the other side and hit X/2.
> > X0 is now in the centre.
> > If you have an electronic probe this plugin works quite well
> > <https://github.com/linuxcnc-probe-screen/probe-screen-ng>.
> >
> > Les
> >
> > On 12/07/2021 05:29, R C wrote:
> >> Hello,
> >>
> >>
> >> in linuxcnc,� is there an easy/automated way to get halfway between
> >> two points?�� (Fort example, you'd touch off somewhere, move to some
> >> coordinate (x, y)� (or even (x, y, z)) and go inbetween right to the
> >> the middle of where you touched off and where the spindle is now?
> >>
> >>
> >> thanks,
> >>
> >>
> >> Ron
> >
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread John Dammeyer
Many many many years ago in the compiler writing class, my professor Chris 
Thomson, use to say if "in doubt, add another pass".  He also stressed that in 
the future, unlike the limited IBM 370 with only 16MB of memory, systems would 
have lots of memory and so adding more passes would not be expensive.

Chris is mentioned here:
https://en.wikipedia.org/wiki/FLACC

He wrote the entire Algol-68 compiler in IBM 370 assembler.   It was a time 
when we were given so many minutes of computer time for a course.   AlgolW 
would compile 1000 line program in a fraction of a second.  FLACC might take a 
whole second to compile the same thing.   

AlgolW and Fortran would spit out an error and then the next 50 errors would be 
there because of the first.  So in the long run you would submit and compile 
many times to get a program running.  With FLACC if you were dumb enough to 
only fix the first error the other exact same 49 would show up again.  But fix 
all 49 and likely you wouldn't see any others.  So that longer compile time 
came with the benefit of perfect error reporting.  To create a compiler that 
can do that is not easy.

John







> -Original Message-
> From: andy pugh [mailto:bodge...@gmail.com]
> Sent: July-12-21 3:00 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> 
> On Mon, 12 Jul 2021 at 22:55, John Dammeyer  wrote:
> 
> > That's so wrong on so many levels really.  Either continue the previous 
> > section or throw up a "Repeated Section" warning or error.
> If it knows to ignore it then it also has the ability to do throw up an error.
> 
> It doesn't actively ignore it. It searches the file for [HALUI], reads
> all the entries, and then stops looking when it sees the next
> [SECTION]
> 
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> � George Fitch, Atlanta Constitution Newspaper, 1912
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread andy pugh
On Mon, 12 Jul 2021 at 23:12, R C  wrote:

> what does the "#5420" do/mean?

http://linuxcnc.org/docs/2.8/html/gcode/overview.html#gcode:parameters

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread R C


On 7/12/21 9:20 AM, Les Newell wrote:
It's pretty easy to do this in g-code. There is no need to get 
involved with HAL programming.

Here is one way I do it on my mill. I have buttons for the following:
Zero X (runs code G92X0)
Zero Y (runs code G92Y0)
Zero Z (runs code G92Z0)
X/2 (runs code G92X[#5420 / 2])
Y/2 (runs code G92X[#5421 / 2])




what does the "#5420" do/mean?


Ron



Say I want to find the centre of X. I find one X edge using a probe or 
eyeball as required then zero X. Move to the other side and hit X/2. 
X0 is now in the centre.
If you have an electronic probe this plugin works quite well 
.


Les

On 12/07/2021 05:29, R C wrote:

Hello,


in linuxcnc,  is there an easy/automated way to get halfway between 
two points?   (Fort example, you'd touch off somewhere, move to some 
coordinate (x, y)  (or even (x, y, z)) and go inbetween right to the 
the middle of where you touched off and where the spindle is now?



thanks,


Ron




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread andy pugh
On Mon, 12 Jul 2021 at 22:55, John Dammeyer  wrote:

> That's so wrong on so many levels really.  Either continue the previous 
> section or throw up a "Repeated Section" warning or error.  If it knows to 
> ignore it then it also has the ability to do throw up an error.

It doesn't actively ignore it. It searches the file for [HALUI], reads
all the entries, and then stops looking when it sees the next
[SECTION]

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread R C


On 7/12/21 8:59 AM, Leonardo Marsaglia wrote:

That was actually what I was looking for, a button "like that", and
wondered if I just didn't see/find it.

Yeah I can see some "convenient" functionality in that,  but being able
to go "half way" between two points, even with some iteration would
help, to get that started

(It would be really easy, math wise, once you have something like that,
to find the center of a circular hole,  or a rectangle, or anything
symmetrical, basically)

I wonder, in hal, with a plugin, if you can just move the tool/spindle,
and the DRO screen shows where it is going. For example,  for finding
the center of a circular hole, you'd only need to find the edge in 3
spots, and then just "go there".


I'd love to figure out how to write a plugin like that.


Well If you want to use an electronic probe tool to automatically stop at
contact I think the use of HAL is unavoidable since the probe input is a
part of the MOTION component of LinuxCNC. You'll also have to make fancy
G-CODE as John said with this approach since you're gonna need to deal with
digital outputs and delays to make the routine.
right, and I don't know if I want to go that route, if there's a simpler 
one.

  If you plan to externalize
the probing or if you plan to use a wiggle edge finder, you can still use
HAL to manually set the points with a button as we talked earlier.


that was orinallt the 'question' I had in mind.  Something simple with a 
few buttons, that can do some simple calculations.  But if it's already 
there, I just haven't found it yet.


I am not that experienced using LCNC/Axis,  and don't have a lot of time 
to  'play' with it  (it's that paycheck commitment thing :)  )




As Andy suggests, there are plenty of GUI(ed) ways to do this also, but I'm
so comfortable with HAL that I really don't mess around too much at GUI
level. (That's a big to do on my list)

If you have some C programming knowledge I think you will be more than alright 
making your custom component to try this.


Actually,  been programming in C for a few decades, on all kinds of 
platforms. Question, as always is,  where to get started?  Is there some 
sort of "skeleton", a frame  that shows what it should look like, with 
some  trivial functionality?


For example,  if you want to write a linux daemon, you can use a 
"skeleton", that basically show  some of that,  and with already 
existing coding skills,  you can write your own functioning daemon.


So if there is something like that for  LCNC/Axis,  I'd give that a shot.



  I myself am pretty far
from being a programmer and I could do a lot of custom components with the HAL
Component Generator  for
the machines I have here.

Any help you need please feel free to ask :)


Well,  is there a spot where I can find some examples, of that what you 
mentioned?



Ron




El lun, 12 jul 2021 a las 5:20, andy pugh () escribió:


(Nothing quoted, as this is general info)

If you have a probe, then there is a hole centre macro that ships with
LinuxCNC, "probe-hole.ngc"
That will work without any config changes.
There is a fairly complete set of probe routines included in the
distribution which are included in the QTDragon and Woodpecker QTVcp
GUIs at least.
(There is a lot going on with QTVcp, it seems, and it is passing me by)

In the venerable "Axis" interface you can spoof a fair bit of what is
being talked about here in the touch-off dialog as it will accept
mathematical expressions in the box.
So, you can type in the current DRO reading and halve it ( 1.234 / 2
). I believe that any valig G-code expression will work: (sin[60] / 2
for example)

It would be handy to be able to use axis letters in there, and feels
like an easy thing to add. I would not be at all surprised to find
that some of the newer GUIs allow exactly that.

This touch-off behaviour will be GUI-specific, and I doubt that anyone
is intimately familiar with more than a couple of GUIs.

--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread John Dammeyer
OK.
Thanks Les.
I really thought that the way the HAL files and INI files were constructed that 
 the parser just continued each section before doing the next pass to deal with 
the created data structures.  

On 2.7.14 obviously not. 

I moved the two MDI_COMMAND lines into the HB04 layout2.inc and moved the two 
net lines from 
net remote-rapid-to-Z-home halui.mdi-command-16 <= pyvcp.rapid-to-Z-home
net remote-rapid-to-XY-home halui.mdi-command-17 <= pyvcp.rapid-to-XY-home

into the pyvcp_options.hal file where the spindle RPM and up to speed led lives.

Now I have Home Z and Home XY buttons.
Thanks.

I really think that if the second [HALUI] is ignored it should throw up an 
error or warning.

I think I'll play with the probe stuff next.

John


> -Original Message-
> From: Les Newell [mailto:les.new...@fastmail.co.uk]
> Sent: July-12-21 2:29 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> 
> I took a look at the files you sent me off-list and I suspect the issue
> is that you have two [HALUI] sections, one in the ini file and one in
> layout2.inc. If you combine the two sections it will probably work.
> 
> Could anyone else here confirm that having two sections with the same
> name is problematic?
> 
> Les
> 
> 
> 
> On 12/07/2021 18:43, John Dammeyer wrote:
> > I uncommented them but they don't show up in the hal config.  Only the 
> > first 16 from 00 to 15 from the pendant.m  Just went out
> to the shop and checked that again.
> >
> > Looking at the expanded ini the #INCLUDE layout2.inc is at the front of the 
> > ini file.  It's there so that the hard coded pendant
> MDI_COMMAND numbers assigned numbers match.
> >
> > Then under the [halui] I have the two additional MD_COMMAND lines.  Those 
> > don't show up in the hal config.  And that's where I
> got stuck.
> >
> > John
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread John Dammeyer
> From: andy pugh [mailto:bodge...@gmail.com]
> On Mon, 12 Jul 2021 at 22:31, Les Newell  wrote:
> 
> > Could anyone else here confirm that having two sections with the same
> > name is problematic?
> 
> Yes. Only the first section will be found.
> 
> 
> --
> atp

That's so wrong on so many levels really.  Either continue the previous section 
or throw up a "Repeated Section" warning or error.  If it knows to ignore it 
then it also has the ability to do throw up an error.  

John




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread andy pugh
On Mon, 12 Jul 2021 at 22:31, Les Newell  wrote:

> Could anyone else here confirm that having two sections with the same
> name is problematic?

Yes. Only the first section will be found.


-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread R C

Hi Andy,

On 7/12/21 2:17 AM, andy pugh wrote:

(Nothing quoted, as this is general info)

If you have a probe, then there is a hole centre macro that ships with
LinuxCNC, "probe-hole.ngc"
That will work without any config changes.


Well I have a simple, mechanical one, one end cylindrical, the other 
side a cone..  I think it is called a "wobbler" ?




There is a fairly complete set of probe routines included in the
distribution which are included in the QTDragon and Woodpecker QTVcp
GUIs at least.
(There is a lot going on with QTVcp, it seems, and it is passing me by)

In the venerable "Axis" interface you can spoof a fair bit of what is
That is what I am using, up until a few weeks ago I didn't know there 
were different interfaces.

being talked about here in the touch-off dialog as it will accept
mathematical expressions in the box.
So, you can type in the current DRO reading and halve it ( 1.234 / 2
). I believe that any valig G-code expression will work: (sin[60] / 2
for example)

It would be handy to be able to use axis letters in there, and feels
like an easy thing to add. I would not be at all surprised to find
that some of the newer GUIs allow exactly that.

This touch-off behaviour will be GUI-specific, and I doubt that anyone
is intimately familiar with more than a couple of GUIs.


thanks,


Ron



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread John Dammeyer
I can easily try that to see what happens.  Give me a few minutes.
John


> -Original Message-
> From: Les Newell [mailto:les.new...@fastmail.co.uk]
> Sent: July-12-21 2:29 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> 
> I took a look at the files you sent me off-list and I suspect the issue
> is that you have two [HALUI] sections, one in the ini file and one in
> layout2.inc. If you combine the two sections it will probably work.
> 
> Could anyone else here confirm that having two sections with the same
> name is problematic?
> 
> Les
> 
> 
> 
> On 12/07/2021 18:43, John Dammeyer wrote:
> > I uncommented them but they don't show up in the hal config.  Only the 
> > first 16 from 00 to 15 from the pendant.m  Just went out
> to the shop and checked that again.
> >
> > Looking at the expanded ini the #INCLUDE layout2.inc is at the front of the 
> > ini file.  It's there so that the hard coded pendant
> MDI_COMMAND numbers assigned numbers match.
> >
> > Then under the [halui] I have the two additional MD_COMMAND lines.  Those 
> > don't show up in the hal config.  And that's where I
> got stuck.
> >
> > John
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread R C


On 7/12/21 2:03 AM, John Dammeyer wrote:

The Shumatech DRO-350 just uses the same technique for circles as for squares.  
Move only in X direction to each edge to determine the mid-point.  Then do the 
same for the Y axis only.   Yes, it's 4 points instead of 3 for a circle but 
realistically is easier to understand even if it's not as clever.

I have yet to get the HOME Z and HOME XY buttons I put onto the pyvcp panel 
working.  Once I get back to that adding the probe stuff shouldn't be that 
hard.  I really don't understand why that doesn't already exist in AXIS.

Well, seems it would be convenient.  watching videos etc/  about how to 
do stuff, I ran into "so, how do I do that in LCNC?"





-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: July-11-21 11:25 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] 'automatically' go halfway between 2 points

correct,

If you draw 2, different, triangles like that, with their corners on a
circle, their hypotenuses intersect in the center of that circle. also
the middle of these hypotenuses, of each triangle, would be the center,
hence, that is why I was interested in finding� the "half way point" of
2 points, coordinates.


on a mill it would actually be pretty easy.� touch off on a 'reasonable'
spot at the edge of a 'circle� (30-60 degree XY axis or so).

Go down/up the X-direction until you find the edge again. From there go
in the Y direction til you find the edge yet again. The center (of that
circle/hole) will be half way� between where you "touched off" and where
you are now.

for a rectangle, similarly you could center the X axis,� and next the Y
axis (and find the center of a piece of stock for example). Technically
you would have found the center of a concentric circle,� but that's the
same thing.



It would be a cool utility,� that you can find all kinds of "spots" on a
part with, I'd be interested in 'building' something like that


Ron


On 7/11/21 11:52 PM, John Dammeyer wrote:

Here are your 3 points.  As a math wiz you can see that if you draw a 
perpendicular line from each pair of points they all intersect in

the middle.

The third angle is the one I can create graphically and from that the length 
for the XY of the center but you might be able to explain

the math a bit better.




-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: July-11-21 10:31 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] 'automatically' go halfway between 2 points


On 7/11/21 11:15 PM, John Dammeyer wrote:

Essentially the process involves two touch off operations.  First one side 
until an LED comes on or even better the probe input

goes

active.  At that point touch off so the axis is set to 0.

Then you move in the opposite direction until the probe (or LED) goes active.  
Divide that axis value by two and move back to

that

position.  Now touch off again to set the axis to 0.  You are now in the middle.

Right,? I can do that with a calculator and some arithmetic, and jog
there manually,? but I am a mathematician,? and we're known to be lazy,?
so I am thinking about a button?? :)



It's probably possible with a fancy G-Code macro.

well,? if one can write a plugin,? it would probably be fairly easy (but
I am a CNC rookie) to do that,? if that plugin can actually move the
tool/spindle



A number of different projects I've done have been set up that way.  Find the 
center of the object which is also where I've set

the

center in the CAM software.  Rather than top left or bottom left corner of 
something that has been milled away.

right,? I don't think it is not too difficult to find the center of all
kinds of shapes (geometrically or otherwise), in a math kinda way that is.



But I'm an amateur and probably do things the hard way.  Often...

well,? hobbyist that's trying to learn some stuff here,? I am actually a
mathematician,? I can calculate things,? but I'd be a starving machinist
or CNC person/operator/machinist ...?? this weekend I created 4 proto
types of a stepper motor mount,? aka scrap.

John

Ron



-Original Message-
From: R C [ <mailto:cjv...@gmail.com> mailto:cjv...@gmail.com]
Sent: July-11-21 10:00 PM
To:  <mailto:emc-users@lists.sourceforge.net> emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] 'automatically' go halfway between 2 points


On 7/11/21 10:47 PM, John Dammeyer wrote:

I still have my Shumatech DRO on my mill.  I touch one side and zero the axis.  
I then move across and jog until the LED goes

on.

Then FCN 1 and the axis letter button.  At that point the axis changes to minus 
halfway between where I just touched off and

the

original 0 point.

I move to make the DRO show 0 and then touch off that axis on the AXIS screen.  
Now I have the center point between 

Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread Les Newell
I took a look at the files you sent me off-list and I suspect the issue 
is that you have two [HALUI] sections, one in the ini file and one in 
layout2.inc. If you combine the two sections it will probably work.


Could anyone else here confirm that having two sections with the same 
name is problematic?


Les



On 12/07/2021 18:43, John Dammeyer wrote:

I uncommented them but they don't show up in the hal config.  Only the first 16 
from 00 to 15 from the pendant.m  Just went out to the shop and checked that 
again.

Looking at the expanded ini the #INCLUDE layout2.inc is at the front of the ini 
file.  It's there so that the hard coded pendant MDI_COMMAND numbers assigned 
numbers match.

Then under the [halui] I have the two additional MD_COMMAND lines.  Those don't 
show up in the hal config.  And that's where I got stuck.

John




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread Les Newell
Could you post your inc and ini files. Hopefully that way I can see what 
is going on.


Les


On 12/07/2021 18:43, John Dammeyer wrote:

I uncommented them but they don't show up in the hal config.  Only the first 16 
from 00 to 15 from the pendant.m  Just went out to the shop and checked that 
again.

Looking at the expanded ini the #INCLUDE layout2.inc is at the front of the ini 
file.  It's there so that the hard coded pendant MDI_COMMAND numbers assigned 
numbers match.

Then under the [halui] I have the two additional MD_COMMAND lines.  Those don't 
show up in the hal config.  And that's where I got stuck.

John





___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread andrew beck
John I have it working with glade vcp its awesome and easy.  My 12 year old
brother was making buttons.  I can share a config if you want

On Tue, Jul 13, 2021, 4:37 AM John Dammeyer  wrote:

> Can you post the code that creates the buttons?  I think that's the main
> issue here.  As mentioned before, there are all sorts of G-Code subroutines
> in the nc_files folder but getting away from using the 'command line' so to
> speak is the general idea.
>
> My issue was I have the HB04 Pendant.  I also have in the pyvcp-panel.xml
> file hal pins described.
> 
> RIDGE
> 6
> 
> "rapid-to-Z-home"
> "Rapid to Z Home"
> ('Fixed',16)
> 
> 
> "rapid-to-XY-home"
> "Rapid to XY Home"
> ('Fixed',16)
> 
> 
>
>
> In the postgui_call_list.hal I had
> #net remote-rapid-to-Z-home halui.mdi-command-16 <= pyvcp.rapid-to-Z-home
> #net remote-rapid-to-XY-home halui.mdi-command-17 <= pyvcp.rapid-to-XY-home
>
> From what I understood from the documentation I then add two lines
> # add halui MDI commands here (max 64)
> # MDI_COMMAND = G0 Z0
> # MDI_COMMAND = G0 X0 Y0
>
> Which are assigned mdi-command-16 and -17 because the layout2.inc for the
> HB04 has
>
> [HALUI]
> # these are examples, edit as required:
> # a halui hal pin is created for each MDI_COMMAND below
> # halui.mdi-command-00, halui.mdi-command-01,... etc
> MDI_COMMAND=G0 X0 Y0 Z0
> MDI_COMMAND=(debug, example: mdi-01)
> MDI_COMMAND=(debug, example: mdi-02)
> #03 M110: clears notifications
> ...
> #15
> MDI_COMMAND= G10 L20 P0 C0
>
> However that didn't work.  So I postponed work on that for other stuff.
> But I would like to get it working and I would like to create a few more
> buttons.
>
> John
>
>
> > -Original Message-
> > From: Les Newell [mailto:les.new...@fastmail.co.uk]
> > Sent: July-12-21 8:20 AM
> > To: emc-users@lists.sourceforge.net
> > Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> >
> > It's pretty easy to do this in g-code. There is no need to get involved
> > with HAL programming.
> > Here is one way I do it on my mill. I have buttons for the following:
> > Zero X (runs code G92X0)
> > Zero Y (runs code G92Y0)
> > Zero Z (runs code G92Z0)
> > X/2 (runs code G92X[#5420 / 2])
> > Y/2 (runs code G92X[#5421 / 2])
> >
> > Say I want to find the centre of X. I find one X edge using a probe or
> > eyeball as required then zero X. Move to the other side and hit X/2. X0
> > is now in the centre.
> > If you have an electronic probe this plugin works quite well
> > <https://github.com/linuxcnc-probe-screen/probe-screen-ng>.
> >
> > Les
> >
> > On 12/07/2021 05:29, R C wrote:
> > > Hello,
> > >
> > >
> > > in linuxcnc,� is there an easy/automated way to get halfway between
> > > two points?�� (Fort example, you'd touch off somewhere, move to some
> > > coordinate (x, y)� (or even (x, y, z)) and go inbetween right to the
> > > the middle of where you touched off and where the spindle is now?
> > >
> > >
> > > thanks,
> > >
> > >
> > > Ron
> >
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread John Dammeyer
I uncommented them but they don't show up in the hal config.  Only the first 16 
from 00 to 15 from the pendant.m  Just went out to the shop and checked that 
again. 

Looking at the expanded ini the #INCLUDE layout2.inc is at the front of the ini 
file.  It's there so that the hard coded pendant MDI_COMMAND numbers assigned 
numbers match.

Then under the [halui] I have the two additional MD_COMMAND lines.  Those don't 
show up in the hal config.  And that's where I got stuck.

John


> -Original Message-
> From: Les Newell [mailto:les.new...@fastmail.co.uk]
> Sent: July-12-21 9:57 AM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> 
> > My issue was I have the HB04 Pendant
> 
> I had one of those on my router. The MPG died shortly after I received
> it so I ended up throwing it in a corner in disgust. I'd recommend
> feeding the MPG though a low pass filter component (ilowpass would
> work), otherwise motion gets pretty jerky. I submitted a better low pass
> filter some time back but it looks like it was never added to the source
> tree.
> 
> In my case I have hardware buttons. My front panel has quite a few
> buttons, connected to LCNC over Modbus.
> In your [HALUI] section the first MDI_COMMAND line is
> halui.mdi-command-00, the second is halui.mdi-command-01 and so on. You
> just need to make sure you keep track of the line numbers. The lines for
> my zero and /2 buttons are as follows:
> MDI_COMMAND = G92X0
> MDI_COMMAND = G92Y0
> MDI_COMMAND = G92Z0
> MDI_COMMAND = G92X[#5420 / 2]
> MDI_COMMAND = G92Y[#5421 / 2]
> 
> I didn't have enough buttons on my front panel for Z/2 and I can't say
> I've ever needed it.
> 
> Les
> 
> On 12/07/2021 17:34, John Dammeyer wrote:
> > Can you post the code that creates the buttons?  I think that's the main 
> > issue here.  As mentioned before, there are all sorts of G-
> Code subroutines in the nc_files folder but getting away from using the 
> 'command line' so to speak is the general idea.
> >
> > My issue was I have the HB04 Pendant.  I also have in the pyvcp-panel.xml 
> > file hal pins described.
> >  
> >  RIDGE
> >  6
> > 
> > "rapid-to-Z-home"
> > "Rapid to Z Home"
> > ('Fixed',16)
> > 
> > 
> > "rapid-to-XY-home"
> > "Rapid to XY Home"
> > ('Fixed',16)
> > 
> >  
> >
> >
> > In the postgui_call_list.hal I had
> > #net remote-rapid-to-Z-home halui.mdi-command-16 <= pyvcp.rapid-to-Z-home
> > #net remote-rapid-to-XY-home halui.mdi-command-17 <= pyvcp.rapid-to-XY-home
> >
> >  From what I understood from the documentation I then add two lines
> > # add halui MDI commands here (max 64)
> > # MDI_COMMAND = G0 Z0
> > # MDI_COMMAND = G0 X0 Y0
> >
> > Which are assigned mdi-command-16 and -17 because the layout2.inc for the 
> > HB04 has
> >
> > [HALUI]
> > # these are examples, edit as required:
> > # a halui hal pin is created for each MDI_COMMAND below
> > # halui.mdi-command-00, halui.mdi-command-01,... etc
> > MDI_COMMAND=G0 X0 Y0 Z0
> > MDI_COMMAND=(debug, example: mdi-01)
> > MDI_COMMAND=(debug, example: mdi-02)
> > #03 M110: clears notifications
> > ...
> > #15
> > MDI_COMMAND= G10 L20 P0 C0
> >
> > However that didn't work.  So I postponed work on that for other stuff.  
> > But I would like to get it working and I would like to create
> a few more buttons.
> >
> > John
> >
> >
> >> -Original Message-
> >> From: Les Newell [mailto:les.new...@fastmail.co.uk]
> >> Sent: July-12-21 8:20 AM
> >> To: emc-users@lists.sourceforge.net
> >> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> >>
> >> It's pretty easy to do this in g-code. There is no need to get involved
> >> with HAL programming.
> >> Here is one way I do it on my mill. I have buttons for the following:
> >> Zero X (runs code G92X0)
> >> Zero Y (runs code G92Y0)
> >> Zero Z (runs code G92Z0)
> >> X/2 (runs code G92X[#5420 / 2])
> >> Y/2 (runs code G92X[#5421 / 2])
> >>
> >> Say I want to find the centre of X. I find one X edge using a probe or
> >> eyeball as required then zero X. Move t

Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread Les Newell

My issue was I have the HB04 Pendant


I had one of those on my router. The MPG died shortly after I received 
it so I ended up throwing it in a corner in disgust. I'd recommend 
feeding the MPG though a low pass filter component (ilowpass would 
work), otherwise motion gets pretty jerky. I submitted a better low pass 
filter some time back but it looks like it was never added to the source 
tree.


In my case I have hardware buttons. My front panel has quite a few 
buttons, connected to LCNC over Modbus.
In your [HALUI] section the first MDI_COMMAND line is 
halui.mdi-command-00, the second is halui.mdi-command-01 and so on. You 
just need to make sure you keep track of the line numbers. The lines for 
my zero and /2 buttons are as follows:

MDI_COMMAND = G92X0
MDI_COMMAND = G92Y0
MDI_COMMAND = G92Z0
MDI_COMMAND = G92X[#5420 / 2]
MDI_COMMAND = G92Y[#5421 / 2]

I didn't have enough buttons on my front panel for Z/2 and I can't say 
I've ever needed it.


Les

On 12/07/2021 17:34, John Dammeyer wrote:

Can you post the code that creates the buttons?  I think that's the main issue 
here.  As mentioned before, there are all sorts of G-Code subroutines in the 
nc_files folder but getting away from using the 'command line' so to speak is 
the general idea.

My issue was I have the HB04 Pendant.  I also have in the pyvcp-panel.xml file 
hal pins described.
 
 RIDGE
 6

"rapid-to-Z-home"
"Rapid to Z Home"
('Fixed',16)


"rapid-to-XY-home"
"Rapid to XY Home"
('Fixed',16)

 


In the postgui_call_list.hal I had
#net remote-rapid-to-Z-home halui.mdi-command-16 <= pyvcp.rapid-to-Z-home
#net remote-rapid-to-XY-home halui.mdi-command-17 <= pyvcp.rapid-to-XY-home

 From what I understood from the documentation I then add two lines
# add halui MDI commands here (max 64)
# MDI_COMMAND = G0 Z0
# MDI_COMMAND = G0 X0 Y0

Which are assigned mdi-command-16 and -17 because the layout2.inc for the HB04 
has

[HALUI]
# these are examples, edit as required:
# a halui hal pin is created for each MDI_COMMAND below
# halui.mdi-command-00, halui.mdi-command-01,... etc
MDI_COMMAND=G0 X0 Y0 Z0
MDI_COMMAND=(debug, example: mdi-01)
MDI_COMMAND=(debug, example: mdi-02)
#03 M110: clears notifications
...
#15
MDI_COMMAND= G10 L20 P0 C0

However that didn't work.  So I postponed work on that for other stuff.  But I 
would like to get it working and I would like to create a few more buttons.

John



-Original Message-
From: Les Newell [mailto:les.new...@fastmail.co.uk]
Sent: July-12-21 8:20 AM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] 'automatically' go halfway between 2 points

It's pretty easy to do this in g-code. There is no need to get involved
with HAL programming.
Here is one way I do it on my mill. I have buttons for the following:
Zero X (runs code G92X0)
Zero Y (runs code G92Y0)
Zero Z (runs code G92Z0)
X/2 (runs code G92X[#5420 / 2])
Y/2 (runs code G92X[#5421 / 2])

Say I want to find the centre of X. I find one X edge using a probe or
eyeball as required then zero X. Move to the other side and hit X/2. X0
is now in the centre.
If you have an electronic probe this plugin works quite well
<https://github.com/linuxcnc-probe-screen/probe-screen-ng>.

Les

On 12/07/2021 05:29, R C wrote:

Hello,


in linuxcnc,� is there an easy/automated way to get halfway between
two points?�� (Fort example, you'd touch off somewhere, move to some
coordinate (x, y)� (or even (x, y, z)) and go inbetween right to the
the middle of where you touched off and where the spindle is now?


thanks,


Ron



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users





___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread John Dammeyer
Can you post the code that creates the buttons?  I think that's the main issue 
here.  As mentioned before, there are all sorts of G-Code subroutines in the 
nc_files folder but getting away from using the 'command line' so to speak is 
the general idea.

My issue was I have the HB04 Pendant.  I also have in the pyvcp-panel.xml file 
hal pins described.

RIDGE 
6

"rapid-to-Z-home"
"Rapid to Z Home" 
('Fixed',16)
  

"rapid-to-XY-home"
"Rapid to XY Home" 
('Fixed',16)
  



In the postgui_call_list.hal I had
#net remote-rapid-to-Z-home halui.mdi-command-16 <= pyvcp.rapid-to-Z-home
#net remote-rapid-to-XY-home halui.mdi-command-17 <= pyvcp.rapid-to-XY-home

From what I understood from the documentation I then add two lines
# add halui MDI commands here (max 64)
# MDI_COMMAND = G0 Z0
# MDI_COMMAND = G0 X0 Y0

Which are assigned mdi-command-16 and -17 because the layout2.inc for the HB04 
has 

[HALUI]
# these are examples, edit as required:
# a halui hal pin is created for each MDI_COMMAND below
# halui.mdi-command-00, halui.mdi-command-01,... etc
MDI_COMMAND=G0 X0 Y0 Z0
MDI_COMMAND=(debug, example: mdi-01)
MDI_COMMAND=(debug, example: mdi-02)
#03 M110: clears notifications
...
#15
MDI_COMMAND= G10 L20 P0 C0

However that didn't work.  So I postponed work on that for other stuff.  But I 
would like to get it working and I would like to create a few more buttons.

John


> -Original Message-
> From: Les Newell [mailto:les.new...@fastmail.co.uk]
> Sent: July-12-21 8:20 AM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> 
> It's pretty easy to do this in g-code. There is no need to get involved
> with HAL programming.
> Here is one way I do it on my mill. I have buttons for the following:
> Zero X (runs code G92X0)
> Zero Y (runs code G92Y0)
> Zero Z (runs code G92Z0)
> X/2 (runs code G92X[#5420 / 2])
> Y/2 (runs code G92X[#5421 / 2])
> 
> Say I want to find the centre of X. I find one X edge using a probe or
> eyeball as required then zero X. Move to the other side and hit X/2. X0
> is now in the centre.
> If you have an electronic probe this plugin works quite well
> <https://github.com/linuxcnc-probe-screen/probe-screen-ng>.
> 
> Les
> 
> On 12/07/2021 05:29, R C wrote:
> > Hello,
> >
> >
> > in linuxcnc,� is there an easy/automated way to get halfway between
> > two points?�� (Fort example, you'd touch off somewhere, move to some
> > coordinate (x, y)� (or even (x, y, z)) and go inbetween right to the
> > the middle of where you touched off and where the spindle is now?
> >
> >
> > thanks,
> >
> >
> > Ron
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread Les Newell
It's pretty easy to do this in g-code. There is no need to get involved 
with HAL programming.

Here is one way I do it on my mill. I have buttons for the following:
Zero X (runs code G92X0)
Zero Y (runs code G92Y0)
Zero Z (runs code G92Z0)
X/2 (runs code G92X[#5420 / 2])
Y/2 (runs code G92X[#5421 / 2])

Say I want to find the centre of X. I find one X edge using a probe or 
eyeball as required then zero X. Move to the other side and hit X/2. X0 
is now in the centre.
If you have an electronic probe this plugin works quite well 
.


Les

On 12/07/2021 05:29, R C wrote:

Hello,


in linuxcnc,  is there an easy/automated way to get halfway between 
two points?   (Fort example, you'd touch off somewhere, move to some 
coordinate (x, y)  (or even (x, y, z)) and go inbetween right to the 
the middle of where you touched off and where the spindle is now?



thanks,


Ron




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread Leonardo Marsaglia
>
> That was actually what I was looking for, a button "like that", and
> wondered if I just didn't see/find it.
>
> Yeah I can see some "convenient" functionality in that,  but being able
> to go "half way" between two points, even with some iteration would
> help, to get that started
>
> (It would be really easy, math wise, once you have something like that,
> to find the center of a circular hole,  or a rectangle, or anything
> symmetrical, basically)
>
> I wonder, in hal, with a plugin, if you can just move the tool/spindle,
> and the DRO screen shows where it is going. For example,  for finding
> the center of a circular hole, you'd only need to find the edge in 3
> spots, and then just "go there".
>
>
> I'd love to figure out how to write a plugin like that.
>

Well If you want to use an electronic probe tool to automatically stop at
contact I think the use of HAL is unavoidable since the probe input is a
part of the MOTION component of LinuxCNC. You'll also have to make fancy
G-CODE as John said with this approach since you're gonna need to deal with
digital outputs and delays to make the routine. If you plan to externalize
the probing or if you plan to use a wiggle edge finder, you can still use
HAL to manually set the points with a button as we talked earlier.

As Andy suggests, there are plenty of GUI(ed) ways to do this also, but I'm
so comfortable with HAL that I really don't mess around too much at GUI
level. (That's a big to do on my list)

If you have some C programming knowledge I think you will be more than
alright making your custom component to try this. I myself am pretty far
from being a programmer and I could do a lot of custom components with the HAL
Component Generator  for
the machines I have here.

Any help you need please feel free to ask :)

El lun, 12 jul 2021 a las 5:20, andy pugh () escribió:

> (Nothing quoted, as this is general info)
>
> If you have a probe, then there is a hole centre macro that ships with
> LinuxCNC, "probe-hole.ngc"
> That will work without any config changes.
> There is a fairly complete set of probe routines included in the
> distribution which are included in the QTDragon and Woodpecker QTVcp
> GUIs at least.
> (There is a lot going on with QTVcp, it seems, and it is passing me by)
>
> In the venerable "Axis" interface you can spoof a fair bit of what is
> being talked about here in the touch-off dialog as it will accept
> mathematical expressions in the box.
> So, you can type in the current DRO reading and halve it ( 1.234 / 2
> ). I believe that any valig G-code expression will work: (sin[60] / 2
> for example)
>
> It would be handy to be able to use axis letters in there, and feels
> like an easy thing to add. I would not be at all surprised to find
> that some of the newer GUIs allow exactly that.
>
> This touch-off behaviour will be GUI-specific, and I doubt that anyone
> is intimately familiar with more than a couple of GUIs.
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1912
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread andy pugh
(Nothing quoted, as this is general info)

If you have a probe, then there is a hole centre macro that ships with
LinuxCNC, "probe-hole.ngc"
That will work without any config changes.
There is a fairly complete set of probe routines included in the
distribution which are included in the QTDragon and Woodpecker QTVcp
GUIs at least.
(There is a lot going on with QTVcp, it seems, and it is passing me by)

In the venerable "Axis" interface you can spoof a fair bit of what is
being talked about here in the touch-off dialog as it will accept
mathematical expressions in the box.
So, you can type in the current DRO reading and halve it ( 1.234 / 2
). I believe that any valig G-code expression will work: (sin[60] / 2
for example)

It would be handy to be able to use axis letters in there, and feels
like an easy thing to add. I would not be at all surprised to find
that some of the newer GUIs allow exactly that.

This touch-off behaviour will be GUI-specific, and I doubt that anyone
is intimately familiar with more than a couple of GUIs.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-12 Thread John Dammeyer
The Shumatech DRO-350 just uses the same technique for circles as for squares.  
Move only in X direction to each edge to determine the mid-point.  Then do the 
same for the Y axis only.   Yes, it's 4 points instead of 3 for a circle but 
realistically is easier to understand even if it's not as clever.

I have yet to get the HOME Z and HOME XY buttons I put onto the pyvcp panel 
working.  Once I get back to that adding the probe stuff shouldn't be that 
hard.  I really don't understand why that doesn't already exist in AXIS.

> -Original Message-
> From: R C [mailto:cjv...@gmail.com]
> Sent: July-11-21 11:25 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> 
> correct,
> 
> If you draw 2, different, triangles like that, with their corners on a
> circle, their hypotenuses intersect in the center of that circle. also
> the middle of these hypotenuses, of each triangle, would be the center,
> hence, that is why I was interested in finding� the "half way point" of
> 2 points, coordinates.
> 
> 
> on a mill it would actually be pretty easy.� touch off on a 'reasonable'
> spot at the edge of a 'circle� (30-60 degree XY axis or so).
> 
> Go down/up the X-direction until you find the edge again. From there go
> in the Y direction til you find the edge yet again. The center (of that
> circle/hole) will be half way� between where you "touched off" and where
> you are now.
> 
> for a rectangle, similarly you could center the X axis,� and next the Y
> axis (and find the center of a piece of stock for example). Technically
> you would have found the center of a concentric circle,� but that's the
> same thing.
> 
> 
> 
> It would be a cool utility,� that you can find all kinds of "spots" on a
> part with, I'd be interested in 'building' something like that
> 
> 
> Ron
> 
> 
> On 7/11/21 11:52 PM, John Dammeyer wrote:
> > Here are your 3 points.  As a math wiz you can see that if you draw a 
> > perpendicular line from each pair of points they all intersect in
> the middle.
> >
> > The third angle is the one I can create graphically and from that the 
> > length for the XY of the center but you might be able to explain
> the math a bit better.
> >
> >
> >
> >> -Original Message-
> >> From: R C [mailto:cjv...@gmail.com]
> >> Sent: July-11-21 10:31 PM
> >> To: emc-users@lists.sourceforge.net
> >> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> >>
> >>
> >> On 7/11/21 11:15 PM, John Dammeyer wrote:
> >>> Essentially the process involves two touch off operations.  First one 
> >>> side until an LED comes on or even better the probe input
> goes
> >> active.  At that point touch off so the axis is set to 0.
> >>> Then you move in the opposite direction until the probe (or LED) goes 
> >>> active.  Divide that axis value by two and move back to
> that
> >> position.  Now touch off again to set the axis to 0.  You are now in the 
> >> middle.
> >>
> >> Right,? I can do that with a calculator and some arithmetic, and jog
> >> there manually,? but I am a mathematician,? and we're known to be lazy,?
> >> so I am thinking about a button?? :)
> >>
> >>
> >>> It's probably possible with a fancy G-Code macro.
> >> well,? if one can write a plugin,? it would probably be fairly easy (but
> >> I am a CNC rookie) to do that,? if that plugin can actually move the
> >> tool/spindle
> >>
> >>
> >>> A number of different projects I've done have been set up that way.  Find 
> >>> the center of the object which is also where I've set
> the
> >> center in the CAM software.  Rather than top left or bottom left corner of 
> >> something that has been milled away.
> >>
> >> right,? I don't think it is not too difficult to find the center of all
> >> kinds of shapes (geometrically or otherwise), in a math kinda way that is.
> >>
> >>
> >>> But I'm an amateur and probably do things the hard way.  Often...
> >> well,? hobbyist that's trying to learn some stuff here,? I am actually a
> >> mathematician,? I can calculate things,? but I'd be a starving machinist
> >> or CNC person/operator/machinist ...?? this weekend I created 4 proto
> >> types of a stepper motor mount,? aka scrap.
> >>> John
> >> Ron
> >>
> 

Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread R C

correct,

If you draw 2, different, triangles like that, with their corners on a 
circle, their hypotenuses intersect in the center of that circle. also 
the middle of these hypotenuses, of each triangle, would be the center, 
hence, that is why I was interested in finding  the "half way point" of 
2 points, coordinates.



on a mill it would actually be pretty easy.  touch off on a 'reasonable' 
spot at the edge of a 'circle  (30-60 degree XY axis or so).


Go down/up the X-direction until you find the edge again. From there go 
in the Y direction til you find the edge yet again. The center (of that 
circle/hole) will be half way  between where you "touched off" and where 
you are now.


for a rectangle, similarly you could center the X axis,  and next the Y 
axis (and find the center of a piece of stock for example). Technically 
you would have found the center of a concentric circle,  but that's the 
same thing.




It would be a cool utility,  that you can find all kinds of "spots" on a 
part with, I'd be interested in 'building' something like that



Ron


On 7/11/21 11:52 PM, John Dammeyer wrote:

Here are your 3 points.  As a math wiz you can see that if you draw a 
perpendicular line from each pair of points they all intersect in the middle.
  
The third angle is the one I can create graphically and from that the length for the XY of the center but you might be able to explain the math a bit better.
  

  

-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: July-11-21 10:31 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] 'automatically' go halfway between 2 points


On 7/11/21 11:15 PM, John Dammeyer wrote:

Essentially the process involves two touch off operations.  First one side 
until an LED comes on or even better the probe input goes

active.  At that point touch off so the axis is set to 0.

Then you move in the opposite direction until the probe (or LED) goes active.  
Divide that axis value by two and move back to that

position.  Now touch off again to set the axis to 0.  You are now in the middle.

Right,� I can do that with a calculator and some arithmetic, and jog
there manually,� but I am a mathematician,� and we're known to be lazy,�
so I am thinking about a button�� :)



It's probably possible with a fancy G-Code macro.

well,� if one can write a plugin,� it would probably be fairly easy (but
I am a CNC rookie) to do that,� if that plugin can actually move the
tool/spindle



A number of different projects I've done have been set up that way.  Find the 
center of the object which is also where I've set the

center in the CAM software.  Rather than top left or bottom left corner of 
something that has been milled away.

right,� I don't think it is not too difficult to find the center of all
kinds of shapes (geometrically or otherwise), in a math kinda way that is.



But I'm an amateur and probably do things the hard way.  Often...

well,� hobbyist that's trying to learn some stuff here,� I am actually a
mathematician,� I can calculate things,� but I'd be a starving machinist
or CNC person/operator/machinist ...�� this weekend I created 4 proto
types of a stepper motor mount,� aka scrap.

John

Ron



-Original Message-
From: R C [ <mailto:cjv...@gmail.com> mailto:cjv...@gmail.com]
Sent: July-11-21 10:00 PM
To:  <mailto:emc-users@lists.sourceforge.net> emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] 'automatically' go halfway between 2 points


On 7/11/21 10:47 PM, John Dammeyer wrote:

I still have my Shumatech DRO on my mill.  I touch one side and zero the axis.  
I then move across and jog until the LED goes on.

Then FCN 1 and the axis letter button.  At that point the axis changes to minus 
halfway between where I just touched off and the
original 0 point.

I move to make the DRO show 0 and then touch off that axis on the AXIS screen.  
Now I have the center point between the two

edges.  Since the LED indicator probe is 0.2" diameter the distance to the 
center doesn't matter.  Only if I am trying to find the

edge

and the Shumatech can be told the diameter of the probe.

Certainly there must be an easy way to do this with LCNC?  The Shumatech 
software has been around for at least 13 years.

Oops,?? I didn't see this last line...?? I think so,??? either some
added functionality in the DRO? (that is where I was looking around),?
or else a plugin.?? it's probably not that hard,? if I knew how to write
a plugin for LCNC



John



-----Original Message-
From: R C [ <mailto:cjv...@gmail.com> mailto:cjv...@gmail.com]
Sent: July-11-21 9:29 PM
To: linuxcnc-users-list
Subject: [Emc-users] 'automatically' go halfway between 2 points

Hello,


in linuxcnc,? is there an easy/automated way to get halfway between two
points??? (Fort example, you'd touch 

Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread John Dammeyer
Here are your 3 points.  As a math wiz you can see that if you draw a 
perpendicular line from each pair of points they all intersect in the middle.
 
The third angle is the one I can create graphically and from that the length 
for the XY of the center but you might be able to explain the math a bit better.
 

 
> -Original Message-
> From: R C [mailto:cjv...@gmail.com]
> Sent: July-11-21 10:31 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> 
> 
> On 7/11/21 11:15 PM, John Dammeyer wrote:
> > Essentially the process involves two touch off operations.  First one side 
> > until an LED comes on or even better the probe input goes
> active.  At that point touch off so the axis is set to 0.
> >
> > Then you move in the opposite direction until the probe (or LED) goes 
> > active.  Divide that axis value by two and move back to that
> position.  Now touch off again to set the axis to 0.  You are now in the 
> middle.
> 
> Right,� I can do that with a calculator and some arithmetic, and jog
> there manually,� but I am a mathematician,� and we're known to be lazy,�
> so I am thinking about a button�� :)
> 
> 
> >
> > It's probably possible with a fancy G-Code macro.
> 
> well,� if one can write a plugin,� it would probably be fairly easy (but
> I am a CNC rookie) to do that,� if that plugin can actually move the
> tool/spindle
> 
> 
> >
> > A number of different projects I've done have been set up that way.  Find 
> > the center of the object which is also where I've set the
> center in the CAM software.  Rather than top left or bottom left corner of 
> something that has been milled away.
> 
> right,� I don't think it is not too difficult to find the center of all
> kinds of shapes (geometrically or otherwise), in a math kinda way that is.
> 
> 
> >
> > But I'm an amateur and probably do things the hard way.  Often...
> well,� hobbyist that's trying to learn some stuff here,� I am actually a
> mathematician,� I can calculate things,� but I'd be a starving machinist
> or CNC person/operator/machinist ...�� this weekend I created 4 proto
> types of a stepper motor mount,� aka scrap.
> >
> > John
> 
> Ron
> 
> 
> >
> >> -Original Message-
> >> From: R C [ <mailto:cjv...@gmail.com> mailto:cjv...@gmail.com]
> >> Sent: July-11-21 10:00 PM
> >> To:  <mailto:emc-users@lists.sourceforge.net> 
> >> emc-users@lists.sourceforge.net
> >> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> >>
> >>
> >> On 7/11/21 10:47 PM, John Dammeyer wrote:
> >>> I still have my Shumatech DRO on my mill.  I touch one side and zero the 
> >>> axis.  I then move across and jog until the LED goes on.
> >> Then FCN 1 and the axis letter button.  At that point the axis changes to 
> >> minus halfway between where I just touched off and the
> >> original 0 point.
> >>> I move to make the DRO show 0 and then touch off that axis on the AXIS 
> >>> screen.  Now I have the center point between the two
> >> edges.  Since the LED indicator probe is 0.2" diameter the distance to the 
> >> center doesn't matter.  Only if I am trying to find the
> edge
> >> and the Shumatech can be told the diameter of the probe.
> >>> Certainly there must be an easy way to do this with LCNC?  The Shumatech 
> >>> software has been around for at least 13 years.
> >>
> >> Oops,?? I didn't see this last line...?? I think so,??? either some
> >> added functionality in the DRO? (that is where I was looking around),?
> >> or else a plugin.?? it's probably not that hard,? if I knew how to write
> >> a plugin for LCNC
> >>
> >>
> >>> John
> >>>
> >>>
> >>>> -Original Message-
> >>>> From: R C [ <mailto:cjv...@gmail.com> mailto:cjv...@gmail.com]
> >>>> Sent: July-11-21 9:29 PM
> >>>> To: linuxcnc-users-list
> >>>> Subject: [Emc-users] 'automatically' go halfway between 2 points
> >>>>
> >>>> Hello,
> >>>>
> >>>>
> >>>> in linuxcnc,? is there an easy/automated way to get halfway between two
> >>>> points??? (Fort example, you'd touch off somewhere, move to some
> >>>> coordinate (x, y)? (or even (x, y, z)) and go inbetween right to the the
> >>>> middle of wher

Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread R C


On 7/11/21 11:15 PM, John Dammeyer wrote:

Essentially the process involves two touch off operations.  First one side 
until an LED comes on or even better the probe input goes active.  At that 
point touch off so the axis is set to 0.

Then you move in the opposite direction until the probe (or LED) goes active.  
Divide that axis value by two and move back to that position.  Now touch off 
again to set the axis to 0.  You are now in the middle.


Right,  I can do that with a calculator and some arithmetic, and jog 
there manually,  but I am a mathematician,  and we're known to be lazy,  
so I am thinking about a button   :)





It's probably possible with a fancy G-Code macro.


well,  if one can write a plugin,  it would probably be fairly easy (but 
I am a CNC rookie) to do that,  if that plugin can actually move the 
tool/spindle





A number of different projects I've done have been set up that way.  Find the 
center of the object which is also where I've set the center in the CAM 
software.  Rather than top left or bottom left corner of something that has 
been milled away.


right,  I don't think it is not too difficult to find the center of all 
kinds of shapes (geometrically or otherwise), in a math kinda way that is.





But I'm an amateur and probably do things the hard way.  Often...
well,  hobbyist that's trying to learn some stuff here,  I am actually a 
mathematician,  I can calculate things,  but I'd be a starving machinist 
or CNC person/operator/machinist ...   this weekend I created 4 proto 
types of a stepper motor mount,  aka scrap.


John


Ron





-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: July-11-21 10:00 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] 'automatically' go halfway between 2 points


On 7/11/21 10:47 PM, John Dammeyer wrote:

I still have my Shumatech DRO on my mill.  I touch one side and zero the axis.  
I then move across and jog until the LED goes on.

Then FCN 1 and the axis letter button.  At that point the axis changes to minus 
halfway between where I just touched off and the
original 0 point.

I move to make the DRO show 0 and then touch off that axis on the AXIS screen.  
Now I have the center point between the two

edges.  Since the LED indicator probe is 0.2" diameter the distance to the 
center doesn't matter.  Only if I am trying to find the edge
and the Shumatech can be told the diameter of the probe.

Certainly there must be an easy way to do this with LCNC?  The Shumatech 
software has been around for at least 13 years.


Oops,�� I didn't see this last line...�� I think so,��� either some
added functionality in the DRO� (that is where I was looking around),�
or else a plugin.�� it's probably not that hard,� if I knew how to write
a plugin for LCNC



John



-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: July-11-21 9:29 PM
To: linuxcnc-users-list
Subject: [Emc-users] 'automatically' go halfway between 2 points

Hello,


in linuxcnc,? is there an easy/automated way to get halfway between two
points??? (Fort example, you'd touch off somewhere, move to some
coordinate (x, y)? (or even (x, y, z)) and go inbetween right to the the
middle of where you touched off and where the spindle is now?


thanks,


Ron



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread R C
I have been watching a lot of CNC and machining videos over the past 
year and a half too...  (which makes me wonder why I still turn so much 
stock into scrap.. :)  )


On 7/11/21 11:15 PM, John Dammeyer wrote:

I've been watching the Tormach Path Pilot videos and there's a lot of 
information in the LCNC side of things for setting tool height etc.  There are 
a number of G-Code macros that can find edges.

John



-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: July-11-21 9:58 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] 'automatically' go halfway between 2 points

Hi John,


I have seen videos about these electronic "add on" DROs that is actually
why I am asking.�� It would be incredibly helpful finding the center of
circles (aka holes), or squares, the center of stock etc etc.


That's why I wondered if there is something like that in linuxcnc.��
(Maybe I should start looking into how to build plugins for linuxcnc...� )

thanks,

Ron


On 7/11/21 10:47 PM, John Dammeyer wrote:

I still have my Shumatech DRO on my mill.  I touch one side and zero the axis.  
I then move across and jog until the LED goes on.

Then FCN 1 and the axis letter button.  At that point the axis changes to minus 
halfway between where I just touched off and the
original 0 point.

I move to make the DRO show 0 and then touch off that axis on the AXIS screen.  
Now I have the center point between the two

edges.  Since the LED indicator probe is 0.2" diameter the distance to the 
center doesn't matter.  Only if I am trying to find the edge
and the Shumatech can be told the diameter of the probe.

Certainly there must be an easy way to do this with LCNC?  The Shumatech 
software has been around for at least 13 years.

John



-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: July-11-21 9:29 PM
To: linuxcnc-users-list
Subject: [Emc-users] 'automatically' go halfway between 2 points

Hello,


in linuxcnc,? is there an easy/automated way to get halfway between two
points??? (Fort example, you'd touch off somewhere, move to some
coordinate (x, y)? (or even (x, y, z)) and go inbetween right to the the
middle of where you touched off and where the spindle is now?


thanks,


Ron



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread R C

Hi Leonardo,

That was actually what I was looking for, a button "like that", and 
wondered if I just didn't see/find it.


Yeah I can see some "convenient" functionality in that,  but being able 
to go "half way" between two points, even with some iteration would 
help, to get that started


(It would be really easy, math wise, once you have something like that, 
to find the center of a circular hole,  or a rectangle, or anything 
symmetrical, basically)


I wonder, in hal, with a plugin, if you can just move the tool/spindle, 
and the DRO screen shows where it is going. For example,  for finding 
the center of a circular hole, you'd only need to find the edge in 3 
spots, and then just "go there".



I'd love to figure out how to write a plugin like that.


Ron




On 7/11/21 11:08 PM, Leonardo Marsaglia wrote:

Hi Ron,

I guess you could do it with a custom component in HAL. You can link a
physical button to set the points and then compute the center point. You
should need a reset button and some other functionalities too I guess, but
I think it's perfectly doable. Also you could show the output with pyvcp so
you can replicate what a DRO does. It's not that easy but neither that hard
I guess.

El lun, 12 jul 2021 a las 2:02, R C () escribió:


On 7/11/21 10:47 PM, John Dammeyer wrote:

I still have my Shumatech DRO on my mill.  I touch one side and zero the

axis.  I then move across and jog until the LED goes on. Then FCN 1 and the
axis letter button.  At that point the axis changes to minus halfway
between where I just touched off and the original 0 point.

I move to make the DRO show 0 and then touch off that axis on the AXIS

screen.  Now I have the center point between the two edges.  Since the LED
indicator probe is 0.2" diameter the distance to the center doesn't
matter.  Only if I am trying to find the edge and the Shumatech can be told
the diameter of the probe.

Certainly there must be an easy way to do this with LCNC?  The Shumatech

software has been around for at least 13 years.


Oops,   I didn't see this last line...   I think so,either some
added functionality in the DRO  (that is where I was looking around),
or else a plugin.   it's probably not that hard,  if I knew how to write
a plugin for LCNC



John



-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: July-11-21 9:29 PM
To: linuxcnc-users-list
Subject: [Emc-users] 'automatically' go halfway between 2 points

Hello,


in linuxcnc,� is there an easy/automated way to get halfway between two
points?�� (Fort example, you'd touch off somewhere, move to some
coordinate (x, y)� (or even (x, y, z)) and go inbetween right to the the
middle of where you touched off and where the spindle is now?


thanks,


Ron



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread John Dammeyer
I've been watching the Tormach Path Pilot videos and there's a lot of 
information in the LCNC side of things for setting tool height etc.  There are 
a number of G-Code macros that can find edges.

John


> -Original Message-
> From: R C [mailto:cjv...@gmail.com]
> Sent: July-11-21 9:58 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> 
> Hi John,
> 
> 
> I have seen videos about these electronic "add on" DROs that is actually
> why I am asking.�� It would be incredibly helpful finding the center of
> circles (aka holes), or squares, the center of stock etc etc.
> 
> 
> That's why I wondered if there is something like that in linuxcnc.��
> (Maybe I should start looking into how to build plugins for linuxcnc...� )
> 
> thanks,
> 
> Ron
> 
> 
> On 7/11/21 10:47 PM, John Dammeyer wrote:
> > I still have my Shumatech DRO on my mill.  I touch one side and zero the 
> > axis.  I then move across and jog until the LED goes on.
> Then FCN 1 and the axis letter button.  At that point the axis changes to 
> minus halfway between where I just touched off and the
> original 0 point.
> >
> > I move to make the DRO show 0 and then touch off that axis on the AXIS 
> > screen.  Now I have the center point between the two
> edges.  Since the LED indicator probe is 0.2" diameter the distance to the 
> center doesn't matter.  Only if I am trying to find the edge
> and the Shumatech can be told the diameter of the probe.
> >
> > Certainly there must be an easy way to do this with LCNC?  The Shumatech 
> > software has been around for at least 13 years.
> >
> > John
> >
> >
> >> -Original Message-
> >> From: R C [mailto:cjv...@gmail.com]
> >> Sent: July-11-21 9:29 PM
> >> To: linuxcnc-users-list
> >> Subject: [Emc-users] 'automatically' go halfway between 2 points
> >>
> >> Hello,
> >>
> >>
> >> in linuxcnc,? is there an easy/automated way to get halfway between two
> >> points??? (Fort example, you'd touch off somewhere, move to some
> >> coordinate (x, y)? (or even (x, y, z)) and go inbetween right to the the
> >> middle of where you touched off and where the spindle is now?
> >>
> >>
> >> thanks,
> >>
> >>
> >> Ron
> >>
> >>
> >>
> >> ___
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread John Dammeyer
Essentially the process involves two touch off operations.  First one side 
until an LED comes on or even better the probe input goes active.  At that 
point touch off so the axis is set to 0.

Then you move in the opposite direction until the probe (or LED) goes active.  
Divide that axis value by two and move back to that position.  Now touch off 
again to set the axis to 0.  You are now in the middle.

It's probably possible with a fancy G-Code macro.  

A number of different projects I've done have been set up that way.  Find the 
center of the object which is also where I've set the center in the CAM 
software.  Rather than top left or bottom left corner of something that has 
been milled away.

But I'm an amateur and probably do things the hard way.  Often...

John

> -Original Message-
> From: R C [mailto:cjv...@gmail.com]
> Sent: July-11-21 10:00 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] 'automatically' go halfway between 2 points
> 
> 
> On 7/11/21 10:47 PM, John Dammeyer wrote:
> > I still have my Shumatech DRO on my mill.  I touch one side and zero the 
> > axis.  I then move across and jog until the LED goes on.
> Then FCN 1 and the axis letter button.  At that point the axis changes to 
> minus halfway between where I just touched off and the
> original 0 point.
> >
> > I move to make the DRO show 0 and then touch off that axis on the AXIS 
> > screen.  Now I have the center point between the two
> edges.  Since the LED indicator probe is 0.2" diameter the distance to the 
> center doesn't matter.  Only if I am trying to find the edge
> and the Shumatech can be told the diameter of the probe.
> >
> > Certainly there must be an easy way to do this with LCNC?  The Shumatech 
> > software has been around for at least 13 years.
> 
> 
> Oops,�� I didn't see this last line...�� I think so,��� either some
> added functionality in the DRO� (that is where I was looking around),�
> or else a plugin.�� it's probably not that hard,� if I knew how to write
> a plugin for LCNC
> 
> 
> > John
> >
> >
> >> -Original Message-
> >> From: R C [mailto:cjv...@gmail.com]
> >> Sent: July-11-21 9:29 PM
> >> To: linuxcnc-users-list
> >> Subject: [Emc-users] 'automatically' go halfway between 2 points
> >>
> >> Hello,
> >>
> >>
> >> in linuxcnc,? is there an easy/automated way to get halfway between two
> >> points??? (Fort example, you'd touch off somewhere, move to some
> >> coordinate (x, y)? (or even (x, y, z)) and go inbetween right to the the
> >> middle of where you touched off and where the spindle is now?
> >>
> >>
> >> thanks,
> >>
> >>
> >> Ron
> >>
> >>
> >>
> >> ___
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread Leonardo Marsaglia
Hi Ron,

I guess you could do it with a custom component in HAL. You can link a
physical button to set the points and then compute the center point. You
should need a reset button and some other functionalities too I guess, but
I think it's perfectly doable. Also you could show the output with pyvcp so
you can replicate what a DRO does. It's not that easy but neither that hard
I guess.

El lun, 12 jul 2021 a las 2:02, R C () escribió:

>
> On 7/11/21 10:47 PM, John Dammeyer wrote:
> > I still have my Shumatech DRO on my mill.  I touch one side and zero the
> axis.  I then move across and jog until the LED goes on. Then FCN 1 and the
> axis letter button.  At that point the axis changes to minus halfway
> between where I just touched off and the original 0 point.
> >
> > I move to make the DRO show 0 and then touch off that axis on the AXIS
> screen.  Now I have the center point between the two edges.  Since the LED
> indicator probe is 0.2" diameter the distance to the center doesn't
> matter.  Only if I am trying to find the edge and the Shumatech can be told
> the diameter of the probe.
> >
> > Certainly there must be an easy way to do this with LCNC?  The Shumatech
> software has been around for at least 13 years.
>
>
> Oops,   I didn't see this last line...   I think so,either some
> added functionality in the DRO  (that is where I was looking around),
> or else a plugin.   it's probably not that hard,  if I knew how to write
> a plugin for LCNC
>
>
> > John
> >
> >
> >> -----Original Message-
> >> From: R C [mailto:cjv...@gmail.com]
> >> Sent: July-11-21 9:29 PM
> >> To: linuxcnc-users-list
> >> Subject: [Emc-users] 'automatically' go halfway between 2 points
> >>
> >> Hello,
> >>
> >>
> >> in linuxcnc,� is there an easy/automated way to get halfway between two
> >> points?�� (Fort example, you'd touch off somewhere, move to some
> >> coordinate (x, y)� (or even (x, y, z)) and go inbetween right to the the
> >> middle of where you touched off and where the spindle is now?
> >>
> >>
> >> thanks,
> >>
> >>
> >> Ron
> >>
> >>
> >>
> >> ___
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread R C


On 7/11/21 10:47 PM, John Dammeyer wrote:

I still have my Shumatech DRO on my mill.  I touch one side and zero the axis.  
I then move across and jog until the LED goes on. Then FCN 1 and the axis 
letter button.  At that point the axis changes to minus halfway between where I 
just touched off and the original 0 point.

I move to make the DRO show 0 and then touch off that axis on the AXIS screen.  Now 
I have the center point between the two edges.  Since the LED indicator probe is 
0.2" diameter the distance to the center doesn't matter.  Only if I am trying 
to find the edge and the Shumatech can be told the diameter of the probe.

Certainly there must be an easy way to do this with LCNC?  The Shumatech 
software has been around for at least 13 years.



Oops,   I didn't see this last line...   I think so,    either some 
added functionality in the DRO  (that is where I was looking around),  
or else a plugin.   it's probably not that hard,  if I knew how to write 
a plugin for LCNC




John



-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: July-11-21 9:29 PM
To: linuxcnc-users-list
Subject: [Emc-users] 'automatically' go halfway between 2 points

Hello,


in linuxcnc,� is there an easy/automated way to get halfway between two
points?�� (Fort example, you'd touch off somewhere, move to some
coordinate (x, y)� (or even (x, y, z)) and go inbetween right to the the
middle of where you touched off and where the spindle is now?


thanks,


Ron



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread R C

Hi John,


I have seen videos about these electronic "add on" DROs that is actually 
why I am asking.   It would be incredibly helpful finding the center of 
circles (aka holes), or squares, the center of stock etc etc.



That's why I wondered if there is something like that in linuxcnc.   
(Maybe I should start looking into how to build plugins for linuxcnc...  )


thanks,

Ron


On 7/11/21 10:47 PM, John Dammeyer wrote:

I still have my Shumatech DRO on my mill.  I touch one side and zero the axis.  
I then move across and jog until the LED goes on. Then FCN 1 and the axis 
letter button.  At that point the axis changes to minus halfway between where I 
just touched off and the original 0 point.

I move to make the DRO show 0 and then touch off that axis on the AXIS screen.  Now 
I have the center point between the two edges.  Since the LED indicator probe is 
0.2" diameter the distance to the center doesn't matter.  Only if I am trying 
to find the edge and the Shumatech can be told the diameter of the probe.

Certainly there must be an easy way to do this with LCNC?  The Shumatech 
software has been around for at least 13 years.

John



-Original Message-
From: R C [mailto:cjv...@gmail.com]
Sent: July-11-21 9:29 PM
To: linuxcnc-users-list
Subject: [Emc-users] 'automatically' go halfway between 2 points

Hello,


in linuxcnc,� is there an easy/automated way to get halfway between two
points?�� (Fort example, you'd touch off somewhere, move to some
coordinate (x, y)� (or even (x, y, z)) and go inbetween right to the the
middle of where you touched off and where the spindle is now?


thanks,


Ron



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread John Dammeyer
I still have my Shumatech DRO on my mill.  I touch one side and zero the axis.  
I then move across and jog until the LED goes on. Then FCN 1 and the axis 
letter button.  At that point the axis changes to minus halfway between where I 
just touched off and the original 0 point.

I move to make the DRO show 0 and then touch off that axis on the AXIS screen.  
Now I have the center point between the two edges.  Since the LED indicator 
probe is 0.2" diameter the distance to the center doesn't matter.  Only if I am 
trying to find the edge and the Shumatech can be told the diameter of the probe.

Certainly there must be an easy way to do this with LCNC?  The Shumatech 
software has been around for at least 13 years.

John


> -Original Message-
> From: R C [mailto:cjv...@gmail.com]
> Sent: July-11-21 9:29 PM
> To: linuxcnc-users-list
> Subject: [Emc-users] 'automatically' go halfway between 2 points
> 
> Hello,
> 
> 
> in linuxcnc,� is there an easy/automated way to get halfway between two
> points?�� (Fort example, you'd touch off somewhere, move to some
> coordinate (x, y)� (or even (x, y, z)) and go inbetween right to the the
> middle of where you touched off and where the spindle is now?
> 
> 
> thanks,
> 
> 
> Ron
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] 'automatically' go halfway between 2 points

2021-07-11 Thread R C

Hello,


in linuxcnc,  is there an easy/automated way to get halfway between two 
points?   (Fort example, you'd touch off somewhere, move to some 
coordinate (x, y)  (or even (x, y, z)) and go inbetween right to the the 
middle of where you touched off and where the spindle is now?



thanks,


Ron



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users