PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

On-board programming on PXI-6132

Solved!
Go to solution

Hello,

 

This is my first post so please be forbearing.

 

I have been asked to develop a Labview Vi for DAQ. I have to acquire and average a certain number of exponential decays (like it happens during the discharge of a capacitor through a resistance) to calculate the decay constante. My boss already bought a PXI-1073 chassis with a PXI-6132 for acquiring the datas. My question is the following : since the sampling rate we have to use is very high, I would like to reduce at maximum the amount of data transferred from the PXi system to the computer, so, with my system (windows 7, LV 2011, Ni-DAQmx ??), is it possible to "tell" the PXI-6132 to isolate the datas belonging to the exponantial decay, to average several decays and then to send the data to the host ?

 

Thank you in advance for your help

0 Kudos
Message 1 of 10
(6,053 Views)

Hi NicolasZ,

 

this is not possible. You will have to sample the data on the card and then sent it all to the Host.The processing of the data must happen on the PC. The daq-card has no own intelligence.

How high is your sampling rate? Have you tried to sample your data?

If you have concernes about your performance I would recommend you to use the Producer-Consumer-Designpattern. You can find that under File>New... >From Templates>Framework>Design Pattern

 

I hope this helps,

RMathews

Ramona Lombardo
Applications Engineer, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 2 of 10
(6,040 Views)

Thanks for the help RMathews,

 

I indeed realized that I can't process the data form the PXI 6132. For my problem I am thinking about another solution(I am also gonna check the producer/consummer frame you advised me). As I said, I have to acquire a certain number a point from a waveform at a constant frequency, my DAQ is trigerred by the falling edge of an other analog waveform with the same theoritical frequency.

 

What I would like to do is to acquire for example 30 samples after the trigger, then store this data in the on-board memory; then wait for the next falling edge (my trigger) to acquire another 30 samples batch and, after let say X acquisition events, transfer this data form the on-board memory to my host computer memory to be read by a classical "Read fonction" in one itération of my while loop. I tried a lot of solutions (for ex. by setting the on-board memory buffer size to X * 30 before entering the while loop) but the read function still reads only 30 samples in one iteration. Is it possible to find a solution with the classical : create channel, timing function, trigerring function then a read function in a while loop or do I need to use a more complicated structure ....

 

PS:What I am concern about here is not really the global performance of my VI but really the way I am processing my datas.

 

 

0 Kudos
Message 3 of 10
(6,037 Views)

Hi,

 

with the read function you can read as many samples as you want to, eg. 60 for 2 "runs".

Can you please post your vi?

 

Thanks

Ramona Lombardo
Applications Engineer, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 4 of 10
(6,035 Views)

Here is my VI which is actually coming from a Labview example

0 Kudos
Message 5 of 10
(6,008 Views)

Ok, you want:

 

- finite number(30) of  samples

- starting every rising edge of a TTL Signal

 

You want a retriggerable AI function. If this is possible depends on the hardware. The 6132 is not able to retrigger. I added a screenshot where you can see this - I used a simulated 6132.

What you can do to achive this is using instead the counter. I added a screenshot where you can find an example how to do this.

 

I hope this helps.

RMathews

 

 

Ramona Lombardo
Applications Engineer, NI Germany
Certified LabVIEW Developer
Download All
0 Kudos
Message 6 of 10
(6,001 Views)

Thank you,

 

I took a look in another part of this website and I indeed saw that this example was a solution to simulate a retriggerable, but now my problem is that I don't find (with this VI) how to set the period between to trigerring event (I know that it is mastered by the Start Digital Edge Trigger Function, but I don't know which digital triggering line to choose (PFI0, PFI1 ...... )and how to set its frequency). I know that this is basic labview programming, but I would like your help one more time for this point.

0 Kudos
Message 7 of 10
(5,990 Views)
Solution
Accepted by topic author NicolasZ

The counter channel in the example I pointed you out, is the counter, you are using to generate the clock signal. So its a finite pulse train with 30 pulses if you want to acquire 30 samples.

This channel can be configured as retriggerable and control "Source" you have to select the PFI where the trigger signal is wired. That depends on how you did it.

 

The clock signal will be routed internally, which means for that you dont need any cabeling, you just have to select the right source for your AI input channel (eg. Ctr0InternalOutput if you selected Counter 0).

 

So the only external signals will be the onces you want to measure with AI and the trigger signal for the clockgeneration (counter).

In MAX you can make a right click on the device and see the pin layout of your device.

 

Ramona Lombardo
Applications Engineer, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 8 of 10
(5,983 Views)

Ok, thank you very much, it seems clear to me now,

 

However, I have a last question ! For the trigger, I will later have to use an analog signal, so I think I can still use this algorithm by converting my analog signal (which is a square wave) to a digital signal by making an analog comparison event. But for know I think I will just simulate a digital line as a trigger. In order to do this, I would know if it is possible to write a continuous digital signal and to use it  directly as an "internal trigger" in the same time, or do I have to create a parallele VI ?

0 Kudos
Message 9 of 10
(5,979 Views)

As you can read in the specification this device also supports analog triggering. So you could use an analog line with a secified level to trigger. You would only have to reconfigure the Trigger VI, that should work (but I havent tested it).

Ramona Lombardo
Applications Engineer, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 10 of 10
(5,960 Views)