Author Topic: stepper motor encoder pulse measurement  (Read 11887 times)

edmund

  • Newbie
  • Posts: 7
  • I love YaBB 1G - SP1!
    • View Profile
stepper motor encoder pulse measurement
« on: January 15, 2003, 04:41:04 PM »
Can i use the HSC for stepper motor pulse measurement? or can i use PMON to measure 2?

Can u tell me what is the general guidlines for entering values for the PIDDEF?
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: stepper motor encoder pulse measurement
« Reply #1 on: January 15, 2003, 07:21:13 PM »
Stepper motor is open loop control, so you just have to specify the number of pulses you want to send and the PLC will handle the rest. No encoders are normally used with stepper motor.

However, if you want to connect an encoder you can use the HSC (High Speed Counter) to connect to a quadrature encoder for up/down counting.

PMON is used for measuring pulsewidth and frequency which is useful if your purpose is to measure the speed. But I wonder why you need to measure the speed since the speed is set by the STEPSPEED command already.

PIDDEF lets you define the proportional, integral and derivative multiplier. You do need to have knowledge of PID type digital control to use the function properly. Usually you start with proportional term only, and if the steady state error is not acceptable then add in some integral factor. D term is not necessary if P+I can do the job, in that case just leave the D term as zero.  

Since the M-series PLC do not handle floating point, you usually represent fraction using fixed point arithmatic. E.g. Use a single digit to represent 0.01. i.e 123 represents 1.23 so on. That allow you to specify fractional P or I terms without using floating point.
« Last Edit: December 31, 1969, 04:00:01 PM by -1 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

edmund

  • Newbie
  • Posts: 7
  • I love YaBB 1G - SP1!
    • View Profile
Re: stepper motor encoder pulse measurement
« Reply #2 on: January 15, 2003, 10:05:25 PM »
Motor using is a  DC permanent magnet motor, employing a digital tachometer feedback with TTL Pulse Stream.

So what can i use to get the feedback pulse over a sampling time of, say 1 minute? Because the speed of the motor is changing (but not very frequently), so i will need to know if the speed is becoming faster or slower, so the PLC can changing the time delay to make the output on faster or slower.

« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: stepper motor encoder pulse measurement
« Reply #3 on: January 16, 2003, 08:05:22 AM »
So your purpose is speed control of a DC motor? That has nothing to do with the stepper motor.

What is the time delay that you are refering to to control the speed of the motor? Normally, you vary the speed of the DC motor by using the PWM outputs to apply variable voltage to the motor. The PMON can be used to enable a pulse measurement channel and you can then use the PULSEFREQUENCY function to measure the speed of the motor. The result is then used to vary the PWM output. That should be the correct way of doing it.  The control can be achieved by a few if then else statement or apply a full PID control.


« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS