Announcement

Collapse
No announcement yet.

Stepper Motor & PID problem

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


  • Stepper Motor & PID problem

    My basic setup is that I'm using a CTRIO2 module with a stepper to drive a traction belt which moves product towards a cutter, which then cuts the product to size. My problem so far: my length tolerance is 1mm and so far the best I've been able to do with my setup is 5mm. I've added a rotary encoder which should give me about 0.1mm resolution. I've hooked it up and I'm getting counts coming off of it.

    Now: I'm having difficulty determining how to configure Do-more to essentially perform a trapezoid movement with a PID correction. I've read over the PID modules but I'm unsure how to "output" it to the stepper. I've read over some of the "Axis/Run Dynamic Position Mode" modules, but I'm unsure how to tie in the encoder.

    Any help would be appreciated.


    Specific Equipment:
    • Direct Logic 205: Comm/status module, CTRIO2 module
    • MTRH-24066 stepper on STP-DRV-80100 driver - driven on Channel 1 Out
    • Optical Sensor on Channel 2C (In) for edge detection when loading raw stock
    • TRD-MX1000AD rotary encoder on Channel 1 A, B, C (Encoder Ch A, Ch B, Reset/Rev Counter)
    • Air-driven notching press, activated on Channel 2 (C) Out
    Last edited by Jarod997; 11-27-2019, 12:34 PM.


  • #2
    Do-More CTAXCFG (CTRIO's axix configuration instruction) allows selecting encoder feedback. Couldn't you just execute your move like normal and it will correct directly off of the encoder pulses, rather than trying to set up a PID implementation instead?

    Comment



    • #3
      Originally posted by MikeN View Post
      Do-More CTAXCFG (CTRIO's axix configuration instruction) allows selecting encoder feedback. Couldn't you just execute your move like normal and it will correct directly off of the encoder pulses, rather than trying to set up a PID implementation instead?
      I didn't even look at that block. I like simple. I'll try it and see what happens - thanks!
      Last edited by Jarod997; 11-27-2019, 12:57 PM.

      Comment



      • #4
        If you have a Stepper moving a Product, it will move the Prescribed number of 'Inches', or what ever.. But in this case I'm thinking you are getting Slip between the Traction Belt and the Product?.. Other then the Stepper being overloaded and Skipping pulses, I can think of no other way your product would not be in the proper spot..

        Your Edge Detection, what are you detecting and why?..

        Cap

        Comment



        • #5
          Originally posted by Cap View Post
          If you have a Stepper moving a Product, it will move the Prescribed number of 'Inches', or what ever.. But in this case I'm thinking you are getting Slip between the Traction Belt and the Product?.. Other then the Stepper being overloaded and Skipping pulses, I can think of no other way your product would not be in the proper spot..

          Your Edge Detection, what are you detecting and why?..

          Cap
          The way I load the product, the drive feeds the product in past the cutter until it hits the edge detector, it then backs the product up past the cutter and then forward up to the middle of the cutter to get a beveled cut on the edge. I'd like to have the edge detection before the cutter, but there's no room. From there all the feeds are forward and cutting at whatever lengths I need.

          The stepper isn't skipping, but likely the notched drive belt is expanding to some degree as it's moving and there's probably some amount of slipping between the drive belt and the product. The surface under the product is either PTFE (Teflon) or UHMW ("plastic") tape to keep the friction to a minimum. I can't change the drive system (at this point), and I believe I have the pressure between the drive belt and the product at an optimal point. Too much more and the product doesn't move as much and/or we stall the motor, and too much less and we get more slipping.

          I've been playing with my "Adjustment" parameter, (which I'm using as Steps per Meter at the moment, for resolution and fine tuning), and a "Scrap" measurement (which is the fixed length of scrap the cutter makes and is added to every length cut) - but even with very minimal tweaking I'm still getting "wildly" varying measurements.

          To be a bit more specific, we're cutting hard plastic from 3,657mm (12') stock lengths, at lengths between 694 and 1,110 mm.

          Comment



          • #6
            Can you run an Encoder on a wheel, that runs on the top surface of the Product.. and use this as your 'Feedback' for actual distance moved?

            Comment



            • #7
              You should put some kind of marker on your belt, then execute a whole bunch of different moves without any product on the belt. Measure the mark each time you do a move and verify the measurement is exactly what the move profile told it to do. If Your mark measures correct each time then the drive system and belt are most likely having no issues and getting any additional feedback wont help. The problem would then be in how the product is being detected or being moved. However if the mark does not measure correctly after any moves, then you have at least narrowed down your problem to the movement of the system itself in how it is set up and running.

              Comment



              • #8
                Originally posted by Cap View Post
                Can you run an Encoder on a wheel, that runs on the top surface of the Product.. and use this as your 'Feedback' for actual distance moved?
                That's what I'm trying to implement right now.

                As for the drive belt, it's only maybe 3.5 to 4" long and the only "drive" pressure points are under the two idler wheels (think of a Case Quad-Trac tractor). Commanding really short distances doesn't translate the reliability well to the longer distances I need I've found.

                Comment



                • #9
                  I know this is an Entire Level of Complication, but can you 'Pinch' the Product with another Drive Assembly from the top.. ??..

                  OR, can you use a 'Vacuum Belt' to Suck the thing to the belt?.. we use that is Labeling, to keep the Floppy Label sucked back to a Bely until the Bottle Rolls through it..

                  Cap

                  Comment



                  • #10
                    Originally posted by Cap View Post
                    I know this is an Entire Level of Complication, but can you 'Pinch' the Product with another Drive Assembly from the top.. ??..

                    OR, can you use a 'Vacuum Belt' to Suck the thing to the belt?.. we use that is Labeling, to keep the Floppy Label sucked back to a Bely until the Bottle Rolls through it..

                    Cap
                    That would have been my preferred solution: one drive wheel and one idler wheel pinching the product, but prior to my time here they said they tried that and couldn't get enough grip on the product. I still would have liked to try it, but the traction belt drive was the route we took on this machine.

                    Comment



                    • #11
                      So after I selected "Encoder 1" I got Error 106 (Specified input function is unconfigured or invalid), restart the PLC, error 106. I couldn't clear it because I wasn't sure how the error was being caused. I had the Encoder configured and set up with engineering units and input scale, and before this I could spin it by hand and watch the raw values in the Data View.

                      Comment

                      Working...
                      X