Jump to content

Frequency Sweep Counter Output


hooovahh

Recommended Posts

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.