CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Re: Caliper to PC interface, Part II: Data Format ?????? Help ?

Posted by ccs@m...
on 2001-10-20 07:49:41 UTC
> > Acutally, most modern parallel ports do have bidirectional capability
> > through one or both of two special modes (ECP and EPP).
>
> I've tested bidirectionality in ECP and EPP modes and have not got it to
> work. Do you have firsthand knowledge that they are bidirectional ? I've
> set up the control register for bidirectional operation but I can't get the
> pull up circuitry to disengage.

They really are bidirectional. The term 'pull up' usually refers to a
passive device - a resistor, which is over-ridden by an open-collector
(open drain) switching device. I'd try putting the port in input
mode, then pulling the line down through an ammeter and seeing if the
current stays within the source specification for a parallel port.
Also see if the port then reads that as a zero. This may require
nixing my current limit series resistor suggestion.

> Agreed. Some of those modes are DMA driven, which would really be nice.

This is not an application where DMA is at all suitable. DMA is for
transferring blocks of data - you need to get a word and think about
it. DMA would only be usefull if you wanted to make an oscilloscope
like 'recording' of the output which you could later analyze to
extract the bit transisitions of data and clock. But recording in
this fashion would be woefully inefficient as your non-synchronized
sampling rate must be well above the data rate.

> > Or if you don't need to read the devices too frequently, simply
> > multiplexing them may be the best bet.
>
> Timing is an issue. The calipers output data every 300ish mSec, to the beat
> of their own drum. There is no practical way to set when a caliper outputs
> its data. All three could send at once or they cold be spread out evenly.

Yes, so the worst case is that it would take 1.8 seconds to see a
valid sequence on all three devices. Select first device, wait until
you see a new sequence start, select second device, wait until
sequence start, etc. For some applications this might be okay - you
haven't said what you want to do with it. The 300 mSec individual
rate is fine for a DRO or for logging dimensions of finished parts,
but it is no where near fast enough for any kind of servo loop.

> Right now it doesn't, but it will. Right now I am using a simple, but
> effective polling algorithm. It uses about 1% of the available CPU time.
> In the future I will use a DMA scheme or interrupt driven data capture or
> multiple threads, each polling for one caliper. Any of them could work, the
> approach is just different.

I don't think you actually need multiple threads - you can just
process each input word for the three calipers in sequence, using
seperate variables to track the state of each. But maybe you are more
familiar with multithreading than I.

I don't know that you can get multiple interrupts off any of the
parallel port schemes, so you would have to add interrupt multiplexing
logic... poling with on-the-fly data extraction is probably the best
solution.

Chris

Discussion Thread

krlux 2001-10-18 17:57:57 UTC Caliper to PC interface, Part II: Data Format ?????? Help ? Doug Fortune 2001-10-18 18:18:20 UTC Re: [CAD_CAM_EDM_DRO] Caliper to PC interface, Part II: Data Format ?????? Help ? krlux 2001-10-18 18:22:43 UTC Re: [CAD_CAM_EDM_DRO] Caliper to PC interface, Part II: Data Format ?????? Help ? krlux 2001-10-18 20:57:57 UTC Re: [CAD_CAM_EDM_DRO] Caliper to PC interface, Part II: Data Format ?????? Help ? Graham Hollis 2001-10-19 08:43:34 UTC Re: [CAD_CAM_EDM_DRO] Caliper to PC interface, Part II: Data Format ?????? Help ? krlux 2001-10-19 09:26:42 UTC Re: [CAD_CAM_EDM_DRO] Caliper to PC interface, Part II: Data Format ?????? Help ? Jon Elson 2001-10-19 11:15:03 UTC Re: [CAD_CAM_EDM_DRO] Caliper to PC interface, Part II: Data Format ?????? Help ? Bill Phillips 2001-10-19 13:11:15 UTC Re: [CAD_CAM_EDM_DRO] Caliper to PC interface, Part II: Data Format ?????? Help ? wayne_j_hill@y... 2001-10-19 22:02:27 UTC Re: Caliper to PC interface, Part II: Data Format ?????? Help ? krlux 2001-10-20 00:18:23 UTC Re: [CAD_CAM_EDM_DRO] Re: Caliper to PC interface, Part II: Data Format ?????? Help ? ccs@m... 2001-10-20 06:09:44 UTC Re: [CAD_CAM_EDM_DRO] Re: Caliper to PC interface, Part II: Data Format ?????? Help ? krlux 2001-10-20 07:28:41 UTC Re: [CAD_CAM_EDM_DRO] Re: Caliper to PC interface, Part II: Data Format ?????? Help ? ccs@m... 2001-10-20 07:49:41 UTC Re: [CAD_CAM_EDM_DRO] Re: Caliper to PC interface, Part II: Data Format ?????? Help ? brian 2001-10-20 20:44:44 UTC Re: [CAD_CAM_EDM_DRO] Re: Caliper to PC interface, Part II: Data Format ?????? Help ? Jon Elson 2001-10-20 22:08:04 UTC Re: [CAD_CAM_EDM_DRO] Re: Caliper to PC interface, Part II: Data Format ?????? Help ? wayne_j_hill@y... 2001-10-21 10:23:57 UTC Re: Caliper to PC interface, Part II: Data Format ?????? Help ?