09-16-2024 07:06 AM - edited 09-16-2024 07:08 AM
Hi!
I have a working setup where I control a potentiometer (I2C), on my RPi, from my PC with LV Community 2022 Q3 installed.
Question: Is it possible to build an .exe so I don't have to open the project each time? To run from my PC I mean?
When I tries, the "executable" want to be a .rtexe. Does this mean I have to install LV RunTime aswell? Or am I missing something?
Best Regards, Viktor
Solved! Go to Solution.
09-19-2024 03:27 AM
The RPi is its own computer and the VIs that you have placed under the "raspberrypi" target effectively run on the RPi itself. What you probably did so far is to directly deploy the VIs from your LabVIEW project. That will compile the VIs to run on the ARM CPU achitecture on the RPi and then deploy them directly into RAM and execute if from there. The neat thing is that they UI (frontpanels) are still shown on your PC and LabVIEW communicates with the application on the RPi to update these front panels.
Now when you build an executable from your RPi application you do indeed create a rtexe file and then deploy that to the RPi. Build Specifications->TemperatureControl->Deploy. This will copy the rtexe to the RPi and if you then select Build Specifications->TemperatureControl->Run as Startup entry LabVIEW will configure the LabVIEW runtime envrionment on the RPi to now startup your application everytime your RPi boots up.
But!!!! Your LabVIEW executable on the RPi does not have any access to the display that you may have attached to your RPi.There is also no LabVIEW IDE anymore in whose context the VIs are downloaded and executed so there is no possibility to directly watch your front panel on your PC. Basically your LabVIEW application on the RPi runs in the dark (LVDark was also the original LabVIEW internal code name for the first version of LabVIEW realtime).
You will have to add some means to your application do report your data in some meaningful way.
Possible solutions:
- It could post it to some HTTP server that you are running
- It could post the data to a MQTT or similar IoT server application
- You could integrate your own HTTP server in your application that provides a minimal HTTP page with all the data
- You could implement your own TCP/IP server and according protocol in your LabVIEW app to have a second application on your PC interface with. This second application can be LabVIEW based, or Python, or C(++), or C# or whatever you feel most comfortable with.
09-20-2024 07:54 AM
Thank you for the very enlightning reply! 🙂
I understand whats going on now and will look into one of your proposed solutions.
Best Regards, Viktor