Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Outputting 4 different digital waveforms using the PCI-6221

I am trying to output 4 different digital waveforms from my PCI-6221 at 1MHz each.  Right now my vi either outputs nothing, complains about buffersize, or gives me an offset error.  I am attaching the vi as an example.
0 Kudos
Message 1 of 7
(3,745 Views)

You shouldn't have to write the samples inside the while loop.  Try replacing that write with a DAQmx Is Task Done.  Did you want it to automatically loop the same data until you press the stop button?  If so, you should use a property node to make sure that regeneration is set to true.  That part of the code would look something like this:

 digital_gen.png

 

-Christina

0 Kudos
Message 2 of 7
(3,719 Views)
Thanks!  I'll try that out and see if it works.  Eventually the users want to be able to alter the data while the VI is running and have it change the waveform so I may need to keep the write in the loop.
0 Kudos
Message 3 of 7
(3,698 Views)

That did not seem to help.  I've checked my data going into the DAQ write, its fine, but the DAQ card outputs nothing.

 

I converted the digital waveform to an analog one and graphed it and the data seemed to have been negated as the graph showed 0s and -1s.

0 Kudos
Message 4 of 7
(3,691 Views)

Hello

Try this example. Which exaclty does what you want to do i.e generate different wavefrom of different frequency and duty cycle.

 

Good luck

 

NI-khil

0 Kudos
Message 5 of 7
(3,670 Views)

Thanks for the example but that isn't what I need.  That example makes signals with regular duty cycles and my waveforms are not like that.  The pulses within the waveform differ in width so I have to build it with samples I already have.

 

I am going to try to do something different today as digital waveforms are not working out for me.  Thanks for all your help eveyrone.

0 Kudos
Message 6 of 7
(3,653 Views)

Hey libbya,

 

The example posted should be a great frame work for what it sounds like you need to do.  If you are having problems generating a specific waveform, try posting back with some details on what you've tried and what you're hoping to achieve and we can offer some suggestions.

ColeR
Field Engineer
0 Kudos
Message 7 of 7
(3,633 Views)