7i43 and Charge Pump signal

More
28 Sep 2011 15:44 #13508 by photomankc
I'm slowly working on my new control system based on the 7i43 board and I only one issue I have run into so far. I wanted a Charge Pump or better described as a watchdog to gate off the power to the mill and accessories unless EMC is up and running. Now, further study shows that this may not be a big deal since it appears that the MESA board has it's own watchdog that must be satisifed however I'm still working on my little microcontroller watchdog so I figured I'd go ahead and add the "Charge Pump" signal to the mesa just to confirm that it works well even in the noisy enviroment of a CNC machine. It's also being used to provide some basic status displays through LEDs and so on.

Anyway, after getting the config setup and confirming that the board was work via the O-Scope I noticed that the Charge Pump pin doesn't do anything. I looked at the HAL config and I definately see that it's there and attached to the servo thread but there is no output on the pin from the 7i43. I reconfigured and moved it to another pin just to rule out a bad connection or solder joint or something. Same deal. Everything else is there and working but the CP signal is nowhere to be found.

I'm I looking for a phantom? Does the MESA board even work with the charge pump? I kinda still want the charge pump because the default MESA output seems to be HIGH and that will be a problem for some of my other circuitry. Long term I want to alter that circuitry to be active low since there is less chance of a noise spike triggering something all the way to the 0 threshold. But at present some of it is active high.

I've attached the HAL output. I can play with it however needed I setup a spare PC for this so I don't have to tear down the old machine to test constantly. Just won't have the actual drives connected to it.

File Attachment:

File Name: PM25_MV__HW_STEP_.hal
File Size:9 KB
Attachments:

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

More
28 Sep 2011 16:13 #13511 by PCW
Replied by PCW on topic Re:7i43 and Charge Pump signal
Theres no reason the 7i43 should not work with the charge pump
maybe first halscope the chargepump net to see if its toggling

I notice the wiki suggests
net emcOn motion.motion-enabled => charge-pump.enable
so possibly your enable via Estop-out polarity is wrong

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

More
28 Sep 2011 20:17 #13527 by photomankc
Thank you! That was it. Didn't pick up on the dependency there.

In this case I don't want it gated against anything else. It's to operate independently and be just an indication that the control PC is on and EMC is running. On a related note.... is there anything real detrimental to running the servo thread at twice per millisecond? The more pulses I can generate per second the faster I can get the monitor loop and still record enough pulses to be useful and get too twitchy about small variances. Right now I wait 100ms so I can collect 50 pulses a 1/2 milisecond servo thread would let me drop that to 50ms and get faster response.

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

More
29 Sep 2011 01:16 #13535 by PCW
Replied by PCW on topic Re:7i43 and Charge Pump signal
No, you should be OK at 2KHz but the EPP I/O will use more of your CPU time at 2 KHz. For 4KHz or faster a
PCI card is probably needed

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

More
29 Sep 2011 17:30 - 29 Sep 2011 17:40 #13542 by photomankc
Cool. I tried it out last night and recalibrated the controller to the faster rate and that would work really well. I could then drop the loop time down to 50ms and still have a decent pulse count at the 1KHz toggle rate. Should be just doable as well to handle the default 500Hz rate with a wide enough margin for jitter. The faster it notices the condition and responds the better.

Running at 2KHz should be just fine. That will allow my firmware to be adjustable for 0-2.2KHz for EMC servo-thread based charge pumps and also 6 to 13.6KHz to allow for Mach3's 12.5KHz signal or an EMC real-time thread pump. About 100 to 300hz would be pretty much the floor though. Sooner or later you have so few pulses to count per period that it's hard to get it adjusted to track it since there is only a couple of pulses of leeway + or -.

My adjustment is an analog port reading a POT. Put it in calibration mode and adjust till it triggers and then center it between the high and low end of the 30% window. The more pulses you have the less twitchy it is to adjust.
Last edit: 29 Sep 2011 17:40 by photomankc.

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

More
30 Sep 2011 10:47 #13549 by andypugh
photomankc wrote:

On a related note.... is there anything real detrimental to running the servo thread at twice per millisecond? The more pulses I can generate per second the faster I can get the monitor loop and still record enough pulses to be useful and get too twitchy about small variances.


You could use a 50% PWM from the Mesa hardware, then you can have just about any watchdog frequency you want.

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

More
30 Sep 2011 12:59 #13553 by photomankc
Well..... Yeah. I guess that I could. Didn't even think about doing it that way. EMC has to keep updating or the PWM shuts down from the Mesa watchdog. Thanks that would work nicely too.

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

Moderators: PCWjmelson
Time to create page: 0.131 seconds
Powered by Kunena Forum