02-14-2007 03:16 PM
02-14-2007 08:02 PM
02-15-2007 12:28 PM
02-15-2007 01:43 PM
02-15-2007 02:20 PM
02-15-2007 03:25 PM
1. To preserve the finite acquisition approach, you could bring the Start and Stop functions inside the loop. The way you'd run is: (a) start task, (b) read 1 full buffer of samples after it completely fills, (c) stop task, (d) repeat a,b,c as needed.
2. Errors with small speed changes are a puzzler to me. Have you tried a separate example program that'll use a counter to perform frequency measurement on the A channel signal? That might show more clearly if there's a tendency to receive faster bursts of edges under different conditions.
3. The 6602 is an older design than the M-series boards and I can't think of anything it offers over the M-series except to give you a larger # of counters. I *do* know that it's a bit less flexible in the kinds of non-default signal connections it allows. Note that the 6602 definitely IS supported by DAQmx, but the datasheet you found probably pre-dates the existence of DAQmx. It's also limited to a 2-sample FIFO. The 6602 is getting old enough (in computer board time) that I like to think we're about due to see NI release a new generation counter/timer board.
4. Agreed, consistently not working is usually easier to diagnose & fix than intermittent problems. I'd still recommend doing some troubleshooting both (1) on your regular app while using an alternative sample clock source, and (2) measuring the observed frequency of the A channel signal when wired into your PFI pin.
-Kevin P.
02-15-2007 05:04 PM
02-16-2007 11:06 AM
I'm not really an electrical whiz -- dealing with erratic / noisy signals still seems a bit like black magic to me. However, I've had a few situations where signals looked just fine on a scope but they still generated too high of a "burst rate" for sampling when connected to the DAQ board. Sometimes I could see a bit of ringing by dialing down the scope's timebase setting into the realm of nanosec while triggering off the edges. Other times, I never did see anything suspicious and chalked it up to the scope probes offering a kinder gentler electrical path than my regular DAQ wiring.
1. Yeah, I'm not real surprised. The finite vs. continuous acquisition change would mainly give you some benefit if you were dealing with high rates (maybe several 100 kHz or more) and a definitely clean clock signal. At this point, I'm still suspicious of your clock signal.
2. If you're talking internal combustion engine, spark plugs are notoriously "dirty" in terms of electrical noise transmission.
3. I very much expect that you *can* do what you want with the hardware you've already got. One additional option for you to look into is the PFI Line digital filtering available in the M-series boards. I haven't found myself needing it yet, so I'm afraid I'm no help on the details.
4. I'd use one of the shipping examples for continuous AO. As long as you don't wire the output to anything, it doesn't matter what the example generates. All you care about is that the sample clock gets generated continuously at the rate you desire. Just start that example vi and let it run in parallel with your app. In your app, drop down a DAQmx Timing vi for your encoder measurement tasks. One of the inputs will let you specify that the AO sample clock gets used as the sample clock for your encoder tasks. All the internal signal routing needed for this is handled automatically by DAQmx, and I've NEVER seen this type of sample clock show any noise-like behavior.
I won't say that scopes lie, but a scope probe will represent different termination characteristics than your normal wiring. This can in turn change the transient behavior of the signal. Or maybe there's some deeply embedded scope setting that's suppressing or filtering the transients in question?
5. I don't have exact specs on sustained sampling rate capability for that board either, but I would certainly expect you to be able to achieve 100 kHz or so but probably not as much as 1 MHz for any significant duration. Since you're talking about an engine, I'd guess you're maybe in the 10's of kHz?
6. Yeah, I use the Create Channel and the Timing and DAQmx property nodes, etc. Kind of an old-school habit so that all the configuration can be right in the executable, and doesn't depend on an operator setting up stuff in MAX on a deployed machine.
-Kevin P.