Page 1 of 1

Servo motor control

Posted: 08 Jan 2019, 06:58
by kodyaz
Hi, how do I control the servo motor and servo motor drive with python.

Re: Servo motor control

Posted: 11 Jan 2019, 18:50
by kodyaz
Hi again, Is there a solution to this issue?

Re: Servo motor control

Posted: 15 Jan 2019, 15:59
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

Re: Servo motor control

Posted: 23 Jan 2019, 15:14
by kodyaz
Thanks Sven. I will share the result of the experience on the application.

Re: Servo motor control

Posted: 05 Mar 2019, 19:56
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

Re: Servo motor control

Posted: 05 Jan 2020, 03:18
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