02-05-2024 08:02 AM
If I write this to the DAQmx write, it should output alternating values for 10 seconds at a sample rate of 10 (100 samples). Unfortunately, the same result. i.e. the output remains always high (or always low when I invert the array)...
02-09-2024 03:10 PM
I had to go back and review the whole thread a bit more.
1. Back in msg #8 you identified that you're using a 6225 for the DO task. That's an M-series MIO device which requires you to use an external clock. It's not able to derive its own sample clock using the 'OnboardClock'. This is probably at the heart of the problem.
Bring up another shipping example for Counter - Continuous Output and run it on your 6225. Note the PFI terminal you designated for the output pulse train. Then run the DO example where you specify the same PFI terminal as the 'Sample Clock Source'.
2. I would have expected an error from trying to use 'OnboardClock' on a device that doesn't support it. But this error might not get discovered by DAQmx until you try to start the task at the call to DAQmx Write. The reported timeout isn't the error I'd have expected though.
3. From your description, it sounds like the task *did* generate the last value in the array. That surprises me. I'd have expected the prior error to prevent it from generating any output at all.
The # of enable lines you can drive with a single counter's PWM output will depend on the current draw from your op amps and your 6225's current sourcing spec. But I'm sure there are simple & cheap IC's you could connect to your counter output to drive the 32 enables. (Sorry, I don't have a specific recommendation, but I'm sure there's plenty too choose from.)
-Kevin P