NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
pschmal2
Posts: 16
0 Kudos

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?

Member
pschmal2
Posts: 16
0 Kudos

Re: Faster looping in PXIe-8101

No ideas... :smileyfrustrated:

Member
SchamWow
Posts: 26
0 Kudos

Re: Faster looping in PXIe-8101

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

Member
pschmal2
Posts: 16
0 Kudos

Re: Faster looping in PXIe-8101

Hi,

 

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

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.

Member
SchamWow
Posts: 26
0 Kudos

Re: Faster looping in PXIe-8101

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.

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page