adccommunitymod (AutomationDirect) asked a question.

Stepper Motor & PID problem

Created Date: November 27,2019

Created By: Jarod997

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

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


  • adccommunitymod (AutomationDirect)

    Created Date: November 27,2019

    Created by: Jarod997

    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

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 27,2019

    Created by: MikeN

    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?

  • adccommunitymod (AutomationDirect)

    Created Date: November 27,2019

    Created by: Jarod997

    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!

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 27,2019

    Created by: Cap

    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

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 27,2019

    Created by: Jarod997

    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.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 27,2019

    Created by: Cap

    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?

  • adccommunitymod (AutomationDirect)

    Created Date: November 27,2019

    Created by: MikeN

    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.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 27,2019

    Created by: Jarod997

    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.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 27,2019

    Created by: Cap

    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

  • adccommunitymod (AutomationDirect)

    Created Date: November 28,2019

    Created by: Jarod997

    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.

    Expand Post
10 of 11