alnpco

CP1H with servo motor

7 posts in this topic

Hello guys, I'm new here on the forum and also with PLC.  I have a CP1H and would like to use it to control an MG995 servo motor, however, after several attempts with the PWM and INI commands I was unsuccessful, I would like to know if you need to make any configuration on the PLC for the servo to work.  According to the servo manual the working frequency is 50Hz, the duty left at 50%, respecting the smallest division of the door 101.00.   I read somewhere that maybe the PLC couldn't make low frequency servos work, would you like some help wondering if this statement is really true? Thanks. 

commands used 
PWM
 # 1000 
 & 0500 
 & 0500
  ---------------- 
INI
 # 1000 
 # 0003 
 0

Edited by alnpco

Share this post


Link to post
Share on other sites

Complete model number of the CP1H ?

Share this post


Link to post
Share on other sites

Providing model number does NOT end with an A [CP1H-X40DR-A or CP1HXA40DR-A] the PWM should work.

1. With PWM outputs it is NOT necessary to change any PLC settings.

2. Is the task in which the PWM and INI instructions running?

3. Could be a wiring OR power supply issue from the PLC to the MG995 servo?

4. Post your code.

 

Edited by BITS N BYTES

Share this post


Link to post
Share on other sites

Hello. As I said before the servant is at exit 101.00.

 

I made the measurement on the PLC Power Supply and the result was OK

 

I also measured the servo power supply, OK result too.

 

Even when I reset the PLC after downloading some new program the servo moves, probably to find itself.

PWM.jpg

PWM1.jpg

Share this post


Link to post
Share on other sites

If you measure the PWM output with a meter does it change with the duty ratio?

Maybe a wiring issue?

Notes from servo motor:-

  • Frequency of PWM: MG995 takes in PWM signal of frequency 50Hz and any higher and lower frequency PWM will lead to error. As shown in figure the every single cycle of PWM needs to be 20ms width for 50Hz frequency.
  • Duty cycle of PWM: The duty cycle of PWM (or ratio of ON time to total cycle time) determines the position of servo axis. If we provide a PWM signal of 0.5ms ON time over 20mS complete cycle, the servo axis will move to 0º.

Your settings  for pulse output  0 at  1000 hex Pulse output 0 and Duty factor in increments of 0.1%, Frequency in increments of 0.1 Hz look correct, but maybe the motor will not respond correctly. Try 0000 for the Port specifier and change the duty ratio to &50.

IMHO has to be either a wiring issue OR response from the motor.

Share this post


Link to post
Share on other sites

Alnpco,

1. The PLC outputs are isolated, and the voltage for them must be supplied to their COM terminals. There is no such wire on your diagram.

2. Why are you applying 24V PMW signal to the motor 5V input? You need a voltage divider between the PLC and the motor input.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now