LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control PWN pins on Raspberry Pi by LINX?

Hello everyone!

 

I’d like to make sure whether or not LINX can directly control PWM pins on Raspberry Pi so that we can change duty cycle of the board. I have LabVIEW 2020 pro and LINX installed and am trying to control PWM output of Raspberry Pi 3B+.

Firstly, I manually set a PWM pin (physical pin number 32, BCM number 12) of the Pi as PWM mode by Raspberry Pi OS.

Then run and deploy LINX – Digital Read 1 Channel.vi, which I got it searching in LabVIEW examples.

It worked and I was able to see the duty cycle running property.

Next, I tried to change the value of the duty cycle by LINX – Digital Write 1 Channel.vi but failed with an error.

I also tried LINX-PWM 1 Channel.vi but the result was same, not worked but returned an error.

 

Does this means that LINX cannot directly control PWM pins on the Pi, doesn’t it?

0 Kudos
Message 1 of 5
(2,182 Views)

The Raspberry Pi version liblinxdevice shared library used by the Linx Toolkit does not support PWM operations. There are no PWM pins initialized and recognized by that shared library and support for it is non-trivial to add and has to happen in the C++ source code for that library.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 5
(2,141 Views)

Hi Rolf, Thanks!

 

I understood the limitation of LINX.

I will try another way.

Hope to talk to you again in the near future.

 

0 Kudos
Message 3 of 5
(2,117 Views)

The way we are using PWM with the Raspberry pi in combination with LabVIEW is with this extension board:
https://www.adafruit.com/product/815

 

With this you can send I2C commands to this board to control 16 PWM channels

0 Kudos
Message 4 of 5
(2,115 Views)

Dear Bas,

 

I would thank you for your advice.

I followed it (I2C commands) and succeeded to operate PWM devices such as SunFounder's ones.

0 Kudos
Message 5 of 5
(2,066 Views)