LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Faster looping in PXIe-8101

Right now I am trying to speed up my setup. My code is pretty bare bones but this is what happens:

I have an 16 channel AO N sample output using PXI-6723. (200k clock out rate for 48 samples)

This sets my external hardware

Then I read in a result from an A/D PXI-6115, 512 samples at 512k rate (1 ms total).

 

I then loop this. My AO sets the hardware, then the PXI-6115 gets triggered to measure the result from the hardware.

I'm using a PXIe-8101, and this loop is taking around average 38ms. There can be many spikes however. My end goal is to have something like 2-3 ms for the loop. What can I do to improve this?

0 Kudos
Message 1 of 5
(2,358 Views)

No ideas... Smiley Frustrated

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

pschmal2

 

it's hard to determine what is wrong without you posting some version of your code up - but some things that I can say is

 

1) hopefully you're not using daq assistant

2) make sure you don't have a wait until next multiple function inside the loop

3) switch to RT module for fastest results

4) use a producer-consumer loop

 

also, this question has been asked before so please check out the forums.  like here: http://forums.ni.com/t5/LabVIEW/Faster-sampling-software-controlled/td-p/1633096

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

Hi,

 

Yes I did a search. Unfortuantely if a producer-consumer loop would have been the answer I would not have posted. 😞

Basically I am controlling MEM switches with the AO, so I cannot capture the data until they are set correctly. MEMS don't send ack or anything so I have to wait for the AO output finished.

 

I am using the DAQ assist, I will try to clean that up so I'm not using it next time I work on the code.

 

I am looking into RT module. I am wondering some thing abouts that:

Can I use dll with C wrapper on RT module? I don't have one now, but I am planning to put one later so we can do a little more complex processing in real time.

If it can't use DLL, then can I push the data out onto the ethernet bus? The processing isn't so time critical, its more of setting the MEMS and reading the output.

0 Kudos
Message 4 of 5
(2,336 Views)

just did a search for your question and came up with this: http://digital.ni.com/public.nsf/allkb/0BF52E6FAC0BF9C286256EDB00015230?OpenDocument

 

I'm guessing that it won't work unless you write it in real time since dlls are normally windows wrappers.

 

I don't have a lot of experience with RT but it doesn't mean that it will be faster - though I suppose you can put parts of your code into more deterministic loops and others in non-deterministic loops which could in turn make it faster.

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