Neil Pate Posted July 14, 2020 Report Share Posted July 14, 2020 (edited) Am I being dumb here? I have a linux based cRIO and have two problems, surely related: I want a VI to show its FP when called (just using the tick boxes in the SubVI Node Setup config) I want to be able to programmatically show and hide front panel windows. I pass a message to one of my running VIs and tell it to open the FP Window Neither of these seem to work. In (1) the SubVI is definitely running it just does not show the FP window and (2) the method to open the FP window executes and there is no error in the code but nothing visibly changes Now, this is not the kind of thing I have done in the past with a cRIO as I am used to running them headless. Note: I do not actually have a display plugged into the cRIO, I was expecting the windows to open on my dev PC. Is this the mistake I am making? Note2: if I move all this code out of the RT platform to the My Computer bit everything works perfectly as expected. Note3: I probably should have mentioned this, the VI I am trying to control is a preallocated re-entrant clone. If I change it to non-reentrant then (1) works correctly but not (2) Edited July 14, 2020 by Neil Pate Quote Link to comment
JKSH Posted July 15, 2020 Report Share Posted July 15, 2020 (edited) 9 hours ago, Neil Pate said: Note: I do not actually have a display plugged into the cRIO, I was expecting the windows to open on my dev PC. Is this the mistake I am making? Are those front panels part of your intended Embedded UI, or only for debugging? When I run VIs on the cRIO "from source", both (1) and (2) work correctly for me on the cRIO's screen but not on the PC's screen (including preallocated re-entrant VIs). Tested with LV 2017 SP1 + cRIO-903x image in a VM. It is always worth having the cRIO screen visible during embedded UI development because what you see on the PC is not what you get on the cRIO: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LZ9SAM Edited July 15, 2020 by JKSH 1 Quote Link to comment
M_P Posted July 15, 2020 Report Share Posted July 15, 2020 Not being dumb, but also not experiencing unexpected behavior. It is different than what you might expect from just running the code on the local Windows system. This behavior boils down to the fact that you are viewing a remote representation of what is running on the remote system, separated by a transparent communication layer that relays front panel and probe values back to the Windows machine you're viewing it on, rather than the actual front panels. You can get (2) to work if you enable the embedded UI (assuming it is a cRIO unit that supports embedded UI like the 903x, 904x or 905x) and connect a monitor to the display port of the cRIO. Unless you're in direct dev/debug of the RT code, it is usually a better design approach to assume the RT code is headless and structure the user interface accordingly. This is actually such a common snag that users hit that NI added VI Analyzer tests for the RT Module a few years back (2014, I think?), and the top item in that test suite is usage of front panel property/invoke nodes. Quote Link to comment
Neil Pate Posted July 15, 2020 Author Report Share Posted July 15, 2020 (edited) Thanks everyone. Sorry I should have made it a bit more clear, I am familiar with the embedded UI in the Linux based RT environment, I have used it on several projects. My question is more around the inconsistency. I can get some windows to show up in the Windows host under some circumstances and this is what was confusing me. I am designing a lightweight actor framework that runs on RT (nothing at all to do with the NI AF) and part of this is the ability to show or hide FP windows. I plan on mostly using this for debugging as the system will normally run headless but I want to see what it can do. I have a similar framework I have developed for "normal" Windows based LabVIEW applications and it works really nicely, but there of course I expect the user to interact with the GUI. @JKSHthanks for confirming this. This is a bit of pity but not a dealbreaker. I don't have a screen attached as I dont have the right USB C/DP cable that plugs into the cRIO. Will buy one ASAP! Edited July 15, 2020 by Neil Pate Quote Link to comment
Neil Pate Posted July 15, 2020 Author Report Share Posted July 15, 2020 (edited) Update: OK this does "just work". I did what @JKSH tried and ran with a VM image and the results are good. In the video attached I have a re-entrant actor I instantiate twice (just by dropping it on the BD twice). I have not tried building this into an rtexe but I presume it should also work. Works fine as an rtexe also 🙂 2020-07-15 20-39-31.mkv Edited July 15, 2020 by Neil Pate Quote Link to comment
Popular Post hooovahh Posted July 15, 2020 Popular Post Report Share Posted July 15, 2020 That's a mighty fine VM you got yourself there. Almost like having a VM of this Linux RT target is a super useful tool, that helps troubleshoot and debug features of the embedded UI that are at times "inconsistent" as you put it. For anyone else that finds this useful you should go vote on the idea, and/or contribute to the conversation. 1 2 Quote Link to comment
JKSH Posted July 16, 2020 Report Share Posted July 16, 2020 3 hours ago, hooovahh said: That's a mighty fine VM you got yourself there. Almost like having a VM of this Linux RT target is a super useful tool, that helps troubleshoot and debug features of the embedded UI that are at times "inconsistent" as you put it. For anyone else that finds this useful you should go vote on the idea, and/or contribute to the conversation. Voted ages ago. Thanks for posting detailed instructions, @hooovahh: https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/NI-Linux-Real-Time-PXI-x86-VM/m-p/3561064/highlight/true?profile.language=en#M2107 That's what helped me get started in the first place! Quote Link to comment
Neil Pate Posted July 17, 2020 Author Report Share Posted July 17, 2020 (edited) On 7/16/2020 at 2:48 AM, JKSH said: Voted ages ago. Thanks for posting detailed instructions, @hooovahh: https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/NI-Linux-Real-Time-PXI-x86-VM/m-p/3561064/highlight/true?profile.language=en#M2107 That's what helped me get started in the first place! Absolutely. This is such a good tool it is a bit sad NI does not officially endorse this. By the way I found this thread a bit more current https://forums.ni.com/t5/LabVIEW-Real-Time-Idea-Exchange/Provide-a-Virtual-Machine-VM-in-which-to-run-LV-RT-systems-on/idi-p/1069833#comments In particular this post with step-by-step instructions on how to begin: https://forums.ni.com/t5/LabVIEW-Real-Time-Idea-Exchange/Provide-a-Virtual-Machine-VM-in-which-to-run-LV-RT-systems-on/idc-p/3953070/highlight/true#M598 with a bit of further info instruction here to get the embedded GUI up and running: https://forums.ni.com/t5/LabVIEW-Real-Time-Idea-Exchange/Provide-a-Virtual-Machine-VM-in-which-to-run-LV-RT-systems-on/idc-p/3953394/highlight/true#M603 Edited July 17, 2020 by Neil Pate 1 Quote Link to comment
Jordan Kuehn Posted July 17, 2020 Report Share Posted July 17, 2020 2 hours ago, Neil Pate said: Absolutely. This is such a good tool it is a bit sad NI does not officially endorse this. By the way I found this thread a bit more current https://forums.ni.com/t5/LabVIEW-Real-Time-Idea-Exchange/Provide-a-Virtual-Machine-VM-in-which-to-run-LV-RT-systems-on/idi-p/1069833#comments In particular this post with step-by-step instructions on how to begin: https://forums.ni.com/t5/LabVIEW-Real-Time-Idea-Exchange/Provide-a-Virtual-Machine-VM-in-which-to-run-LV-RT-systems-on/idc-p/3953070/highlight/true#M598 with a bit of further info instruction here to get the embedded GUI up and running: https://forums.ni.com/t5/LabVIEW-Real-Time-Idea-Exchange/Provide-a-Virtual-Machine-VM-in-which-to-run-LV-RT-systems-on/idc-p/3953394/highlight/true#M603 Thanks for all the links. I had seen discussion some time back and had never jumped through the hoops to make it happen. Currently I have three different cRIOs on my desk which gets to be expensive. I'll give this a shot! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.