LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating an analog output synchronized with input timing signal

Hi.

I'm using PCIe6323 and having a problem in synchronizing my analog output to the timing input signal in LabView.

To be precise, I want to generate a 60 Hz triangular analog output (1000 sample points) that is synchronized to a 60 kHz(either analog or digital) signal given to PFI0.

The attached .vi file is a modified version of the example file and I also draw the picture for better understanding.

I'd be very appreciated if I can get help from here.

Best,

 

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

At a glance, the block diagram looks pretty good.  Exactly what symptoms are you having?   FYI, the picture you posted would be considered a "sawtooth" shape.

 

Key "right" things I see:

- you've correctly specified the device's PFI0 pin as the sample clock source.  (Is the signal you've wired there a good, digital pulse train at 60 kHz?)

- you're defining an integer # of complete cycles of your sawtooth wave.  1000 samples at 60 kHz gives you exactly 1 full cycle worth of your function.  This is important because at the end of those 1000 samples, DAQmx knows to "wrap around" and start over again from the beginning.  This is known as "regeneration", and it's enabled by default for Continuous Sampling tasks.

 

Possible (but unlikely) problem source:

- the default values for the Waveform Settings on the GUI are set for Sine wave at 10 Hz.  You're probably setting these correctly before running the code, but it's about the only thing I noticed that *might* lead to unexpected behavior.

- unless you're thrown off by the *phase* of the waveform?   The code generates the waveform starting at 0 phase.  Your picture illustrates it starting at -90 deg.

 

 

-Kevin P

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 2
(1,610 Views)