03-28-2007 05:25 PM
03-28-2007 06:01 PM
03-28-2007 06:33 PM
03-29-2007 08:29 AM
Hi again. While the M-series boards can do hardware-timed buffered digital input acquisition, there is no internal clock that can be directly assigned as a DI sample clock. The sample clock either needs to be generated by one of the on-board counters, *shared from an AI or AO task, or wired from an external clock source.
Other tidbit: in your loop, both DAQmx Read calls request -1 samples, meaning "read all available samples." Since the calls happen in sequence, there's no guarantee that they will have the same # available. A better idea, IMO, is to set your 1st call to "read all available" then request your 2nd call to read a number == the size of the 1st call's output array.
-Kevin P.
"share from" -- a nice way to phrase freeloading, as in, "Here, let me share some fries from you..."
03-29-2007 11:40 AM
03-29-2007 11:49 AM
03-29-2007 12:08 PM
03-30-2007 06:29 AM
03-30-2007 01:42 PM
03-30-2007 02:15 PM - edited 03-30-2007 02:15 PM
First - how are you doing a difference of 2 quad encoders? Are you taking the A channel from each of 2 different encoders running at the same nominal pulse rate? I'm away from my LV PC and can't go back and look now. I've done that kind of thing before, where you configure for up/down counting and you get a measure of relative lead and lag.
Second - all the stuff I did was at home while procrastinating and is fully untested. Don't trust it to do what I said it should without testing.
Third - does it make sense to save data continuously like I tried to do for you? I've developed a rule of thumb that says, "when in doubt, store to file and defer the decision-making." The reason I goofed with the # of samples acquired & displayed was that I pictured you updating a graph representing <something> through exactly 1 engine cycle. Seemed like updating it a couple times a second would be enough.
Since this is your thread and you asked, here's the scoop on Audacity: I actually grunted through that stuff several months back. I probably did use the envelope tool, but I think I ended up applying it piecewise in several little pieces through the fade region. I couldn't make the envelope curves apply just the right shape to keep the volume constant across the fade.
It was interesting in a weird way. I'd have thought going in that nothing could be easier to mix imperceptibly than noise. It turned out that the clicks you get with no fade and the volume artifacts coming from linear fade make noise especially *difficult* to mix.
At some stage I think I mixed in some pure noise and then applied some filtering to cut out high freq hiss. I also added some low freq amplitude modulation and some low freq Left<-->Right panning. In the order of <0.1 Hz, with the two effects at frequencies without common multiples. Overall the effect isn't very noticeable (especially the panning on a boombox), but I think the slight variation works better than 100% solid repetition. Anyway, they were effects sitting there in Audacity and I figured they'd be fun to goof with.
Finally, a couple months after the first cd I found an old "Nature Sounds" tape of crashing waves on a beach. So I mixed that in with the original cd to make a version 2. The nightly scoreboard is now Fans - 2, Boomboxes - 2. I'm getting there...
-Kevin P.
Edit: put back a sentence I accidentally deleted
Message Edited by Kevin Price on 03-30-2007 03:16 PM