05-02-2011 03:17 PM - edited 05-02-2011 03:19 PM
You should be more specific about what you are not satisfied about, what you have tried, and what problems you have run into. The Continuous Pulse Generation example that Richard pointed you to should be pretty much exactly what you need assuming you want to use the counter output to generate the waveform.
There is one optional change I would make to the example. It sounds like it might make more sense to define your signal in terms of {high time, low time} instead of {frequency, duty cycle}. Either set of parameters can be used to uniquely determine the output signal so changing the example isn't required, but all you have to do is change the instance of DAQmx Create Channel:
Looking at your code posted on the other thread, it looks like you started out using the Analog Output subsystem to generate your pulse (instead of the counters). This is fine, and is certainly another possibility. The issues I noticed after a quick lookthrough of your code were:
1. The default timeout on the DAQ Assistant is 10 seconds, and the code you attached in the other VI did not change this setting (on the Advanced Timing tab). The default timeout does not allow for enough time to elapse before you complete your generation.
2. The simulate signal VI requires a frequency and duty cycle input. You are calculating Frequency based off of a High Time and Low Time control on the front panel, but you are specifying Duty Cycle independently. Duty Cycle should be computed based off of the front panel controls and should not be its own independent input.
3. Your DAQ task is finite and will restart on each loop iteration. I don't think this is what you are trying to do.
Anyway, I recommend using the counter to generate the pulse, just try using the example and if you run into any specific problems you can let us know. Alternatively, you can modify your existing program to do it as well, but you'll at least need to fix the 3 issues that I mentioned above.
Best Regards,