LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does the FPGA read/write control act on the root loop/ user interface thread?

Solved!
Go to solution

Hi All,

 

As the title suggest, Does the FPGA read/write control,  https://zone.ni.com/reference/en-XX/help/371599H-01/lvfpgahost/readwrite_control/,  act on the root loop/ user interface thread?

 

Looking at, https://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/multitasking_in_labview/, it would indicate this, but I'd like to get a proper answer.

 

Kind Regards

David

 

0 Kudos
Message 1 of 7
(3,341 Views)

Hey David,

 

Could you please clarify what you mean by root loop/user interface thread? Do you mean the host VI?

The FPGA read/write control is function that is used in RT target. 


This thread also questions how this control works, worth giving it a look.

http://forums.ni.com/t5/LabVIEW/Read-Write-Control-Function-in-FPGA-target/td-p/2338222

 

Ask away if you have any more questions!

Kind Regards,

-Natalia

 

0 Kudos
Message 2 of 7
(3,291 Views)
Solution
Accepted by topic author DavidGray
While I'm not 100% if it acts on the root loop / UI thread - calls to the FPGA (e.g. read/write control, FIFO operations) are definitely blocking. I remember having a weird issue in the past where my FPGA operations were hanging because I was waiting for FIFO data somewhere else.

You should be able to test this fairly easily - try opening a file dialogue while reading from your FPGA. If the read hangs while the dialogue is open, you have a root loop problem.

LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 3 of 7
(3,284 Views)

Hi Natalia,

 

The root loop and user interface thread are discussed http://www.labviewcraftsmen.com/blog/the-root-loop and https://www.winemantech.com/blog/the-ui-thread-root-loop-and-labview-what-you-need-to-know/

 

The short description is that any user interaction has to go through a serial thread, therefore, no parralisation can occur. For labview, any update to a front pannel object goes through this thread, while block diagram code generally does not, but can be set through the preffered exicution system in VI properties.

 

Yes, the read/write control goes from the RT block diagram to the FPGA front pannel. What I'm trying to find out is if the fuction has to use the user interface thread/root loop of the RT. My understanding is that the threading of the RT is similar to a winOS.

 

I've inherited a large application where this has been implimented a lot, so i'm not asking how to use it. My question is what goes on under the hood.

0 Kudos
Message 4 of 7
(3,271 Views)

Hi Sam,

 

Thank you for the information and the easy test, I'll give that a go and repost.

 

I find it hard to belive that a blocking function would not be root loop/UIT related. If it blocked a parrallel thread, the rest of the code would excitute around it. Unless that happened multiple times and blocked every thread.

 

Kind Regards

David

0 Kudos
Message 5 of 7
(3,269 Views)

@DavidGray wrote:

I find it hard to belive that a blocking function would not be root loop/UIT related. If it blocked a parrallel thread, the rest of the code would excitute around it. Unless that happened multiple times and blocked every thread.


In the case we're talking about here (interfacing with the FPGA), it could be resource lock related serialisation, rather than requiring root loop access - hence why I wasn't sure which one it was. Of course, even a non-reentrant VI being called in multiple places would block execution. If it required root loop - then I would suspect that it might be because it's calling a non-threadsafe DLL in the UI thread under the hood?


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 7
(3,264 Views)

Sorry, I should have re-read the root loop and UIT webpages https://www.winemantech.com/blog/the-ui-thread-root-loop-and-labview-what-you-need-to-know/.

 

From that if something is blocking then it'll most likely be on the root loop.

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