LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sampling time limit

Hi, I have a program with a simple while loop and some DLLs run in the while loop. Currently the sampling time is 0.001sec. I want to know what will happen if the real computation time of the program in the while loop exceed the sampling time and how I can check that. Is there any document I can use? Thanks.
 
machman
0 Kudos
Message 1 of 7
(3,695 Views)
very simply transform your while loop into a timed loop. it work the same, but you can input the cycle time, as well as the time source. as a property, you get to know if the iteration time exceeded or not the predefined period of the loop
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 2 of 7
(3,681 Views)
Will this work when I use Labview Real Time system? Thanks
0 Kudos
Message 3 of 7
(3,674 Views)
i never tried, but i dont see why not. you could probably get the info like any other indicator, via vi server.
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 4 of 7
(3,659 Views)
Is there any other way to detect late iteration? Thanks
0 Kudos
Message 5 of 7
(3,650 Views)

Hey Machman,

 

Thank you for contacting National Instruments.  From the information you have provided here, I am still a bit unclear about what you are using at this point.  Are you currently or wanting to use the Real-Time module? 

 

In LabVIEW, when using while loops with DLLs running inside, the program is going to wait for completion.  Also, in Traditional LabVIEW if using the Timed Loops as mentioned above, there are no timing guarantees.

 

It is from within the Real-Time Module where the Timed Loops will have this type of deterministic behavior.  One way to verify this is to reference the example finder, and the Performance Benchmarking.vi.  This can be used to better determine the behavior/performance of your application.

 

I hope this helps.  If you have other specific questions or additional information, post back and I would be happy to respond.  Have a great day!

 

Jason W.

.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 7
(3,561 Views)

Hi, Jason, Thanks for your reply. currently I am using Labview RT system. is there any control I can use to check the late iteration problem? another problem is about dynamic memory allocation. does RT system support dynamic memory allocation? Thanks.

 

machman

0 Kudos
Message 7 of 7
(3,542 Views)