Re: [Emc-users] Oneshot question

2016-09-15 Thread Gene Heskett
On Thursday 15 September 2016 21:06:17 Gene Heskett wrote:

> On Thursday 15 September 2016 10:44:08 Gene Heskett wrote:
> > On Thursday 15 September 2016 06:57:27 andy pugh wrote:
> > > On 15 September 2016 at 11:04, Gene Heskett 
> >
> > wrote:
> > > > But, if I could 'net' the edge trigger parameters,
> > >
> > > You can't net parameters. You can only net pins.
> > > http://linuxcnc.org/docs/2.7/html/man/man9/oneshot.9.html
> > > Tells you which are which.
> >
> > Ok, then as soon as the coffee and my morning pills have kicked in,
> > I'll go carve a bit on the hal file for TLM.
>
> Looking at the lut5 modules man page, where it claims all kinds of
> functions can be performed, I am not grokking what it says.  And the
> link to lut5.py isn't helping as it gives me the exact same answer,
> 0x2, regardless of what logic operator I put between the two input
> pins.  And what it says is not getting me what I want.  What I want is
> a true output for every input combo of 2 pins, based on
> motion.spindle-on but delayed a hundred milliseconds as an enable of
> its going false if the encoder output stops, indicated by frozen data
> for .2 seconds.
>
> That will stop the retrigger oneshot. So it will go true or false
> depending on the output wired in.
>
> The second input in-1, is fed from a timedelay module so that its
> output is a time-delayed version of motion.spindle-on, delayed by how
> long it takes the spindle to move past an edge of a slot plus a bit,
> perhaps 250 milliseconds from the time motion.spindle-on went true.
>
> The best I can get, for about an hours playing with halshowconfig, and
> setp is to get it to move the spindle about 10 degrees during the
> timedelay, and shut it down because the spindle did move.
>
> Thanks for any enlightenment that is not in the manpage.
>
> Cheers, Gene Heskett

I just had a better idea Andy. Use the onehot to make a 
spindle-is-turning signal as now. Feed that into a mux2.in1

Use the timedelay to switch that mux2, feeding a logic one into in0, and 
the spindle-is-turning into in1.

When the timedelay runs out, and spindle-is-turning is still false, bang 
the motion.enable down with the 0 out of the mux2 until the timedelay 
has been reset by motion.spindle-on going back false, putting the logic 
1 back into motion.enable from the mux2.in0.

However, a mux2 carries digital values & may not like a setp in0 True, 
and on looking thru what we have, maybe tristate_bit might be the better 
choice, copying a logic 0 from spindle-is-turning when it isn't, to 
motion.enable until the timedelay is reset by the machine being turned 
off  I'll try that.  And I found tristate_bit is not tristated when 
disabled. Testing now. Yup, its pulling motion.enable false when its 
enable is false. So the machine cannot be turned on at all.  

Thats a bug isn't it?

Unless you've an even better idea of course. Obviously this doesn't work.

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 

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


Re: [Emc-users] Oneshot question

2016-09-15 Thread Gene Heskett
On Thursday 15 September 2016 10:44:08 Gene Heskett wrote:

> On Thursday 15 September 2016 06:57:27 andy pugh wrote:
> > On 15 September 2016 at 11:04, Gene Heskett 
>
> wrote:
> > > But, if I could 'net' the edge trigger parameters,
> >
> > You can't net parameters. You can only net pins.
> > http://linuxcnc.org/docs/2.7/html/man/man9/oneshot.9.html
> > Tells you which are which.
>
> Ok, then as soon as the coffee and my morning pills have kicked in,
> I'll go carve a bit on the hal file for TLM.

Looking at the lut5 modules man page, where it claims all kinds of 
functions can be performed, I am not grokking what it says.  And the 
link to lut5.py isn't helping as it gives me the exact same answer, 0x2, 
regardless of what logic operator I put between the two input pins.  And 
what it says is not getting me what I want.  What I want is a true 
output for every input combo of 2 pins, based on motion.spindle-on but 
delayed a hundred milliseconds as an enable of its going false if the 
encoder output stops, indicated by frozen data for .2 seconds.

That will stop the retrigger oneshot. So it will go true or false 
depending on the output wired in.

The second input in-1, is fed from a timedelay module so that its output 
is a time-delayed version of motion.spindle-on, delayed by how long it 
takes the spindle to move past an edge of a slot plus a bit, perhaps 250 
milliseconds from the time motion.spindle-on went true.

The best I can get, for about an hours playing with halshowconfig, and 
setp is to get it to move the spindle about 10 degrees during the 
timedelay, and shut it down because the spindle did move.

Thanks for any enlightenment that is not in the manpage.

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 

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


Re: [Emc-users] Got "new" PC, some question about setting it up.

2016-09-15 Thread Gene Heskett
On Thursday 15 September 2016 12:16:45 Chris Albertson wrote:

> Hello,
>
> Got a "new" computer I saved from going to the dump.  II am going to
> it use for LinuxCNC.  I tested latency for a good 30 minutes and got
> just under 30,000 over 20,000 on the display.   The PC is an Intel i7,
> 2.67 GHz, 4GB RAM and no built-in graphics on the mother board.  There
> is a video card in one of the slots.  One PCI slot is free.
>
> I want to run some NEMA 23 stepper motors to control a Sieg X2 mill. 
> (aka "Mini Mill".)  Yes, call it a "toy" but the parts I want to make
> would fit on your open hand.  I have a rotary table I am converting
> also and hope one day to be able to do 4-axis work.
>
> Questions:
>
> 1)  Is it worth it to experiment with different video drivers and such
> to reduce the latency?  The numbers look good enough already, I think.
>
Not for moving steppers at usable speeds.

> 2)  What would I gain by using a Mesa card over a parallel port card? 
> I don't have either one of these now and would need to buy one or the
> other and with only one PCI slot I can use only one card.

A mesa 5i25 with a 10 dollar breakput board on the other end of a parport 
cable essentially removes the boxes latency from the equation because 
all you will need is the much slower servo-thread. I still have one 
software stepper driven machine, and its slow, and z now misses pulses 
at a maxvel it was happy with at ubu8.04 LTS.  So I intend to put one of 
the 5i25's in it before too long. Its in a box on the floor beside this 
chair right now. I have the exact same motor on my toy lathe, and with a 
5i25 issuing the marching orders it can do 60 ipm without losing a step. 
The software stepping machine is an identical  intel D-525-MW, but no 
5i25. 8 ipm is the speed limit if I don't want it to lose steps.  Thats 
a huge difference. Best dollars you will spend.

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 

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


Re: [Emc-users] Got "new" PC, some question about setting it up.

2016-09-15 Thread andy pugh
On 15 September 2016 at 17:16, Chris Albertson 
wrote:

> 1)  Is it worth it to experiment with different video drivers and such to
> reduce the latency?  The numbers look good enough already, I think.
>

It looks fine, I wouldn't bother.

>
> 2)  What would I gain by using a Mesa card over a parallel port card?  I
> don't have either one of these now and would need to buy one or the other
> and with only one PCI slot I can use only one card.
>

Have you checked the motherboard for a parallel port header?

-- 
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
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Got "new" PC, some question about setting it up.

2016-09-15 Thread Joshua Glenn
I'm no expert on this. Those of you who are more experienced with this,
please correct me if I am wrong.

But I recently had a system with similar latency numbers to yours, and was
able to run a cpu hog while doing the test, and reduced the latency to
around 4000.

The cpu hog is a simple routine you run in the terminal. From what I
understand it keeps the cpu active so it won't do any power saving which
adversely affects the latency.

You run it by opening Terminal then copy/paste this command into the
command line (then press enter):

while true ; do echo "nothing" > /dev/null ; done

That will start the cpu hog running, then run the latency test. You should
see your numbers come down.

What I don't know (and hopefully someone will chime in and let us know) is
this:
Do you have to run the cpu hog while you're operating linuxcnc to see the
benefits of that lower latency while operating the actual machine?

You can read more about the cpu hog on this page:
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?RealTime



On Thu, Sep 15, 2016 at 11:16 AM, Chris Albertson  wrote:

> Hello,
>
> Got a "new" computer I saved from going to the dump.  II am going to it use
> for LinuxCNC.  I tested latency for a good 30 minutes and got just under
> 30,000 over 20,000 on the display.   The PC is an Intel i7, 2.67 GHz, 4GB
> RAM and no built-in graphics on the mother board.  There is a video card in
> one of the slots.  One PCI slot is free.
>
> I want to run some NEMA 23 stepper motors to control a Sieg X2 mill.  (aka
> "Mini Mill".)  Yes, call it a "toy" but the parts I want to make would fit
> on your open hand.  I have a rotary table I am converting also and hope one
> day to be able to do 4-axis work.
>
> Questions:
>
> 1)  Is it worth it to experiment with different video drivers and such to
> reduce the latency?  The numbers look good enough already, I think.
>
> 2)  What would I gain by using a Mesa card over a parallel port card?  I
> don't have either one of these now and would need to buy one or the other
> and with only one PCI slot I can use only one card.
>
>
> --
>
> Chris Albertson
> Redondo Beach, California
> 
> --
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Got "new" PC, some question about setting it up.

2016-09-15 Thread Chris Albertson
Hello,

Got a "new" computer I saved from going to the dump.  II am going to it use
for LinuxCNC.  I tested latency for a good 30 minutes and got just under
30,000 over 20,000 on the display.   The PC is an Intel i7, 2.67 GHz, 4GB
RAM and no built-in graphics on the mother board.  There is a video card in
one of the slots.  One PCI slot is free.

I want to run some NEMA 23 stepper motors to control a Sieg X2 mill.  (aka
"Mini Mill".)  Yes, call it a "toy" but the parts I want to make would fit
on your open hand.  I have a rotary table I am converting also and hope one
day to be able to do 4-axis work.

Questions:

1)  Is it worth it to experiment with different video drivers and such to
reduce the latency?  The numbers look good enough already, I think.

2)  What would I gain by using a Mesa card over a parallel port card?  I
don't have either one of these now and would need to buy one or the other
and with only one PCI slot I can use only one card.


-- 

Chris Albertson
Redondo Beach, California
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Oneshot question

2016-09-15 Thread Gene Heskett
On Thursday 15 September 2016 06:57:27 andy pugh wrote:

> On 15 September 2016 at 11:04, Gene Heskett  
wrote:
> > But, if I could 'net' the edge trigger parameters,
>
> You can't net parameters. You can only net pins.
> http://linuxcnc.org/docs/2.7/html/man/man9/oneshot.9.html
> Tells you which are which.

Ok, then as soon as the coffee and my morning pills have kicked in, I'll 
go carve a bit on the hal file for TLM.

The story so far:

Its next job is to make a base for the phase II on the Sheldon, replacing 
the compound.  The ways on the compound are junk, sprung to about a 20 
thou taper, and the "ears" where its bolted to the carriage are sprung 
just enough to let it rock, so I have a block of cast that currently 
weighs about 25 lbs that will be carved in stages, first to a cylinder 
the same size as the base of the old compound, then the side grooves cut 
on the mill to copy the shape of the compounds base, and the holes for 
the hold-down bolts drilled.  Then back to TLM but mounted off-center 
about 3/4", drill the hole for the phase II hold-down and tap it, make 
the top about .001" concave so its the outside edge of the phase II that 
bears 95% of the hold-down bolts force, a trick I learned on TLM to stop 
the tool post from being turned by cutting forces such has a dull boring 
bar might subject it to.

Hope fully, the top of the cross slider isn't similarly sprung.

The last operation then is to turn it to this off-center contour with a 
g3 curve, advancing both x and z in the loop until the top is the right 
size for the phase II, and the bottom will clear any large things I 
might be tempted to mount in that 8" chuck on the Sheldon.

That was, maybe still is a problem on TLM, but that same piece replaceing 
the compound on it has now been similarly carved, hopefully enough I can 
face cut all the way to the center as I make that piece for the Sheldon.  
The idea of the off-center is so that this base can be rotated, moving 
the tool post to adjust such clearance issues.

Then I need to make a ring for the shop made collet puller to rest 
against on the rear of the Sheldon's spindle so I can also use 5C stuff 
for smaller work.

And while TLM is doing that, I can drill & tap the bottom of the 
Sheldon's saddle for some 1/4" bolts to hold a brass, full width front 
gib in place. I am still removing paint from the bottom of the bed ledge 
so I can use an area that has not been chewed up by the OEM postage 
sized tabs that served that purpose, one of which was also equipted with 
a locking bolt to serve as a carriage lock, so the first 3/16" of that 
area is well trashed because that bolt was bent and there was no 
position that didn't drag and wear on the bed lip short of removing it 
completely.  The high wear area is cut about 20 thou deep!
Test fits indicate I may need a few thousandths of shim stock to fit it 
right. OTOH, it might fit if I can get rid of all the paint. Acetone 
removes it, slowly, and I've spent at least an hour already doing that.

I'd make tapered gibs, but that job for TLM was about 2 weeks work 
because I didn't really have enough heat to properly anneal the brass, 
so I had to hammer and file it straight, a process that always came up 
with a twist, until I found the file wasn't flat! Things went a lot 
better after I found a file that didn't rock when laid on a flat 
surface. That made a huge difference in how TLM made finish cuts. I can 
almost quit calling it a toy!

OTOH, that side project improving TLM did kept me out of the bars for a 
while. :)

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 

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


Re: [Emc-users] Oneshot question

2016-09-15 Thread andy pugh
On 15 September 2016 at 11:04, Gene Heskett  wrote:

> But, if I could 'net' the edge trigger parameters,


You can't net parameters. You can only net pins.
http://linuxcnc.org/docs/2.7/html/man/man9/oneshot.9.html
Tells you which are which.




-- 
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
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Oneshot question

2016-09-15 Thread Gene Heskett
On Thursday 15 September 2016 04:55:03 andy pugh wrote:

> On 15 September 2016 at 05:20, Gene Heskett  
wrote:
> > would be simplified if I could use a 'setp' parameter as
> > a 'net' pin.
>
> As parameters, pins, nets and "setp" are all different things I am not
> clear what you are asking here.
>
> If you are asking if you can "setp" a pin value then leave it
> unconnected, and it will hold the setp value, then the answer is "yes"

I'd like to "net" it to the output of another logic module, which would 
save an and2 gate in the data flow.

I already have a 'spindle-is-moving' signal which would (re)trigger a 
oneshot to give a steady signal as long as the spindle is turning. Then 
I want motion.spindle-on to trigger a second oneshot. If at the end of 
that oneshot pulse, the spindle is moving, everythings fine, but if the 
spindle-is-moving is false at the end of that oneshot, trigger a 3rd to 
pull motion.enable down for a few milliseconds, bringing everything to a 
halt before the motor, with no feedback, has been told to go 450 rpms, 
but the PID winds it up to 10 grand and destroys some more stuff.  This 
time it was the 5i25 and the bob that were blown.  But it went thru the 
grounding system and took all 3 slot interrupters out of the encoder 
too.  So it was about a $150 fix all told, apparently caused by a lack 
of a common ground between the - end of the motor's psu and the system 
ground.

So maybe do it with 2 oneshots & a timedelay?  The timedelay to make a 
startup delay of perhaps 50 milliseconds. A oneshot to convert the 
filter pump to a steady signal, Feed those to an and2, and if the and2 
goes true, fire the 3rd one to shut things down before the motor gets 
all wound up.

But, if I could 'net' the edge trigger parameters, I could do away with 
an and2 in the chain by disabling both edges in lieu of the and2.

It seems there ought to be a simpler way than 4 hal modules to do a 
spindle hasn't turned 100 milliseconds after enabling it shutdown.

I'll set that up come daytime & see if I can get the right "-not" signals 
into the and2.

The idea is to pull motion.enable low just long enough to kill everything 
and then release it.  While at the same time, being immune to the very 
short time of very low speed when the spindle direction is reversed 
while doing rigid tapping. That reversals speed is determined by the 
acceleration profiles, separate from the PID that I put in to keep from 
destroying drive pulley's and belts.

That acceleration limit3's straight line ramp works, but I'd like to have 
a limit4 whose characteristic output for a step input was a 'sine 
squared' ramp.  But we "don't hardly got some more of those". :)  It 
would go a long ways towards de-jerking the spindle.

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 

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


Re: [Emc-users] Oneshot question

2016-09-15 Thread andy pugh
On 15 September 2016 at 05:20, Gene Heskett  wrote:

> would be simplified if I could use a 'setp' parameter as
> a 'net' pin.
>

As parameters, pins, nets and "setp" are all different things I am not
clear what you are asking here.

If you are asking if you can "setp" a pin value then leave it unconnected,
and it will hold the setp value, then the answer is "yes"

-- 
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
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users