LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

When using the LabVIEW Simulation Module, how can I start a frequency sweep with the Simulation Chirp signal generation VI at an arbitrary time after the simulation initial time?

I'm using the Simulation Loop on LV RT when interacting with some hardware (i.e. all I/O is happening in the Sim loop). I'm going to conduct a frequency sweep test on the hardware and want to use the Simulation Chirp function. However, there is no way (that I can see) to trigger the Chirp to start at some event (i.e. I click a boolean on the front panel and enter a case statement). The Chirp is tied to the global time of the Simulation loop and so are it's input parameters. Is there a way to make it relative to some time at which an event happens?

0 Kudos
Message 1 of 4
(2,701 Views)

You can put Controls and case structures in simulation loops:

 

CD&SIM Chirp.png

 

Does this answer your question?

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 2 of 4
(2,657 Views)

Craig,

 

Your solution will 'cut' the beginning of the signal and only show the signal afterwards.

 

To control when the chirp should start, the best option is to use the Chirp Pattern.vi ( in the Signal Generation palette) and use a Lookup table to control when to feed the time. The shipping example (in LabVIEW 2013) shows how to code using a lookup table.

 

C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Signal Generation\SimEx Chirp.vi

 

Then, to start from a toggled boolean, look at the example:

C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Signal Generation\SimEx Step.vi

 

and Here is the example in 2013 (in attachment):

 

sweep.PNG

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 3 of 4
(2,637 Views)

One more thing: if you don't want to repeat over and over, just remove the "Quotient and Remainder" before the Lookup table....

 

This example starts the sweep after 5 s. if you want to start by pressing a button, just need to wire a button the the inverter.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 4 of 4
(2,636 Views)