NEWS
LinuxCNC 2.5.2 Release
LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Hardware Driver Boards 7i43 and Charge Pump signal

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: 7i43 and Charge Pump signal

7i43 and Charge Pump signal 28 Sep 2011 08:44 #13508

  • photomankc
  • photomankc's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 64
  • Karma: 1
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.

This attachment is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
The administrator has disabled public write access.

Re:7i43 and Charge Pump signal 28 Sep 2011 09:13 #13511

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1671
  • Thank you received: 87
  • Karma: 116
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
The administrator has disabled public write access.

Re:7i43 and Charge Pump signal 28 Sep 2011 13:17 #13527

  • photomankc
  • photomankc's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 64
  • Karma: 1
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.
The administrator has disabled public write access.

Re:7i43 and Charge Pump signal 28 Sep 2011 18:16 #13535

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1671
  • Thank you received: 87
  • Karma: 116
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
The administrator has disabled public write access.

Re:7i43 and Charge Pump signal 29 Sep 2011 10:30 #13542

  • photomankc
  • photomankc's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 64
  • Karma: 1
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 10:40 by photomankc.
The administrator has disabled public write access.

Re:7i43 and Charge Pump signal 30 Sep 2011 03:47 #13549

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4140
  • Thank you received: 141
  • Karma: 130
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.
The administrator has disabled public write access.

Re:7i43 and Charge Pump signal 30 Sep 2011 05:59 #13553

  • photomankc
  • photomankc's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 64
  • Karma: 1
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.
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: PCW, jmelson
Time to create page: 0.974 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.