foxman Posted January 16, 2022 Report Share Posted January 16, 2022 Hi colleagues, I need some help. Description: it's necessary to launch an app startup.rtexe on a CRIO 9075 (OC VxWorks) then launch a second app app.rtexe from the first one and close first app. Seems System Ecex.vi might be a great solution, but this function is not available in a palette for RIO which is based on VxWorks. Maybe anyone could help me or share links with relevant information. Thanks, Vadim. Quote Link to comment
Rolf Kalbermatter Posted January 16, 2022 Report Share Posted January 16, 2022 Quote Seems System Ecex.vi might be a great solution, but this function is not available in a palette for RIO which is based on VxWorks. No! An rtexe is not a real executable. It is more like a ZIP archive that can not be started in itself but that needs to be started by invoking the runtime engine and passing it the rtexe as parameter. And the exact mechanism is fairly obscure and not well researched and totally not documented. Unless you are a Linux kernel hacker who knows how to investigate the run level initialization and how the LabVIEW rtexe mechanisme is added in there. Quote Link to comment
foxman Posted January 17, 2022 Author Report Share Posted January 17, 2022 13 hours ago, Rolf Kalbermatter said: No! An rtexe is not a real executable. It is more like a ZIP archive that can not be started in itself but that needs to be started by invoking the runtime engine and passing it the rtexe as parameter. And the exact mechanism is fairly obscure and not well researched and totally not documented. Unless you are a Linux kernel hacker who knows how to investigate the run level initialization and how the LabVIEW rtexe mechanisme is added in there. Thanks, Rolf for the explanation. Quote Link to comment
Jordan Kuehn Posted January 17, 2022 Report Share Posted January 17, 2022 21 hours ago, Rolf Kalbermatter said: No! An rtexe is not a real executable. It is more like a ZIP archive that can not be started in itself but that needs to be started by invoking the runtime engine and passing it the rtexe as parameter. And the exact mechanism is fairly obscure and not well researched and totally not documented. Unless you are a Linux kernel hacker who knows how to investigate the run level initialization and how the LabVIEW rtexe mechanisme is added in there. Rolf, I've been looking for this information myself. Not quite in this use case as requested, but simply to restart the application. Do you have any reference for simply restarting the runtime engine and relaunching the configured rtexe? SystemLink is capable of doing this, but I haven't managed to figure out how yet. Quote Link to comment
Mads Posted January 18, 2022 Report Share Posted January 18, 2022 (edited) 19 hours ago, Jordan Kuehn said: Rolf, I've been looking for this information myself. Not quite in this use case as requested, but simply to restart the application. Do you have any reference for simply restarting the runtime engine and relaunching the configured rtexe? SystemLink is capable of doing this, but I haven't managed to figure out how yet. We normally just make the executable reboot the cRIO/sbRIO it runs on instead, through the system configuration function nisyscfg.lvlib:Restart.vi, but here are two discussions on killing and restarting just the rtexe on LinuxRT: https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/Launching-startup-rtxe-from-terminal-or-linux-window-manager/td-p/3457415 https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/Is-it-possible-to-close-and-re-open-RTEXE-through-Embedded-UI/td-p/3707540 Edited January 18, 2022 by Mads 1 Quote Link to comment
Jordan Kuehn Posted January 18, 2022 Report Share Posted January 18, 2022 (edited) 6 hours ago, Mads said: We normally just make the executable reboot the cRIO/sbRIO it runs on instead, through the system configuration function nisyscfg.lvlib:Restart.vi, but here are two discussions on killing and restarting just the rtexe on LinuxRT: https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/Launching-startup-rtxe-from-terminal-or-linux-window-manager/td-p/3457415 https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/Is-it-possible-to-close-and-re-open-RTEXE-through-Embedded-UI/td-p/3707540 Oh that’s perfect. Just like OP on that post it’s the reboot time that’s the issue for me. This line is what I was missing: /etc/init.d/nilvrt stop && /etc/init.d/nilvrt start I’ll give this a try. Thank you. Edited January 18, 2022 by Jordan Kuehn Quote Link to comment
hooovahh Posted January 18, 2022 Report Share Posted January 18, 2022 So combining the script to stop and start the NI service, with a couple of file copies or moves, you could get something that works but is pretty clunky. When the user tries to switch programs, it will need to copy over the other rtexe, replacing the current one, then have it call a script to stop and start the NI service. That might bring up the new rtexe, but will have issues if you restart the controller as it will run the now new rtexe instead of the older one. It might be possible to on start up, copy over the first rtexe back before the NI service starts. All very clunky, and probably not what you want but possible. Other developers would probably suggest trying to just make a single LabVIEW project that combines the code from both into a single application. Quote Link to comment
Mads Posted January 19, 2022 Report Share Posted January 19, 2022 17 hours ago, hooovahh said: When the user tries to switch programs, it will need to copy over the other rtexe, replacing the current one, then have it call a script to stop and start the NI service. The path to the rtexe launched by the RTE is not fixed...so perhaps you could just change the given path before killing the current application? I have not tried, but if it works it would allow you to keep multiple rtexe files instead of overwriting them: On LinuxRT the path is in: etc/natinst/share/lvrt.conf which is an ini-file formatted file it looks like with the key: RTTarget.ApplicationPath=/home/lvuser/natinst/bin/startup.rtexe Quote Link to comment
hooovahh Posted January 19, 2022 Report Share Posted January 19, 2022 15 minutes ago, Mads said: The path to the rtexe launched by the RTE is not fixed...so perhaps you could just change the given path before killing the current application? Oh that is better than renaming EXEs and copying them. A native solution from NI would be even better but I'm guessing they don't get this kind of request often. Still if the embedded target has some desktop like functionality it isn't crazy to be able to run arbitrary LabVIEW binaries. 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.