Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

Script to random switch between different waveforms

Solved!
Go to solution

Hi Max,

 

I can't immediately find any documentation detailing why only 4 script triggers are available, but I suspect it is due to the limited space on the onboard FPGA.  Can I ask why you need 20 script triggers?  What is the goal of your application?  It could be possible that an FGEN instead of an ARB could save you a lot of time and money.

 

Thanks,

 

David B

National Instruments

Applications Engineer

0 Kudos
Message 21 of 23
(3,007 Views)

Hi David.

 

Thanks a lot.

I already knew that to implement my goal better would come the AFG.
However still, I would like to make the application with modules that we have now. It's NI 5422.
In short, I was hoping to implement switching between different frequencies (i.e. arbitrary waveform) with help of 20 triggers.

 

Regards,

 

Max O.
Engineer and software developer,
TeSLa.

 

0 Kudos
Message 22 of 23
(3,006 Views)

Hi Max_i,

 

Your application is perfectly suited for an FGEN.  FGEN's were designed to switch frequencies quickly and easily, FGEN even ships with an example to do this: FGEN Function Generator.vi.  This VI can change sine wave frequencies on the fly during generation.  You could potentially have this system up and running within an hour.

 

While an FGEN would be much easier, I understand that sometimes funding can be hard to come by.  Unfortunately, there are only 4 script triggers available.  To try to expand the number of triggers, you could try "nesting" them as seen below.  While a script like this isn't very robust, it could potentially help you expand to 24 triggers.

 

 

script myScript1
Wait 5
if scriptTrigger0
   if scriptTrigger1
      Generate Waveform1
   else
   end if
else
end if
if scriptTrigger0
   if scriptTrigger2
      Generate Waveform2
   else
end if
else
end if
end script

 

Sincerely,

 

David B

National Instruments

Applications Engineer

0 Kudos
Message 23 of 23
(2,991 Views)