Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

PXIe-6738 Analog Output response too slow.

Hi, I'm trying to generate a 3V 1.25kHz analog arbitrary waveform using PXIe-6738 analog output port and reading data from a CSV file. But the frequency obtained is only 800-900Hz.

Using Digital output port, i can set the Rate in MAX to 10Khz and obtain the frequency of 1.25V but the amplitude is 5V. 

Other than using a clamping diode on the digital output or buy another PXIe card with output level control function, what other ways can i generate the signal that i want?

Download All
0 Kudos
Message 1 of 2
(797 Views)

The main immediate problem is that you're trying to deliver data to your task 1 sample at a time.   Based on the scope pic, it also appears that the timing between "pulses" can vary, suggesting that the task (which is defined outside the code in MAX and is thus unavailable for inspection) may not be configured to use a hardware sample clock.

 

A first step would be to make sure you configure the task for a 1.25 kHz sample clock.  After that, simply write the entire file contents to the task all at once, and *then* start the task.

 

Additionally, you're setting yourself up for trouble with your habit of using local variables unnecessarily.  LabVIEW execution is based on dataflow.   Best practices for dataflow programming are different than for sequential scripts and text languages.  A lot of good LabVIEW code will use no local variables at all -- it's the wires themselves that define the flow of data and their connections help define and enforce the sequence of execution.  Local variables typically create ambiguity and race conditions, leading to sometimes-subtle bugs and inconsistent behavior.

 

 

-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
(788 Views)