Servo motor control

Moderator: RevPiModIO

Post Reply
kodyaz
Posts: 16
Joined: 13 Oct 2018, 06:57

Servo motor control

Post by kodyaz »

Hi, how do I control the servo motor and servo motor drive with python.
kodyaz
Posts: 16
Joined: 13 Oct 2018, 06:57

Re: Servo motor control

Post by kodyaz »

Hi again, Is there a solution to this issue?
User avatar
RevPiModIO
KUNBUS
Posts: 335
Joined: 20 Jan 2017, 08:44
Contact:

Re: Servo motor control

Post by RevPiModIO »

I think you have to use the PWM Outputs of the RevPi DO / DIO modules.

But remember they have 24 volts!

Than you can set the value of the PWM outputs with python3

Code: Select all

import revpimodio2
rpi = revpimodio2.RevPiModIO(autorefresh=True)
rpi.io.PWM_1.value = 100
Sven
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
kodyaz
Posts: 16
Joined: 13 Oct 2018, 06:57

Re: Servo motor control

Post by kodyaz »

Thanks Sven. I will share the result of the experience on the application.
kodyaz
Posts: 16
Joined: 13 Oct 2018, 06:57

Re: Servo motor control

Post by kodyaz »

RevPiModIO wrote: 15 Jan 2019, 15:59 I think you have to use the PWM Outputs of the RevPi DO / DIO modules.

But remember they have 24 volts!

Than you can set the value of the PWM outputs with python3

Code: Select all

import revpimodio2
rpi = revpimodio2.RevPiModIO(autorefresh=True)
rpi.io.PWM_1.value = 100
Sven
Hi Sven, I made the experiment. But unfortunately I did not get the result I wanted.
I use the PWM as a voltage output. A value in the range 0-24 volts. However I would like to drive a stepper motor. In this case I need to take a certain stroke per second. Can I do this with PWM?
At all values, the engine rotates at the same speed. I want to change the motor speed according to each value.

Sample code
rpi.io.PWM_1.value=50
serviciovupe
Posts: 1
Joined: 05 Jan 2020, 03:07

Re: Servo motor control

Post by serviciovupe »

Hi everyone,
I have an aplication with a servomotor I need control speed, torque and position the servodrive can be controlled by any PLC just is necessary I/O module analogic Outs and preference motion control soft, I saw the rev pi is compatible with codesys but I don`t know if somebody already use codesys with softmotion of codesys and works??
Thanks for the support
Post Reply