![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
| 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_pumpMy intention is to have the charge pump wait for EMC to be running then close a contactor supplying the stepper controller powersupply and the mill control circuitry. That limits me to one power button as opposed to 3. 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 E-Stop, just stop motion and spindle rotation. Am I correct or am I a resident of left field?
__________________ Every day is a learning process, whether you remember yesterday or not is the hard part. www.distinctperspectives.com |
|
#2
| |||
| |||
| This caught my eye so I looked at the charge_pump component: http://cvs.linuxcnc.org/cvs/emc2/src...arge_pump.comp It appears that it outputs a square wave (at half the frequency of the thread you run it in) as long as the enable bit is on: FUNCTION(_) { if ( enable ) { out = !out; } else { out = 0; } } (this looks funny because the forum chops the indenting spaces) The input pin is "enable", and the output pin is "out", so you could connect the e-stop signal to the enable pin (probably after inverting it) to get what you want. I'm not sure if there's already an inverted e-stop signal indicating the absence of e-stop, that might save a little bit of trouble. |
|
#4
| ||||
| ||||
| Ok, after a quick glance at my old Essential Guide to ANSI C - I understand what the function is doing, inverting the output each time it is ran IF it's enabled. How do I set it to always be enabled via the .hal file though? If I connect it to E-Stop it's still going to toggle at some point. I want it to run if EMC2 is running - never toggle. E-Stop only shut down the amplifier enable bit and the spindle enable bit. I also posted to the mailing list (I think...hope I did it right...) EDIT - Ok after reading more of the CVS info : Code: pin out bit out "Square wave if 'enable' is TRUE or unconnected, low if 'enable' is FALSE"; Am I going about this an overly complex way? As there a simpler way, maybe to set a high bit high when EMC is active and forgive the possible startup jitters that rarely might power up the controllers? (ie a $5 relay instead of a $22.50 charge pump board or programming my own PIC) Just spitballing... Thanks for any help.
__________________ Every day is a learning process, whether you remember yesterday or not is the hard part. www.distinctperspectives.com Last edited by cadmonkey; 04-11-2008 at 09:40 PM. |
|
#5
| ||||
| ||||
I used pin 17 for the enable because on my BOB that was where the charge pump would have been. All three drive enables are physically tied to parport.0.pin-17-out. # create a signal for the machine enable net xenable => parport.0.pin-17-out net xenable axis.0.amp-enable-out => stepgen.0.enable I also have these two lines but I don't really know what purpose they serve. net yenable axis.1.amp-enable-out => stepgen.1.enable net zenable axis.2.amp-enable-out => stepgen.2.enable My estop is on pin 10 and it is set up like this. net estop-ext <= parport.0.pin-10-in-not net estop-out <= iocontrol.0.user-enable-out net estop-ext => iocontrol.0.emc-enable-in Alan
__________________ http://www.alansmachineworks.com |
| Sponsored Links |
|
#6
| ||||
| ||||
| I remember there being a difference in my mockup between machine enable and amplifier enable and I chose amplifier enable - I think you might be onto what I'm looking for. As to the 2 other lines - essentially those are enabling the step generators for the other axis (Y & Z) just like X was, just the xenable was also tied to a physical output pin (parport.0.pin-17-out) to be driven high when the axis are enabled. You could in theory have each tied to a pin to enable each drive individually, but pin limitations and the need to individually shut down drives aren't common on our DIY setups. I've got the estop setup like I want, all my optical limits on a second LPT card and I'm just looking to streamline the startup and eliminate switches to forget to turn off... Maybe tomorrow I'll setup the motherboard, plug in everything, hook it up to the scope and just see what happens when I make a few changes. Thanks.
__________________ Every day is a learning process, whether you remember yesterday or not is the hard part. www.distinctperspectives.com |
|
#7
| ||||
| ||||
| You're right, I remember now. I just couldn't figure out how to net the three of them together off of pin 17 in hal. The way I have my estop setup, I have to have the physical switch active as well as the "Axis" estop button. So hitting either one will put it into estop. Alan
__________________ http://www.alansmachineworks.com |
|
#8
| ||||
| ||||
| Well I got the answer I needed off the EMC2 users mailing list - in addition to the 4 lines I need to add: Code: setp charge-pump.enable 1
__________________ Every day is a learning process, whether you remember yesterday or not is the hard part. www.distinctperspectives.com |
|
#9
| |||
| |||
| If you want the charge pump to turn on only when you click the Machine Power button or hit F2, use the following... Use stepconfig to set up your estop pin (pin10 in my case) and the configure the charge pump on whatever pin you're using. Then edit the Hal file. in your Hal config file, Delete the line; net estop-out charge-pump.enable iocontrol.0.user-enable-out and replace it with the following; net motion-enabled charge-pump.enable motion.motion-enabled This will make the Machine Power (F2) button control the charge pump on the G540. The external estop button will work correctly, and the EMC Estop (F1) button will act correctly as well. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Newbie- Charge pump setup | zeta | LinuxCNC (formerly EMC2) | 6 | 02-23-2008 03:05 PM |
| Charge pump for Hilbilly BOB | dougputt | Mach Software (ArtSoft software) | 2 | 10-11-2007 12:31 PM |
| Charge Pump ??? | jack55 | General Electronics Discussion | 6 | 04-21-2007 02:59 PM |
| Diy Charge Pump Circuit? | zigmart | General Electronics Discussion | 6 | 03-18-2007 07:28 PM |
| Charge pump | mlaws1172 | Screen Layouts, Post Processors & Misc | 0 | 01-03-2006 10:46 PM |