In the frequency sweep generator module , I would like to be able to have the sweep repeated automatically. Is there a way to set this up either in the module itself or have the module controled by a loop within a C file. Thanks.
The frequency sweep does not have a flag to indicate that the sweep is complete. However, the time that it takes to sweep from the lowest to highest frequency is completely deterministic based on the settings you use in the block. In order to start and re-start the sweep, you will have to control this algorithm from your system microcontroller.
Thanks for the quick reply. So basically to create a reoccuring sweep generator I have to have a C file that just reinitializes the module based on the timing involved to complete one sweep? If my understanding is correct, Could I bother you to give my some hints at the specifics on how to calculate the timing and what controls do I create in my C file...aka is it just a matter of setting/clearing a register bit.
Another question. Is there any way to have the module tell me what freq is being generated when polled? Or even have the module automatically send such info to the microcontroller.
The log sweep block allows you to set the start and stop frequencies, the number of steps between the two, and the cycles/step. The time that it will take to sweep from the start to stop frequencies will be (using a simple example of two steps, just the start and stop freqs):
t = (1/f_start * steps) + (1/f_stop * steps)
If there were additional steps in between the start and stop, this equation would just have additional terms at each frequency. The SigmaStudio help file (press F1 with the block highlighted) has additional information on the use of these blocks. You can also use SigmaStudio's Capture Window to view the parameters that are being written when you set them in the cell or when you toggle the different buttons.
The block cannot automatically output the currently generated frequency value. I do not believe that there's an easy way for you to read back the frequency value from this cell.
Thank you very much.
Retrieving data ...