Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Host VI and cRIO execution time

Solved!
Go to solution

Hello,

 

I have a cRIO 9014, I am running a real time application with two loops and a host VI in my PC, the host VI is kynda slow, but I would like to know if there is a way to check if the cRIO is running at the speed it should run.

 

Thanks.

--Luis

0 Kudos
Message 1 of 6
(5,057 Views)
What do you mean when you say the host VI is running slow? You could probably check the execution time of loops on the cRIO by using the Real-Time Execution Trace Toolkit.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 6
(5,051 Views)

Luis,

 

Hello! I'm not sure exactly what you are asking when you ask, "If there is a way to check if the cRIO is running at the speed it should run".

 

If you want to check the Memory Usage or CPU usage on you cRIO you can use the Distributed System Manager, which is much like the windows Task Manager. Below are some KnowledgeBase articles that discuss this. If your cRIO's CPU usage is constantly at 100%, then you will encounter problems, and you might have an issue with your program. Also, you might want to monitor the memory on your cRIO, if it constantly climbs you might have a memory issue with your program.

 

How Do I Monitor Available Storage Space on a LabVIEW Real-Time Controller?

How Do I See the Memory Usage on Real-Time (RT) Engines using LabVIEW Real-Time?

 

If you are wanting to see how quickly a section of your code is running, or check how fast a loop is running at, you can check with using the Tick Count VI on the timing palette. You can use that VI and a flat sequence structure to grab the time in ms before and after a section of code to see how long it took to execute, or you can use that VI and a shift register in a loop to time loop iterations.

 

Can you give us some more information/details on what you mean by,  "to check if the cRIO is running at the speed it should run".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 Kudos
Message 3 of 6
(5,038 Views)

Hello,

 

I want to do the thing with the Tick Count VI, I want to know how fast is the code running, do you have an example of how to use the Tick Count VI?

 

Thanks.

--Luis

0 Kudos
Message 4 of 6
(5,034 Views)
Solution
Accepted by topic author Luis_R.

Luis,

 

Here are the two methods to time your code that I described in my last post. The top while loop uses a shift register to tell you how much time (ms) each loop iteration takes. The bottom flat sequence structure will measure how much time (ms) a section of code takes to execute.


 

Timing.PNG

 

 

 

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Message 5 of 6
(5,028 Views)

Ben,

 

Thanks, that was what I was looking for.

 

--Luis

0 Kudos
Message 6 of 6
(5,023 Views)