05-17-2021 04:03 AM
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?
05-17-2021 05:31 AM
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.
05-17-2021 11:21 AM
Hi Rolf, Thanks!
I understood the limitation of LINX.
I will try another way.
Hope to talk to you again in the near future.
05-17-2021 11:44 AM
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
05-21-2021 07:26 AM
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.