09-07-2016 03:06 AM
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
Solved! Go to Solution.
09-08-2016 04:27 AM
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
09-08-2016 05:59 AM
09-08-2016 10:05 AM
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.
09-08-2016 10:12 AM
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
09-08-2016 10:29 AM - edited 09-08-2016 10:29 AM
@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?
09-08-2016 10:34 AM
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.