Author Topic: Stepper Motor control question  (Read 13507 times)

BLF_Electronics

  • Newbie
  • Posts: 9
  • Controls are Cool!
    • View Profile
    • BLF Technology Group
Stepper Motor control question
« on: December 16, 2003, 07:26:18 AM »
I have a question using the Stepper control with the T100MD+ PLC. I am using the stepspeed command in a dCust function to setup the initial move parameters with the default values I am storing them in the DM variables as follows.

DM[1] = 5000 'Pulses Per Second
DM[2] = 100   'Steps to reach full speed
DM[3] = 500   'Default Forward pulses per move
DM[4] = -500  'Default Reverse pulses per move
DM[5] = 2     'Default Delay time between moves
DM[6] = 20     'Default number of moves

stepspeed 1,DM[1],DM[2]

I then issue a stepmove command in another dCust function based on logic that looks at the time delay between moves after the step complete relay becomes true.

stepmove 1,DM[3],10

Everything works fine until I set the pulses per second up to 5000. At that point I get some oscillation in the stepper motor and it may stall. I am using a SilverPak integrated step motor and driver from Lin Engineering that is good up to 20Khz as the max step frequency. The specs also say the minimum step low time is 20 microseconds which should not be a problem at the 5000 pps setting. Am I doing anything that appears incorrect and do you have any ideas? I have also moved the motor only one move at the 5000 pps and get the same results. Everything works fine at a slower pps.

Thanks,

Brian Ferry
« 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 control question
« Reply #1 on: December 16, 2003, 12:15:43 PM »
How is the PLC's output interface to your stepper driver? Is it a direct connection or going through some interface circuitry. The interface circuitry may introduce some distortion on the stepper signal if it is not properly design.  Use an oscilloscope to examine the signal integrity when it arrives at the driver if you involve external interface circuitry.

The PLC normally should be able to output good square wave up to 10KHz. Beyond 10KHz the time spent in servicing system interrupts may become significant and that can have effect on the motor. Are you using interrupt intensive operation such as pulse measurement or high speed counter simultaneously? Are you using any READ_EEP or WRITE_EEP command?

Note that the CPU disables interrupt temporarily during EEPROM write in order to protect integrity of the data. Thus if you write to EEPROM a lot during the stepper output phases then the stepper pulse generated may not be squarish because the stepper output also depend on interrupt to handle the step counting and acceleration/deceleration.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BLF_Electronics

  • Newbie
  • Posts: 9
  • Controls are Cool!
    • View Profile
    • BLF Technology Group
Re: Stepper Motor control question
« Reply #2 on: December 17, 2003, 08:56:55 AM »
I appreciate your response and ideas. I checked my interface circuitry and it is solid. I have some current limiting resistors installed and they work fine. I found by increasing the acc value to 600 for the stepspeed command that the stepper smooths out and works well. I have a limited number of other functions running on the plc and I can go up to 14000 pulses with no loss in system performance. This should now work well for my application.  

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