Newbie PID advice on a retrofit BenchmanXT - Page 5


Page 5 of 5 FirstFirst ... 2345
Results 49 to 56 of 56

Thread: PID advice on a retrofit BenchmanXT

  1. #49
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2378
    Downloads
    0
    Uploads
    0

    Default Re: PID advice on a retrofit BenchmanXT

    Hi Steve,

    Great. btw if you use the #CODE tag in cnczone then the code will be formatted/indented better and much nicer to read.

    Yes Kanalog has 8 3.3V LVTTL inputs and 8 3.3V LVTTL Outputs on JP12.

    The default settings for the GCode Interpreter can be set in the Tool Setup | Tool Setup Files | Setup File. There is an example called INCHES.SET. See here

    HTH
    Regards

    TK
    http://dynomotion.com


  2. #50
    Registered
    Join Date
    Aug 2012
    Location
    United States
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: PID advice on a retrofit BenchmanXT

    Tom,

    I've been busy but having enormous success and have cut quite a few parts with great precision. I'm still learning how to use this system but so far everything is running great and very stable. I have a continuing problem that I wanted to run by you. I can successfully run a "Home" routine that seeks and finds a switch on all three axis. I want to use that position to set movement limits on the axis. So once I command home for, as an example, the Y Axis. The axis moves backwards towards the column until it contacts the limit switch. my bed can travel maximum of 7 inches in the Y axis. So I want to let the machine know that from the limit switch contact, it can travel no further in that direction and only a maximum of 7 inches in the opposite direction. So if I command it either in the cutting program or by trying to move the bed with joystick or keyboard buttons, it will stop before reaching its limit.
    Thanks

    Steve



  3. #51
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    254
    Downloads
    0
    Uploads
    0

    Default Re: PID advice on a retrofit BenchmanXT

    Steve, what you need to implement is soft limits.
    You'll need to work out the axis counts you want as limits, then set them for each axis, which you would normally do as part of the homing routine.

    To work out the limits, I personally watch the Axis screen within KMotion, and slowly jog the machine into the limit switch. Then add/subtract a suitable safety margin, and use those values to set the soft limits.
    You'll probably also want to implement the SoftLimits3Axes example file, so a feedhold gets implemented if you're going to run into a soft limit, as the basic soft limit implementation simply activates after the limit has been exceeded, which means the axis doesn't start decelerating until after the limit has been exceeded.



  4. #52
    Registered
    Join Date
    Aug 2012
    Location
    United States
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: PID advice on a retrofit BenchmanXT

    Ok I finally have time to revisit this limit problem. The machine has been running beautifully and in some ways it is the reason this is plodding along. (It has become a very useful tool and finding down time to continue working on this had become a welcomed problem.) There is an issue I have had since the start. If I move the X or Y axis and it runs into a hard stop on either extreme, the unit apparently continues to try to move beyond the hard stop. Ultimately, it suddenly reverses direction and will slam into the opposite extreme if I don't stop it in time. It is normally not an issue since the part I am cutting has to fit within the limits of the table. The problem comes in when there is a mistake moving the table with the game controller and I accidentally run into the hard stop. What I THINK is happening is that I'm getting some kind of PID integral windup. The unit keeps trying to move and the number generated by the PID continues to get bigger, until it finally overflows the register and crosses zero. The PID number suddenly changes signs and causes the table to run wild in the opposite direction. I THINK this is what happens. I want to fix this for safety concerns. I tried adding the soft limits. It DOES cause a stop by disabling the axis. However, as soon as I re-enable the axis, it takes that opportunity to run wild. Just playing possum until it gets its chance! I think what I need is some way to tell the controller to stop trying to move that direction and not just preventing it from being able to move. Any ideas? Or any thoughts? Am I wrong in my conclusions? Thanks
    Steve



  5. #53
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2378
    Downloads
    0
    Uploads
    0

    Default Re: PID advice on a retrofit BenchmanXT

    Hi Steve,

    Normally a small Max Following Error would be set so as soon as the hardstop is hit the Axis would disable.

    Soft Limits should not disable the axis so I don't really understand what you describe there.

    It also might be how you are enabling your Axes. For a servo system is is usually best to set the Destination to the current Encoder Position when enabling so the Axis remains still. Such as:

    EnableAxisDest(0,ch0->Position);

    Is that what you are doing?

    Regards

    TK
    http://dynomotion.com


  6. #54
    Registered
    Join Date
    Aug 2012
    Location
    United States
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: PID advice on a retrofit BenchmanXT

    Thank you for the reply Tom.
    I am using SoftLimits3Axes and SoftLimits3AxesV2. I have taken these programs and added them to my main program. I also added an automatic Home so that on initialization the machine homes. Homing works great and would be necessary to set valid limits in either of the Soft Limit Programs. Both programs include :
    if (InLimit()) // check for any limit
    {
    DisableAxis(0);
    DisableAxis(1);
    DisableAxis(2);

    while (InLimit()) ; //wait until back within limits
    }
    Which I take to mean if a Max or Min limit is exceeded, the Axis is disabled until it is back within Min and Max. Am I misinterpreting these programs?

    Steve



  7. #55
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2378
    Downloads
    0
    Uploads
    0

    Default Re: PID advice on a retrofit BenchmanXT

    Hi Steve,

    Those examples were created before KFLOP Firmware supported Soft Limits. So you might use the Soft Limits setting instead.

    Regards

    TK
    http://dynomotion.com


  8. #56
    Registered
    Join Date
    Aug 2012
    Location
    United States
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: PID advice on a retrofit BenchmanXT

    Tom,

    OK NOW I get it. For whatever reason I thought it was a software implementation from those examples and I was reluctant to incorporate them until I could take time to get it right. I used the soft limit settings and after a little tweaking got the system to home and set limits. Perfect! Thanks again for the great help!

    Steve.



Page 5 of 5 FirstFirst ... 2345

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

PID advice on a retrofit BenchmanXT
PID advice on a retrofit BenchmanXT