From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW working with FIFOs is weird

Hello guys,

 

my most complex VI took too much CPU on my cRIO so I tried isolating the problematic code and what came out was really unexpected. I attached the test VI and would be glad to get some advice why is it happenning.

Thomas444_1-1587399362756.png

 

Two FIFOs. They have writing enclosed in case structure, which is connected to a control (!important). Both of the structures are enclosed in another case structure connected to a control. I have fifo1 and fifo2 set to FALSE permanently, so there is actual no writing. When the topmost boolean is set to TRUE, CPU usage is about 4, but when i set it to TRUE, the LV takes a lot of CPU (~ 40). No writing to FIFOs involved at all. Just pure LabVIEW unpredictability. 

 

Tested on both cRIO and Windows 10, LabVIEW 2019. If you will play with the Numeric, you can adjust the CPU usage. 100 for cRIO and 5000 for PC worked fine.

Message 1 of 5
(2,236 Views)

Strange behavior indeed! It seems that it works normally if you force the two case structures to be executed serially. I would also like to know why this is happening.

RT FIFO Test.png

Lucian
CLA
0 Kudos
Message 2 of 5
(2,163 Views)

Doesn't explain much, but for me at the moment, what you found is fine workaround, thanks! Should I report it as a bug?

0 Kudos
Message 3 of 5
(2,148 Views)

Yes, please report it to NI support and post here the CAR number if you receive one.

Lucian
CLA
0 Kudos
Message 4 of 5
(2,143 Views)

NI reply (translated):

 

I escalated your question to my colleagues, we found no workaround but to serialize the Case Structure so they agreed to bug report. Its number is BUG 1027464. We can expect the solution in one of the following versions of LabVIEW. I have set the service request status to Closed.

Message 5 of 5
(2,034 Views)