LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate 16 bit digital output

I am not new to Labview, but completely new to Digital output.

 

 I am stuck with the following problem:

 

PCIe-6363, 32 digital I/O channels that can be clocked.

 

To scan microscope mirrors, I have to generate two 16-bit digital waveforms that my program calculates based on user selected parameters.

 

For waveforms I am using separate tasks, and select 16 digital lines for one channel and one task.

 

So, the array for ONE waveform that I calculate can be, for example, a thousand of 16-bit values like 32355, 32400, 32460, .... 52000.

 

When I wire my array to DAQmx Write / Digital / 1 D U16 1 channel / N samples I keep getting error message, where my 1000 data points are interpreted as 1000 channels... So, the approach that I used for analog output does not work here.

 

Selecting "One channel for all lines" (16 lines for this task) on Digital Output DAQmx did not help.

 

I have a feeling that I have to use digital waveform VI's, as there is a 1D waveform option on the DAQmx write, but how would I incorporate pre-calculated 16-bit integer values in that case?

 

 

0 Kudos
Message 1 of 8
(3,207 Views)

Can you share some code?  What DAQmx Write instance are you using?  You need to make sure it is set to Digital Output 1D U16 1 Channel N Samples.

 

Nevermind.  Missed some of the details in your post.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(3,188 Views)

Crossrulz,

Here is the VI - it's a work in progress, I deleted everything I could to keep it relevant, but the digital values are generated in a sub-vi - it's a 1-D array of U16 integers

0 Kudos
Message 3 of 8
(3,183 Views)

VI that generates waveform

0 Kudos
Message 4 of 8
(3,178 Views)

The 6363 is not 16-bit port addressable.  I has a 32 bit port.  Therefore you can't use the 16-bit method.  You need to use the 32-bit method and change your data to an array of U32.  This also means that you can't use the upper 16 lines of the port during this time for other functions.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 8
(3,163 Views)

Thank you for that clarification.

 

Is this a deal breaker for generating 2 digital waveforms in two parallel tasks? Is that at all possible with this hardware?

 

Initially I was going to specify lines 0:15 for the first task, and 16:31 for the second one.  I already have custom-made hardware that matches pcie-6363 pins...

0 Kudos
Message 6 of 8
(3,156 Views)

If they are using the same clock source, just use the single task.  Use Join Numbers to turn your two 16-bit numbers into a 32 bit.

 

Otherwise, I think you will need to have 2 cards to do this.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 8
(3,143 Views)

Thanks! Will look into that - joining numbers is a new concept for me after having lived in the analog world with my VI's.

 

The waveforms are on the same clock, so as long as the receiving hardware sees the wavefronts separately on the respective 16 lines, this suggestion might work.

0 Kudos
Message 8 of 8
(3,135 Views)