10-28-2015 03:08 PM
Hi everybody,
Currently working on a pressure controller intended for use with a vacuum chamber, I chose a Raspberry Pi and code in Python to control the different valves, pumps and get data from sensors.
I woud like to connect my Python code to a GUI designed with Labview, in order to diplay some variables such as a graph of the pressure inside the chamber, the status of my valves, pumps and send some simple commands (close, open...)...
I have already found the LabPython library, but I am not sure to understand how to use the different boxes from the palette.
Hence my questions :
- First what is the best way to connect the raspberry Pi to the GUI Labview software running on another computer (or the Raspberry Pi... I do not know if it possible now with Windows 10 installed on the RPi instead of Raspbian) ?
TCP/IP protocol ??
-Second, is it possible to get continuously data from the python code running on Raspberry Pi and display them in the Labview GUI using LabPython Library ?
Thank you for time and attention
10-28-2015 05:13 PM
LabPython is not gonna help you here. LabPython interfaces to a Python kernel on the same machine as on which LabVIEW is installed. You do want to run Python on the Raspi and LabVIEW on your host. You will have to implement some form of communcation most likely through TCP/IP between your Python code on the Raspi and the LabVIEW application on your computer.
LabVIEW for the moment doesn't support to create code to run directly on the Raspberry Pi. There is a project ongoing here which already supports something like this for the Arduino system and they plan to release a version for the Raspi, but the Arduino version does have some limitations. And I'm not sure it will support to have a GUI directly on the embedded device anyhow.
However LabPython is using a compiled shared library which is currently only available for the Windows x86 32 Bit platform. It won't run on the Arduino or Raspi at all.
10-29-2015 09:29 AM
Hi rolfk,
Thank you for these explanations. As I cannot use LabPython to do what I want I will try to use the work of this guy
http://etchingpathways.blogspot.ch/2013/09/labview-and-raspberry-pi-tcpip.html
10-29-2015 09:51 AM
@Neercs wrote:
Hi rolfk,
Thank you for these explanations. As I cannot use LabPython to do what I want I will try to use the work of this guy
http://etchingpathways.blogspot.ch/2013/09/labview-and-raspberry-pi-tcpip.html
That is a good start, I guess it depends on how you want to dot it.
I think the example you link uses network streaming to provide a constant communication data stream.
You could also add code in your PI program to listen for a query and respond. Then use LabVIEW to query the PI over Ethernet just like any other instrument using VISA reads and writes.
09-15-2018 12:55 AM
Could you figure out how to do it...i want to do it now and would like to have some help on it......i tried a funny approach of writing these data to a csv file in a network location and asking LabVIEW to read it in real time ....it did not work out very nicely to me.