LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

single channel digital waveform?

Hello,
 
I want to use a PCI-6221 (37 pin) to continuously generate a single-line hardware timed digital waveform, which I intend to use as a driver signal for a current source.  The waveform's repetition rate and duty cycle will vary according to user input.  At the moment, I am calculating the current "ON" time and "OFF" time based on the user-specified rep rate and d.f., building a 1D, U-8 array of "1"s and "0"s, and then using the "Binary U8 to digital waveform" function to convert my array to a waveform.  Then I use the "build waveform" function to add the timing information. 
 
The digital waveform that is returned from "Build Waveform" invariably consists of 8 channels.  Channel 0 has the waveform I actually want.  The other 7 channels are all "0"s.  How do I get rid of those other 7 channels?  I'm pretty sure that they are the source of error -200463, which I get every time I try to run the "Write Digital Waveform" VI (set to 1 channel, N samples).
 
I know I can write the digital output as a Boolean array instead of a waveform, but then I think I have to reconfigure my sample clock every time the user changes the rep rate.  That's kind of a pain but can be done...should I go that route instead of trying to use a waveform (which contains embedded timing information)?
 
Thanks,
diane
0 Kudos
Message 1 of 5
(3,748 Views)

Hi Diane,

I think that outputting your data as a waveform is your best solution. I would like you to try building the waveform a couple of different ways. If you already have your data, then simply try using the build waveform VI. A couple of other options would be to use the digital signal subset VI or the replace subset VI.

Regards,
Hal L.

0 Kudos
Message 2 of 5
(3,729 Views)

Hi Hal,

I AM using the "Build Waveform" VI to generate my digital waveform, as I explained in the first two paragraphs of my original post.   My question is as follows:  how do I force the "Build Waveform" VI to return a single-channel waveform?  I am only wiring one "Y" input, so why does the "Build Waveform" VI keep giving me 8 channels in my waveform?!

I've been doing DAQ for several years and am very familiar with it.  Usually I use Boolean (or U16) arrays as the DAQ output data, but thought I'd try a waveform this time since the timing information is embedded.

This is a build waveform question, not a DAQ question.  I apologize if that wasn't clear from my original post.

Thanks,

Diane

0 Kudos
Message 3 of 5
(3,712 Views)
Thanks anyway, I think I figured it out on my own.  I'll build a single-channel analog square wave and convert it to a digital waveform.  That should do it.
0 Kudos
Message 4 of 5
(3,709 Views)

I know I'm a few years late to this post but I have a similar issue where i am using 32bit binary and I am getting 32 lines of data but only 1 of those (y = 0) actually contain any data. I want to output a digital signal that i can control by using a user input. I was just wondering if you had figured out a solution besides creating analog and converting, or if anyone else has a potential solution that would be great.

0 Kudos
Message 5 of 5
(2,913 Views)