Re: [Emc-users] How to add additional condition for enabling machine

2017-07-30 Thread Gene Heskett
On Sunday 30 July 2017 05:50:57 Tomaz T. wrote:

> newsig pressureOK bit
> linksp pressureOK <= ppmc.0.din.09.in
I think newer ways to say the above would be:

net pressureOK <= ppmc.0.din.09.in => signaltarget.in

Look at man 9 tristate_bit to see if that might be useful as 
signaltarget. Its output might be usable, and its tristate. Figure out a 
way to do its .enable pin by the signal axis is sending to 
motion.enable.

You said that once enabled it won't matter if the pressure drops. I'd 
disagree a bit.

I'd use 2 pressure switches, or one with a large pressure gap between 
closing because there is enough pressure, and its opening because the 
pressure is too low. And I'd go ahead and stop the machine in its tracks 
if the pressure falls too low. If, when the switch opens, it drops a 
sprague clutch against the post to support the weight of the head until 
such time as the pressure is restored, and an initial upward move of 
perhaps 5 thousandths to release the clutch once the solenoid pulling it 
free has been re-enabled by the closing of the switch. 

More complex might be a disk brake, clamping a disk on the motor shaft to 
prevent the fall.  The disk and brake pad assembly from a retired riding 
lawn mower (with a fresh pad) might be usable for the brake as that 
would not need the initial small lift to free the sprague.

All this is personal prefs, with safety for both the tooling and part 
that would be compromised if the pressure dropped too low to adequately 
support the head in mind.

> now, how to properly implement this pin to condition powering up
> machine?
>
> >Electrically you need a way to get this signal on a pin.
> >
> >Past that, it well within the capabilities of the HAL to code up that
> >this pin reading "TRUE" is a condition for running.  It will not
> > matter if "TRUE" is high or low.
> >
> >The HAL can be used to integrate this signal, in like a dozen
> > different ways.  It will only require like <5 lines.

At least a dozen, once the basic desired logic is designed, the devil is 
in the details.

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] How to add additional condition for enabling machine

2017-07-30 Thread Tomaz T .
newsig pressureOK bit
linksp pressureOK <= ppmc.0.din.09.in

now, how to properly implement this pin to condition powering up machine?


>Electrically you need a way to get this signal on a pin.
>
>Past that, it well within the capabilities of the HAL to code up that
>this pin reading "TRUE" is a condition for running.  It will not matter
>if "TRUE" is high or low.
>
>The HAL can be used to integrate this signal, in like a dozen different
>ways.  It will only require like <5 lines.

--
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] How to add additional condition for enabling machine

2017-07-29 Thread Danny Miller

Electrically you need a way to get this signal on a pin.

Past that, it well within the capabilities of the HAL to code up that 
this pin reading "TRUE" is a condition for running.  It will not matter 
if "TRUE" is high or low.


The HAL can be used to integrate this signal, in like a dozen different 
ways.  It will only require like <5 lines.


Danny


On 7/29/2017 3:30 PM, Tomaz T. wrote:

Some more explanation


pressure switch is a simple NO switch which is triggered at certain pressure 
(5.5bar in my case) and that is minimum I need to operate my machine (Z-axis 
counter weight cylinder). So every time I want to use my machine I (manually) 
have to open valve for air.

I doesn't need to stop (or pause) machine if pressure drops, as my air compressor is 
always on "stand by".

So this should be one of conditions needed to power up machine and start homing 
axes.

I don't like the idea to wire it in same circuit as e-stop, I think it would be 
nice to receive warning for this specific error, if it is possible?



Two important questions:
1.  Do you want the machine to pause if you lose pressure mid-run?
(almost certainly so)
2.  Do you want the machine to be able to auto-resume if pressure drops
but comes back?




--
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] How to add additional condition for enabling machine

2017-07-29 Thread Gregg Eshelman via Emc-users

You could simply connect it in series with the e-stop circuit.

-- Original Message --
From: "Tomaz T." <tomaz_...@hotmail.com>
To: "emc-users@lists.sourceforge.net" <emc-users@lists.sourceforge.net>
Sent: 7/29/2017 10:10:31 AM
Subject: [Emc-users] How to add additional condition for enabling 
machine


I have air pressure switch to control if there is enough air pressure. 
Now I would like that this is also condition for enabling machine to 
run.


I would need a little help how to correctly add this to hal.



--
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] How to add additional condition for enabling machine

2017-07-29 Thread Tomaz T .
Some more explanation


pressure switch is a simple NO switch which is triggered at certain pressure 
(5.5bar in my case) and that is minimum I need to operate my machine (Z-axis 
counter weight cylinder). So every time I want to use my machine I (manually) 
have to open valve for air.

I doesn't need to stop (or pause) machine if pressure drops, as my air 
compressor is always on "stand by".

So this should be one of conditions needed to power up machine and start homing 
axes.

I don't like the idea to wire it in same circuit as e-stop, I think it would be 
nice to receive warning for this specific error, if it is possible?


>Two important questions:

>1.  Do you want the machine to pause if you lose pressure mid-run?
>(almost certainly so)

>2.  Do you want the machine to be able to auto-resume if pressure drops
>but comes back?




--
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] How to add additional condition for enabling machine

2017-07-29 Thread Danny Miller

Two important questions:

1.  Do you want the machine to pause if you lose pressure mid-run? 
(almost certainly so)


2.  Do you want the machine to be able to auto-resume if pressure drops 
but comes back?


Danny


On 7/29/2017 1:36 PM, David Berndt wrote:
If the air pressure is related to movement of an axis (or you want to 
say it is...) you can use axis.N.amp-fault-in as a place to input an 
your error condition. The machine won't be forced to e-stop, but will 
not allow the power button to be pressed/stay on.


Same thing should be possible with motion.enable in bit.

For the spindle, maybe motion.spindle-inhibit in bit is what you're 
looking for.


If you want the machine to be totally useless then perhaps wiring it 
into the e-stop circuit is the way to go. Personally I'm not on board 
with that. But about half of the standard conventions in linuxcnc seem 
to rub me the wrong way, so it might be just fine with you.



Dave

On Sat, 29 Jul 2017 12:10:31 -0400, Tomaz T.  
wrote:


I have air pressure switch to control if there is enough air 
pressure. Now I would like that this is also condition for enabling 
machine to run.


I would need a little help how to correctly add this to hal.
-- 


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] How to add additional condition for enabling machine

2017-07-29 Thread David Berndt
If the air pressure is related to movement of an axis (or you want to say  
it is...) you can use axis.N.amp-fault-in as a place to input an your  
error condition. The machine won't be forced to e-stop, but will not allow  
the power button to be pressed/stay on.


Same thing should be possible with motion.enable in bit.

For the spindle, maybe motion.spindle-inhibit in bit is what you're  
looking for.


If you want the machine to be totally useless then perhaps wiring it into  
the e-stop circuit is the way to go. Personally I'm not on board with  
that. But about half of the standard conventions in linuxcnc seem to rub  
me the wrong way, so it might be just fine with you.



Dave

On Sat, 29 Jul 2017 12:10:31 -0400, Tomaz T.  wrote:

I have air pressure switch to control if there is enough air pressure.  
Now I would like that this is also condition for enabling machine to run.


I would need a little help how to correctly add this to hal.
--
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/

--
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] How to add additional condition for enabling machine

2017-07-29 Thread Gene Heskett
On Saturday 29 July 2017 12:10:31 Tomaz T. wrote:

> I have air pressure switch to control if there is enough air pressure.
> Now I would like that this is also condition for enabling machine to
> run.
>
> I would need a little help how to correctly add this to hal.

This is not your problem of coarse, but you may be able to borrow the 
idea from this code snippet, which I did to cause a shutdown if I had 
left the spindle backgear in neutral.  It works fast enough I don't 
have to stand there listening to the motor unwind before I can fix my 
screwup and resume the attempt to run my code. Warning long lines may
wrap in your email agent!

loadrt  and2names=estop_detect
loadrt  not names=not.load,not.spndl,estop_inv 
loadrt  oneshot names=spndlmoving
loadrt  timedelay   names=spndlcmddelay
#==later in file==
#sequence the stopped spindle shutdown, maintain order here
addfspndlmoving servo-thread
addfspndlcmddelay   servo-thread
addfestop_detectservo-thread# a tristate_bit for backgear in 
neutral safety shutdown
addfestop_inv   servo-thread
#==and 375 lines later==
# lets kill things if spindle on, but no motion
# based on a delayed motion.spindle-on for starters
setpspndlcmddelay.on-delay  .2 # time to detect spindle movement
setpspndlcmddelay.off-delay .1 
net spindle-on   <=   motion.spindle-on =>  spndlcmddelay.in # to be 
delayed by on-delay
# works, gives true  when spindle turned on, so feed it to a tristate_bit called
# estop_detect to enable it, 
net estop10  <=   spndlcmddelay.out =>  estop_detect.in1
# next, is spindle moving? Needs turnaround time for g33.1
setpspndlmoving.width  0.4  #seconds it can stop w/o triggering a shutdown
setpspndlmoving.retriggerable   True
setpspndlmoving.rising  True
setpspndlmoving.falling False
net trigger_move  <=  hm2_5i25.0.encoder.00.input-b  => spndlmoving.in
# now feed the and2
net shutrdown   <= spndlmoving.out-not => estop_detect.in0
net gateholderdown  <= estop_detect.out  =>  estop_inv.in
net shutitdown  <= estop_inv.out =>  motion.enable # shuts it down

Now, I haven't a clue how you've wired your pressure switch, so I can't help
there, but there may be an idea you can use in the .hal snippets above.


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] How to add additional condition for enabling machine

2017-07-29 Thread Nicklas SB Karlsson
On Sat, 29 Jul 2017 16:10:31 +
Tomaz T.  wrote:

> I have air pressure switch to control if there is enough air pressure. Now I 
> would like that this is also condition for enabling machine to run.

Emergency stop loop

--
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] How to add additional condition for enabling machine

2017-07-29 Thread Tomaz T .
I have air pressure switch to control if there is enough air pressure. Now I 
would like that this is also condition for enabling machine to run.

I would need a little help how to correctly add this to hal.
--
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