Announcement

Collapse
No announcement yet.

Can I control a stepper motor with a productivity 1000?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can I control a stepper motor with a productivity 1000?

    We are building a mechatronics trainer at school and are hoping to use the Productivity 1000 PLC with a C-MORE EA3-T4CL hmi that we have on hand to have a stepper motor control a linear actuator in both directions (start at "home", extend 20 inches, dwell and retract). Is this possible with the Productivity and if so what module would be needed?

  • #2
    The P1k does not have a typical high speed output module where you control scaled velocity and tell motors to move to a specific position. It does have a high speed counter, and you can use the PWM module to run a stepper, but it isnt as integrated with a specific position move instruction type thing as P2k and P3k. What you would need to do is have either an encoder on your linear slide that wires to the HSI, or a couple position sensors wired to the HSI. Then with the PWM module you would write an output frequency to the tagname for the PWM channel you are using that would make the stepper move at a certain velocity. You could use the encoder count to start ramping down speed as it gets close to the count for 20", and then set PWM speed to 0Hz once it is at the end, or use a registration instruction with a position sensor to find the end point and turn off the PWM. The sensor stop wouldnt ramp up and down very well, but you could write ladder code to simulate a small ramp. You could probably also set up a timer as a backup sort of system since you would know your velocity and how long it would take at N pulses per second to reach 20" travel distance and have the timer either start a ramp down as you get near the sensor or do a shutoff if you elapse the expected time and havent yet hit the sensor.

    Its all pretty "hacky" but it can be done. Though it might be too much to expect people to do on a trainer unit.
    P2k integrates much better and you can do a specific position move instruction, but it costs significantly more.


    Or, if you meant controlling stepper with ascii stream then yes it can do that. You can use the RS485 port to send streaming commands do tell a stepper to move to a position.
    Last edited by MikeN; 10-16-2019, 09:12 AM.

    Comment


    • #3
      Thanks for the insight! Looks like the best bet will be to spend some of that grant money and go with a P2K and HSO module for the most user friendly experience for students learning to program a stepper system.

      Comment


      • #4
        Also be aware of which input voltage specs your stepper drive has, many are 5v, and make sure you have either an output module capable of going down to either 3.3v or 5v, or use a relay to change from a 24v plc output to the required lower voltage you may need to use for an input.
        See the input signals section on their spec sheets of the basic drives and the advanced drives:
        https://cdn.automationdirect.com/sta...estepdrive.pdf


        The P2k HSO will do 5v or 24v on the high speed pulse outputs, as well as the general inputs and outputs, but if you use a regular DC I/O card, make sure you get one that lists a range down to 3.3v, as most are only 12-24v range.

        https://www.automationdirect.com/pro...y/p2000/config
        Last edited by MikeN; 10-16-2019, 12:50 PM.

        Comment


        • #5
          We will be using the STP-DRV-4850, it appears to me that we should be safe but again thank you for including that very important detail!

          Comment


          • #6
            Well it appears that I have been overruled. I now would like to control the stepper using an ascii stream but am not sure how to set it up. I think I understand I will need a "AC", "DE", "VE" and "FL" ascii out command but am unsure how to set it up. In watching the video for the click PLC in mentions edge contacts c1 through c4 and I will admit I have never sent ascii strings and am rather confused. Would you mind providing a quick breakdown of how it works or know where I might be able to find a visual "template"?

            Comment


            • #7
              in the productivity suite you will use an ASCII Out (AOUT) instruction the help file for the instruction is P132 or the Custom Protocol Out (COP) instruction see help file P135. Also see P195 for setting up the serial ports and P199 for more about ASCII and Custom protocal function.

              i haven't done serial to a stepper motor but am using a P1000 and a P1-04PWM card to a STP-MTRD-23065E

              Comment


              • #8
                I havent personally used ascii stream to these drives, but I have seen people on this forum ask before and go through it all. Im sure someone can help you if the help files dont get you there.
                Make sure you are indeed using the 4850 drive, as ascii stream position command is only available on these advanced stepper drives, and not avaiulable on the lower priced normal drives. You should be good, but just confirm your model to make sure.


                edit: there is also this manual for the stepper drives on all the commands to use:
                https://cdn.automationdirect.com/sta...scl_manual.pdf
                and page 11 of this appendix shows the pinouts of how the PLCs serial ports should connect to the pins on the stepper drive serial port to ensure you are connected properly to "talk"
                https://cdn.automationdirect.com/sta...nual/appxb.pdf
                Last edited by MikeN; 10-17-2019, 08:39 AM.

                Comment


                • #9
                  Thanks for the manuals, incredibly helpful! We had discussed going the P1-04PWM route but then I tried to go the upgrade route. Right now there are 3 options, the P1-04PWM card and programming as you mentioned at first, the ascii stream or the upgrade. We will be meeting tonight so I will for sure post an update on exactly which method we are going to use.

                  Comment


                  • #10
                    Honestly for a trainer, ascii stream is probably the best way to go. P2k would be easiest to learn and use for beginners by a big margin IMO, but it is not really the way modern big machines by professional companies do things anymore. HSO cards cost too much and you need too many of them for the amount of servos on modern machines. Instead, they connect servos over ethernet com lines these days and stream commands and position data to the drives. This saves potentially nearly a dozen module spaces on a PLC, saving hundreds and even thousands of dollars while making control panel footprint smaller. Some of the big company's servo drives dont even have high speed pulse inputs anymore because it has fallen so far out of use. Check out protocols like EtherCat and ProfiNet. EtherNet/IP too, but this doesnt seem as common and is not as robust as the other major ones since it is non-deterministic.

                    So ascii stream to a stepper would be more complicated to learn, but it is a more modern approach
                    Last edited by MikeN; 10-18-2019, 12:01 PM.

                    Comment


                    • #11
                      https://support.automationdirect.com/examples.html#com EP-COM-028 the examples are for p2 and p3 series. the p2 should work as long as the ports are configured

                      Comment


                      • #12
                        Thanks! I'll get after it!

                        Comment

                        Working...
                        X