Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

USB Ports / Linx / Raspberry

Hello everyone!

 

I am using LabView 2024Q1 in conjunction with the Hobbyist Toolkit and a Raspberry Pi 4B.

I would like to use the GPIO pins of the Raspberry to switch valves. At the same time, a pump is to be controlled via USB ports and measured values from a sensor are to be read out. The measured values should be displayed in the front panel while the VI is running. Unfortunately, LabView does not recognize the connected ports when I run the VI on the Raspberry. If I connect the USB devices to the PC and run the VI on the PC, I can select the ports "normally" via the drop-down menu in the front panel.

 

At first I thought of connecting the USB devices to the PC and creating two VIs in one project. I wanted to introduce network variables in the main VI, which are then read in the Raspberry VI to control the GPIOs. Unfortunately this does not work, I get an error message: "The current system does not support environment variables."

 

How could I solve this problem?

 

0 Kudos
Message 1 of 2
(451 Views)

Hi SimFux,

 

If all your pumps and sensors use integrated or external USB-COM adapters, you can find all virtual COM ports by running "List Folder" on the /dev folder with the mask ttyUSB*. If you use just one virtual port, that's all you need.

 

If you use more than one, it becomes more involved, since you'll have to figure out which port controls which peripheral. This is also doable, at least if your peripherals use FTDI-based USB-COM adapters: you use their serial numbers, which are easy to find. If you are interested, I can share my code with you and the list.

 

Sergey

0 Kudos
Message 2 of 2
(435 Views)