Re: [Emc-users] jogging again

2017-03-15 Thread Gene Heskett
On Wednesday 15 March 2017 14:27:28 andy pugh wrote:

> On 15 March 2017 at 16:27, Gene Heskett  wrote:
> > This I don't need to gate, but I do need to gate the derived encoder
> > count so it doesn't also move when I am selecting the jog-scale in
> > the mux8.
>
> Actually, you don't. You just need to turn off the jog-enable of the
> various axes when in step-adjusting mode.

Thats true=enabled, in which case I can net that directly to the 
pushbutton for that axis.

Which is done. I also cut back on the various ACCEL settings and seem to 
have fixed the joint error problem. Now I still cannot move it with the 
dial, until I have first moved it a thou or so with a keyboard arrow. I 
have to assume something in motion, the move signals are being delivered 
according to a halmeter, and the jog-enable is true as long as that 
axis's pushbutton is normal/open. Probably a forehead banger when and if 
I find it...

In the meantime, I know my hacking has left loaded and now unused modules 
laying about, so before I fire up the copy/paste to make X work, I am 
going to do some housecleaning.

Thanks Andy.
 
Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
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] jogging again

2017-03-15 Thread andy pugh
On 15 March 2017 at 16:27, Gene Heskett  wrote:
> This I don't need to gate, but I do need to gate the derived encoder
> count so it doesn't also move when I am selecting the jog-scale in the
> mux8.

Actually, you don't. You just need to turn off the jog-enable of the
various axes when in step-adjusting mode.

-- 
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] jogging again

2017-03-15 Thread Gene Heskett
On Wednesday 15 March 2017 09:23:47 andy pugh wrote:

> On 15 March 2017 at 00:35, Gene Heskett  wrote:
> > And, while they do have a scale, my attempts to set it to a value
> > that returns an additional 1 per click, have been ignored, without
> > reporting any error.
>
> The scale setting does not affect the counts. The scale affects how
> the counts are converted into position.
> In theory you could use an encoder.scale of 4 then pass the the float
> position to an S32 converter then use that for jog counts.
>
> But that would be stupid when there is a jog-scale pin to convert
> counts to machine-units offset.
>
> Are you actually using the jog-scale pins?

Yes.

I only have axis.x. sort of working, but here is that line.

net jogxsize   <=  mux8jogspeedx.out => axis.x.jog-scale

That is the size of the jog, in machine units, inch in this case, so 
min=0.0001", & max is 0.0200" per count on a 1,2,5 progression.  And I 
haven't experimented with G7-G8 to see if the jog distance is modified 
by that, ATM its radius. I'll check that G7-G8 thing today.

This I don't need to gate, but I do need to gate the derived encoder 
count so it doesn't also move when I am selecting the jog-scale in the 
mux8. So when the button is held down, counts is zeroed by this new 
mux2s32. Only active when the time delay hasn't expired. Humm, crazy 
idea. I develop the updown counts independent of the encoder's count. 
Thats by and2ing the AB phases so its true at the detent crossover 
point, and thats steered and counted in an updown, clamped at 0 and 7. A 
bitslice converts that to sel lines for the mux8, which in turn selects 
the jog-scale.  The timedelay output is available in either polarity, 
and I am using an xor to do something else, but I could just as easily 
hold the encoder in reset with that same signal, or its inverted case. 
That would disable the jog unless the button has been released and the 
timedelay has not yet timed out.  That would remove the need for this 
particular mux2s32 entirely.  I like it when I can simplicate this 
stuff. :)

I can also see where the mux_generic, doing internal data conversions, 
has got to be marginally faster than 3 separate hal calls. 

Writing it down sure helps to visualize what needs to be done.

Is my coffee kicking in? Another cup might to do it...

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
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] jogging again

2017-03-15 Thread andy pugh
On 15 March 2017 at 00:35, Gene Heskett  wrote:
> And, while they do have a scale, my attempts to set it to a value that
> returns an additional 1 per click, have been ignored, without reporting
> any error.

The scale setting does not affect the counts. The scale affects how
the counts are converted into position.
In theory you could use an encoder.scale of 4 then pass the the float
position to an S32 converter then use that for jog counts.

But that would be stupid when there is a jog-scale pin to convert
counts to machine-units offset.

Are you actually using the jog-scale pins?

-- 
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] jogging again

2017-03-14 Thread Gene Heskett
On Tuesday 14 March 2017 18:22:51 andy pugh wrote:

> On 14 March 2017 at 17:50, Gene Heskett  wrote:
> > I can do that, but the real fix has apparently been removed in the
> > 2.8-pre branch. What I needed, and the manpage says its there on
> > this machine, and in the manpage out there, and that was the
> > encoder.L.x4-mode.
>
> I don't think that the Mesa encoders have ever had that parameter.

And, while they do have a scale, my attempts to set it to a value that 
returns an additional 1 per click, have been ignored, without reporting 
any error.  I've tried the powers of 2 up to 16, but one click is 4 at 
the count output regardless. I either don't understand the man page, or 
its broken. Probably the former.

I can run it thru a mult2 by .25 and get something resembling the 
correct count, but returning the dial to zero doesn't always return the 
output to zero, and thats no good if you want to take .0065" off the 
part to get the correct size.  This might be an artifact of the slower 
200hz jog-thread, or even the servo-thread is occasionally missing a 
count. And for some reason, I may have to change that .25 multiplier 
to a -0.250, its moving backwards.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
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] jogging again

2017-03-14 Thread John Thornton
The encoder.N.x4-mode is still in master but it's for the software 
encoder...

JT


On 3/14/2017 12:50 PM, Gene Heskett wrote:
> On Tuesday 14 March 2017 11:26:41 John Kasunich wrote:
>
>> On Tue, Mar 14, 2017, at 10:56 AM, Gene Heskett wrote:
>>> Greetings all;
>>>
>>> I threw out quite a few lines of code, but while its now working,
>>> its working at 4x the movement I am asking it for.
>>>
>>> I am now sending my distance increment to the axis.x.scale and
>>> joint.0.scale inputs.
>>>
>>> and sending the hm2...encoder.count to axis.x.counts and
>>> joint.0.counts
>>>
>>> It seems that regardless of what I
>>> setp hm2_[HOSTMOT2](BOARD).0.encoder.01.scale at,from 1 to 16
>>> tested, one click is a count of 4 at the count output. So I am
>>> getting 4x the movement I want.  So sending a .0002", gets me .0008"
>>> rad change and .0016" dia change.
>>>
>>> Is there a fix for this unwanted 4 per click?  Or am I getting a 4x
>>> multiplier because I am feeding both axis and joint the encoder
>>> count?
>>>
>>> Thanks all;
>>>
>>> Cheers, Gene Heskett
>>> --
>> The jog scale inputs are "distance you want to travel per jogwheel
>> count".
>>
>> Your wheel sends four counts for one detent.
>>
>> If you want one detent to be 0.001" set jog-scale to 1/4 of that,
>> 0.00025".
>>
>> If you want one detent to be 0.010", set jog-scale to 0.0025".
>>
>> And so on...
>>
>> hm2_[HOSTMOT2](BOARD).0.encoder.01.scale has nothing to do with it.
>> That is used INSIDE the encoder driver to scale the floating point
>> output of the encoder. Wheel jogging doesn't use the floating point
>> output of the encoder, it uses the raw counts.
>>
>> The reason for that is so that you can change the jog-scale any time
>> you want.
> I can do that, but the real fix has apparently been removed in the
> 2.8-pre branch. What I needed, and the manpage says its there on this
> machine, and in the manpage out there, and that was the
> encoder.L.x4-mode.
>
> I can put a mul2 in with one input setp to .25, but why was the x4-mode
> removed AND left at the default of counting every edge, which obviously
> gives an output of 4 for one click. Thats simpler and I'll try that
> first, but...
>
> I have another problem too, halshow now cannot see anything from
> hostmot2! To me thats a genuine bug.  ISTR it worked a week ago. Version
> now on the pi is 2.8.0-pre1-2771-gdc2ff49, fresh last night.
>
> I just tried the counter-mode FALSE so it only counts the rising edge of
> phase a. But as I suspected, it very quickly looses track of where it is
> on the dials reversal. Gr.  I may have a better idea. Ignore the
> encoders count output entirely. I am already developing a click(x|z)
> signal that is only true when both phases of the encoders input are
> true, and a direction derived from its velocity output. I'll take the
> steered up and down count pulses from that and feed them to another
> updown, and use its output to drive the jog-counts inputs to motion.
> Thats also one count per click, but its presumably at the peak of the
> area between detents, and need not be clamped since it will be zerored
> when the timer times out, disabling the jogwheel entirely. At that
> point, the direction outputs I am using should be accurate. But I expect
> I'd better start nearly from square one and rewrite 95% of it.
>
> Cheers, Gene Heskett


--
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] jogging again

2017-03-14 Thread andy pugh
On 14 March 2017 at 17:50, Gene Heskett  wrote:
> I can do that, but the real fix has apparently been removed in the
> 2.8-pre branch. What I needed, and the manpage says its there on this
> machine, and in the manpage out there, and that was the
> encoder.L.x4-mode.

I don't think that the Mesa encoders have ever had that parameter.

-- 
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] jogging again

2017-03-14 Thread Gene Heskett
On Tuesday 14 March 2017 11:26:41 John Kasunich wrote:

> On Tue, Mar 14, 2017, at 10:56 AM, Gene Heskett wrote:
> > Greetings all;
> >
> > I threw out quite a few lines of code, but while its now working,
> > its working at 4x the movement I am asking it for.
> >
> > I am now sending my distance increment to the axis.x.scale and
> > joint.0.scale inputs.
> >
> > and sending the hm2...encoder.count to axis.x.counts and
> > joint.0.counts
> >
> > It seems that regardless of what I
> > setp hm2_[HOSTMOT2](BOARD).0.encoder.01.scale at,from 1 to 16
> > tested, one click is a count of 4 at the count output. So I am
> > getting 4x the movement I want.  So sending a .0002", gets me .0008"
> > rad change and .0016" dia change.
> >
> > Is there a fix for this unwanted 4 per click?  Or am I getting a 4x
> > multiplier because I am feeding both axis and joint the encoder
> > count?
> >
> > Thanks all;
> >
> > Cheers, Gene Heskett
> > --
>
> The jog scale inputs are "distance you want to travel per jogwheel
> count".
>
> Your wheel sends four counts for one detent.
>
> If you want one detent to be 0.001" set jog-scale to 1/4 of that,
> 0.00025".
>
> If you want one detent to be 0.010", set jog-scale to 0.0025".
>
> And so on...
>
> hm2_[HOSTMOT2](BOARD).0.encoder.01.scale has nothing to do with it.
> That is used INSIDE the encoder driver to scale the floating point
> output of the encoder. Wheel jogging doesn't use the floating point
> output of the encoder, it uses the raw counts.
>
> The reason for that is so that you can change the jog-scale any time
> you want.

I can do that, but the real fix has apparently been removed in the 
2.8-pre branch. What I needed, and the manpage says its there on this 
machine, and in the manpage out there, and that was the 
encoder.L.x4-mode.

I can put a mul2 in with one input setp to .25, but why was the x4-mode 
removed AND left at the default of counting every edge, which obviously 
gives an output of 4 for one click. Thats simpler and I'll try that 
first, but...

I have another problem too, halshow now cannot see anything from 
hostmot2! To me thats a genuine bug.  ISTR it worked a week ago. Version 
now on the pi is 2.8.0-pre1-2771-gdc2ff49, fresh last night.

I just tried the counter-mode FALSE so it only counts the rising edge of 
phase a. But as I suspected, it very quickly looses track of where it is 
on the dials reversal. Gr.  I may have a better idea. Ignore the 
encoders count output entirely. I am already developing a click(x|z) 
signal that is only true when both phases of the encoders input are 
true, and a direction derived from its velocity output. I'll take the 
steered up and down count pulses from that and feed them to another 
updown, and use its output to drive the jog-counts inputs to motion. 
Thats also one count per click, but its presumably at the peak of the 
area between detents, and need not be clamped since it will be zerored 
when the timer times out, disabling the jogwheel entirely. At that 
point, the direction outputs I am using should be accurate. But I expect 
I'd better start nearly from square one and rewrite 95% of it.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
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] jogging again

2017-03-14 Thread John Kasunich


On Tue, Mar 14, 2017, at 10:56 AM, Gene Heskett wrote:
> Greetings all;
> 
> I threw out quite a few lines of code, but while its now working, its 
> working at 4x the movement I am asking it for.
> 
> I am now sending my distance increment to the axis.x.scale and 
> joint.0.scale inputs.
> 
> and sending the hm2...encoder.count to axis.x.counts and joint.0.counts
> 
> It seems that regardless of what I 
> setp hm2_[HOSTMOT2](BOARD).0.encoder.01.scale at,from 1 to 16 tested, one 
> click is a count of 4 at the count output. So I am getting 4x the 
> movement I want.  So sending a .0002", gets me .0008" rad change 
> and .0016" dia change.
> 
> Is there a fix for this unwanted 4 per click?  Or am I getting a 4x 
> multiplier because I am feeding both axis and joint the encoder count?
> 
> Thanks all;
> 
> Cheers, Gene Heskett
> -- 

The jog scale inputs are "distance you want to travel per jogwheel count".

Your wheel sends four counts for one detent.

If you want one detent to be 0.001" set jog-scale to 1/4 of that, 0.00025".

If you want one detent to be 0.010", set jog-scale to 0.0025".

And so on...

hm2_[HOSTMOT2](BOARD).0.encoder.01.scale has nothing to do with it.
That is used INSIDE the encoder driver to scale the floating point output of 
the encoder.
Wheel jogging doesn't use the floating point output of the encoder, it uses the 
raw counts.

The reason for that is so that you can change the jog-scale any time you want.

-- 
  John Kasunich
  jmkasun...@fastmail.fm

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


[Emc-users] jogging again

2017-03-14 Thread Gene Heskett
Greetings all;

I threw out quite a few lines of code, but while its now working, its 
working at 4x the movement I am asking it for.

I am now sending my distance increment to the axis.x.scale and 
joint.0.scale inputs.

and sending the hm2...encoder.count to axis.x.counts and joint.0.counts

It seems that regardless of what I 
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.scale at,from 1 to 16 tested, one 
click is a count of 4 at the count output. So I am getting 4x the 
movement I want.  So sending a .0002", gets me .0008" rad change 
and .0016" dia change.

Is there a fix for this unwanted 4 per click?  Or am I getting a 4x 
multiplier because I am feeding both axis and joint the encoder count?

Thanks all;

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

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