09-24-2021 12:53 AM
I have a project that consist of a real-time measurement and triggering hardware using FPGA RIO0 card.
What is the best template to organise my project if I want to use Queued Message Handler? If I select Create Project -> Queued Message Handler Template I don't have FPGA template here. If I select Labview FPGA Project, I don't have Queued Message Handler.
Is there any example code how to combine those two templates into one project? So that I can realize how to organise my QMH+FPGA project...
Solved! Go to Solution.
09-24-2021 01:22 AM
This is (probably) a case where you have to "roll your own". Make yourself a QMH Project, and print out the Top Level VI (which shows the "pattern" of the QMH, and most of its major "parts"). Save this. Note that this Project has all the code in "My Computer" (which I will call the "Host").
Now make a LabVIEW FPGA Project. Note that most of this code is on the RT Target (the "Target"), with probably very little in the Host (the top part of the Project, in "My Computer"). What you want to do is to copy the VIs and Controls from the QMH Project into the FPGA Project (you might find it convenient to create a folder, "QMH", in the FPGA Project and put all the Host code in there). Now open your FPGA Project, go to the Target section, right-click, and "Add Folder (Snapshot)" and point to the QMH folder you just added the RT Project File. Presto, you have a QMH inside an RT Project.
A note -- RT Projects don't support Front Panel Events (because an RT Project doesn't support "interaction with the User"). I tend to create my own QMH "by hand", as I don't want a lot of Bells and Whistles on the RT side, just a simple Message Handler serving as a kind of State Machine with Optional Arguments.
Bob Schor
09-24-2021 02:42 AM - edited 09-24-2021 02:43 AM
@Bob_Schor wrote:
A note -- RT Projects don't support Front Panel Events (because an RT Project doesn't support "interaction with the User").
Actually they do if you have a beefy high end cRIO such as a 903x or 904x with built in DisplayPort and check "Enable Embedded GUI" in NI MAX for that target.
Obviously you need an attached monitor to the device to operate any deployed applications with an UI on that target.
10-21-2021 12:24 PM
@rolfk wrote:
@Bob_Schor wrote:
A note -- RT Projects don't support Front Panel Events (because an RT Project doesn't support "interaction with the User").
Actually they do if you have a beefy high end cRIO such as a 903x or 904x with built in DisplayPort and check "Enable Embedded GUI" in NI MAX for that target.
OK, I admit I'm being a "purist", one who believes that one should not "mix" UI stuff with "deterministic" code that needs to run on an RT Target running an RT Operating System. I, too, have downloaded my RT routine to the Target from the LabVIEW Project and put some Controls and Indicators on the Front Panel "for temporary Debugging, of course". I also know of colleagues who run their PXI systems with Windows as the OS as the Controller's OS (I get slightly nauseated even writing this sentence ...).
Bob Schor
10-25-2021 05:25 AM
Are you looking to implement a queued message handler ON THE FPGA?
i.e. a FIFO-based producer-consumer type of approach?
10-25-2021 05:27 AM
No.