Re: [Emc-users] Auxiliary axis DRO only

2022-02-28 Thread Andy Pugh


> On 26 Feb 2022, at 04:36, Thaddeus Waldner  wrote:
> 
> Anything else I can try?

How about a Python HAL component that logs encoder position (on a HAL pin) to 
file when a trigger pin goes high? 
As it would be a user space component you would need a “handshake” in the 
G-code. Ie a log / logged pair of signals. Possibly using a bidirectional pin 
in the same way as index-enable. 
M65(?) to trigger a measurement then wait-in-falling-edge before continuing 



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


Re: [Emc-users] Auxiliary axis DRO only

2022-02-25 Thread Thaddeus Waldner
I found a workaround; It's possible to read HAL pins from g-code. The
problem is they don't necessarily update after the program is started. But
according to the manual, a state sync command--M66E0L0-- forces it to
update. The problem is that this stops the motion, and now instead of a
non-stop scan, I have a stop-go at each point. I still get around 4
readings per second so it would be workable, just not ideal.

Configuration section)
G20(Inches)
F10 (probe speed)

#4=-1  (Y start)
#5=.01 (Y increment)
#6=101 (Y count)

(End configuration section)

(LOGOPEN,profile-results.ngc)
#9=0 #10=0
G0Z#7
(file preamble)
(LOG,G20)
(LOG,G64 P0.002)
(LOG,F30)
O1 while [#9 lt #6]
G1 Y[#4+#5*#9]
 (LOG, G1 X#<_hal[z-pos-fb]>Y#<_Y> )
 M66E0L0
#9=[#9+1]
O1 endwhile
(LOG,G0X0Y0)
(LOG,M2)
(LOGCLOSE)
G0Y#4
M2

On Fri, Feb 25, 2022 at 10:33 PM Thaddeus Waldner 
wrote:

>
>> I am not sure what the built-in parameters such as #<_Z> show in this
>> situation. I would suspect that it is commanded position but it's not
>> hard to find out.
>>
>
> I just ran the following gcode:
>
> (Configuration section)
> G20(Inches)
> F2(probe speed)
>
> #4=-1  (Y start)
> #5=.04 (Y increment)
> #6=51  (Y count)
>
> (End configuration section)
>
> (LOGOPEN,profile-results.ngc)
> #9=0
>
> O1 while [#9 lt #6]
> G0 Y[#4+#5*#9]
>  (LOG, G1 #<_Y>, #<_Z>)
> #9=[#9+1]
> O1 endwhile
>
> (LOGCLOSE)
> G0Y#4
> M2
>
> I manually moved the z encoder while this was happening.
> It produces a log file as expected, bu all the z-values are zero.
> some more testing with (DEBUG, #<_Z>) showed that #<_Z> stays zero until
> it is changed by motion. For example, using the jog keys will change it.
>
> Anything else I can try?
>

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


Re: [Emc-users] Auxiliary axis DRO only

2022-02-25 Thread Thaddeus Waldner
>
>
> I am not sure what the built-in parameters such as #<_Z> show in this
> situation. I would suspect that it is commanded position but it's not
> hard to find out.
>

I just ran the following gcode:

(Configuration section)
G20(Inches)
F2(probe speed)

#4=-1  (Y start)
#5=.04 (Y increment)
#6=51  (Y count)

(End configuration section)

(LOGOPEN,profile-results.ngc)
#9=0

O1 while [#9 lt #6]
G0 Y[#4+#5*#9]
 (LOG, G1 #<_Y>, #<_Z>)
#9=[#9+1]
O1 endwhile

(LOGCLOSE)
G0Y#4
M2

I manually moved the z encoder while this was happening.
It produces a log file as expected, bu all the z-values are zero.
some more testing with (DEBUG, #<_Z>) showed that #<_Z> stays zero until it
is changed by motion. For example, using the jog keys will change it.

Anything else I can try?

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


Re: [Emc-users] Auxiliary axis DRO only

2022-02-25 Thread gene heskett
On Friday, February 25, 2022 9:16:05 AM EST Thaddeus Waldner wrote:
> > In that case, I'd design the probe to be held in the x axis, or
> > crossfeed if this is a lathe, with its own self contained contact
> > closer, move y by whatever increment is needed to get the y accuracy
> > you need, and use the std g38.2 probe to record the trip position.
> 
> No, it’s not a camshaft :). The profile is continuous and I want to
> avoid having to build an actual powered axis in the direction that I
> am probing. I would like a simple roller-follower attached to an
> encoder that, pretends to be an axis—not that there’s a huge
> difference between the two. Though there will need to be a way to
> engage the roller from a stored position, but that can be a manual
> job.

But thats a time sink like a black hole. I have used the G38.2 to record 
an xyz point map, on a 20 thou grid, of a P17 rifle floor plate intending 
to carve an alu replacement by using G38.2's ability to keep a log file, 
Took my CNC'd X1 mill about 3 days to do it at that high res. Which was 
not high enough to make a good replica, so that round tuit never got 
done. No way was I going to stand there turning cranks by hand, I could 
turn out the lights and let it do its thing. Check back daily till it was 
done. The folks who coded LinuxCNC have given us some pretty powerfull 
tools, so I used them.

In this case, I should have used it to make a sand mold, but in what is 
now a 20 lb rifle, the importance of that ounce saved got lost. It 
doesn't count when sitting on a stump, waiting for a deer to come down 
yonder trail that you are downwind from.

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


Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 





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


Re: [Emc-users] Auxiliary axis DRO only

2022-02-25 Thread gene heskett
On Friday, February 25, 2022 9:05:45 AM EST Thaddeus Waldner wrote:
> >> You don't need a joint at all.  You can just have an encoder
> >> channel that doesn't connect to any joint.
> 
> I will look into the halsampler solution. Can you point me to a working
> example? The end goal is indeed a point cloud. One issue that might
> make it simpler (or not!) to have an actual joint is that I have still
> not determined if the probe/wheel can work on a linear axis or if I
> need to do a trailing rotating arm so as better to roll over steep
> features without snagging.

That should not be required since G38.2 can have a starting point well  
off the work for each point probed. That initial slow motion will eat 
execution time like M&M's though. One could run an initial low res probe, 
and the results of that then used as the starting point for the hi res 
and slower probe, starting at say 50 thou out from the low res probe 
result. Some creative writing will pay off in quicker results. To stop 
probe crashes, use a start point for each probe that is the highest of 
the 3 adjacent to the current point the hi res probe is doing,

> > True, though there is something to be said for having a dummy axis
> > just so that the LinuxCNC GUI will display the encoder position.
> > 
> > You don't need a stepgen, just set up the system as normal but leave
> > joint.N.motor-pos-cmd unconnected. Connect motor-pos-fb to the
> > encoder
> > counter.
> > Then set the following error limits to several miles, and you should
> > get an onscreen readout of the probe position. (set the gui to
> > actual,
> > not commanded..)
> 
> This works with some caveats. The back plot updates to show movement of
> z position until I enable the joints. At which point it stops updating
> the back plot. The position readout does keep updating so maybe it
> will work.
> > I am not sure what the built-in parameters such as #<_Z> show in this
> > situation. I would suspect that it is commanded position but it's not
> > hard to find out.
> 
> That would be the next step..
> 
> Thanks for the help, gentlemen.
 
Take care & stay well Thaddeus.

Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 





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


Re: [Emc-users] Auxiliary axis DRO only

2022-02-25 Thread Thaddeus Waldner

> In that case, I'd design the probe to be held in the x axis, or crossfeed 
> if this is a lathe, with its own self contained contact closer, move y by 
> whatever increment is needed to get the y accuracy you need, and use the 
> std g38.2 probe to record the trip position.

No, it’s not a camshaft :). The profile is continuous and I want to avoid 
having to build an actual powered axis in the direction that I am probing. I 
would like a simple roller-follower attached to an encoder that, pretends to be 
an axis—not that there’s a huge difference between the two. Though there will 
need to be a way to engage the roller from a stored position, but that can be a 
manual job.

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


Re: [Emc-users] Auxiliary axis DRO only

2022-02-25 Thread Thaddeus Waldner


>> You don't need a joint at all.  You can just have an encoder
>> channel that doesn't connect to any joint.

I will look into the halsampler solution. Can you point me to a working 
example? The end goal is indeed a point cloud.
One issue that might make it simpler (or not!) to have an actual joint is that 
I have still not determined if the probe/wheel can work on a linear axis or if 
I need to do a trailing rotating arm so as better to roll over steep features 
without snagging.

> True, though there is something to be said for having a dummy axis
> just so that the LinuxCNC GUI will display the encoder position.
> 
> You don't need a stepgen, just set up the system as normal but leave
> joint.N.motor-pos-cmd unconnected. Connect motor-pos-fb to the encoder
> counter.
> Then set the following error limits to several miles, and you should
> get an onscreen readout of the probe position. (set the gui to actual,
> not commanded..)
This works with some caveats. The back plot updates to show movement of z 
position until I enable the joints. At which point it stops updating the back 
plot. The position readout does keep updating so maybe it will work.

> I am not sure what the built-in parameters such as #<_Z> show in this
> situation. I would suspect that it is commanded position but it's not
> hard to find out.

That would be the next step.. 

Thanks for the help, gentlemen.



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


Re: [Emc-users] Auxiliary axis DRO only

2022-02-25 Thread andy pugh
On Fri, 25 Feb 2022 at 05:12, Ralph Stirling
 wrote:
>
> You don't need a joint at all.  You can just have an encoder
> channel that doesn't connect to any joint.

True, though there is something to be said for having a dummy axis
just so that the LinuxCNC GUI will display the encoder position.

You don't need a stepgen, just set up the system as normal but leave
joint.N.motor-pos-cmd unconnected. Connect motor-pos-fb to the encoder
counter.
Then set the following error limits to several miles, and you should
get an onscreen readout of the probe position. (set the gui to actual,
not commanded..)

I am not sure what the built-in parameters such as #<_Z> show in this
situation. I would suspect that it is commanded position but it's not
hard to find out.

-- 
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] Auxiliary axis DRO only

2022-02-24 Thread gene heskett
On Thursday, February 24, 2022 11:43:45 PM EST Thaddeus Waldner wrote:
> > That is likely because motion is aware its moving, but there is no
> > feedback of a signal showing that it has moved to show motion it is
> > following orders.  I have a pair of 100 ppr dials on my sheldons
> > replacement apron, which I use to drive it since there are no cranks
> > on mine, motors having replaced the cranks.  And I just spent 20
> > mins studying my hal file to find that coupling, but that hal file
> > is now several years old, and apparently not well enough commented
> > to let me get my ancient head back into what I was thinking back
> > then. At 87, can I plead oldtimers?
> 
> I suspect you connected them as MPGs, as that would be the most logical
> thing to do. I don’t think I want MPGs because the axis need to move
> during NC moves.
> 
> Perhaps if I were more clear as to what the purpose is of this axis …
> 
> I plan to use this axis with the linuxCNC probe features to
> automatically record the profile of a surface as the Y axis moves
> across that surface. The probe will have a roller on the end, which
> will be held in contact of the surface by gravity or a spring.
> 
> At this point, I am trying to find the correct hook to feed the
> position/velocity from the encoder into the joint, as Gene suggested,
> to get rid of the following error. Do I even need the stepgen? Can I
> have a joint without a motor? Can I configure the joint to ignore the
> following error and still get good position feedback?
> 
In that case, I'd design the probe to be held in the x axis, or crossfeed 
if this is a lathe, with its own self contained contact closer, move y by 
whatever increment is needed to get the y accuracy you need, and use the 
std g38.2 probe to record the trip position.

I use the cheapest roller tipped, under a buck each by the bag, teeny 
micro-switches for homing, and normaly get .02mm or better repeat 
accuracy's from them. You'd have to write the scanning routine, logging 
the results to a file for later processing, but its something you could 
start at quitting time, turn out the lights and it may or may not be done 
by lights on the next morning. Scanning something held in the chuck or 
between centers, would not if its round, even need the spindle to be 
turning. Scanning a camshaft OTOH, would require the ability to position 
the spindle by the degree or even less, and its position would then be 
logged but then you'd only need 2 reaings per lobe since there is often a 
teeny taper to encourage a flat or mushroom faced tappet to spin and 
equalize the wear. With roller tappets that is not done because the 
tappet is pinned from rotation anyway.

For cams, note that profiles are often patented.

Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 





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


Re: [Emc-users] Auxiliary axis DRO only

2022-02-24 Thread Ralph Stirling
You don't need a joint at all.  You can just have an encoder
channel that doesn't connect to any joint.  You can then
net encoder.xx.count to your display widget.  You could also
net a button widget to encoder.xx.reset to reset the count.
If you are wanting to scan into a point cloud, you could use
halsampler to capture the x, y, z encoder or stepgen counts
and probe encoder counts to a file.

I used this method to map errors of a stepper leadscrew actuator
with a 1um linear encoder borrowed out of an ancient manual
CMM.

-- Ralph

From: Thaddeus Waldner [thadw...@gmail.com]
Sent: Thursday, February 24, 2022 8:43 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] Auxiliary axis DRO only

CAUTION: This email originated from outside the Walla Walla University email 
system.


> That is likely because motion is aware its moving, but there is no
> feedback of a signal showing that it has moved to show motion it is
> following orders.  I have a pair of 100 ppr dials on my sheldons
> replacement apron, which I use to drive it since there are no cranks on
> mine, motors having replaced the cranks.  And I just spent 20 mins
> studying my hal file to find that coupling, but that hal file is now
> several years old, and apparently not well enough commented to let me get
> my ancient head back into what I was thinking back then. At 87, can I
> plead oldtimers?

I suspect you connected them as MPGs, as that would be the most logical thing 
to do. I don’t think I want MPGs because the axis need to move during NC moves.

Perhaps if I were more clear as to what the purpose is of this axis …

I plan to use this axis with the linuxCNC probe features to automatically 
record the profile of a surface as the Y axis moves across that surface. The 
probe will have a roller on the end, which will be held in contact of the 
surface by gravity or a spring.

At this point, I am trying to find the correct hook to feed the 
position/velocity from the encoder into the joint, as Gene suggested, to get 
rid of the following error. Do I even need the stepgen? Can I have a joint 
without a motor? Can I configure the joint to ignore the following error and 
still get good position feedback?

___
Emc-users mailing list

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


Re: [Emc-users] Auxiliary axis DRO only

2022-02-24 Thread Thaddeus Waldner


> That is likely because motion is aware its moving, but there is no 
> feedback of a signal showing that it has moved to show motion it is 
> following orders.  I have a pair of 100 ppr dials on my sheldons 
> replacement apron, which I use to drive it since there are no cranks on 
> mine, motors having replaced the cranks.  And I just spent 20 mins 
> studying my hal file to find that coupling, but that hal file is now 
> several years old, and apparently not well enough commented to let me get 
> my ancient head back into what I was thinking back then. At 87, can I 
> plead oldtimers?

I suspect you connected them as MPGs, as that would be the most logical thing 
to do. I don’t think I want MPGs because the axis need to move during NC moves. 

Perhaps if I were more clear as to what the purpose is of this axis …

I plan to use this axis with the linuxCNC probe features to automatically 
record the profile of a surface as the Y axis moves across that surface. The 
probe will have a roller on the end, which will be held in contact of the 
surface by gravity or a spring.

At this point, I am trying to find the correct hook to feed the 
position/velocity from the encoder into the joint, as Gene suggested, to get 
rid of the following error. Do I even need the stepgen? Can I have a joint 
without a motor? Can I configure the joint to ignore the following error and 
still get good position feedback?

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


Re: [Emc-users] Auxiliary axis DRO only

2022-02-24 Thread gene heskett
On Thursday, February 24, 2022 6:58:51 PM EST Thaddeus Waldner wrote:
> Which components do I need to get this working? I have it set up with a
> stepgen that is set up like the other axis. When I move the encoder
> the dro and backplot display changes but I get a following error.

That is likely because motion is aware its moving, but there is no 
feedback of a signal showing that it has moved to show motion it is 
following orders.  I have a pair of 100 ppr dials on my sheldons 
replacement apron, which I use to drive it since there are no cranks on 
mine, motors having replaced the cranks.  And I just spent 20 mins 
studying my hal file to find that coupling, but that hal file is now 
several years old, and apparently not well enough commented to let me get 
my ancient head back into what I was thinking back then. At 87, can I 
plead oldtimers?

Bear in mind that halshow doesn't show pins that aren't hooked up to 
something, so read the man pages carefully to find the correct pin names 
for your setup. One way is to define a netname, and feed it a likely 
sounding pin from the manpage list of pin names which will then cause 
that pin and its behaviour to be shown in halshow or in halscope. The 
likly suspects names may end in .fb. The output of the encoder watching 
your dials should probably be tied to this .fb pin in the .hal file.

I hope this is helpfull.

I can post that .hal file if you think it might help, but its got huge 
pieces of gingerbread in it too.  That may be helpfull and it may just 
confuse. Yell if you want it.

Take care & stay healthy.

> > On Feb 24, 2022, at 2:08 PM, andy pugh  wrote:
> > 
> > On Thu, 24 Feb 2022 at 17:44, Thaddeus Waldner  
wrote:
> >> Can anyone point me to a working example of this, or maybe point out
> >> what I need to do with homing?> 
> > Set HOME_SEARCH_VELOCITY to zero and it will home to zero wherever it
> > is (ie, without attempting to move)
> > You also need to add a HOME_SEQUENCE for the dummy axis.
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 





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


Re: [Emc-users] Auxiliary axis DRO only

2022-02-24 Thread Thaddeus Waldner
Which components do I need to get this working? I have it set up with a stepgen 
that is set up like the other axis. When I move the encoder the dro and 
backplot display changes but I get a following error.

> On Feb 24, 2022, at 2:08 PM, andy pugh  wrote:
> 
> On Thu, 24 Feb 2022 at 17:44, Thaddeus Waldner  wrote:
> 
>> Can anyone point me to a working example of this, or maybe point out what I 
>> need to do with homing?
> 
> Set HOME_SEARCH_VELOCITY to zero and it will home to zero wherever it
> is (ie, without attempting to move)
> You also need to add a HOME_SEQUENCE for the dummy axis.
> 
> -- 
> 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] Auxiliary axis DRO only

2022-02-24 Thread andy pugh
On Thu, 24 Feb 2022 at 17:44, Thaddeus Waldner  wrote:

> Can anyone point me to a working example of this, or maybe point out what I 
> need to do with homing?

Set HOME_SEARCH_VELOCITY to zero and it will home to zero wherever it
is (ie, without attempting to move)
You also need to add a HOME_SEQUENCE for the dummy axis.

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