LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FGEN; Frequency list; How to update amplitude at particular times with a property node

Hello everyone,

I using a PXIe-5433 card to generate a series of oscillation using frequency list. The series is something similar to this:

 

0 Hz for 5 seconds (i.e., no oscillation)

1kHz for 1 second (first oscillation)

0 Hz for 5 seconds (i.e., no oscillation)

1kHz for 1 second (second oscillation)

1 Hz for 5 seconds (i.e., no oscillation)

...

 

What I am trying to attempt is to adjust the amplitude of each oscillation, so that the first oscillation at 1kHz has a amplitude of 0.1V, the second oscillation has an amplitude of 0.2V, etc. Right now, I have set up a property node, and I am able to adjust the amplitude manually 'on the fly' (I have 5 seconds to change it in-between each oscillation), but I'd like to automate it.

 

Here is what I have tried so far:

- use a property node to detect when the frequency is set to 0 Hz (i.e., no oscillation), and adjust the amplitude during that time. However, the frequency returned by the property node is not 0 Hz, but rather 1MHz (it seems to correspond to a default frequency, as opposed to the current frequency being generated).

 

What I was thinking to try next is to set up a counter to track the time since the generator started and adjust the amplitude during these 5s intervals when no oscillation occurs, but I feel like there should be a much cleaner way to do this. Could I use triggers or markers to do this?

 

BTW I also considered switching to arbitrary waveform generation instead of frequency list, but I am afraid to run into memory issues.

 

Any suggestions would be greatly appreciated.

Thanks,

Jacques

0 Kudos
Message 1 of 2
(1,061 Views)

All you probably need is a simple state machine and no property nodes at all.

 

(Hard to give specific advice without seeing your code. Consider attaching it (i.e. a VI, not a picture)).

0 Kudos
Message 2 of 2
(1,043 Views)