[Emc-users] EMC2 Charge Pump

2008-04-11 Thread Greg Michalski
The manual(s) seem to be lacking on charge pump operation and this being my
first foray into the world of CNC I have a couple questions:

1. Does the charge pump run non stop from the time you open EMC till you
close it (or it crashes) or does it stop on E-Stop condition?

2. To add it to my setup do I need to add anything other than the following
4 lines to my machines .hal file:

loadrt charge_pump
net charge-pump = charge.pump-out
addf charge-pump base-thread
net charge-pump = parport.0.pin-xx-out

My intention is to have the charge pump wait for EMC to be running then
close a contactor supplying the stepper powersupply and the mill control
circuitry. That allows me a single power button (the CPU) as opposed to 2 or
3 and guarantees that only when EMC is control can anything happen and no
sequencing issues (do this then that, then this - ie human error). I may
even add a relay to drop the panel power switch out once the charge pump
engages so that I can't accidentally bump it and upset the OS at all. But I
don't want the mill and power supply to be shutdown completely with the
activation of an E-Stop or Machine Power Off.  I only want E-stop to
disable the amplifier enable and the spindle enable, not drop the charge
pump too.  So in short - I want the Charge Pump running the moment EMC2
successfully loads, till the moment it closes (purposefully or otherwise).
 
Am I correct or am I a resident of left field?  I am designing my enclosure
right now and don't have a spare mobo available to temporarily fire up EMC2
and see what happens until I finish the enclosure setup, which will kind of
be determined by the functionality of the charge pump...catch 22 anyone?

The Charge Pump component from the CVS repository (GNU GPL truncated for
space) is:

//   This is a 'charge-pump' component for EMC2 HAL
//   Copyright 2006 Jeff Epler

component charge_pump Create a square-wave for the 'charge pump' input of
some controller boards;
option singleton yes;
pin out bit out Square wave if 'enable' is TRUE or unconnected, low if
'enable' is FALSE;
pin in bit enable = TRUE If FALSE, forces 'out' to be low;
function _ nofp Toggle the output bit (if enabled);
license GPL;
;;
FUNCTION(_) {
if ( enable ) {
out = !out;
} else {
out = 0;
}
} 

Not being that well versed in coding (been a very long time) I'm confused.
Do I need to somehow send an enable the charge pump - and how do I go about
doing that automatically as I verbosely stated above?

Thanks.

Greg

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.12/1374 - Release Date: 04.11.08
16.59
 


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC2 Charge Pump

2008-04-11 Thread John Kasunich
Greg Michalski wrote:
 The manual(s) seem to be lacking on charge pump operation and this being my
 first foray into the world of CNC I have a couple questions:
 
 1. Does the charge pump run non stop from the time you open EMC till you
 close it (or it crashes) or does it stop on E-Stop condition?
 

That is up to you, based on how you configure your HAL setup.

 2. To add it to my setup do I need to add anything other than the following
 4 lines to my machines .hal file:
 
 loadrt charge_pump
 net charge-pump = charge.pump-out
 addf charge-pump base-thread
 net charge-pump = parport.0.pin-xx-out

You probably need one more:

setp charge-pump.enable 1

That will enable the pump so that it runs continuously until you shut
EMC down.  If you only wanted it to run when EMC is not in E-stop, you
would connect the enable pin to an E-stop related signal.

 My intention is to have the charge pump wait for EMC to be running then
 close a contactor supplying the stepper powersupply and the mill control
 circuitry. That allows me a single power button (the CPU) as opposed to 2 or
 3 and guarantees that only when EMC is control can anything happen and no
 sequencing issues (do this then that, then this - ie human error). I may
 even add a relay to drop the panel power switch out once the charge pump
 engages so that I can't accidentally bump it and upset the OS at all. But I
 don't want the mill and power supply to be shutdown completely with the
 activation of an E-Stop or Machine Power Off.  I only want E-stop to
 disable the amplifier enable and the spindle enable, not drop the charge
 pump too.  So in short - I want the Charge Pump running the moment EMC2
 successfully loads, till the moment it closes (purposefully or otherwise).

The 'setp' command I described above should do that.

 Am I correct or am I a resident of left field?  I am designing my enclosure
 right now and don't have a spare mobo available to temporarily fire up EMC2
 and see what happens until I finish the enclosure setup, which will kind of
 be determined by the functionality of the charge pump...catch 22 anyone?


How to do E-stop is an on-going debate.  Some people (me included) think
that if you have a charge pump, E-stop should turn it off.  That is more
fail-safe than your arrangement, where the pump is running as long as
EMC is running.  But the final decision is up to you.  Only you know
your machine and your situation.

 The Charge Pump component from the CVS repository (GNU GPL truncated for
 space) is:
 
 //   This is a 'charge-pump' component for EMC2 HAL
 //   Copyright 2006 Jeff Epler
 
 component charge_pump Create a square-wave for the 'charge pump' input of
 some controller boards;
 option singleton yes;
 pin out bit out Square wave if 'enable' is TRUE or unconnected, low if
 'enable' is FALSE;
 pin in bit enable = TRUE If FALSE, forces 'out' to be low;
 function _ nofp Toggle the output bit (if enabled);
 license GPL;
 ;;
 FUNCTION(_) {
 if ( enable ) {
   out = !out;
 } else {
   out = 0;
 }
 } 
 
 Not being that well versed in coding (been a very long time) I'm confused.
 Do I need to somehow send an enable the charge pump - and how do I go about
 doing that automatically as I verbosely stated above?

Yes, the enable pin turns the charge pump on and off.  Setting it true
with 'setp charge-pump.enable 1' is all you need to make the pump run
all the time.  If you wanted to turn the pump on and off, the enable pin
is how you would do that.

 
 Thanks.
 
 Greg

Hope this helps,

John Kasunich

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users