Author Topic: Unwanted Stepper motor movement  (Read 21147 times)

nealbert

  • Newbie
  • Posts: 21
  • I'm a llama!
    • View Profile
Unwanted Stepper motor movement
« on: September 11, 2020, 08:37:10 AM »
I have a FMD88-10 PLC and am using the Stepper motor output to move a small elevator.  I also have three 24VDC Solid State Relays wired to PLC Outputs 2, 3 and 4.  These SSRs drive 3 heaters but they are disconnected for now, so it's just SSRs wired to the PLC.

I issue a move command to move the elevator upward.  It moves up, stops where it's supposed to, pauses a couple of seconds, then the 3 SSRs turn on.  At that point I see and hear a jump or jerk of the Stepper motor.  Sometimes a strong jerk, sometimes weak, sometimes not at all.  Note, this occurs when the SSRs turn ON, so it is not related to an inductive kick when inductors turn off.  The jerk motion is actually moving the stepper motor.  Over time, the elevator inches upward away from it's original stopping point.  This is unacceptable.

I have not looked at the output of the PLC (Output 5) on the o'scope yet.
I installed a small ferrite bead on the wire from PLC Output 5 and the Stepper Driver, but that didn't seem to have any effect.
I have some UF4001 diodes (as suggested in the FMD88-10 Users Manual) on order, but won't have those until next week.

Looking for solutions or suggestions at this point. 

Thanks in advance,
Neal Cooper

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re: Unwanted Stepper motor movement
« Reply #1 on: September 12, 2020, 03:59:23 PM »
Neal,

I am running 2 stepper motors from an Fx series PLC.  I have not run into the problem that you are seeing.  The attached photo is my stepper controlled valve test bed. You can see the steppers, the belt driven cams, the limit switches, drivers and big 24 VDC supply for the steppers.  The rest of the test system is a couple meters distant.

Stepper systems are not as easy as they appear.  The bis issues are torque and inertia.  If your stepper doesn’t have enough torque to accelerate the load, you will lose steps on acceleration.  You may gain steps on the de-cel if the inertia of your system is so great that it overrides the holding torque of the stepper. I had a client that when the stepper coasted past the last step that the high voltage generated by the stepper (acting as an alternator) would destroy the driver circuitry.  I destroyed both of his prototypes in less than one minute.  I was unable to convince him that his prototypes would need a bit more development before they were ready to ship..

Most SSRs are optically isolated.  The PLC's view of an SSR is an LED with a series resistor (to limit current) connected to +24 VDC.  There is nothing inductive about the SSR's input structure. There is no need for additional circuitry.  I don’t think this is your problem.

If you have access to a modern oscilloscope, it is probably time to get it out.  If you can modify your PLC firmware to set an OUTPUT bit when your firmware issues a stepper move command and then clears this OUTPUT on completion of the move command. Look carefully at what this output does.  It is very possible that your firmware is buggy and actually responsible for the unwanted stepper movement.

Now that you have a way to trigger the 'scope you can study the PLC stepper signals on the 2nd channel.

Stepper systems are not as easy as they appear.  The bis issues are torque and inertia.  If your stepper doesn’t have enough torque to accelerate the load, you will lose steps on acceleration.  You may gain steps on the de-cel if the inertia of your system is so great that it overrides the holding torque of the stepper. I had a client that when the stepper coasted past the last step that the high voltage generated by the stepper (acting as an alternator) would destroy the driver circuitry.  I destroyed both of his prototypes in less than one minute.  I was unable to convince him that his prototypes would need a bit more development before they were ready to ship.

If the problem is not firmware and not physics (torque and inertia) then I would look carefully at how you have handled power and ground wiring.  I would worry about how you have wired both the SSRs and the stepper driver to ensure that they are all correctly referenced to the PLC +24VDC supply.

I am happy to help you sort this stuff.  You can contact me via my email address in my profile.  I am sure that your problem is simple.  I am sure that I can can help you stare at it just differently enough to figure out the problem.

Gary d

« Last Edit: September 12, 2020, 08:03:44 PM by garysdickinson »

nealbert

  • Newbie
  • Posts: 21
  • I'm a llama!
    • View Profile
Re: Unwanted Stepper motor movement
« Reply #2 on: September 13, 2020, 04:44:29 PM »
I agree, I think it's time to break out the scope.
Gary,

I should have attached this video in my initial post.  It shows the elevator movement to "Home", there is a 2 second pause, then the SSR are turned ON (you can see {on the dial indicator} and hear the "jerk" at about the 00:04 second mark).  You may need to turn up the volume on your PC to hear the "jerk".  Sorry for the poor video quality, but when you're limited to a 512KB upload, somethings gotta give.

I'll also disconnect the SSRs one by one and see if one Output is worse than the others.  If the problem is coming from Output Channel 4 (the one right next to Stepper Clock Output), then moving that one channel to Output 7 or 8 might solve the problem.

Any new ideas after seeing the video?

Thanks,
Neal

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re: Unwanted Stepper motor movement
« Reply #3 on: September 13, 2020, 09:11:41 PM »
Neal,

The video answers a lot of questions that I was going to ask.  The dial test indicator answered the first 4 or 5 questions.

Your indicator moved a couple of marks. I am guessing about 0.002". I see a lead screw driving a carriage and assume that it is directly coupled to a stepper motor (no intermediate gear box). The most common steppers move 1.8 degrees per full step.  I don't know the pitch of your lead screw, but 5 mm per turn is common. Each full step for a 1.8 degree stepper would move the carriage about 0.025 mm (or about 0.001").  So I am guessing that your stepper is not getting too many step pulses.

My initial guess is that it is not noise on the output of the FMD8810. If you have a stray bit of wire that bridges the PLC outputs, then you can create a "wired-or" condition. If either adjacent output goes active then both will.  I'm done this both with intent and by mistake.  This might get you the behavior shown in the video.

You could put a red LED in series with the step signal heading to the stepper driver.  This is the poor man's alternative to the scope. If it flashes when the stepper shouldn't be moving then you have learned something without having to find the scope probes.

I would instrument the PLC code to generate an output that goes active when the PLC firmware issues a stepper movement command and goes inactive when the command completes. If this new OUTPUT goes active when the carriage jerks, then your firmware issued a stepper movement command. If the new OUTPUT is inactive when the carriage jerks then it is probably not firmware. Sync the scope to that signal and you can go hunting.

What are you using for a stepper driver? I have been using Chinese stepper drivers based on the TB6600 chip. They were inexpensive and I could find schematics to verify the input circuitry.  Most of these drivers were designed to be connected to small computers with 0..5V logic. I added an external resistor in series with each PLC OUTPUT to limit the current to 10 mA as I was working with 0..24V logic (PLC).

Gary





nealbert

  • Newbie
  • Posts: 21
  • I'm a llama!
    • View Profile
Re: Unwanted Stepper motor movement
« Reply #4 on: September 14, 2020, 10:03:14 AM »
Gary,

Your last sentence nailed it...the 0-5VDC logic input to the stepper driver.  I'm probably using the same $6 Chinese stepper drivers as you and I had 24VDC going to the stepper driver inputs.  Dropped in a 1K resistor into the Clock wire, got a solid 0-4VDC logic input.  Jumping and jerking disappeared.  Everything nice and smooth when the SSRs turn on now.  My machine has been running for 1.5 hours and has completed 273 up/down cycles.  It stops with 0.001" of the Home position every time.  Color me happy.

I should have thought about this.  Had to do the same thing on some Oriental Motor drivers.  (But, you don't have to add a resistor to Anaheim Automation drivers.)  Guess I should have looked at the data sheet more carefully.   Oh yeah, parts are from China.  No data sheets!

Anyway, thanks a lot for the help and for jogging my memory.

Neal

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re: Unwanted Stepper motor movement
« Reply #5 on: September 14, 2020, 11:48:27 AM »
Neal,

Glad that you found a simple solution.

I find that most of the documentation (if any) for devices is wrong. I reverse engineer the I/O circuitry of most devices. With Modbus devices, I have to run test software to figure out how stuff works.

I  have run into a few rare exceptions.  I have worked with Modbus devices from both a Finnish and Swiss company that were actually document correctly.  And they had technical support that could help with application issues!

Best regards,

Gary d