LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wait ms timer value

 


@dg_lbe wrote:

Using the same example with a wait ms timer the total loop time is 1250ms. 


 

No, It depends on the program design and the dataflow. If there is no data dependency, the 1000ms wait and the 250ms subVI will run in parallel for a total loop time of 1000ms.

 

You don't have to guess. Simply write a small program that measures the loop rate and try the various scenarios. 😉

0 Kudos
Message 11 of 27
(1,983 Views)

 


@dg_lbe wrote:

What could be the possible reason for a deployed application to run slow after the target pc comes out of standby mode?


 

What is your LabVIEW version?

 

Can you say what you mean by "runs slow". Do you have any hard numbers? Is it slower or just less responsive?

0 Kudos
Message 12 of 27
(1,982 Views)

Using version 2010 on a Dell Latitude D910. 

 

One loop usually runs at 800ms after standby runs at 1200ms.  Another 300ms loop runs at 578ms after standby.  Another 750ms loop runs at 950ms after standby.  FYI - Once testing is completed the application is stopped from running.  This is the condition when entering standby mode.  Once awake operator will click the run button to begin testing.

 

Thanks

0 Kudos
Message 13 of 27
(1,964 Views)

Hey dg,

 

There are a few possibilities why this could happen, and it may be easier to take a look at your code to get an idea of what you are trying to do.  Is there a simplified version of the VI in question that addresses this specific timing problem you are facing that you could post?

 

Jake

Regards,
Jake G.
National Instruments
Applications Engineer
0 Kudos
Message 14 of 27
(1,927 Views)

 


@dg_lbe wrote:

Using version 2010 on a Dell Latitude D910. 

 

One loop usually runs at 800ms after standby runs at 1200ms.  Another 300ms loop runs at 578ms after standby.  Another 750ms loop runs at 950ms after standby.  FYI - Once testing is completed the application is stopped from running.  This is the condition when entering standby mode.  Once awake operator will click the run button to begin testing.

 

Thanks


Code and/or a picture are worth a 1000 words. Your explanations are pretty cryptic and it is difficult to provide you with meaningful advice.

 



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 15 of 27
(1,919 Views)

How do you measure the loop speed?

What is the exact power state you are waking up from (suspend (S3), hybernate (S4), etc.)

What determines the loop speed (wait, timed loop, etc.)

What us the CPU use before and after? (slow vs. fast)

Is this on a laptop?

Are you running on batteries?

What exact computer model do you have?

Are you using plain power management drivers shipped with windows or something proprietary to your make and model?

0 Kudos
Message 16 of 27
(1,914 Views)

Thanks for the reply but most of the questions I will have to answer later.  The attachment is of one of the time determination techniques.   The Dell Latitude D630 XP service pack3, Intel Core duo CPU T7300 @ 2 GHz, 1.99GHZ 1.99G of RAM.  

0 Kudos
Message 17 of 27
(1,881 Views)

It would be easier if you could attach a simplified VI, printing the diagram to PDF seems lossy (many wires are missing).

 

The time measurement seems fine, but of course we have no idea what's happening inside the two subVIs.

 

Overall, some of the code is quite questionable, for example:

 

You are autoindexing on a while loop that runs for a fixed number of iterations. That's the job of a FOR loop, with the advantage that the code knows the final array size beforehand and can perfectly allocate it once. The sequence structure inside the while loop makes little sense, especially the last frame. How can it possible matter at what point that comparison is made??

 

Why do you convert the 1D array to a 2D array. Does not seem necessary here because it does not add any information.

 

For better troubleshooting, it would help to measure the time of the second and third frame seperately to narrow down the problem.

 

How does the computer communicate with the measurement hardware? USB?

0 Kudos
Message 18 of 27
(1,853 Views)

Using Measurement Computing 1408FS DAQ along with 2 USB08 relay driver boards. 

Initially the plan was to add the time to the array as the reason for the 2D array size.

The reason for the While loop instead of the FOR loop was I read that using a while loop the CPU memory allocation desision is made once where as the FOR loop it occurs every time.  So I would then say this means its faster.  IS THIS NOT TRUE???????

Will breakdown the source code and upload tomorrow.

 

Please any advice and direction to make me more efficent would greatly be appreciated.

 

Thanks.   

0 Kudos
Message 19 of 27
(1,842 Views)

 


dg_lbe wrote:

The reason for the While loop instead of the FOR loop was I read that using a while loop the CPU memory allocation desision is made once where as the FOR loop it occurs every time.  So I would then say this means its faster.  IS THIS NOT TRUE??????? 


 

Where did you read that? Do you have a link?

 

How can that possibly be true, especially since the final array size is not even known until the while loop termination condition is met? You cannot allocate if you don't know the size.

You could possibly improve it even more by preallocating a fixed size array, then keep it inside shift registers while replacing the elements inside the inner loop. A good analysis tool is "show buffer allocations".

 

0 Kudos
Message 20 of 27
(1,837 Views)