LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Investigation of freezing thread

Solved!
Go to solution

Hello All, 

 

I am investigating an issue in complex measurement system. The problem is that real time program which is running on the cRIO computer freezes at random time of system work. I am looking for an issue in cRIO program but after many days it looks like I've made no progress. Can anyone tell me what is correct way for check or control the assignment of loops to cores of the cRIO processor?  I would like to check what threads were assigned to the core witch freezed. Maybe I need to assign loops to cores in the program. My program consists of 20 parallel while loops. No one is 'timed loop', i have some time critical sub vi's.

 

I have found  possibility of setting core in timed loop. I am wandering if it is correct approach to convert all paralel loops in complex program into timed loop or maybe are there any other possibilities of check what loops are assigned to the freezed core? 

 

Thank you for any help, 

Cheers,

Marcin

0 Kudos
Message 1 of 4
(1,470 Views)
Solution
Accepted by topic author R_Z_

Hi MS,

 

which cRIO do you use?

Do you really need to assign loops to single cores?

Are those "time critical" subVIs really needed with this execution setting?

 

My cRIO programs consist of more than 20 loops and I don't need them to assign to single cores. The main point (IMHO) is to assure the CPU usage stays below 60% to allow timeslots for non-RT stuff (like network communication).You also shoould make sure you don't need the LabVIEW memory manager too often: this also is "non-RT" stuff!

 

Beside of those generic questions/recommendations you could create a log of the cRIO actions, together with CPU and RAM usage. In my cRIO applications I usually monitor CPU usage as additional measurement value…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(1,462 Views)

Your description makes little sense. If you have 20 parallel loops but you still don't have 20+ CPU cores, so cores need to be shared no matter what.

 

Freezing of a program is probably not closely related to any particular core. Does the program or the entire cRIO  freeze device and how do you tell the difference? The problem is more likely just poor code architecture. Why do you need so many loops? What is the loop rate of these while loops? What do the time-critical subVIs do (see also It is a relatively dangerous setting unless you really know what you are doing)?

0 Kudos
Message 3 of 4
(1,455 Views)

Thank you very much for suggestion, 

 

Changes in priorities of loops solved our issue. 👍

0 Kudos
Message 4 of 4
(1,344 Views)