Re: [Emc-users] need a logic bit mux.

2020-07-22 Thread Gene Heskett
On Wednesday 22 July 2020 10:55:47 Jon Elson wrote:

> On 07/22/2020 01:17 AM, Gene Heskett wrote:
> > Greetings all;
> >
> > The launch of linuxcnc on the pi is without any motor power until
> > the F2 button is pushed.  So at launch time I get messages about the
> > z drive being tripped.
> >
> > So I need a 1 or 2 second delay before that bit is sent on thru, but
> > instant transmission once timed out, giving the driver a chance to
> > get all its stuff in one sock from the powerup enabled by the F2
> > key. I want to block any noise during the powerup surge.
>
> OK, so your drives indicate fault status when disabled?

No, it is not specifically disabled, in fact thats not even wired up in 
the drivers since the default is on. But the new 3 phase driver does 
have a fault output, and it is apparently closed during power up 
initialization.

I've assumed this output is similar to the others and I have its minus 
terminal grounded, and am watching its plus terminal with gpio.0061.in 
which will report true except when its tripped, or for a few 
milliseconds at powering up.

They are powred down by removing the electrical power src if linuxcnc 
isn't running, and then its running, the electrical power is only 
activated when f1 is released and f2 is enabled.  That is controlled by 
BIG SSR's driven by motion.motion-enabled. 

So I'm thinking a oneshot, started by motion.motion-enabled, generating a 
true to an or2 for long enough to cover this power up burp.  That 
oneshot and the or2 would have to be above it in the addf order, but 
below motion, so it would be effective when the message module and the 
rest it it looks.  That does sound like it would work.  I'll try it.

I made that work but lost the message, probably by removeing the signal, 
but now I have 2 more messages advising me I must be in joint mode or 
disabled before I can unhome, but it unhomes both axis's anyway!  And 
its all delayed until the next keypress because halui only runs when it 
feels like it.  Can that be fixed somehow? Never mind, a typu. Fixing 
that apparently got rid of the other 2 messages. And I have discovered 
that the motor shutdown allows it to bounce back 15 or 20 thou from the 
chuck jaw I am running into for testing.

So this problem can be marked as solved. See what the freezer has for 
dinner makeins next.  And since I can't eat chicken, take all the canned 
stuff with chicken up to the next door neighbors.  I bought it to feed 
the missus but shes now in a good sam home 50+ miles east of here.
> Yes, a lot of older drives (Copley, Westamp,
> Servo Dynamics) do this.  I made up a module with an
> optocoupler, a CMOS NAND gate and
> some RC delays to do this.  The servo amps usually take a 5
> V ENABLE/.  When the ENABLE/
> is high, the circuit closes the E-stop loop by turning the
> optocoupler on.  When ENABLE/ goes
> low, it continues to do this for about a second, then allows
> the servo amp's FAULT output to control the opto.
>
> Jon
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


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


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


Re: [Emc-users] need a logic bit mux.

2020-07-22 Thread John Dammeyer
> >
> > But I used external hardware to do the time delays to make sure things
> > started up the way I wanted.  You might also use time delay relays.
> > But they aren't cheap.  Ultimately an Arduino ends up being an easy
> > solution.
> >
> > John Dammeyer
> 
> Why should I use any external hardware when LinuxCNC has the stuff built
> in? All I need to do is add it to the .hal file.
> > > Thanks.
> > >
> > > Cheers, Gene Heskett

My system was dual boot to run both MACH3 and LinuxCNC.  I needed the hardware 
to behave in a deterministic way before the PC took control.

John




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


Re: [Emc-users] need a logic bit mux.

2020-07-22 Thread Jon Elson

On 07/22/2020 01:17 AM, Gene Heskett wrote:

Greetings all;

The launch of linuxcnc on the pi is without any motor power until the F2
button is pushed.  So at launch time I get messages about the z drive
being tripped.

So I need a 1 or 2 second delay before that bit is sent on thru, but
instant transmission once timed out, giving the driver a chance to get
all its stuff in one sock from the powerup enabled by the F2 key. I want
to block any noise during the powerup surge.


OK, so your drives indicate fault status when disabled?  
Yes, a lot of older drives (Copley, Westamp,
Servo Dynamics) do this.  I made up a module with an 
optocoupler, a CMOS NAND gate and
some RC delays to do this.  The servo amps usually take a 5 
V ENABLE/.  When the ENABLE/
is high, the circuit closes the E-stop loop by turning the 
optocoupler on.  When ENABLE/ goes
low, it continues to do this for about a second, then allows 
the servo amp's FAULT output to control the opto.


Jon


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


Re: [Emc-users] need a logic bit mux.

2020-07-22 Thread Gene Heskett
On Wednesday 22 July 2020 08:03:48 andy pugh wrote:

> On Wed, 22 Jul 2020 at 12:12, Gene Heskett  
wrote:
> > > It isn't clear what signal you want to block, or under what
> > > circumstances you want to have the delay.
> >
> > Only long enough for the driver to stabilize after power up. One or
> > 2 seconds perhaps
>
> I wasn't asking how long. I was asking what pin.
oh. This is what I have atm:
loadrt  debounce cfg=1
loadrt  message names="ZFault" messages="Z axis Faulted"
[...]
addfdebounce.0  jog-thread
addfZFault  jog-thread
# revel in the free time here from not having to run PID's
# every bit of the processing as set by addf order MUST BE DONE
# between the above read, and the below write.
addf hm2_[HOSTMOT2](BOARD).0.write   servo-thread
[...]
# display msg if Z drive in fault 
# hm2/hm2_7i90.0: IO Pin 061 (P3-31): IOPort
# is lowest numbered gpio used yet a/o 6/25/21
# is lowest numbered gpio used yet a/o 6/25/21
setp ZFault.edge 0
setp debounce.0.delay 1
net z-fault-in  <= hm2_[HOSTMOT2](BOARD).0.gpio.061.in => debounce.0.0.in
net z-fault-trig  <= debounce.0.0.out  => ZFault.trigger
net z-fault-trig  => halui.joint.0.unhome halui.joint.1.unhome

Which should more or less go away, the debounce delays everything, so is 
not really whats wanted.

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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


Re: [Emc-users] need a logic bit mux.

2020-07-22 Thread andy pugh
On Wed, 22 Jul 2020 at 12:12, Gene Heskett  wrote:

> > It isn't clear what signal you want to block, or under what
> > circumstances you want to have the delay.
>
> Only long enough for the driver to stabilize after power up. One or 2
> seconds perhaps

I wasn't asking how long. I was asking what pin.

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


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


Re: [Emc-users] need a logic bit mux.

2020-07-22 Thread Gene Heskett
On Wednesday 22 July 2020 03:51:34 andy pugh wrote:

> On Wed, 22 Jul 2020 at 07:20, Gene Heskett  
wrote:
> > So I need a 1 or 2 second delay before that bit is sent on thru, but
> > instant transmission once timed out, giving the driver a chance to
> > get all its stuff in one sock from the powerup enabled by the F2
> > key. I want to block any noise during the powerup surge
>
> The title says that you need a bit mux. mux_generic can do bits.
>
> Triggering a mux from a timedelay is one way. But is probably
> equivalent to an and2 + timedelay.
> It isn't clear what signal you want to block, or under what
> circumstances you want to have the delay.

Only long enough for the driver to stabilize after power up. One or 2 
seconds perhaps. Long before its asked to do any work, like homing.
Once I get rid of the spurious trip I'll trigger an e-stop with it, 
because if it trips, home has been lost anyway.

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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


Re: [Emc-users] need a logic bit mux.

2020-07-22 Thread Gene Heskett
On Wednesday 22 July 2020 02:45:48 John Dammeyer wrote:

> > The launch of linuxcnc on the pi is without any motor power until
> > the F2 button is pushed.  So at launch time I get messages about the
> > z drive being tripped.
> >
> > So I need a 1 or 2 second delay before that bit is sent on thru, but
> > instant transmission once timed out, giving the driver a chance to
> > get all its stuff in one sock from the powerup enabled by the F2
> > key. I want to block any noise during the powerup surge.
> >
> > Ideas? Something simpler than a one-shot, and2 + a not, thats less
> > time in terms of the addf chain. Timer, driven from F2 I'm stuck
> > with, but is a lut5 faster than all the logic needed to "get the
> > signal right side up"  IDK.
>
> Hi Gene,
> I had similar issues.  The soft start on the Servo Power supply
> results in the STMBL servo drive faulting out when enabled because DC
> power isn't there yet.
>
> I ended up making a board with a PIC12C509 that is an 8 pin processor.
>  If I'd had an Arduino I'd probably have used that.  I now need a
> bigger one anyway since I want to separate the Spindle Enable from the
> rest of the Enables.
>
> But I used external hardware to do the time delays to make sure things
> started up the way I wanted.  You might also use time delay relays. 
> But they aren't cheap.  Ultimately an Arduino ends up being an easy
> solution.
>
> John Dammeyer

Why should I use any external hardware when LinuxCNC has the stuff built 
in? All I need to do is add it to the .hal file.
> > Thanks.
> >
> > 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)
> > If we desire respect for the law, we must first make the law
> > respectable. - Louis D. Brandeis
> > Genes Web page 
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users


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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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


Re: [Emc-users] need a logic bit mux.

2020-07-22 Thread andy pugh
On Wed, 22 Jul 2020 at 07:20, Gene Heskett  wrote:

> So I need a 1 or 2 second delay before that bit is sent on thru, but
> instant transmission once timed out, giving the driver a chance to get
> all its stuff in one sock from the powerup enabled by the F2 key. I want
> to block any noise during the powerup surge

The title says that you need a bit mux. mux_generic can do bits.

Triggering a mux from a timedelay is one way. But is probably
equivalent to an and2 + timedelay.
It isn't clear what signal you want to block, or under what
circumstances you want to have the delay.

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


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


Re: [Emc-users] need a logic bit mux.

2020-07-22 Thread John Dammeyer

> 
> The launch of linuxcnc on the pi is without any motor power until the F2
> button is pushed.  So at launch time I get messages about the z drive
> being tripped.
> 
> So I need a 1 or 2 second delay before that bit is sent on thru, but
> instant transmission once timed out, giving the driver a chance to get
> all its stuff in one sock from the powerup enabled by the F2 key. I want
> to block any noise during the powerup surge.
> 
> Ideas? Something simpler than a one-shot, and2 + a not, thats less time
> in terms of the addf chain. Timer, driven from F2 I'm stuck with, but is
> a lut5 faster than all the logic needed to "get the signal right side
> up"  IDK.

Hi Gene,
I had similar issues.  The soft start on the Servo Power supply results in the 
STMBL servo drive faulting out when enabled because DC power isn't there yet.

I ended up making a board with a PIC12C509 that is an 8 pin processor.  If I'd 
had an Arduino I'd probably have used that.  I now need a bigger one anyway 
since I want to separate the Spindle Enable from the rest of the Enables. 

But I used external hardware to do the time delays to make sure things started 
up the way I wanted.  You might also use time delay relays.  But they aren't 
cheap.  Ultimately an Arduino ends up being an easy solution.

John Dammeyer




> 
> Thanks.
> 
> 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)
> If we desire respect for the law, we must first make the law respectable.
>  - Louis D. Brandeis
> Genes Web page 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


FaultSensePIC.pdf
Description: Adobe PDF document
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] need a logic bit mux.

2020-07-22 Thread Gene Heskett
Greetings all;

The launch of linuxcnc on the pi is without any motor power until the F2 
button is pushed.  So at launch time I get messages about the z drive 
being tripped.

So I need a 1 or 2 second delay before that bit is sent on thru, but 
instant transmission once timed out, giving the driver a chance to get 
all its stuff in one sock from the powerup enabled by the F2 key. I want 
to block any noise during the powerup surge.

Ideas? Something simpler than a one-shot, and2 + a not, thats less time 
in terms of the addf chain. Timer, driven from F2 I'm stuck with, but is 
a lut5 faster than all the logic needed to "get the signal right side 
up"  IDK.

Thanks.

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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