Re: porting new D/A boards to EMC





Doug Fortune wrote:

> Fred Proctor wrote:
>
> > Khaweja wrote:
> > > But my main question, which file contains the C code for input output for a
> > > specific card, and how do i change it. I mean i do not have money to buy a
> > > ServotoGo card, so i am building my own controller,
> > > But i do not want to alter any of the original code of the EMC.
>
> > The actual code that makes up these functions is board-specific. See
> > emc/src/emcmot/extstgmot.c as an example. These functions map the
> > external interface calls to the actual code for the Servo To Go board
> > functions, in emc/src/emcmot/stg.c
>
> In my latest round of brainstorming how to get servo's going on the cheap,
> I had an idea as I came across:
>
> http://www.bsof.com/d140prod.htm    $99  8  bit 8 channel A/D, 24 bit I/O ISA card
> http://www.bsof.com/accsprod.htm      $20  DB-37 pin breakout board to connect to the
> above.
>                                                                         $15  DB-25 pin
> breakout board for the parallel port
>
> As you can see it has eight DAC channels at 8 bits per channel (6 usec settling
> time  ie 166.6 KHz), and hence expandability up to 8 axes.    As each axis of a
> homebrew  brushless motor driver circuit would have its own 20 bit up/down
> counter for positional tracking,  I would use some of the bits (perferably 20,
> otherwise 16)  of the 24 bit I/O to feed positional information back to EMC for a
> closed loop.  Three of the remaining bits would be output as a 1-of-8 decoder to
> nab the positional counter data of the desired axis.

Well, just because you have 6 uSec DACs doesn't mean you can feed them with a
new servo update every 6 uS, and I really don't think you can.  And, 8 bits of
velocity resolution seems VERY limited.  Unless you had a VERY high servo update
rate (maybe 10+ KHz) and a much lower bandwidth on your servo amp, I think there
would be a lot of vibration as the velocity jumped between these steps.  The Servo
to Go card has 13-bit DACs, and many people complain about that being too few.
The ANCIENT Allen-Bradley 7320 CNC system, from the 1970's, had a 14-bit plus
sign PWM DAC, and it had a 100 Hz servo update rate!  This was adequate for
large, heavy machines, but was just too slow for smaller machines like a standard
Bridgeport.

I don't know what you are doing for feedback, but connecting a 20+ bit counter
to a digital input module which reads it back a byte at a time, with no latch to
hold time-coherent samples will require heavy software filtering.  Consider what happens
when the bytes are read in while a count has updated the counter.  Some of the
bytes represent BEFORE the count changed the counter value, some after!
If you don't software filter this, you could reassemble the bytes and get a position
reading that is up to 256 or 65536 counts off, depending on where the carry
ocurred!  This would cause MAJOR glitching of your servo system.
If you DO software filter it, you have to throw away the sample and re-read the
counter.

On that card you mention, is that an 8 channel Analog to Digital converter,
or a Digital to Analog converter?  You need the DAC for a servo velocity
commands to the servo amp.

Jon




Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact