05-22-2014 10:33 AM - edited 05-22-2014 10:51 AM
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?
05-22-2014 10:50 AM - edited 05-22-2014 10:51 AM
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.
05-22-2014 10:55 AM
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
05-22-2014 11:00 AM
VI that generates waveform
05-22-2014 11:33 AM
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.
05-22-2014 12:12 PM
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...
05-22-2014 12:40 PM
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.
05-22-2014 12:56 PM
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.