Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with digital output and sample clock

Hi,

I'm writing an application which will control my experiment (sending TTL and analog signals). It is a second version of this application (the first one is still working without problems). I have some problems with sending the signals with DAQmx. I use NI PXIe-6259 card and LabView 2009.

First I attach a picture of a part in my first application responsible for sending digital and analog signals (it works well) -> DOAO.png.

 

Then I wrote, on the basis of the first application, the second one, but I have some problems. The analog output part works only when the Sample Clock source is not connected to anything (while before it worked together with Ctr0InternalOutput) -> testdaq1.vi.

The digital output does not work at all and I have no idea why... -> testdaqdigi.vi. Do anyone see what I do wrong?

Download All
0 Kudos
Message 1 of 8
(4,942 Views)

Hello,

 

Can you explain the overall idea what are you trying to achieve, maybe we can work together on another architecture that will work.

 

Kind regards,

Ion R.

0 Kudos
Message 2 of 8
(4,931 Views)

Hello,

the application I am writing is to control my experiment (in atomic physics field) via analog and TTL signals. Its UI is in attachment. The user, for a given part of experiment, sets time, the TTLs via Boolean buttons (64 - I have 2 PXIe-6259 cards), and the analog signals (8); and similar for all parts (columns in the right-hand side cluster) and stages (blue buttons in the middle) of the experiment.

The digital signals are then processed and I get a 2D array, where in rows I have the channels (first row is P0.0 channel and so on), so I have 64 rows. The number of columns depends on the time and sampling (about 150 kHz). Then I split the array into two with 32 rows and I try to send it "outside" in the way showed in my first post.

The analog signals have the same sampling. The user sets the start and end voltage and a suitable ramp is built. I get another 2D array, where in rows I have the analog channels (so I have 8 rows). The number of columns is the same as in digital output array. Then I split the array into two with 4 rows and I send them "outside" in the way showed in my first post (fortunately this works).

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

Honest to be, you lost me in your description.

Let's take it one by one.


You have two types of measurements:

- Analog measurement - you say that this one is working for you. You want to trigger the AO with the counter??

- Digital signals -  please have a look in LabVIEW examples, Correlated Dig Write with Counter, maybe this can be a good example to start from.

 

Kind regards,

Ion R.

 

0 Kudos
Message 4 of 8
(4,892 Views)

I checked the example, the main differences I see are: the Flat Sequence Structure with Start Task VIs and the 1D Waveform instead of 2D array I have. I will try to rebuild my code and check if it helps.

 

I want the analog and digital signal to start at once and to be correlated. The structure seen on DOAO.png in my first post was built for me by a man from NI and I just wanted to created something similar but still without success.

0 Kudos
Message 5 of 8
(4,886 Views)

Ok, I see a few mistakes which I made.

 

The first one is that I tried to put the signal generation into separate VIs and when it should be correlated I guess it must be in one. This I can easily correct.

 

The second problem, I believe, is the 2D array which I send as data to DAQmx Write.vi (Digital 2D U32 NChan NSamp). It is built is as follows: it has 32 rows (one row for one channel) and here 150 columns (the signal length is 1 ms, the sampling rate is 150 kHz, so 1ms x 150000 Hz gives 150) and for example on channel 2 it should be possible to see the TTL signal (5V) on the output, as there are "1" values in the second row of the array (see on the picture attached). I don't know what is wrong in this array, maybe it should be arranged in a different way?

0 Kudos
Message 6 of 8
(4,880 Views)

Hello Slavia,

 

But why are you trying to send a 2D array?

Have you also checked all the examples on Digital Generation ? 

 

Kind regards,

0 Kudos
Message 7 of 8
(4,871 Views)

Hi,

 

I have a possibility of using 2D array (if not there should not be the option of Digital 2D U32 NChan NSamp in DAQmx Write.vi) and I want to use it because for me it is the easiest way of data manipulation. In the Help I read "data contains a 2D array of 32-bit unsigned integer samples to write to the task. Each row corresponds to a channel in the task. Each column corresponds to a sample to write to each channel." and I tried to to this. What is wrong in using 2D array? I checked all the examples on digital generation but there is no example how to use 2D array (only waveforms and 1D arrays). 

0 Kudos
Message 8 of 8
(4,866 Views)