02-19-2015 04:16 PM
Your help has been very much appreciated
Excellent! I have that working now. Can you tell me if there is any correlation between the frequency and duty cycle on the counter output and the frequency and duty cycle on the digital output task? Can they be the same?
In one of your first posts you suggested, "Use the 9211 as a software-timed analog input task and write the new duty cycles to your digital task based on the measured values." Would the timing of this analog input be controlled by the counter we just created? If so, then I should be able to run the counter and then run the analog input task to verify that's working correctly. If that works correctly then I could move to manipulating the analog input data to generate a new duty cycles? (Correct, I hope)???
02-19-2015 04:33 PM
Awesome, glad to hear it's working.
The duty cycle on the counter output is irrelevant (50% is fine, I'd avoid excessively high or low duty cycles)--the digital output task uses a rising or falling edge to generate an update so the overall period (or frequency) is all that matters.
The frequency should decidedly not be the same frequency that you intend for the output signal, but it should be much faster depending on the duty cycle resolution you want. As an example, a clock (counter output) frequency 100x faster than the desired digital output frequency would give you a 1% duty cycle resolution, while 1000x faster would give you 0.1% duty cycle resolution.
I wouldn't use timing on the analog input task--you don't need a buffer of data as far as I can tell but rather want to respond to the most up-to-date sample that you can. So if you configure the task in this manner (software-timed AKA "on demand"), then the timing of the analog input would not be controlled by the counter you created. Rather, when you call DAQmx Read the 9211 would return a single sample for each channel that you would use as an input to determine the output duty cycle.
Best Regards,
02-20-2015 11:15 AM
John,
I have add the call DAQmx Read the 9211 in several configurations. Below is the latest configuration. All Im trying to do is watch the call data. I get three different temperature reading before I get this error I It appears that the program still hangs when ever I generate the Call DAQmx 9211. Thoughts?
02-20-2015 12:14 PM - edited 02-20-2015 12:20 PM
I'm not sure how the analog task is configured (it's hidden inside the DAQ Assistant), but that error still probably indicates that the digital output isn't getting its sample clock.
Try this:
Best Regards,
02-23-2015 03:36 PM
John,
You are good, very good!!!
Thanks