LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reduce Execution Time

Hi,

 

I am using niHSDIO Initiate.vi and niHSDIO Fetch Waveform.vi for data acquisition usin PXI 6541. These functions are used in a sub VI. This sub VI is time critical and it takes approximately 4 to 10 ms. But Ideally it should take 0 ms. How to reduce this time to less than 0.5 ms?

 

 

Khan

 

0 Kudos
Message 1 of 8
(3,455 Views)
What is taking the most time? How big are the waveforms? How are you measuring the time? What do you mean by "time critical"? (Generic term or actual priority setting?

... So many questions, so few details!
0 Kudos
Message 2 of 8
(3,433 Views)

I assume you're using some loop for data gathering. If so, initiate should be done outside the loop. Also, getting a very low loop time might be hard, it's usually better to grab a slightly bigger data set and work on that, e.g. grab 20ms worth of data at a time and analyze.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 8
(3,426 Views)

Most time is taken by niHSDIO Fetch Waveform.vi, Waveforms contains 512 bits. I measure time using Time Template (data dep).vi, These are used within a while loop. It is of actual priority as data is acquired.

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

@Khan83 wrote:

It is of actual priority as data is acquired.


I don't understand what this statement means.

0 Kudos
Message 5 of 8
(3,391 Views)

@Khan83 wrote:

Most time is taken by niHSDIO Fetch Waveform.vi, Waveforms contains 512 bits. I measure time using Time Template (data dep).vi, These are used within a while loop. It is of actual priority as data is acquired.


Yes? Can't you measure/calculate time from a 20ms chunk? If you need the system to stop/react fast to a specific value it shouldn't be in software, but wired back as a trigger.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 8
(3,361 Views)

@Khan83 wrote:

Most time is taken by niHSDIO Fetch Waveform.vi, Waveforms contains 512 bits. I measure time using Time Template (data dep).vi, These are used within a while loop. It is of actual priority as data is acquired.


How fast is the waveform being sampled?  You have to allow time for the samples to be gathered in the HSDIO.  So if you are sampling at 50kHz, it takes ~10ms to gather 512 samples.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 8
(3,338 Views)

Actually my DUT sends Interrupt at 1Khz, this interrupt is used for triggering. I have attached the VIs. I am using PXI 6541for data acquisition and use LabView 2009. If I use Initiate.VI out of Loop as mentioned by , I do not get output.

 

Khan

0 Kudos
Message 8 of 8
(3,271 Views)