Re: [Emc-users] EMC traffic

2017-06-20 Thread Erik Christiansen
On 20.06.17 10:25, Jon Elson wrote:
> On 06/20/2017 02:50 AM, Erik Christiansen wrote:
> > Incidentally, I've found that the Postscript printer language is sorta
> > almost like gcode on steroids. Fighting with a GUI drawing package gives
> > me chest pains, without producing useful output, so I've just finished
> > drawing floorplans, elevations, sections, and started the site plan for
> > a new build, with all text input. (800 lines for 8 engineering drawings
> > for submission to the local council.)
> Don Lancaster wrote a couple books on PostScript.  One is "A PostScript
> Cookbook".  Maybe the other was actually a series of magazine articles,
> "PostScript as a programming language".  Very useful stuff to know.

The only dead-tree book I have is "Postscript Language reference, third
edition." Much good info came from BLUEBOOK.PDF, found on the
intertubes. This is my first foray into Postscript, so a steep learning
curve. Rewarding though, because each lesson learned amplifies the
horsepower applied to the next challenge. Making e.g. a simple double
glazed window function, taking length & wall thickness arguments, meant I
only ever had to think once how to draw a window. Adding a "flip"
allowed the dimension text, also taken from the arguments, to be always
the right way up.

> I do some mechanical drawings in my PC board design package. Mostly, because
> I know it very well.

I'm beginning to see why you would. I computed truss length as wall
length (computed from wall segments + window lengths) + eave + porch,
and used that in the corresponding cross-section. When I changed one of
the components in the floorplan, the truss niftily redrew itself to the
new dimensions, but left the veranda posts behind - because I'd not used
the variables to fix their position. Manual drawing would not have found
that error for me.

One thing I didn't find in the books was how to set a variable to a
computed value - all the examples were just setting it to a constant.
A little bit of experimentation revealed that an exch did the trick.
(I'm still not clear on precisely what that's doing inside Postscript.)

Erik

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Tom Easterday
Well, it has been homed and is searching for index when it faults with the 
following errorbut it isn't homed as I have just killed and restarted 
Linuxcnc.  I then move the Z axis down a little bit and then Home All...
-Tom

> On Jun 20, 2017, at 7:54 PM, Peter C. Wallace  wrote:
> 
> This looks like it has been homed before (no large step in encoder position 
> at index)
> Peter Wallace


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Peter C. Wallace

On Tue, 20 Jun 2017, tom-...@bgp.nu wrote:


Date: Tue, 20 Jun 2017 19:52:13 -0400
From: tom-...@bgp.nu
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] following error only while homing

Here is more zoom fwiw??. http://bgp.nu/~tom/pub/enc-6.png

-Tom


This looks like it has been homed before (no large step in encoder position at 
index)




Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread tom-emc
Here is more zoom fwiw…. http://bgp.nu/~tom/pub/enc-6.png
-Tom


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread tom-emc
Is this what you want…?
http://bgp.nu/~tom/pub/enc-5.png
And the log file is...
http://bgp.nu/~tom/pub/enc-5.log

-Tom


> On Jun 20, 2017, at 5:34 PM, Sebastian Kuzminsky  wrote:
> 
> On 06/20/2017 01:31 PM, tom-...@bgp.nu wrote:
>> The Halscope trace of:  hm2_7i43.0.stepgen.02.position-cmd,
>> hm2_7i43.0.encoder.02.position,  hm2_7i43.0.encoder.02.index-enable,
>> axis.2.home-sw-in with trigger of axis.2.f-errored can be seen here:
>> http://bgp.nu/~tom/pub/enc2.png
> 
> Wel that looks fine.  And my reading of the homing code tells me the 
> theory i had (about the jump in the encoder position) is wrong.  I now think 
> it's perfectly normal for the .motor-pos-fb pin to jump during homing, and 
> the homing logic in Motion compensates for it by changing the internal home 
> offset at the same time.
> 
> Can you show us a plot like that one, but with axis.2.f-error instead of 
> .f-errored, add the axis.2.joint-pos-cmd, .joint-pos-fb, and .motor-offset 
> pins, and then zoom in on the f-error event?
> 
> Also increase the gain so we can see the fine detail on all the 
> position-releated pins (both cmd and fb).
> 
> Thanks...
> 
> 
> -- 
> Sebastian Kuzminsky
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread andy pugh
On 20 June 2017 at 22:34, Sebastian Kuzminsky  wrote:

> Also increase the gain so we can see the fine detail on all the
> position-releated pins (both cmd and fb).


I was going to suggest saving the data as a .log file from Halscope, so
that people can zoom and inspect for themselves, but I can't figure out how
to open a data file.

-- 
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, 1916
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Sebastian Kuzminsky

On 06/20/2017 01:31 PM, tom-...@bgp.nu wrote:

The Halscope trace of:  hm2_7i43.0.stepgen.02.position-cmd,
hm2_7i43.0.encoder.02.position,  hm2_7i43.0.encoder.02.index-enable,
axis.2.home-sw-in with trigger of axis.2.f-errored can be seen here:
http://bgp.nu/~tom/pub/enc2.png


Wel that looks fine.  And my reading of the homing code tells me the 
theory i had (about the jump in the encoder position) is wrong.  I now 
think it's perfectly normal for the .motor-pos-fb pin to jump during 
homing, and the homing logic in Motion compensates for it by changing 
the internal home offset at the same time.


Can you show us a plot like that one, but with axis.2.f-error instead of 
.f-errored, add the axis.2.joint-pos-cmd, .joint-pos-fb, and 
.motor-offset pins, and then zoom in on the f-error event?


Also increase the gain so we can see the fine detail on all the 
position-releated pins (both cmd and fb).


Thanks...


--
Sebastian Kuzminsky

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread tom-emc
Yes, when I re-enable the machine (with or without estop first) I get another 
(immediate) following error.  That is, I understand to make the notification 
itself go away I click the X, but what I am seeing is a perpetual following 
error when re-enabling with each new notification piling up on the lower right 
of Axis display.
-Tom


> On Jun 20, 2017, at 4:03 PM, Todd Zuercher  wrote:
> 
> What is strange is that pressing Machine (F2) does not clear the alarm. (That 
> won't close the alarm notification window, you have to click the X on that 
> window to make it go away.)
> 
> - Original Message -
> From: tom-...@bgp.nu
> To: "Enhanced Machine Controller (EMC)" 
> Sent: Tuesday, June 20, 2017 3:31:42 PM
> Subject: Re: [Emc-users] following error only while homing
> 
> You guys are prolific, and I appreciate it!  Thanks for all the input.
> 
> A few things in case it hasn’t been clear...
> 
> 1)  I don’t (currently) have a PID involved at all (position-mode steppers 
> with encoders only).
> 2)  If I set FERROR=2 and MIN_FERROR=1, homing DOES complete successfully.
> 2) Pressing estop after the following error, and then trying to turn Linuxcnc 
> back on from there does NOT help, the error persists.  Only exiting and 
> restarting Linuxcnc clears it.
> 
> The Halscope trace of:  hm2_7i43.0.stepgen.02.position-cmd,  
> hm2_7i43.0.encoder.02.position,  hm2_7i43.0.encoder.02.index-enable,  
> axis.2.home-sw-in with trigger of axis.2.f-errored can be seen here:
> http://bgp.nu/~tom/pub/enc2.png
> 
> I’m happy to help debug a (even obscure) bug if you want, but it sounds like 
> I’d be better off using velocity mode and PID ANYWAY, and so should probably 
> do that instead of what I have.  To wit...
> 
>> On Jun 20, 2017, at 2:04 PM, Sebastian Kuzminsky  wrote:
>> I just pushed a totally untested experimental branch named 
>> "2.7-hm2-encoder-raw-position", try building that, keep home-to-index, link 
>> the new .raw-position pin to axis.*.motor-pos-fb and let us know how that 
>> works.
> 
> If you DO want me to test this, please remind me how I go about 
> getting/building/running it.  It has been a while since I have grabbed 
> branches.  This machine runs from the standard release model, so I assume I 
> will need to incant git (all of which I tend to forget within a week of using 
> it for some reason)…
> 
> -Tom
> 
> 
>> On Jun 20, 2017, at 2:19 PM, andy pugh  wrote:
>> 
>> On 20 June 2017 at 18:47, Sebastian Kuzminsky  wrote:
>> 
>>> It looks like it'd be easy to add a ".raw-position" pin to the hostmot2
>>> encoder.
>> 
>> 
>> Does homing use the accumulated counts in the counter after index as part
>> of the homing offset? It feels like it should.
>> If it does, then this might not work.
>> 
>> 
>> -- 
>> 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, 1916
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7i47S issue

2017-06-20 Thread Peter C. Wallace

On Tue, 20 Jun 2017, Andrew wrote:


Date: Tue, 20 Jun 2017 22:33:43 +0300
From: Andrew 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Mesa 7i47S issue

2017-06-17 20:15 GMT+03:00 Andrew:


2017-06-17 18:34 GMT+03:00 Danny Miller:


Similarly the inputs aren't true differential, they're an optoisolator's
input diode with a series resistor to produce the rated trigger current
when +5v is applied + to -.  Due to some esoteric details in how the bus
switch drive output works, these work best if you tie the + to +5v and use
the pin to drive the - to gnd.  The signal is weaker if you do it the other
way.



Thanks for the tip!
I was going to try the weaker way.
If there's a series resistor, it's safe to drive full 5V between /RX and
RX.
7i47s has GND and 5V pins near RX terminals, pretty handy to connect
either way.

Well today I spent a couple of hours trying to get that alarm signal to

7i47s
This was my basic idea
[image: ??  1]
This connection IIRC caused flickering LED (with termination jumper off).
I tried replacing RX and /RX wires, still nothing.

It doesn't look like there's an optocoupler input between RX and /RX...

Also I tried experimenting with RX0 input and I think something's got
broken, because now I can turn it on/off with termination jumper
left/right. Other inputs doesn't work like this.


This is not unexpected, the card is probably fine

The 7I47S has differential inputs, They are not designed to interface with 
single ended signals but can if needed.


The only way the inputs will work reliably is to have a positive differential 
voltage across the inputs in one case and a negative differential voltage in 
the other case.


If you have single ended say 5V signals you wish to read what you can do is 
this:


Make a low impedance voltage reference of 2.5V with 2 series 100 Ohm 
resistors from the 7I47S 5V pins.


Connect this 2.5V reference to the inverted input pin of all the 7I47S inputs
you wish to use, then connect your 5V single ended signals to the non-inverted 
inputs. Now when you input signal is 5V the input pair see +2.5V and when 
input signal is 0V, The input pair see -2.5V


(this will only work with termination off)




Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Todd Zuercher
What is strange is that pressing Machine (F2) does not clear the alarm. (That 
won't close the alarm notification window, you have to click the X on that 
window to make it go away.)

- Original Message -
From: tom-...@bgp.nu
To: "Enhanced Machine Controller (EMC)" 
Sent: Tuesday, June 20, 2017 3:31:42 PM
Subject: Re: [Emc-users] following error only while homing

You guys are prolific, and I appreciate it!  Thanks for all the input.

A few things in case it hasn’t been clear...

1)  I don’t (currently) have a PID involved at all (position-mode steppers with 
encoders only).
2)  If I set FERROR=2 and MIN_FERROR=1, homing DOES complete successfully.
2) Pressing estop after the following error, and then trying to turn Linuxcnc 
back on from there does NOT help, the error persists.  Only exiting and 
restarting Linuxcnc clears it.

The Halscope trace of:  hm2_7i43.0.stepgen.02.position-cmd,  
hm2_7i43.0.encoder.02.position,  hm2_7i43.0.encoder.02.index-enable,  
axis.2.home-sw-in with trigger of axis.2.f-errored can be seen here:
http://bgp.nu/~tom/pub/enc2.png

I’m happy to help debug a (even obscure) bug if you want, but it sounds like 
I’d be better off using velocity mode and PID ANYWAY, and so should probably do 
that instead of what I have.  To wit...

> On Jun 20, 2017, at 2:04 PM, Sebastian Kuzminsky  wrote:
> I just pushed a totally untested experimental branch named 
> "2.7-hm2-encoder-raw-position", try building that, keep home-to-index, link 
> the new .raw-position pin to axis.*.motor-pos-fb and let us know how that 
> works.

If you DO want me to test this, please remind me how I go about 
getting/building/running it.  It has been a while since I have grabbed 
branches.  This machine runs from the standard release model, so I assume I 
will need to incant git (all of which I tend to forget within a week of using 
it for some reason)…

-Tom


> On Jun 20, 2017, at 2:19 PM, andy pugh  wrote:
> 
> On 20 June 2017 at 18:47, Sebastian Kuzminsky  wrote:
> 
>> It looks like it'd be easy to add a ".raw-position" pin to the hostmot2
>> encoder.
> 
> 
> Does homing use the accumulated counts in the counter after index as part
> of the homing offset? It feels like it should.
> If it does, then this might not work.
> 
> 
> -- 
> 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, 1916
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7i47S issue

2017-06-20 Thread Andrew
2017-06-17 20:15 GMT+03:00 Andrew:

> 2017-06-17 18:34 GMT+03:00 Danny Miller:
>
>> Similarly the inputs aren't true differential, they're an optoisolator's
>> input diode with a series resistor to produce the rated trigger current
>> when +5v is applied + to -.  Due to some esoteric details in how the bus
>> switch drive output works, these work best if you tie the + to +5v and use
>> the pin to drive the - to gnd.  The signal is weaker if you do it the other
>> way.
>
>
> Thanks for the tip!
> I was going to try the weaker way.
> If there's a series resistor, it's safe to drive full 5V between /RX and
> RX.
> 7i47s has GND and 5V pins near RX terminals, pretty handy to connect
> either way.
>
> Well today I spent a couple of hours trying to get that alarm signal to
7i47s
This was my basic idea
[image: Вбудоване зображення 1]
This connection IIRC caused flickering LED (with termination jumper off).
I tried replacing RX and /RX wires, still nothing.

It doesn't look like there's an optocoupler input between RX and /RX...

Also I tried experimenting with RX0 input and I think something's got
broken, because now I can turn it on/off with termination jumper
left/right. Other inputs doesn't work like this.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread tom-emc
You guys are prolific, and I appreciate it!  Thanks for all the input.

A few things in case it hasn’t been clear...

1)  I don’t (currently) have a PID involved at all (position-mode steppers with 
encoders only).
2)  If I set FERROR=2 and MIN_FERROR=1, homing DOES complete successfully.
2) Pressing estop after the following error, and then trying to turn Linuxcnc 
back on from there does NOT help, the error persists.  Only exiting and 
restarting Linuxcnc clears it.

The Halscope trace of:  hm2_7i43.0.stepgen.02.position-cmd,  
hm2_7i43.0.encoder.02.position,  hm2_7i43.0.encoder.02.index-enable,  
axis.2.home-sw-in with trigger of axis.2.f-errored can be seen here:
http://bgp.nu/~tom/pub/enc2.png

I’m happy to help debug a (even obscure) bug if you want, but it sounds like 
I’d be better off using velocity mode and PID ANYWAY, and so should probably do 
that instead of what I have.  To wit...

> On Jun 20, 2017, at 2:04 PM, Sebastian Kuzminsky  wrote:
> I just pushed a totally untested experimental branch named 
> "2.7-hm2-encoder-raw-position", try building that, keep home-to-index, link 
> the new .raw-position pin to axis.*.motor-pos-fb and let us know how that 
> works.

If you DO want me to test this, please remind me how I go about 
getting/building/running it.  It has been a while since I have grabbed 
branches.  This machine runs from the standard release model, so I assume I 
will need to incant git (all of which I tend to forget within a week of using 
it for some reason)…

-Tom


> On Jun 20, 2017, at 2:19 PM, andy pugh  wrote:
> 
> On 20 June 2017 at 18:47, Sebastian Kuzminsky  wrote:
> 
>> It looks like it'd be easy to add a ".raw-position" pin to the hostmot2
>> encoder.
> 
> 
> Does homing use the accumulated counts in the counter after index as part
> of the homing offset? It feels like it should.
> If it does, then this might not work.
> 
> 
> -- 
> 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, 1916
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread andy pugh
On 20 June 2017 at 18:47, Sebastian Kuzminsky  wrote:

> It looks like it'd be easy to add a ".raw-position" pin to the hostmot2
> encoder.


Does homing use the accumulated counts in the counter after index as part
of the homing offset? It feels like it should.
If it does, then this might not work.


-- 
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, 1916
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread andy pugh
On 20 June 2017 at 18:47, Sebastian Kuzminsky  wrote:

> It looks like it'd be easy to add a ".raw-position" pin to the hostmot2
> encoder.  We already track .rawcount and compute .count from it, and
> compute .position from .count.


If that is the answer then rawcounts * scale => feedback might be the
answer. With annoying type-conversions.

-- 
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, 1916
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Sebastian Kuzminsky

On 06/20/2017 11:47 AM, Sebastian Kuzminsky wrote:

On 06/20/2017 11:39 AM, Sebastian Kuzminsky wrote:

On 06/20/2017 11:34 AM, Sebastian Kuzminsky wrote:

On 06/20/2017 10:51 AM, andy pugh wrote:

On 20 June 2017 at 17:37, Peter C. Wallace  wrote:


I suspect this cannot work the way you have this setup because of the
instantaneous jump in encoder (feedback) position at index


He has hooked up axis.*.motor-pos-cmd to the stepgens' .position-cmd,
and motor-pos-cmd does not jump on home.  His stepgens will see a smooth
curve on their .position-cmd inputs even through all stages of homing.

axis.*.joint-pos-cmd includes the homing offset (and a bunch of other
offsets), so it has that discontinuity, so it's good he's not using
that.



I wonder if the answer might be to only connect the encoder once homed?

ie, use a mux2 to to connect motor-pos-fb to motor-pos-cmd until
homed, and
only then switch it to the encoder.


That should not be needed.

Our shopbot has a similar setup, and it homes fine every time.  It has a
Mesa FPGA, position-mode steppers, and encoder position feedback.  It
homes to switches, but not to index.


Never mind, I misread what you guys are talking about.  I think Peter
and Andy are right, the encoder's feedback jumps, even though the
position command does not.

Home to switch, not to index, and it should work fine.


It looks like it'd be easy to add a ".raw-position" pin to the hostmot2
encoder.  We already track .rawcount and compute .count from it, and
compute .position from .count.


I just pushed a totally untested experimental branch named 
"2.7-hm2-encoder-raw-position", try building that, keep home-to-index, 
link the new .raw-position pin to axis.*.motor-pos-fb and let us know 
how that works.



--
Sebastian Kuzminsky

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Sebastian Kuzminsky

On 06/20/2017 11:39 AM, Sebastian Kuzminsky wrote:

On 06/20/2017 11:34 AM, Sebastian Kuzminsky wrote:

On 06/20/2017 10:51 AM, andy pugh wrote:

On 20 June 2017 at 17:37, Peter C. Wallace  wrote:


I suspect this cannot work the way you have this setup because of the
instantaneous jump in encoder (feedback) position at index


He has hooked up axis.*.motor-pos-cmd to the stepgens' .position-cmd,
and motor-pos-cmd does not jump on home.  His stepgens will see a smooth
curve on their .position-cmd inputs even through all stages of homing.

axis.*.joint-pos-cmd includes the homing offset (and a bunch of other
offsets), so it has that discontinuity, so it's good he's not using that.



I wonder if the answer might be to only connect the encoder once homed?

ie, use a mux2 to to connect motor-pos-fb to motor-pos-cmd until
homed, and
only then switch it to the encoder.


That should not be needed.

Our shopbot has a similar setup, and it homes fine every time.  It has a
Mesa FPGA, position-mode steppers, and encoder position feedback.  It
homes to switches, but not to index.


Never mind, I misread what you guys are talking about.  I think Peter
and Andy are right, the encoder's feedback jumps, even though the
position command does not.

Home to switch, not to index, and it should work fine.


It looks like it'd be easy to add a ".raw-position" pin to the hostmot2 
encoder.  We already track .rawcount and compute .count from it, and 
compute .position from .count.



--
Sebastian Kuzminsky

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Sebastian Kuzminsky

On 06/20/2017 11:34 AM, Sebastian Kuzminsky wrote:

On 06/20/2017 10:51 AM, andy pugh wrote:

On 20 June 2017 at 17:37, Peter C. Wallace  wrote:


I suspect this cannot work the way you have this setup because of the
instantaneous jump in encoder (feedback) position at index


He has hooked up axis.*.motor-pos-cmd to the stepgens' .position-cmd,
and motor-pos-cmd does not jump on home.  His stepgens will see a smooth
curve on their .position-cmd inputs even through all stages of homing.

axis.*.joint-pos-cmd includes the homing offset (and a bunch of other
offsets), so it has that discontinuity, so it's good he's not using that.



I wonder if the answer might be to only connect the encoder once homed?

ie, use a mux2 to to connect motor-pos-fb to motor-pos-cmd until
homed, and
only then switch it to the encoder.


That should not be needed.

Our shopbot has a similar setup, and it homes fine every time.  It has a
Mesa FPGA, position-mode steppers, and encoder position feedback.  It
homes to switches, but not to index.


Never mind, I misread what you guys are talking about.  I think Peter 
and Andy are right, the encoder's feedback jumps, even though the 
position command does not.


Home to switch, not to index, and it should work fine.


--
Sebastian Kuzminsky

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Sebastian Kuzminsky

On 06/20/2017 10:51 AM, andy pugh wrote:

On 20 June 2017 at 17:37, Peter C. Wallace  wrote:


I suspect this cannot work the way you have this setup because of the
instantaneous jump in encoder (feedback) position at index


He has hooked up axis.*.motor-pos-cmd to the stepgens' .position-cmd, 
and motor-pos-cmd does not jump on home.  His stepgens will see a smooth 
curve on their .position-cmd inputs even through all stages of homing.


axis.*.joint-pos-cmd includes the homing offset (and a bunch of other 
offsets), so it has that discontinuity, so it's good he's not using that.




I wonder if the answer might be to only connect the encoder once homed?

ie, use a mux2 to to connect motor-pos-fb to motor-pos-cmd until homed, and
only then switch it to the encoder.


That should not be needed.

Our shopbot has a similar setup, and it homes fine every time.  It has a 
Mesa FPGA, position-mode steppers, and encoder position feedback.  It 
homes to switches, but not to index.



The ini settings for all joints are of this form:

HOME = 0.000
HOME_OFFSET = -0.260
HOME_SEARCH_VEL = -2.0
HOME_LATCH_VEL = 0.250
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_IS_SHARED = 0


The HAL wiring looks like this:

net x-encoder-pos <= hm2_5i23.0.encoder.01.position
net x-encoder-pos => axis.0.motor-pos-fb

net x-pos-cmd <= axis.0.motor-pos-cmd
net x-pos-cmd => hm2_5i23.0.stepgen.01.position-cmd


Pretty straight forward.

I still want to see the halscope trace.

It might be worth trying (just for debugging purposes) homing to the 
home switch, not the index, since that's the config that works for me. 
If home-to-index is broken we should fix it, and doing that test will 
help tell us if that's the case.


I have a vague memory that there's a fairly long pause at some stage in 
the homing state machine.  I wonder if it was during index homing?  And 
if so, if that's maybe related to this problem?  A halscope trace might 
show us.



--
Sebastian Kuzminsky

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread andy pugh
On 20 June 2017 at 17:37, Peter C. Wallace  wrote:

> I suspect this cannot work the way you have this setup because of the
> instantaneous jump in encoder (feedback) position at index


I wonder if the answer might be to only connect the encoder once homed?

ie, use a mux2 to to connect motor-pos-fb to motor-pos-cmd until homed, and
only then switch it to the encoder.

-- 
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, 1916
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Peter C. Wallace

On Mon, 19 Jun 2017, tom-...@bgp.nu wrote:

Date: Mon, 19 Jun 2017 22:51:59 -0400 From: tom-...@bgp.nu Reply-To: 
"Enhanced Machine Controller (EMC)"
 To: "Enhanced Machine Controller 
(EMC)"  Subject: [Emc-users] following 
error only while homing


Why would I get a following error only while homing (latest Linuxcnc 2.7.9)? 
I recently added home switches to my machine.  My machine has encoders on 
the steppers on each of the 3 axes so I want to use the index pulse for 
home.  I set up the homing sequence each axis and when I do "Home All" I get 
a following error on my Z axis (first one to home).  I played with all the 
settings and can??t get it to complete unless I set ferror and min_ferror 
very high Also, once there is a following error I can only clear it by 
exiting Linuxcnc and restarting it.  If I just turn it back on, it 
immediately faults again with the same following error.  If I don??t home, 
after restarting Linuxcnc, I can run the Z axis (and X and Y) all day at any 
speed without a following error.


I have tried setting the ferror and min_ferror settings to various reasonable 
values but it didn??t work.  Before adding the switches I had error=0.001 and 
min_ferror=0.0005 and never had a following error appear.  I set ferror to 2 
and min_ferror to 1 (I think those were the values) and it worked but then got 
the following error on the Y axis (the second axis homed).  The values for 
ferror and min_ferror that ??worked?? seem completely unreasonable given I am 
not even moving anywhere near my max velocity during homing.


I have tried changing the sign on the HOME_LATCH_VEL to make it search for 
index in the other direction but the same thing happens.  Below are my 
(current) machine hal and ini.



-Tom



I suspect this cannot work the way you have this setup because of the 
instantaneous jump in encoder (feedback) position at index (and 
cooresponding jump in commanded position) cannot be followed by the

stepgen in position mode. It only happens once because index will not
cause a feedback position jump a second time since its already at 0

One way to make this work is do as others have siggested and run the stepgen 
in velocity mode and run a standard servo velocity PID loop


This has the advantage the you are actually using the encoder feedback
for control rather than just monitoring following error

Peter Wallace
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Gene Heskett
On Tuesday 20 June 2017 10:03:42 Tom Easterday wrote:

> Is there a parameter I can tweak after it happens in order to clear
> the fault (e.g. can I clear the ferror value) ?  I can then try to
> home again...
>
I've no clue if this would apply to your case or not, Tom.  The mpja dial 
encoders I use for jogging in lieu of manual cranks on this new to me 
Sheldon lathe, are inputting thru a std mesa card encoder, and when the 
jog timeout is finished, 5 seconds after the last "click", I found it 
was needed to hold the encoder on the mesa card in reset, so the next 
time I push the button, to adjust the per step movement or to use it as 
a jog wheel at the last gain setting, the motion induced effectively 
starts at zero = whereever the dial was at when I enabled it.  If I want 
to make a calibrated motion, I set the dial to zero before I push the 
button to enable it, then I can just dial in the motion I need. Wait for 
the 5 second timeout and touch it off at the new position.

But I don't think this is a solution to your problem.

In your case, since zeroing the encoder would move the machine, I believe 
I would AND the home switch input with the index before I sent the home 
switch signal to the motion modules input. And because the index is 
relatively narrow, a slower search velocity might be needed.

That way, motion would be snapshoting the encoders status at the index, 
not on the home switch, but on the next index pulse after the home 
switch activated.  It seems to me that would get rid of a following 
error.  Be sure you debounce the home switch just enough for 
consistency.  And that the home switch is far enough away from any 
mechanical travel stops by a full turn of the motor, and is setup that 
the potentially full turn of the screw, the extra travel needed to find 
the index, will not damage the home switch.  And of course advise the 
list if this latter idea solves the problem.

This advice comes with no warranty of course. :)

> > On Jun 20, 2017, at 9:49 AM, Tom Easterday  wrote:
> >
> > Todd, the ini and hal config were in the first post
> >
> >> On Jun 20, 2017, at 9:21 AM, Todd Zuercher
> >>  wrote:
> >>
> >> I just checked my config on my step/dir servo machine, and it is
> >> homing to index on 2 of the axis.  It is not having and problems. 
> >> Maybe you have a configuration problem. Could you post a copy of
> >> your ini and hal file somewhere where we could check it over.
> >>
> >> - Original Message -
> >> From: "Tom Easterday" 
> >> To: "Enhanced Machine Controller (EMC)"
> >>  Sent: Tuesday, June 20, 2017
> >> 9:00:22 AM
> >> Subject: Re: [Emc-users] following error only while homing
> >>
> >> Andy, you are correct it is related to using index.  Homing works
> >> fine if I don't use index.  The encoder reset makes sense as to why
> >> it CAN happen (but shouldn't be).  Is this just a bug?  I would try
> >> to home a second time but as Todd says, I can't clear the error. 
> >> Linuxcnc shuts off when it happens and pressing on just immediately
> >> faults again.  I have to exit and restart it.
> >>
> >> -Tom
> >>
> >>> On Jun 20, 2017, at 8:13 AM, Todd Zuercher
> >>>  wrote:
> >>>
> >>>
> >>> - Original Message -
> >>>
>  From: "andy pugh" 
>  To: "Enhanced Machine Controller (EMC)"
>   Sent: Tuesday, June 20, 2017
>  4:27:46 AM
>  Subject: Re: [Emc-users] following error only while homing
> 
> > On 20 June 2017 at 03:51,  wrote:
> >
> > Why would I get a following error only while homing
> 
>  I think it is probably because you are using HOME_USE_INDEX
>  (which will
>  zero the encoder at the index pulse) and feeding the encoder
>  feedback back
>  into LinuxCNC.
> 
>  Now, this is perfectly normal, and with a servo / pid machine the
>  system
>  knows to ignore the f-error immediately after an encoder reset.
>  What is
>  puzzling me here is why it isn't working in this case. I think it
>  is something to do with the fact that your system is set up for
>  open-loop step
>  position control but has encoder feedback. However I can't
>  immediately see
>  why this makes a difference.
> 
>  I imagine that if you press the home button again it will home Z
>  seamlessly, and then f-error homing the next axis.
> 
> 
>  --
>  atp
> >>>
> >>> Andy,
> >>>
> >>> I wish that were true.  For some reason my analog servo machine
> >>> trips up and sets a following error on an axis about 25% of the
> >>> time when trying to home to index for the first time after turning
> >>> on LInuxcnc. (Almost every time since it is a 4 axis machine.) 
> >>> But the alarm is easily cleared, and it always homes fine the 2nd
> >>> try.  I have never been able to figure out why, and no one else
> >>> seems to have been able to replicate the problem.
> >>>
> >>> His problem sounds different since he says can't clear the alarm.
> >>>
> >>> My other machine 

Re: [Emc-users] Emc-users Digest, Vol 134, Issue 49

2017-06-20 Thread John Freeborg
Does anyone know why the "daily" digest feature never works correctly?

e.g.  Its 9:30am CDT and I've gotten 4 emails from emc-users already (each with 
about 4-6 messages in them).



-Original Message-
From: emc-users-requ...@lists.sourceforge.net 
[mailto:emc-users-requ...@lists.sourceforge.net] 
Sent: Monday, June 19, 2017 8:51 PM
To: emc-users@lists.sourceforge.net
Subject: Emc-users Digest, Vol 134, Issue 49

Send Emc-users mailing list submissions to
emc-users@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/emc-users
or, via email, send a message with subject or body 'help' to
emc-users-requ...@lists.sourceforge.net

You can reach the person managing the list at
emc-users-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Emc-users digest..."


Today's Topics:

   1. EMC traffic (hubert)
   2. Re: EMC traffic (Kurt Jacobson)
   3. Re: EMC traffic (Bertho Stultiens)
   4. Re: EMC traffic (David Berndt)
   5. Things are quiet (jim)
   6. Re: Things are quiet (Stuart Stevenson)
   7. Re: Things are quiet (jim)


--

Message: 1
Date: Mon, 19 Jun 2017 16:42:24 -0500
From: hubert 
To: emc-users@lists.sourceforge.net
Subject: [Emc-users] EMC traffic
Message-ID: <805b6842-af3a-ca23-b366-c57484646...@hbahr.org>
Content-Type: text/plain; charset=windows-1252; format=flowed

Just checking, It seems unusual not to have any posts in this long a period.  
My last received post was 6/17/17, 12:27 PM



--

Message: 2
Date: Mon, 19 Jun 2017 17:51:35 -0400
From: Kurt Jacobson 
To: "Enhanced Machine Controller (EMC)"

Subject: Re: [Emc-users] EMC traffic
Message-ID:

Content-Type: text/plain; charset="UTF-8"

I was thinking the same thing. It's very unusual for this list to be so
quiet.

Kurt Jacobson
505-303-1933
Sent from Mobile

On Jun 19, 2017 5:47 PM, "hubert"  wrote:

> Just checking, It seems unusual not to have any posts in this long a
> period.  My last received post was 6/17/17, 12:27 PM
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


--

Message: 3
Date: Mon, 19 Jun 2017 23:52:06 +0200
From: Bertho Stultiens 
To: "Enhanced Machine Controller (EMC)"

Subject: Re: [Emc-users] EMC traffic
Message-ID: <0d044d0e-3235-c6a4-72c7-0715aeaf7...@vagrearg.org>
Content-Type: text/plain; charset=windows-1252

On 06/19/2017 11:42 PM, hubert wrote:
> Just checking, It seems unusual not to have any posts in this long a
> period.  My last received post was 6/17/17, 12:27 PM

Seems right... No news is good news ;-)


-- 
Greetings Bertho

(disclaimers are disclaimed)



--

Message: 4
Date: Mon, 19 Jun 2017 17:57:29 -0400
From: "David Berndt" 
To: emc-users@lists.sourceforge.net, hubert 
Subject: Re: [Emc-users] EMC traffic
Message-ID: 
Content-Type: text/plain; charset=iso-8859-15; format=flowed;
delsp=yes

Everyone gave up and moved to machinekit...


On Mon, 19 Jun 2017 17:42:24 -0400, hubert  wrote:

> Just checking, It seems unusual not to have any posts in this long a  
> period.  My last received post was 6/17/17, 12:27 PM
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 
Using Opera's mail client: http://www.opera.com/mail/



--

Message: 5
Date: Mon, 19 Jun 2017 20:24:26 -0400
From: jim 
To: "Enhanced Machine Controller (EMC)"

Subject: [Emc-users] Things are quiet
Message-ID: 
Content-Type: text/plain; charset=utf-8; format=flowed

I need my machine to move On a 10 degree line using the  x y axis .

I see g codes for this on other systems .

Can Linuxcnc do this?

Thank you,

Jim




--

Message: 6
Date: Mon, 19 Jun 2017 20:18:29 -0500
From: Stuart Stevenson 
To: "Enhanced Machine Controller (EMC)"

Subject: Re: [Emc-users] Things are quiet
Message-ID:

Content-Type: text/plain; charset="UTF-8"

Yes, it will probably use the same g code you see for other systems

Which 10 degree angle do you want?


On Jun 19, 2017 7:29 PM, "jim"  wrote:

> I need my machine to move On a 10 degree line using the  x y axis .
>
> I 

Re: [Emc-users] following error only while homing

2017-06-20 Thread Jon Elson

On 06/20/2017 09:52 AM, Chris Radek wrote:

On Tue, Jun 20, 2017 at 09:27:46AM +0100, andy pugh wrote:

Now, this is perfectly normal, and with a servo / pid machine the system
knows to ignore the f-error immediately after an encoder reset. What is
puzzling me here is why it isn't working in this case. I think it is

pid's index-enables need to be added to the index-enable nets.


Well, that certainly will do it!  To explain, index-enable 
is a very funny signal, unlike almost anything else in HAL.
On both the encoder and joint, these are bi-directional 
pins.  When homing or preparing to synch to the spindle, the 
scheme is as follows:


joint sets index-enable to 1
encoder sees index-enable as 1 and enables the encoder 
counter to be zeroed when the index pulse is detected
the encoder component also clears index-enable on that servo 
cycle
joint detects index-enable has been cleared, and ends the 
homing cycle.


So, it is obvious PID also needs to know that on a 
particular servo cycle, the encoder position has made a 
jump, but should not report an error or produce a large PID 
output based on that.  This suppresses errors, but ONLY for 
one servo cycle.


Jon

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Sebastian Kuzminsky

On 06/19/2017 08:51 PM, tom-...@bgp.nu wrote:

Why would I get a following error only while homing (latest Linuxcnc
2.7.9)?  I recently added home switches to my machine.  My machine
has encoders on the steppers on each of the 3 axes so I want to use
the index pulse for home.  I set up the homing sequence each axis
and when I do "Home All" I get a following error on my Z axis (first
one to home).  I played with all the settings and can’t get it to
complete unless I set ferror and min_ferror very high  Also, once
there is a following error I can only clear it by exiting Linuxcnc
and restarting it.  If I just turn it back on, it immediately faults
again with the same following error.  If I don’t home, after
restarting Linuxcnc, I can run the Z axis (and X and Y) all day at
any speed without a following error.

I have tried setting the ferror and min_ferror settings to various
reasonable values but it didn’t work.   Before adding the switches I
had error=0.001 and min_ferror=0.0005 and never had a following error
appear.  I set ferror to 2 and min_ferror to 1 (I think those were
the values) and it worked but then got the following error on the Y
axis (the second axis homed).  The values for ferror and min_ferror
that “worked” seem completely unreasonable given I am not even moving
anywhere near my max velocity during homing.

I have tried changing the sign on the HOME_LATCH_VEL to make it
search for index in the other direction but the same thing happens.
Below are my (current) machine hal and ini.


Your ini and hal file look right, except that in the hal file all 
stepgens get their .maxvel and .maxaccel from [AXIS_0].  But all your 
[AXIS_*]MAXVEL and MAXACCEL have the same value, so it doesn't affect 
behavior in any way.


I agree with Jon Elson, the next step in debugging this should be to get 
a halscope trace of Z homing and f-erroring, while looking at these pins:


hm2_7i43.0.stepgen.02.position-cmd
hm2_7i43.0.encoder.02.position
hm2_7i43.0.encoder.02.index-enable
axis.2.home-sw-in

Trigger on rising signal on axis.2.f-errored.


--
Sebastian Kuzminsky

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Jon Elson

On 06/20/2017 09:03 AM, Tom Easterday wrote:

Is there a parameter I can tweak after it happens in order to clear the fault 
(e.g. can I clear the ferror value) ?  I can then try to home again...

PID error should be recomputed every servo cycle.  If PID 
error remains at a large value, then it means that the 
commanded position is not being reset to the actual position 
when not in machine-on state.  Whenever you leave the 
machine-on state (following error, F2 or F1) then the 
commanded position should be reset to equal actual position, 
and that should cause PID error to become zero.


Jon

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Jon Elson

On 06/20/2017 08:00 AM, Tom Easterday wrote:

Andy, you are correct it is related to using index.  Homing works fine if I 
don't use index.  The encoder reset makes sense as to why it CAN happen (but 
shouldn't be).  Is this just a bug?  I would try to home a second time but as 
Todd says, I can't clear the error.  Linuxcnc shuts off when it happens and 
pressing on just immediately faults again.  I have to exit and restart it.


I think you may need to scope this out with Halscope, 
looking at encoder velocity, ENCODER_INDEX_ENABLE and PID, 
and trigger the trace on amp_enable.  There seem to be two 
problems here.  One is, it should not be tripping a 
following error.  Second, it should not get in a state that 
requires restarting.  Have you tried going to E-stop (F1) 
and then F2?
Going all the way to E-stop really should clear all 
conditions like that.


I'm thinking there may be something wrong in your HAL files 
that is causing the state of the system to get stuck.


Jon

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Jon Elson

On 06/20/2017 07:13 AM, Todd Zuercher wrote:



I wish that were true.  For some reason my analog servo machine trips up and 
sets a following error on an axis about 25% of the time when trying to home to 
index for the first time after turning on LInuxcnc. (Almost every time since it 
is a 4 axis machine.)  But the alarm is easily cleared, and it always homes 
fine the 2nd try.  I have never been able to figure out why, and no one else 
seems to have been able to replicate the problem.


You should be able to track signals such as encoder position 
and INDEX_ENABLE with Halscope and capture the events when 
this happens.  Homing does cause a discontinuity in the PID, 
which is only masked on following error and P.  The PID 
output gets a bit of a bump due to the D term.  Since it is 
usually moving quite slowly during the final home to index 
move, that shouldn't be enough to trip errors.  You could 
try lowing the final move and see if that helps.  I 
occasionally get a servo amp fault just as the index is 
detected for this reason.  Pretty rare, so I have ignored it.


Jon

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Jon Elson

On 06/20/2017 03:27 AM, andy pugh wrote:

On 20 June 2017 at 03:51,  wrote:


Why would I get a following error only while homing


I think it is probably because you are using HOME_USE_INDEX (which will
zero the encoder at the index pulse) and feeding the encoder feedback back
into LinuxCNC.

Now, this is perfectly normal, and with a servo / pid machine the system
knows to ignore the f-error immediately after an encoder reset. What is
puzzling me here is why it isn't working in this case. I think it is
something to do with the fact that your system is set up for open-loop step
position control but has encoder feedback. However I can't immediately see
why this makes a difference.
I think I have an idea.  If the jump in position is all 
accomplished in one servo cycle, then the jump is handled by 
the logic you describe.  If the jump is spread over a few 
servo cycles or delayed by even one cycle, it will certainly 
cause a following error.  The key is that Tom reports 
setting MIN_FERROR to 1 doesn't suppress the error.  That 
means the position jump is not occurring during the same 
servo cycle where the index pulse is seen.  Is the encoder 
feeding ANYTHING else than LinuxCNC through a simple 
interface? Some external motion controller or drive in the 
path between encoder and LinuxCNC could introduce a delay.

I imagine that if you press the home button again it will home Z
seamlessly, and then f-error homing the next axis.


Yes, since the first home operation should zero the encoder 
counter at the index position, re-doing the home should 
cause a minimal shift in the position.


Jon

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC traffic

2017-06-20 Thread Jon Elson

On 06/20/2017 02:50 AM, Erik Christiansen wrote:
Incidentally, I've found that the Postscript printer 
language is sorta almost like gcode on steroids. Fighting 
with a GUI drawing package gives me chest pains, without 
producing useful output, so I've just finished drawing 
floorplans, elevations, sections, and started the site 
plan for a new build, with all text input. (800 lines for 
8 engineering drawings for submission to the local council.)
Don Lancaster wrote a couple books on PostScript.  One is "A 
PostScript Cookbook".  Maybe the other was actually a series 
of magazine articles, "PostScript as a programming 
language".  Very useful stuff to know.


I do some mechanical drawings in my PC board design package. 
Mostly, because I know it very well.


Jon

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Sebastian Kuzminsky

On 06/20/2017 08:52 AM, Chris Radek wrote:

On Tue, Jun 20, 2017 at 09:27:46AM +0100, andy pugh wrote:


Now, this is perfectly normal, and with a servo / pid machine the system
knows to ignore the f-error immediately after an encoder reset. What is
puzzling me here is why it isn't working in this case. I think it is


pid's index-enables need to be added to the index-enable nets.


Tom has no pids in this config, he's using position-mode steppers with 
encoders.


That's the same setup I use on the shopbot at the local hackspace, and 
it homes fine.  I don't see anything obviously wrong with Tom's config.



--
Sebastian Kuzminsky

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread andy pugh
On 20 June 2017 at 15:52, Chris Radek  wrote:

> > Now, this is perfectly normal, and with a servo / pid machine the system
> > knows to ignore the f-error immediately after an encoder reset. What is
> > puzzling me here is why it isn't working in this case. I think it is
>
> pid's index-enables need to be added to the index-enable nets.


Yes, but, there is no PID here.


-- 
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, 1916
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Chris Radek
On Tue, Jun 20, 2017 at 09:27:46AM +0100, andy pugh wrote:
> 
> Now, this is perfectly normal, and with a servo / pid machine the system
> knows to ignore the f-error immediately after an encoder reset. What is
> puzzling me here is why it isn't working in this case. I think it is

pid's index-enables need to be added to the index-enable nets.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Todd Zuercher
I don't see why my step/dir servo setup would be any different from a step 
motor + encoder config.  (Obviously, PID settings would be different as they 
would be machine specific.)

One thing to remember the PID loop will likely not be able to correct for a 
stalled step motor.  A few missed steps should be recoverable, but if a step 
motor stalls, the PID loop will command faster and faster velocities, trying to 
catch up to where it thinks it should be, making the stall worse.

- Original Message -
From: "Tom Easterday" 
To: "Enhanced Machine Controller (EMC)" 
Sent: Tuesday, June 20, 2017 10:15:01 AM
Subject: Re: [Emc-users] following error only while homing

Hmm, it seems like I failed miserably trying to do that when I first built the 
machine (this was my first build and Linuxcnc endeavor) back in 2010.  I have a 
vague recollection someone suggested that as a method of using encoders with 
steppers.  Seems like I spent a bunch of time flailing with getting the pid to 
work and ultimately gave up.  Perhaps I could attempt it again...I assume it 
would be identical to setting up a typical servo system?

> On Jun 20, 2017, at 9:59 AM, Todd Zuercher  wrote:
> 
> What if you set up the stepgens in velocity mode with PID (I understand that 
> it is the better way to do hardware stepping with Mesa cards anyway.)  This 
> is how I have my step/dir servos configured (using the encoder feedback for 
> the PID loop rather than the stepgens dummy position feedback.
> 
> - Original Message -
> From: "Tom Easterday" 
> To: "Enhanced Machine Controller (EMC)" 
> Sent: Tuesday, June 20, 2017 9:49:51 AM
> Subject: Re: [Emc-users] following error only while homing
> 
> Todd, the ini and hal config were in the first post
> 
>> On Jun 20, 2017, at 9:21 AM, Todd Zuercher  wrote:
>> 
>> I just checked my config on my step/dir servo machine, and it is homing to 
>> index on 2 of the axis.  It is not having and problems.  Maybe you have a 
>> configuration problem.
>> Could you post a copy of your ini and hal file somewhere where we could 
>> check it over.
>> 
>> - Original Message -
>> From: "Tom Easterday" 
>> To: "Enhanced Machine Controller (EMC)" 
>> Sent: Tuesday, June 20, 2017 9:00:22 AM
>> Subject: Re: [Emc-users] following error only while homing
>> 
>> Andy, you are correct it is related to using index.  Homing works fine if I 
>> don't use index.  The encoder reset makes sense as to why it CAN happen (but 
>> shouldn't be).  Is this just a bug?  I would try to home a second time but 
>> as Todd says, I can't clear the error.  Linuxcnc shuts off when it happens 
>> and pressing on just immediately faults again.  I have to exit and restart 
>> it.
>> 
>> -Tom
>> 
>>> On Jun 20, 2017, at 8:13 AM, Todd Zuercher  wrote:
>>> 
>>> 
>>> - Original Message -
 From: "andy pugh" 
 To: "Enhanced Machine Controller (EMC)" 
 Sent: Tuesday, June 20, 2017 4:27:46 AM
 Subject: Re: [Emc-users] following error only while homing
 
> On 20 June 2017 at 03:51,  wrote:
> 
> Why would I get a following error only while homing
 
 
 I think it is probably because you are using HOME_USE_INDEX (which
 will
 zero the encoder at the index pulse) and feeding the encoder feedback
 back
 into LinuxCNC.
 
 Now, this is perfectly normal, and with a servo / pid machine the
 system
 knows to ignore the f-error immediately after an encoder reset. What
 is
 puzzling me here is why it isn't working in this case. I think it is
 something to do with the fact that your system is set up for
 open-loop step
 position control but has encoder feedback. However I can't
 immediately see
 why this makes a difference.
 
 I imagine that if you press the home button again it will home Z
 seamlessly, and then f-error homing the next axis.
 
 
 --
 atp
>>> 
>>> Andy, 
>>> 
>>> I wish that were true.  For some reason my analog servo machine trips up 
>>> and sets a following error on an axis about 25% of the time when trying to 
>>> home to index for the first time after turning on LInuxcnc. (Almost every 
>>> time since it is a 4 axis machine.)  But the alarm is easily cleared, and 
>>> it always homes fine the 2nd try.  I have never been able to figure out 
>>> why, and no one else seems to have been able to replicate the problem.
>>> 
>>> His problem sounds different since he says can't clear the alarm.
>>> 
>>> My other machine with step/dir servos, doesn't have encoder index to home 
>>> to.  But it does home fine without ever setting following errors.
>>> 
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> ___
>>> Emc-users mailing list
>>> Emc-users@lists.sourceforge.net
>>> https://li

Re: [Emc-users] following error only while homing

2017-06-20 Thread Tom Easterday
Hmm, it seems like I failed miserably trying to do that when I first built the 
machine (this was my first build and Linuxcnc endeavor) back in 2010.  I have a 
vague recollection someone suggested that as a method of using encoders with 
steppers.  Seems like I spent a bunch of time flailing with getting the pid to 
work and ultimately gave up.  Perhaps I could attempt it again...I assume it 
would be identical to setting up a typical servo system?

> On Jun 20, 2017, at 9:59 AM, Todd Zuercher  wrote:
> 
> What if you set up the stepgens in velocity mode with PID (I understand that 
> it is the better way to do hardware stepping with Mesa cards anyway.)  This 
> is how I have my step/dir servos configured (using the encoder feedback for 
> the PID loop rather than the stepgens dummy position feedback.
> 
> - Original Message -
> From: "Tom Easterday" 
> To: "Enhanced Machine Controller (EMC)" 
> Sent: Tuesday, June 20, 2017 9:49:51 AM
> Subject: Re: [Emc-users] following error only while homing
> 
> Todd, the ini and hal config were in the first post
> 
>> On Jun 20, 2017, at 9:21 AM, Todd Zuercher  wrote:
>> 
>> I just checked my config on my step/dir servo machine, and it is homing to 
>> index on 2 of the axis.  It is not having and problems.  Maybe you have a 
>> configuration problem.
>> Could you post a copy of your ini and hal file somewhere where we could 
>> check it over.
>> 
>> - Original Message -
>> From: "Tom Easterday" 
>> To: "Enhanced Machine Controller (EMC)" 
>> Sent: Tuesday, June 20, 2017 9:00:22 AM
>> Subject: Re: [Emc-users] following error only while homing
>> 
>> Andy, you are correct it is related to using index.  Homing works fine if I 
>> don't use index.  The encoder reset makes sense as to why it CAN happen (but 
>> shouldn't be).  Is this just a bug?  I would try to home a second time but 
>> as Todd says, I can't clear the error.  Linuxcnc shuts off when it happens 
>> and pressing on just immediately faults again.  I have to exit and restart 
>> it.
>> 
>> -Tom
>> 
>>> On Jun 20, 2017, at 8:13 AM, Todd Zuercher  wrote:
>>> 
>>> 
>>> - Original Message -
 From: "andy pugh" 
 To: "Enhanced Machine Controller (EMC)" 
 Sent: Tuesday, June 20, 2017 4:27:46 AM
 Subject: Re: [Emc-users] following error only while homing
 
> On 20 June 2017 at 03:51,  wrote:
> 
> Why would I get a following error only while homing
 
 
 I think it is probably because you are using HOME_USE_INDEX (which
 will
 zero the encoder at the index pulse) and feeding the encoder feedback
 back
 into LinuxCNC.
 
 Now, this is perfectly normal, and with a servo / pid machine the
 system
 knows to ignore the f-error immediately after an encoder reset. What
 is
 puzzling me here is why it isn't working in this case. I think it is
 something to do with the fact that your system is set up for
 open-loop step
 position control but has encoder feedback. However I can't
 immediately see
 why this makes a difference.
 
 I imagine that if you press the home button again it will home Z
 seamlessly, and then f-error homing the next axis.
 
 
 --
 atp
>>> 
>>> Andy, 
>>> 
>>> I wish that were true.  For some reason my analog servo machine trips up 
>>> and sets a following error on an axis about 25% of the time when trying to 
>>> home to index for the first time after turning on LInuxcnc. (Almost every 
>>> time since it is a 4 axis machine.)  But the alarm is easily cleared, and 
>>> it always homes fine the 2nd try.  I have never been able to figure out 
>>> why, and no one else seems to have been able to replicate the problem.
>>> 
>>> His problem sounds different since he says can't clear the alarm.
>>> 
>>> My other machine with step/dir servos, doesn't have encoder index to home 
>>> to.  But it does home fine without ever setting following errors.
>>> 
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> ___
>>> Emc-users mailing list
>>> Emc-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/emc-users
>> 
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> __

Re: [Emc-users] following error only while homing

2017-06-20 Thread Todd Zuercher
Here is what my Hal file looks like for my step/dir machine with encoder 
feedback.  It has the stepgens configured for velocity mode and a PID loop 
(using a Mesa 5i25/7i85s).



# Generated by PNCconf at Tue Jul  9 15:53:16 2013
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD 
servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
#loadrt probe_parport
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=4 num_pwmgens=0 num_3pwmgens=0 
num_stepgens=4 sserial_port_0=0xxx " 
setp hm2_5i25.0.watchdog.timeout_ns 1000
#loadrt hal_parport cfg="0x0278 in"
loadrt pid names=pid.x,pid.y,pid.z
#loadrt abs names=
#loadrt lowpass names=
#loadrt classicladder_rt numPhysInputs=15 numPhysOutputs=15 numS32in=10 
numS32out=10 numFloatIn=10 numFloatOut=10

#addf parport.0.read servo-thread
#addf parport.0.write servo-thread
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
#addf classicladder.0.refresh servo-thread
addf hm2_5i25.0.write servo-thread
#addf hm2_5i25.0.pet_watchdog  servo-thread


#***
#  AXIS X
#***

setp   pid.x.Pgain [AXIS_0]P
setp   pid.x.Igain [AXIS_0]I
setp   pid.x.Dgain [AXIS_0]D
setp   pid.x.bias  [AXIS_0]BIAS
setp   pid.x.FF0   [AXIS_0]FF0
setp   pid.x.FF1   [AXIS_0]FF1
setp   pid.x.FF2   [AXIS_0]FF2
setp   pid.x.deadband  [AXIS_0]DEADBAND
setp   pid.x.maxoutput [AXIS_0]MAX_OUTPUT

net x-index-enable  <=>  pid.x.index-enable
net x-enable   => pid.x.enable
net x-output   => pid.x.output
net x-pos-cmd  => pid.x.command
net x-vel-fb   => pid.x.feedback-deriv
net x-pos-fb   => pid.x.feedback

# Step Gen signals/setup

setp   hm2_5i25.0.stepgen.00.dirsetup[AXIS_0]DIRSETUP
setp   hm2_5i25.0.stepgen.00.dirhold [AXIS_0]DIRHOLD
setp   hm2_5i25.0.stepgen.00.steplen [AXIS_0]STEPLEN
setp   hm2_5i25.0.stepgen.00.stepspace   [AXIS_0]STEPSPACE
setp   hm2_5i25.0.stepgen.00.position-scale  [AXIS_0]STEP_SCALE
setp   hm2_5i25.0.stepgen.00.step_type0
setp   hm2_5i25.0.stepgen.00.control-type 1
setp   hm2_5i25.0.stepgen.00.maxaccel 18
setp   hm2_5i25.0.stepgen.00.maxvel   12.5

# ---closedloop stepper signals---

net x-pos-cmdaxis.0.motor-pos-cmd
net x-output => hm2_5i25.0.stepgen.00.velocity-cmd
net x-enable axis.0.amp-enable-out  => hm2_5i25.0.stepgen.00.enable

# ---Encoder feedback signals/setup---

setphm2_5i25.0.encoder.00.counter-mode 0
setphm2_5i25.0.encoder.00.filter 1
setphm2_5i25.0.encoder.00.index-invert 0
setphm2_5i25.0.encoder.00.index-mask 0
setphm2_5i25.0.encoder.00.index-mask-invert 0
setphm2_5i25.0.encoder.00.scale  [AXIS_0]ENCODER_SCALE

net x-pos-fb   <=  hm2_5i25.0.encoder.00.position
net x-vel-fb   <=  hm2_5i25.0.encoder.00.velocity
net x-pos-fb   =>  axis.0.motor-pos-fb
net x-index-enableaxis.0.index-enable  <=>  
hm2_5i25.0.encoder.00.index-enable
net x-pos-rawcounts<=  hm2_5i25.0.encoder.00.rawcounts

# ---setup home / limit switch signals---

#net min-home-x =>  axis.0.home-sw-in
#net min-home-x =>  axis.0.neg-lim-sw-in
#net max-x =>  axis.0.pos-lim-sw-in

#***
#  AXIS Y
#***

setp   pid.y.Pgain [AXIS_1]P
setp   pid.y.Igain [AXIS_1]I
setp   pid.y.Dgain [AXIS_1]D
setp   pid.y.bias  [AXIS_1]BIAS
setp   pid.y.FF0   [AXIS_1]FF0
setp   pid.y.FF1   [AXIS_1]FF1
setp   pid.y.FF2   [AXIS_1]FF2
setp   pid.y.deadband  [AXIS_1]DEADBAND
setp   pid.y.maxoutput [AXIS_1]MAX_OUTPUT

net y-index-enable  <=>  pid.y.index-enable
net y-enable   => pid.y.enable
net y-output   => pid.y.output
net y-pos-cmd  => pid.y.command
net y-vel-fb   => pid.y.feedback-deriv
net y-pos-fb   => pid.y.feedback

# Step Gen signals/setup

setp   hm2_5i25.0.stepgen.01.dirsetup[AXIS_1]DIRSETUP
setp   hm2_5i25.0.stepgen.01.dirhold [AXIS_1]DIRHOLD
setp   hm2_5i25.0.stepgen.01.steplen [AXIS_1]STEPLEN
setp   hm2_5i25.0.stepgen.01.stepspace   [AXIS_1]STEPSPACE
setp   hm2_5i25.0.stepgen.01.position-scale  [AXIS_1]STEP_SCALE
setp   hm2_5i25.0.stepgen.01.step_type0
setp   hm2_5i25.0.stepgen.01.control-type 1
setp   hm2_5i25.0.stepgen.01.maxaccel 18
setp   hm2_5i25.0.stepgen.01.maxvel   12.5

# ---closedloop stepper signals---

net y-pos-cmdaxis.1.motor-pos-cmd
net y-output => hm2_5i25.0.stepgen.01.velocity-cmd
net y-enable axis.1.amp-enable-out  => hm2_5i25.0.stepgen.01.enable

# ---Encoder feedback signals/setup---

setphm2_5i25.0.encoder.01.counter-mode 0
setp   

Re: [Emc-users] following error only while homing

2017-06-20 Thread Tom Easterday
Is there a parameter I can tweak after it happens in order to clear the fault 
(e.g. can I clear the ferror value) ?  I can then try to home again...

> On Jun 20, 2017, at 9:49 AM, Tom Easterday  wrote:
> 
> Todd, the ini and hal config were in the first post
> 
>> On Jun 20, 2017, at 9:21 AM, Todd Zuercher  wrote:
>> 
>> I just checked my config on my step/dir servo machine, and it is homing to 
>> index on 2 of the axis.  It is not having and problems.  Maybe you have a 
>> configuration problem.
>> Could you post a copy of your ini and hal file somewhere where we could 
>> check it over.
>> 
>> - Original Message -
>> From: "Tom Easterday" 
>> To: "Enhanced Machine Controller (EMC)" 
>> Sent: Tuesday, June 20, 2017 9:00:22 AM
>> Subject: Re: [Emc-users] following error only while homing
>> 
>> Andy, you are correct it is related to using index.  Homing works fine if I 
>> don't use index.  The encoder reset makes sense as to why it CAN happen (but 
>> shouldn't be).  Is this just a bug?  I would try to home a second time but 
>> as Todd says, I can't clear the error.  Linuxcnc shuts off when it happens 
>> and pressing on just immediately faults again.  I have to exit and restart 
>> it.
>> 
>> -Tom
>> 
>>> On Jun 20, 2017, at 8:13 AM, Todd Zuercher  wrote:
>>> 
>>> 
>>> - Original Message -
 From: "andy pugh" 
 To: "Enhanced Machine Controller (EMC)" 
 Sent: Tuesday, June 20, 2017 4:27:46 AM
 Subject: Re: [Emc-users] following error only while homing
 
> On 20 June 2017 at 03:51,  wrote:
> 
> Why would I get a following error only while homing
 
 
 I think it is probably because you are using HOME_USE_INDEX (which
 will
 zero the encoder at the index pulse) and feeding the encoder feedback
 back
 into LinuxCNC.
 
 Now, this is perfectly normal, and with a servo / pid machine the
 system
 knows to ignore the f-error immediately after an encoder reset. What
 is
 puzzling me here is why it isn't working in this case. I think it is
 something to do with the fact that your system is set up for
 open-loop step
 position control but has encoder feedback. However I can't
 immediately see
 why this makes a difference.
 
 I imagine that if you press the home button again it will home Z
 seamlessly, and then f-error homing the next axis.
 
 
 --
 atp
>>> 
>>> Andy, 
>>> 
>>> I wish that were true.  For some reason my analog servo machine trips up 
>>> and sets a following error on an axis about 25% of the time when trying to 
>>> home to index for the first time after turning on LInuxcnc. (Almost every 
>>> time since it is a 4 axis machine.)  But the alarm is easily cleared, and 
>>> it always homes fine the 2nd try.  I have never been able to figure out 
>>> why, and no one else seems to have been able to replicate the problem.
>>> 
>>> His problem sounds different since he says can't clear the alarm.
>>> 
>>> My other machine with step/dir servos, doesn't have encoder index to home 
>>> to.  But it does home fine without ever setting following errors.
>>> 
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> ___
>>> Emc-users mailing list
>>> Emc-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/emc-users
>> 
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.s

Re: [Emc-users] following error only while homing

2017-06-20 Thread Todd Zuercher
What if you set up the stepgens in velocity mode with PID (I understand that it 
is the better way to do hardware stepping with Mesa cards anyway.)  This is how 
I have my step/dir servos configured (using the encoder feedback for the PID 
loop rather than the stepgens dummy position feedback.

- Original Message -
From: "Tom Easterday" 
To: "Enhanced Machine Controller (EMC)" 
Sent: Tuesday, June 20, 2017 9:49:51 AM
Subject: Re: [Emc-users] following error only while homing

Todd, the ini and hal config were in the first post

> On Jun 20, 2017, at 9:21 AM, Todd Zuercher  wrote:
> 
> I just checked my config on my step/dir servo machine, and it is homing to 
> index on 2 of the axis.  It is not having and problems.  Maybe you have a 
> configuration problem.
> Could you post a copy of your ini and hal file somewhere where we could check 
> it over.
> 
> - Original Message -
> From: "Tom Easterday" 
> To: "Enhanced Machine Controller (EMC)" 
> Sent: Tuesday, June 20, 2017 9:00:22 AM
> Subject: Re: [Emc-users] following error only while homing
> 
> Andy, you are correct it is related to using index.  Homing works fine if I 
> don't use index.  The encoder reset makes sense as to why it CAN happen (but 
> shouldn't be).  Is this just a bug?  I would try to home a second time but as 
> Todd says, I can't clear the error.  Linuxcnc shuts off when it happens and 
> pressing on just immediately faults again.  I have to exit and restart it.
> 
> -Tom
> 
>> On Jun 20, 2017, at 8:13 AM, Todd Zuercher  wrote:
>> 
>> 
>> - Original Message -
>>> From: "andy pugh" 
>>> To: "Enhanced Machine Controller (EMC)" 
>>> Sent: Tuesday, June 20, 2017 4:27:46 AM
>>> Subject: Re: [Emc-users] following error only while homing
>>> 
 On 20 June 2017 at 03:51,  wrote:
 
 Why would I get a following error only while homing
>>> 
>>> 
>>> I think it is probably because you are using HOME_USE_INDEX (which
>>> will
>>> zero the encoder at the index pulse) and feeding the encoder feedback
>>> back
>>> into LinuxCNC.
>>> 
>>> Now, this is perfectly normal, and with a servo / pid machine the
>>> system
>>> knows to ignore the f-error immediately after an encoder reset. What
>>> is
>>> puzzling me here is why it isn't working in this case. I think it is
>>> something to do with the fact that your system is set up for
>>> open-loop step
>>> position control but has encoder feedback. However I can't
>>> immediately see
>>> why this makes a difference.
>>> 
>>> I imagine that if you press the home button again it will home Z
>>> seamlessly, and then f-error homing the next axis.
>>> 
>>> 
>>> --
>>> atp
>> 
>> Andy, 
>> 
>> I wish that were true.  For some reason my analog servo machine trips up and 
>> sets a following error on an axis about 25% of the time when trying to home 
>> to index for the first time after turning on LInuxcnc. (Almost every time 
>> since it is a 4 axis machine.)  But the alarm is easily cleared, and it 
>> always homes fine the 2nd try.  I have never been able to figure out why, 
>> and no one else seems to have been able to replicate the problem.
>> 
>> His problem sounds different since he says can't clear the alarm.
>> 
>> My other machine with step/dir servos, doesn't have encoder index to home 
>> to.  But it does home fine without ever setting following errors.
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the worl

Re: [Emc-users] following error only while homing

2017-06-20 Thread Tom Easterday
Todd, the ini and hal config were in the first post

> On Jun 20, 2017, at 9:21 AM, Todd Zuercher  wrote:
> 
> I just checked my config on my step/dir servo machine, and it is homing to 
> index on 2 of the axis.  It is not having and problems.  Maybe you have a 
> configuration problem.
> Could you post a copy of your ini and hal file somewhere where we could check 
> it over.
> 
> - Original Message -
> From: "Tom Easterday" 
> To: "Enhanced Machine Controller (EMC)" 
> Sent: Tuesday, June 20, 2017 9:00:22 AM
> Subject: Re: [Emc-users] following error only while homing
> 
> Andy, you are correct it is related to using index.  Homing works fine if I 
> don't use index.  The encoder reset makes sense as to why it CAN happen (but 
> shouldn't be).  Is this just a bug?  I would try to home a second time but as 
> Todd says, I can't clear the error.  Linuxcnc shuts off when it happens and 
> pressing on just immediately faults again.  I have to exit and restart it.
> 
> -Tom
> 
>> On Jun 20, 2017, at 8:13 AM, Todd Zuercher  wrote:
>> 
>> 
>> - Original Message -
>>> From: "andy pugh" 
>>> To: "Enhanced Machine Controller (EMC)" 
>>> Sent: Tuesday, June 20, 2017 4:27:46 AM
>>> Subject: Re: [Emc-users] following error only while homing
>>> 
 On 20 June 2017 at 03:51,  wrote:
 
 Why would I get a following error only while homing
>>> 
>>> 
>>> I think it is probably because you are using HOME_USE_INDEX (which
>>> will
>>> zero the encoder at the index pulse) and feeding the encoder feedback
>>> back
>>> into LinuxCNC.
>>> 
>>> Now, this is perfectly normal, and with a servo / pid machine the
>>> system
>>> knows to ignore the f-error immediately after an encoder reset. What
>>> is
>>> puzzling me here is why it isn't working in this case. I think it is
>>> something to do with the fact that your system is set up for
>>> open-loop step
>>> position control but has encoder feedback. However I can't
>>> immediately see
>>> why this makes a difference.
>>> 
>>> I imagine that if you press the home button again it will home Z
>>> seamlessly, and then f-error homing the next axis.
>>> 
>>> 
>>> --
>>> atp
>> 
>> Andy, 
>> 
>> I wish that were true.  For some reason my analog servo machine trips up and 
>> sets a following error on an axis about 25% of the time when trying to home 
>> to index for the first time after turning on LInuxcnc. (Almost every time 
>> since it is a 4 axis machine.)  But the alarm is easily cleared, and it 
>> always homes fine the 2nd try.  I have never been able to figure out why, 
>> and no one else seems to have been able to replicate the problem.
>> 
>> His problem sounds different since he says can't clear the alarm.
>> 
>> My other machine with step/dir servos, doesn't have encoder index to home 
>> to.  But it does home fine without ever setting following errors.
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Todd Zuercher
I just checked my config on my step/dir servo machine, and it is homing to 
index on 2 of the axis.  It is not having and problems.  Maybe you have a 
configuration problem.
Could you post a copy of your ini and hal file somewhere where we could check 
it over.

- Original Message -
From: "Tom Easterday" 
To: "Enhanced Machine Controller (EMC)" 
Sent: Tuesday, June 20, 2017 9:00:22 AM
Subject: Re: [Emc-users] following error only while homing

Andy, you are correct it is related to using index.  Homing works fine if I 
don't use index.  The encoder reset makes sense as to why it CAN happen (but 
shouldn't be).  Is this just a bug?  I would try to home a second time but as 
Todd says, I can't clear the error.  Linuxcnc shuts off when it happens and 
pressing on just immediately faults again.  I have to exit and restart it.

-Tom

> On Jun 20, 2017, at 8:13 AM, Todd Zuercher  wrote:
> 
> 
> - Original Message -
>> From: "andy pugh" 
>> To: "Enhanced Machine Controller (EMC)" 
>> Sent: Tuesday, June 20, 2017 4:27:46 AM
>> Subject: Re: [Emc-users] following error only while homing
>> 
>>> On 20 June 2017 at 03:51,  wrote:
>>> 
>>> Why would I get a following error only while homing
>> 
>> 
>> I think it is probably because you are using HOME_USE_INDEX (which
>> will
>> zero the encoder at the index pulse) and feeding the encoder feedback
>> back
>> into LinuxCNC.
>> 
>> Now, this is perfectly normal, and with a servo / pid machine the
>> system
>> knows to ignore the f-error immediately after an encoder reset. What
>> is
>> puzzling me here is why it isn't working in this case. I think it is
>> something to do with the fact that your system is set up for
>> open-loop step
>> position control but has encoder feedback. However I can't
>> immediately see
>> why this makes a difference.
>> 
>> I imagine that if you press the home button again it will home Z
>> seamlessly, and then f-error homing the next axis.
>> 
>> 
>> --
>> atp
> 
> Andy, 
> 
> I wish that were true.  For some reason my analog servo machine trips up and 
> sets a following error on an axis about 25% of the time when trying to home 
> to index for the first time after turning on LInuxcnc. (Almost every time 
> since it is a 4 axis machine.)  But the alarm is easily cleared, and it 
> always homes fine the 2nd try.  I have never been able to figure out why, and 
> no one else seems to have been able to replicate the problem.
> 
> His problem sounds different since he says can't clear the alarm.
> 
> My other machine with step/dir servos, doesn't have encoder index to home to. 
>  But it does home fine without ever setting following errors.
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Tom Easterday
Andy, you are correct it is related to using index.  Homing works fine if I 
don't use index.  The encoder reset makes sense as to why it CAN happen (but 
shouldn't be).  Is this just a bug?  I would try to home a second time but as 
Todd says, I can't clear the error.  Linuxcnc shuts off when it happens and 
pressing on just immediately faults again.  I have to exit and restart it.

-Tom

> On Jun 20, 2017, at 8:13 AM, Todd Zuercher  wrote:
> 
> 
> - Original Message -
>> From: "andy pugh" 
>> To: "Enhanced Machine Controller (EMC)" 
>> Sent: Tuesday, June 20, 2017 4:27:46 AM
>> Subject: Re: [Emc-users] following error only while homing
>> 
>>> On 20 June 2017 at 03:51,  wrote:
>>> 
>>> Why would I get a following error only while homing
>> 
>> 
>> I think it is probably because you are using HOME_USE_INDEX (which
>> will
>> zero the encoder at the index pulse) and feeding the encoder feedback
>> back
>> into LinuxCNC.
>> 
>> Now, this is perfectly normal, and with a servo / pid machine the
>> system
>> knows to ignore the f-error immediately after an encoder reset. What
>> is
>> puzzling me here is why it isn't working in this case. I think it is
>> something to do with the fact that your system is set up for
>> open-loop step
>> position control but has encoder feedback. However I can't
>> immediately see
>> why this makes a difference.
>> 
>> I imagine that if you press the home button again it will home Z
>> seamlessly, and then f-error homing the next axis.
>> 
>> 
>> --
>> atp
> 
> Andy, 
> 
> I wish that were true.  For some reason my analog servo machine trips up and 
> sets a following error on an axis about 25% of the time when trying to home 
> to index for the first time after turning on LInuxcnc. (Almost every time 
> since it is a 4 axis machine.)  But the alarm is easily cleared, and it 
> always homes fine the 2nd try.  I have never been able to figure out why, and 
> no one else seems to have been able to replicate the problem.
> 
> His problem sounds different since he says can't clear the alarm.
> 
> My other machine with step/dir servos, doesn't have encoder index to home to. 
>  But it does home fine without ever setting following errors.
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread Todd Zuercher

- Original Message -
> From: "andy pugh" 
> To: "Enhanced Machine Controller (EMC)" 
> Sent: Tuesday, June 20, 2017 4:27:46 AM
> Subject: Re: [Emc-users] following error only while homing
> 
> On 20 June 2017 at 03:51,  wrote:
> 
> > Why would I get a following error only while homing
> 
> 
> I think it is probably because you are using HOME_USE_INDEX (which
> will
> zero the encoder at the index pulse) and feeding the encoder feedback
> back
> into LinuxCNC.
> 
> Now, this is perfectly normal, and with a servo / pid machine the
> system
> knows to ignore the f-error immediately after an encoder reset. What
> is
> puzzling me here is why it isn't working in this case. I think it is
> something to do with the fact that your system is set up for
> open-loop step
> position control but has encoder feedback. However I can't
> immediately see
> why this makes a difference.
> 
> I imagine that if you press the home button again it will home Z
> seamlessly, and then f-error homing the next axis.
> 
> 
> --
> atp

Andy, 

I wish that were true.  For some reason my analog servo machine trips up and 
sets a following error on an axis about 25% of the time when trying to home to 
index for the first time after turning on LInuxcnc. (Almost every time since it 
is a 4 axis machine.)  But the alarm is easily cleared, and it always homes 
fine the 2nd try.  I have never been able to figure out why, and no one else 
seems to have been able to replicate the problem.

His problem sounds different since he says can't clear the alarm.

My other machine with step/dir servos, doesn't have encoder index to home to.  
But it does home fine without ever setting following errors.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] following error only while homing

2017-06-20 Thread andy pugh
On 20 June 2017 at 03:51,  wrote:

> Why would I get a following error only while homing


I think it is probably because you are using HOME_USE_INDEX (which will
zero the encoder at the index pulse) and feeding the encoder feedback back
into LinuxCNC.

Now, this is perfectly normal, and with a servo / pid machine the system
knows to ignore the f-error immediately after an encoder reset. What is
puzzling me here is why it isn't working in this case. I think it is
something to do with the fact that your system is set up for open-loop step
position control but has encoder feedback. However I can't immediately see
why this makes a difference.

I imagine that if you press the home button again it will home Z
seamlessly, and then f-error homing the next 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, 1916
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Things are quiet

2017-06-20 Thread andy pugh
On 20 June 2017 at 01:24, jim  wrote:

> I need my machine to move On a 10 degree line using the  x y axis .


Yet another way. You can use G10 L2 to rotate the coordinate system.
http://linuxcnc.org/docs/2.7/html/gcode/g-code.html#gcode:g10-l2


-- 
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, 1916
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC traffic

2017-06-20 Thread Erik Christiansen
On 19.06.17 16:42, hubert wrote:
> Just checking, It seems unusual not to have any posts in this long a period.
> My last received post was 6/17/17, 12:27 PM

IIRC, there is usually a bit of a lull in the northern hemisphere
summer. My guess is that there's been a bit of sunny weather, and
everyone's out behind or on a mower. (That or down at the beach.)

Not so down under. I'm off to the farm for another load of firewood
tomorrow. The chainsaws are already sharpened. Will have to turf out the
27 year old wood heater, though. It doesn't heat as well since the
baffle plate rolled itself up after I ran it hard during a cold spell.

Incidentally, I've found that the Postscript printer language is sorta
almost like gcode on steroids. Fighting with a GUI drawing package
gives me chest pains, without producing useful output, so I've just
finished drawing floorplans, elevations, sections, and started the site
plan for a new build, with all text input. (800 lines for 8 engineering
drawings for submission to the local council.)

Erik

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users