hooovahh Posted October 15, 2013 Report Share Posted October 15, 2013 Tell me I am not the only one that did not know you could do this. When you use an analog output you can have 1 Channel N samples, where you have an array of output values to set, and each one is set one at a time in a finite or continuous output mode. (this part I knew) What I didn't know is Counter Outputs also support writing to them with 1 Channel N samples. Normally you set a Counter Output as a Frequency and Duty Cycle pair, then when you need to change it you set it again. But I discovered yesterday (with a few examples) that you can write a array of Frequency Duty Cycle pairs, and the counter output will set them one at a time. It will set the next pair after one cycle has been completed at the frequency selected. In this way you can setup a counter to have 1KHz 50% for 1 second, then off for 1 second, then back on at 2Khz 20% for 1 second, then what ever and repeat. I was even more thrilled when I realized that the cDAQ 8 slot chassis have 4 internal counter outputs that can be tied to either of the two front BNC PFI terminals with no extra hardware. So attached is my quick demo which will perform a frequency sweep on a counter output going from Frequency Min, to Frequency Max, back to Frequency Min in the duration set by Sweep Duration all being hardware timed. Hope someone else finds this useful. Frequency Sweep Counter.zip Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.