Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

Script Mode for FGEN c++ function

Solved!
Go to solution

Hello everyone,

 

My goal was to use pxi 5406 to implement frequency sweep functionality. Right now, we just use the functions about creating frequency list. There are four trigger modes for frequency list, signle, continuous, stepped through and burst. We are using the stepped through mode. It is painful to use this mode, since for each frequency you should send a rising edge, thus if i have several hundreds, it means i have to generate this amount of rising edges. This will generate a lot of sample buffer in another analog card.

 

My question is that could i use script mode for frequency list? Or is there any smart way to achieve this goal? From the signal help file, it said there is some c programe about script mode. But i can't find any example in my computer. If you have some, could you send me?

 

Thanks very much.
.

Yami.

0 Kudos
Message 1 of 6
(6,444 Views)
Solution
Accepted by peter_fang

Yami,

 

The 5406 doesn't have the ability to perform script mode. The only output modes for it are Standard Function and Frequency List. However, I believe you can do what you want to do with Frequency List mode. Assuming you don't want to trigger you can put the device into Single or Continuous Mode. Single will play out your select frequency sweep and then once completed, generate nothing:

 

single trigger mode.png

 

Continuous is similar but will keep repeating the waveform until stopped:

 

continuous trigger mode.png

 

All the details from above can be found in the NI Signal Generators Help. I looked under Devices >> 5406 >> Triggering >> Triggering Modes.

 

With Single or Continuous you can specify the duration of the waveform step, that might be a good place to start. As far as examples for c++, I don't have any, but if you look under the Start Menu, National Instruments, NI-FGEN, Examples, NI-FGEN C Examples you can find a folder for "Sweep Generator", there is a C example you can look over and model your program after. Hope this helps!

 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 2 of 6
(6,332 Views)

Thanks for your reply. Right now, i understand what should i do for my program. Are you sure that NI 5406 doesn't support script mode? Since i don't find some information about this message from the manual or the Signal Help file.

 

Yami.

0 Kudos
Message 3 of 6
(6,326 Views)

Yumi,

 

It doesn't support script mode. If you look at the NI Signal Generators help there is a page for "Features Supported on SMC Devices" Picture below:

function support.png

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 4 of 6
(6,322 Views)

Thank you very much.  Then in this case, i think stepped through will be the best choice for me. It helps me a lot. I should read the manual much more carefully.

 

Yami.

0 Kudos
Message 5 of 6
(6,320 Views)

No worries, some of the info is burried and you have to know where to look. Happy to help.

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 6 of 6
(6,318 Views)