× Forum Header

Charge Pump + Emergency Stop

More
31 Jul 2010 20:25 #3535 by JensR
Charge Pump + Emergency Stop was created by JensR
I've got my mill configured with the wizard, and it generally works (after fixing the #@%$ Intel SMI problem latency problem. (Could we have a script for that, i.e. checking the pci devices for an Intel motherboard and then adding the correct settings to the rtai config? I made two silly mistakes.))
The controller board I use needs a charge pump signal on pin 1. That works fine normally, but I recently built myself an external Emergency Stop button to make it easier to reach than the keyboard in case of trouble.
The problem is, if I configure an external Emergency Stop (or "NOTAUS" in my German config) on pin 10 I don't get the charge pump signal and the board is dead. The user interface shows the state of the button correctly if I press or release it. As soon as I configure pin 10 as unused again the board resumes to work.
I looked at the config files and the documentation, and as far as I can tell it is configured correctly.

Please Log in or Create an account to join the conversation.

More
01 Aug 2010 12:53 #3541 by BigJohnT
Replied by BigJohnT on topic Re:Charge Pump + Emergency Stop
What version of EMC are you running?

Attach a pastebin link to your .hal file that was generated by Stepconf Wizard.

If you configure pin 10 to other inputs does the charge pump work properly?

John

Please Log in or Create an account to join the conversation.

More
01 Aug 2010 18:58 #3550 by JensR
Replied by JensR on topic Re:Charge Pump + Emergency Stop
BigJohnT wrote:

What version of EMC are you running?

I just did an update on Saturday, and I started out with the Ubuntu 8.04 based disc. During startup it reports 2.3.5, but is that only for axis or for the runtime as well?

Attach a pastebin link to your .hal file that was generated by Stepconf Wizard.

The difference between the config without the external emergency stop and the one with is:
1c1
< # Erstellt von stepconf am Sun Aug  1 15:41:25 2010
---
> # Erstellt von stepconf am Sun Aug  1 18:48:52 2010
42a43
> net estop-ext <= parport.0.pin-10-in-not
82c83
< net estop-out => iocontrol.0.emc-enable-in
---
> net estop-ext => iocontrol.0.emc-enable-in
My button is "normal closed". I attached the working one without external estop.

If you configure pin 10 to other inputs does the charge pump work properly?

I tried pin 11, and again I see the emergency stop enable/disable in the gui and I can switch on the machine button, but I don't actually get the charge pump signal. Or better, the "enable" LED on the board stays dark.
If I disable the external emergency stop I can enable estop from the gui and run the machine as normal.

Btw, I just noticed, does the line
net [b]estop-out[/b] charge-pump.enable iocontrol.0.user-enable-out
need to be
net [b]estop-ext[/b] charge-pump.enable iocontrol.0.user-enable-out
?

File Attachment:

File Name: working_no...stop.txt
File Size:3 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
30 Oct 2010 16:13 #4971 by JensR
Replied by JensR on topic Re:Charge Pump + Emergency Stop
I just got another bunch of mechanical and electrical things cleaned up, but this is still not working. Is anyone else using a driver board that uses a charge pump and external estop, and what are the settings?

Please Log in or Create an account to join the conversation.

More
30 Oct 2010 22:19 - 07 Nov 2010 22:11 #4973 by andypugh
Replied by andypugh on topic Re:Charge Pump + Emergency Stop
How is the e-stop wired? (Does it pull the pin low normally and let it come high when activated?)

The first question is what you want to happen when you hit the E-Stop. Mine actually drops the main power relay, and EMC remains unaware of this fact, so I wouldn't use my config in your situation.

It is possible that you have hit the limits of what stepconf can do for you, and you might have to start editing the HAL file by hand.
Hal files are not that difficult, once you understand the basics:

Ignoring the loadrt and addf commands (which create and activate the realtime "building blocks") the key to HAL is the "net" function

The structure is

net <signal_name> <pin1> . . . . <pinN>

Each line must have a signal name. Consider that to be the colour of the wire that links the pins. You can use any colour you like. By which I mean you can put any signal name you choose in that position. The signal name itself does nothing, but ought to be meaningful to you, in much the same way as a red wire is generally used for "live" but not all red wires are live. Similarly calling a signal "e-stop-in" does not mean that EMC interprets it to have anything to do with an estop. Feel free to call those signals "notaus-in" if you prefer.

The other things on the line must be "pins" which are the input and output terminals of the functions loaded by the "loadrt" function. You can see all those pins, and if they are inputs or outputs in the Machine->show HAL config menu in Axis. If things are so messed up that EMC2 won't even start, then add a line to the HAL file which says "show pin" just after the "loadrt" section of the HAL file and you will get a list of all pin names. Be careful with pins_like_this and pins-like-this as HAL is rather inconsistent that way.

Every "net" command must have one signal name and can have at most one Output pin. (signal source). It can have as many input pins (listeners) as you want.

So:
net estop-out charge-pump.enable iocontrol.0.user-enable-out
creates a signal name "estop out" and links the iocontrol.0.user-enable output to the charge-pump.enable input.

Once you have created a signal name you can use it to split things over several lines. The following is equivalent to the single line above.
net estop-out charge-pump.enable 
…. <several more lines, maybe a whole separate file>
net estop-out iocontrol.0.user-enable-out

I suspect that if you want to use both the onscreen F1 button and the external button you might need to add an extra function to your HAL file (and and2 function, probably wiki.linuxcnc.org/emcinfo.pl?HAL_Components#and2 )

It might be better if you post the not-working config and then we can try to make it work.

Simplest solution might be to just add this line:
net notoaus-pump parport.0.pin-10-in => charge-pump.enable

(This uses the fact that the parport pins have two outputs, one being the inverse of the other, so it is possible to use them as two separate virtual HAL pins.)
Last edit: 07 Nov 2010 22:11 by andypugh. Reason: I missed out the signal name in the example, making it meaningless

Please Log in or Create an account to join the conversation.

More
06 Nov 2010 22:46 - 06 Nov 2010 22:48 #5122 by JensR
Replied by JensR on topic Re:Charge Pump + Emergency Stop
I experimented a bit more, and I got it to work with this solution:
Re: [Emc-users] iocontrol user-enable-out

Basically I deleted the "net estop-out charge-pump.enable iocontrol.0.user-enable-out" line and added a "net estop-ext => charge-pump.enable" line.

"iocontrol.0.user-enable-out" seemed to be always false, independent of machine state.

So this works for me now, and it would be nice if stepconf would generate a solution like this if both an external estop and a charge pump are configured. I could add this myself, but I'm not sure if this is really the correct and safe solution.

An even better solution would probably "and2" the "estop-ext" and "iocontrol.0.user-enable-out" signals, but the GUI doesn't seem to take an input on the GUI button if it is controlled externally.
Last edit: 06 Nov 2010 22:48 by JensR.

Please Log in or Create an account to join the conversation.

More
07 Nov 2010 22:13 #5147 by andypugh
Replied by andypugh on topic Re:Charge Pump + Emergency Stop
No, that is what iocontrol.0.user-enable-in is for, taking that signal low will change the state of the software e-stop button.

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum