11-10-2021 07:11 PM
I am trying to run a NEMA 17 stepper motor with an A4988 motor driver. I have the LINX target firmware setup and I'm able to step the motor one step at a time using a boolean control and the Digital Write vi. But when I try the PWM vi it says the channel is not compatible with the raspberry pi. I have tried channel 18 and 32 to match the pins. I have tried channel 0 and 1 to maybe match the "PMW0" channel. Nothing works. How can I write a pwm signal to the Pi using LINX?
11-11-2021 06:44 AM
The Linx shared library for the Raspberry Pi does not currently implement the PWM functionality.
11-11-2021 07:02 AM
I have seen other posts where people have been able to do it successfully using linx, how is that possible? If I cannot use linx, is there a way to send a square wave without making one using delays?
11-11-2021 07:18 AM
Probably you saw posts using arduino, not rpi
you can create square waves using arrays or pt by pt.
11-11-2021 07:23 AM
I'm not sure how to do it with arrays. I'm trying to make a robot arm that will use multiple steppers, having square waves calculated manually might end up being overwhelming, right? Is there a hardware way around it?
11-30-2021 07:36 AM
I recall RPi 4 does not have a hardware PWM chip type option, so you are going to have to setup a custom LABVIEW code to talk to a 3rd party RPi PWM board. That is how I did it about a year ago. I will try to see if I can find my old code and post it here.
12-09-2021 07:26 PM
I have the same question on this topic. i wanna generate a PWM to drive the motor. how can it be?
12-18-2021 04:25 PM
What kind of duty cycle are you looking for. I bet the timed loop is good for loops as fast as 10kHz. If you need to go faster, this kit has PWM capabilities. It's 90% there.
https://forums.ni.com/t5/Community-Documents/LabVIEW-BCM2835-Library-for-Raspberry-Pi/ta-p/3539080