Build Thread Tree325 Retrofit Started - Page 25


Page 25 of 25 FirstFirst ... 1522232425
Results 289 to 297 of 297

Thread: Tree325 Retrofit Started

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

    Default Re: Tree325 Retrofit Started

    Hi PeterTheWolf,

    I was thinking that would be accomplished with the "OFF" position of the axis selection knob since this MPG pendant does not have the a safety switch to be held-In while using it.
    Yes of course you can do this. What confused me was on the schematic the 4 positions were labeled X Y Z A. Let's treat the A selection as "OFF". BTW its actually not necessary to have the OFF position wired in as we could assume if no X Y Z is selected, then assume OFF. But since it is wired in let's use it.

    Let's change these definitions:

    Code:
    #define ENABLE_MPG 29   // Switch/Button used to enable MPG Motion
    
    #define FACTOR1 31  //Petes JP6 pin #12 to MPG pin #18 Wire
    #define FACTOR10 32  //Petes JP6 pin #13 to MPG pin #6 Wire
    #define FACTOR100 33  //Petes JP6 pin #14 to MPG pin #19 Wire
    #define FACTOR200 23  //Not Used -- Petes MPG does not have a X200 setting
    
    #define SELECTX 28  //Petes JP6 pin #7 to MPG pin #16 Wire
    #define SELECTY 29  //Petes JP6 pin #10 to MPG pin #4 Wire
    #define SELECTZ 30  //Petes JP6 pin #11 to MPG pin #17 Wire
    #define SELECTA 27  //Petes JP6 pin #6 to MPG pin #5 Wire
    to

    Code:
    #define FACTOR1 31  //Petes JP6 pin #12 to MPG pin #18 Wire
    #define FACTOR10 32  //Petes JP6 pin #13 to MPG pin #6 Wire
    #define FACTOR100 33  //Petes JP6 pin #14 to MPG pin #19 Wire
    
    #define SELECTX 28  //Petes JP6 pin #7 to MPG pin #16 Wire
    #define SELECTY 29  //Petes JP6 pin #10 to MPG pin #4 Wire
    #define SELECTZ 30  //Petes JP6 pin #11 to MPG pin #17 Wire
    #define SELECTOFF 27  //Petes JP6 pin #6 to MPG pin #5 Wire

    Now change

    Code:
    if (!ReadBit(ENABLE_MPG) || JOB_ACTIVE)	// if not button pressed or Job Active ignore the encoder.
    		Change1 = 0;
    To (notice the '!' NOT operator is removed as when the OFF bit is active we want to prevent motion, rather than when an ENABLE bit is not active). Also change to the more appropriate symbol name.

    Code:
    if (ReadBit(SELECTOFF) || JOB_ACTIVE)	// if OFF or Job Active ignore the encoder.
    		Change1 = 0;
    change
    Code:
    if (ReadBit(FACTOR1))		// is X1 selected?
    	Factor = 4;
    else if (ReadBit(FACTOR10))	// is X10 selected?
    	Factor = 20;
    else if (ReadBit(FACTOR100))	// is X100 selected?
    	Factor = 40;
    else if (ReadBit(FACTOR200))	// is X200 selected?
    	Factor = 400;
    else
    	Factor = 0.0;
    
    if (ReadBit(SELECTX))		// is x selected?
    	Axis = 0;
    else if (ReadBit(SELECTY))	// is y selected?
    	Axis = 1;
    else if (ReadBit(SELECTZ))	// is z selected?
    	Axis = 2;
    else if (ReadBit(SELECTA))	// is A selected?
    	Axis = 3;
    to this because we don't have a FACTOR200 or an A axis

    Code:
    if (ReadBit(FACTOR1))		// is X1 selected?
    	Factor = 4;
    else if (ReadBit(FACTOR10))	// is X10 selected?
    	Factor = 20;
    else if (ReadBit(FACTOR100))	// is X100 selected?
    	Factor = 40;
    else
    	Factor = 0.0;
    
    if (ReadBit(SELECTX))		// is x selected?
    	Axis = 0;
    else if (ReadBit(SELECTY))	// is y selected?
    	Axis = 1;
    else if (ReadBit(SELECTZ))	// is z selected?
    	Axis = 2;
    Make sense?

    Regards



  2. #290
    Registered PeterTheWolf's Avatar
    Join Date
    Aug 2008
    Location
    USA
    Posts
    147
    Downloads
    0
    Uploads
    0

    Default Re: Tree325 Retrofit Started

    Quote Originally Posted by TomKerekes View Post

    Yes of course you can do this. What confused me was on the schematic the 4 positions were labeled X Y Z A. Let's treat the A selection as "OFF". BTW its actually not necessary to have the OFF position wired in as we could assume if no X Y Z is selected, then assume OFF. But since it is wired in let's use it.

    Let's change these definitions:
    ......
    ......

    Make sense?

    Tom ... this does make sense.

    I implemented the changes to my "MPGServiceSmoothHardwareEncFilteredRev3_Petes.c" file as you suggested and tried it. No errors in the console window of KMotion and I can see the I/O changing correctly as I select the axis/scale factor; however, I still get no movement on any of the axis.

    Can you suggest something I should be looking at to help me find why this MPG pendant may not be working correctly?



    Tree325 Retrofit Started-mpg_digital_i_o_working-jpg .....LINK


    Thanks............



    .....
    .....

    J325 Quick Links:

    Machine
    Existing Machine Schematics
    Electronic Cabinet-Right Side
    Electronic Cabinet-Back SIde
    Existing Drive Board SD1525-10
    J325 Servo Drive-SD1525 Manual
    3-Phase Rotary Convert Used
    RickB's J325 Retrofit Wiring
    KFLOP 5VDC/15Watt/3A Power Supply
    KANALOG Mounted & Connected
    Kmotion - Axis Encoder Manual Test of Position via Manual Movement
    Kanalog-Encoder Voltage High/Low Checks & 1KOhm Resister
    Kmotion Configuration Screens "RUN-AWAY"
    Tree Journeyman 325 Designed Specs.
    Tree Journeyman 325 Axis-Tension Frequency Settings
    Final Axis Tuned Error Parameters
    VFD Wiring to Existing Tree325 Old Controller
    DAC Values to RPM / Voltage Checks

    .....
    .....



  3. #291
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2933
    Downloads
    0
    Uploads
    0

    Default Re: Tree325 Retrofit Started

    Hi PeterTheWolf,

    I think we forgot to configure the Encoder Input. I believe you have the encoder wired up to encoder input #7. You must pick a spare KFLOP Axis. (ie Axis 5 as your MPG Program has a define to use that axis) Configure it to have Encoder Input and set the InputChan0 to 7. All other axis parameters don't matter. Do not enable the axis. The axis Position will track the encoder regardless of whether the Axis is enabled or not. Once you do this verify on the KMotion Axis Screen that when the MPG encoder is moved the Axis 5 Position Changes. Then see if the MPG Program works.

    Regards



  4. #292
    Registered PeterTheWolf's Avatar
    Join Date
    Aug 2008
    Location
    USA
    Posts
    147
    Downloads
    0
    Uploads
    0

    Default Re: Tree325 Retrofit Started

    Quote Originally Posted by TomKerekes View Post

    I think we forgot to configure the Encoder Input. I believe you have the encoder wired up to encoder input #7. You must pick a spare KFLOP Axis. (ie Axis 5 as your MPG Program has a define to use that axis) Configure it to have Encoder Input and set the InputChan0 to 7. All other axis parameters don't matter. Do not enable the axis. The axis Position will track the encoder regardless of whether the Axis is enabled or not. Once you do this verify on the KMotion Axis Screen that when the MPG encoder is moved the Axis 5 Position Changes. Then see if the MPG Program works.

    Tom ... Thanks ......... after changing the "5" to the "7" in the following line

    #define MPG_INPUT_AXIS 7 // Axis used to read hardware encoder (not necessarily the encoder channel)

    in my "MPGServiceSmoothHardwareEncFilteredRev3_Petes.c" file the MPG pendant is now working.

    However, I am not getting the correct amount of move on the "X1 / X10 / X100" scale settings.

    One incremental move on the MPG dial with the scale set to "X1" is giving me:

    X-axis .... 0.0008"
    Y-Axis .....0.0008"
    Z-Axis .....0.0006"

    While, One incremental move on the MPG dial with the scale set to "X10" is giving me:

    X-axis .... 0.0040"
    Y-Axis .....0.0040"
    Z-Axis .....0.0032"

    And One incremental move on the MPG dial with the scale set to "X100" is giving me:

    X-axis .... 0.0080"
    Y-Axis .....0.0080"
    Z-Axis .....0.0064"

    What line(s) in the file "MPGServiceSmoothHardwareEncFilteredRev3_Petes.c" file do I need to be looking at to correct this?
    File attached.

    .....
    .....

    J325 Quick Links:

    Machine
    Existing Machine Schematics
    Electronic Cabinet-Right Side
    Electronic Cabinet-Back SIde
    Existing Drive Board SD1525-10
    J325 Servo Drive-SD1525 Manual
    3-Phase Rotary Convert Used
    RickB's J325 Retrofit Wiring
    KFLOP 5VDC/15Watt/3A Power Supply
    KANALOG Mounted & Connected
    Kmotion - Axis Encoder Manual Test of Position via Manual Movement
    Kanalog-Encoder Voltage High/Low Checks & 1KOhm Resister
    Kmotion Configuration Screens "RUN-AWAY"
    Tree Journeyman 325 Designed Specs.
    Tree Journeyman 325 Axis-Tension Frequency Settings
    Final Axis Tuned Error Parameters
    VFD Wiring to Existing Tree325 Old Controller
    DAC Values to RPM / Voltage Checks

    .....
    .....



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

    Default Re: Tree325 Retrofit Started

    Hi PeterTheWolf,

    "Factor" is the amount to move in counts per click. Because your resolution is different based on axis your factors will need to be modified based on the chosen axis. I'm not sure what your final axis resolutions are but you might change this:

    Code:
        if (ReadBit(FACTOR1))        // is X1 selected?
            Factor = 4;
        else if (ReadBit(FACTOR10))    // is X10 selected?
            Factor = 20;
        else if (ReadBit(FACTOR100))    // is X100 selected?
            Factor = 40;
        else
            Factor = 0.0;
    
        if (ReadBit(SELECTX))        // is x selected?
            Axis = 0;
        else if (ReadBit(SELECTY))    // is y selected?
            Axis = 1;
        else if (ReadBit(SELECTZ))    // is z selected?
            Axis = 2;
    to something like:

    Code:
        if (ReadBit(FACTOR1))        // is X1 selected?
            Factor = 0.001;
        else if (ReadBit(FACTOR10))  // is X10 selected?
            Factor = 0.01;
        else if (ReadBit(FACTOR100)) // is X100 selected?
            Factor = 0.1;
        else
            Factor = 0.0;
    
        if (ReadBit(SELECTX))        // is x selected?
        {
            Axis = 0;
            Factor *= 20225.0;        // Multiply by x Resolution
        }
        else if (ReadBit(SELECTY))    // is y selected?
        {
            Axis = 1;
            Factor *= 20225.0;      // Multiply by y Resolution
        }
        else if (ReadBit(SELECTZ))    // is z selected?
        {
            Axis = 2;
            Factor *= 25280.0;      // Multiply by z Resolution
        }
    HTH
    Regards



  6. #294
    Registered PeterTheWolf's Avatar
    Join Date
    Aug 2008
    Location
    USA
    Posts
    147
    Downloads
    0
    Uploads
    0

    Default Re: Tree325 Retrofit Started

    Quote Originally Posted by TomKerekes View Post

    "Factor" is the amount to move in counts per click. Because your resolution is different based on axis your factors will need to be modified based on the chosen axis. I'm not sure what your final axis resolutions are but you might change this:

    .... Code found in page #293 of thread.
    Thanks again Tom .... here is the code I ended up with that gave me correct scaled movements on my MPG pendant (X1 / X10 / X100)... at least on the KMotionCNC postion readouts :

    Code:
    if (ReadBit(FACTOR1))        // is X1 selected?
                Factor = 0.000025;
            else if (ReadBit(FACTOR10))  // is X10 selected?
                Factor = 0.00025;
            else if (ReadBit(FACTOR100)) // is X100 selected?
                Factor = 0.0025;
            else
                Factor = 0.0;
    
            if (ReadBit(SELECTX))        // is x selected?
            {
                Axis = 0;
                Factor *= 20010.0;        // Multiply by x Resolution
            }
            else if (ReadBit(SELECTY))    // is y selected?
            {
                Axis = 1;
                Factor *= 20005.0;      // Multiply by y Resolution
            }
            else if (ReadBit(SELECTZ))    // is z selected?
            {
                Axis = 2;
                Factor *= 25000.0;      // Multiply by z Resolution
            }
    Question: When using this MPG Pendant, what code is used to determine the actual speed the axis moves with each tick of the MPG dial?

    If I have the X100 scale selected on the X-axis and ... lets say .... start to turn this MPG dial maybe 10-20 ticks very quick.... the axis moves very fast. If I turn too fast I start getting following errors.
    Is there a way to slow the motion down some?
    Or does user of the MPG need to be more conservative in the speed of rotating the MPG dial?


    .....
    .....

    J325 Quick Links:

    Machine
    Existing Machine Schematics
    Electronic Cabinet-Right Side
    Electronic Cabinet-Back SIde
    Existing Drive Board SD1525-10
    J325 Servo Drive-SD1525 Manual
    3-Phase Rotary Convert Used
    RickB's J325 Retrofit Wiring
    KFLOP 5VDC/15Watt/3A Power Supply
    KANALOG Mounted & Connected
    Kmotion - Axis Encoder Manual Test of Position via Manual Movement
    Kanalog-Encoder Voltage High/Low Checks & 1KOhm Resister
    Kmotion Configuration Screens "RUN-AWAY"
    Tree Journeyman 325 Designed Specs.
    Tree Journeyman 325 Axis-Tension Frequency Settings
    Final Axis Tuned Error Parameters
    VFD Wiring to Existing Tree325 Old Controller
    DAC Values to RPM / Voltage Checks

    .....
    .....



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

    Default Re: Tree325 Retrofit Started

    Hi PeterTheWolf,

    Question: When using this MPG Pendant, what code is used to determine the actual speed the axis moves with each tick of the MPG dial?

    If I have the X100 scale selected on the X-axis and ... lets say .... start to turn this MPG dial maybe 10-20 ticks very quick.... the axis moves very fast. If I turn too fast I start getting following errors.
    Is there a way to slow the motion down some?
    Or does user of the MPG need to be more conservative in the speed of rotating the MPG dial?
    No the Operator should never be able to cause a following error regardless of how quickly they turn the MPG.

    The Motion should be limited to the Velocity and Acceleration in the Axis Parameters (Rapid Profile Settings). Although Jerk is not necessarily honored. Are you sure you can make big moves with your Rapid settings? What about with "infinite" Jerk (set to 1000X acceleration).

    Increasing these TAU values should make the motion smoother, accelerate slower, with more lag. You might try increasing these (all by some factor).

    #define TAU 0.01 // smoothness factor (Low Pass Time constant seconds for MoveExp)
    #define TAU1 0.015 // smoothness factor (Low Pass Time constant seconds for pre filter 1)
    #define TAU2 0.015 // smoothness factor (Low Pass Time constant seconds for pre filter 2)

    Regards



  8. #296
    Registered PeterTheWolf's Avatar
    Join Date
    Aug 2008
    Location
    USA
    Posts
    147
    Downloads
    0
    Uploads
    0

    Default Re: Tree325 Retrofit Started

    Quote Originally Posted by TomKerekes View Post

    No the Operator should never be able to cause a following error regardless of how quickly they turn the MPG.

    The Motion should be limited to the Velocity and Acceleration in the Axis Parameters (Rapid Profile Settings). Although Jerk is not necessarily honored. Are you sure you can make big moves with your Rapid settings? What about with "infinite" Jerk (set to 1000X acceleration).
    I can move larges move on all axis via the KmotionCNC rapid buttons without any following errors.


    Quote Originally Posted by TomKerekes View Post

    Increasing these TAU values should make the motion smoother, accelerate slower, with more lag. You might try increasing these (all by some factor).

    #define TAU 0.01 // smoothness factor (Low Pass Time constant seconds for MoveExp)
    #define TAU1 0.015 // smoothness factor (Low Pass Time constant seconds for pre filter 1)
    #define TAU2 0.015 // smoothness factor (Low Pass Time constant seconds for pre filter 2)

    I did find the following settings usable in my "MPGServiceSmoothHardwareEncFilteredRev3_Petes.c" file:


    #define TAU 0.015 // smoothness factor (Low Pass Time constant seconds for MoveExp) Second Try * 1.5
    #define TAU1 0.0225 // smoothness factor (Low Pass Time constant seconds for pre filter 1) Second Try * 1.5
    #define TAU2 0.030 // smoothness factor (Low Pass Time constant seconds for pre filter 2) Third Try * 2.0

    #define FINAL_TIME 1.0 // Set final dest after this amount of time with no change

    Now I can use the MPG Pendant as design without any following errors .............. Thanks Tom!


    On another subject .... Setting the Raw Machine Zero (Home Position) manually.

    I want to created a button that I can use each time I start-up my machine which will set the Raw Machine Zeros.
    And then I would like to set some soft-limits based on the counts.
    I know back on page #186 of this thread I was going to set-up some proximity sensor; however, I have yet to do that.

    So, I thought I would make a button I can use on machine start-up.

    Question: Is this C-Code correct for setting a button such that once I hit the button the Raw Machine Coordinate system will be zeroed out on all three axis?

    Code:
    #include "KMotionDef.h"
    
    // Manually setting Raw Machine Zeros on 3 axis System (via Button)
    // after manually moving each axis to a know user home position
    // then re-enabled all axis for KmotionCNC use.
    
    
    main()
    {
    	int SaveXLimits,SaveYLimits,SaveZLimits;  //place to save limit switch settings
    
    	// Set Machine Zero for X-Axis
    	DisableAxis(0);		// disable the axis
            Zero(0);		// Zero the position
    	EnableAxis(0);		// re-enable the ServoTick
    
            // Set Machine Zero for Y-Axis
    	DisableAxis(1);		// disable the axis
            Zero(1);		// Zero the position
    	EnableAxis(1);		// re-enable the ServoTick
    	
            // Set Machine Zero for Z-Axis
    	DisableAxis(2);		// disable the axis
            Zero(2);		// Zero the position
    	EnableAxis(2);		// re-enable the ServoTick
    
    	DefineCoordSystem(0,1,2,-1);  //Define XYZ coordinated motion axes
    }
    .....
    .....

    J325 Quick Links:

    Machine
    Existing Machine Schematics
    Electronic Cabinet-Right Side
    Electronic Cabinet-Back SIde
    Existing Drive Board SD1525-10
    J325 Servo Drive-SD1525 Manual
    3-Phase Rotary Convert Used
    RickB's J325 Retrofit Wiring
    KFLOP 5VDC/15Watt/3A Power Supply
    KANALOG Mounted & Connected
    Kmotion - Axis Encoder Manual Test of Position via Manual Movement
    Kanalog-Encoder Voltage High/Low Checks & 1KOhm Resister
    Kmotion Configuration Screens "RUN-AWAY"
    Tree Journeyman 325 Designed Specs.
    Tree Journeyman 325 Axis-Tension Frequency Settings
    Final Axis Tuned Error Parameters
    VFD Wiring to Existing Tree325 Old Controller
    DAC Values to RPM / Voltage Checks

    .....
    .....



  9. #297
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2933
    Downloads
    0
    Uploads
    0

    Default Re: Tree325 Retrofit Started

    Hi PeterTheWolf,

    Question: Is this C-Code correct for setting a button such that once I hit the button the Raw Machine Coordinate system will be zeroed out on all three axis?
    That should work. Although it has some unnecessary things:

    #1 it's not necessary to disable the axes to Zero them.
    #2 the Coordinate System is probably already defined by your Init Program
    #3 The Save variables are not used so no need to define them.

    You might want to add in setting the Soft Limits here. It doesn't usually make sense to set them in the Init Program until the system has been Homed.



Page 25 of 25 FirstFirst ... 1522232425

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

Tree325 Retrofit Started

Tree325 Retrofit Started