Problem with Y axis, need help!! - Page 2


Page 2 of 2 FirstFirst 12
Results 21 to 24 of 24

Thread: Problem with Y axis, need help!!

  1. #21
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default Re: Problem with Y axis, need help!!

    Hi Mark,

    I have some progress with this issue today! I decided to go ahead and parallel my encoder inputs for Y axis (CH1) over to CH6 to do a double check. And right after doing this the problem popped up again, and sure enough I can see the two channels drifting apart. I set up an indicator and CH1 is moving off (and axis sounds rough at high speed) and CH6 is reading good. So I guess this means the problem is either between the screw terminal block and the pins, or in the receiver itself. And looks like my wiring/encoder should be fine.

    Considering that the problem popped up again right after me doing this, Its likely that something I did here caused it to come back. I have 2 possible theories. First is loose connection between pins and me fiddling with it made it loose again. But how would this allow it to work fine at low speed and not work at high speed? Second theory is that my receiver has some kind of issue and is barely able to read signals at high speed. Now with the encoder signals being send to 2 inputs they are slightly lower strength and this is just enough to cause it not to work? Any thoughts on which problem is more likely? Or something else I haven't thought of?
    That all sounds correct.

    I suppose there could be a bad solder connection on the differential receiver chip Kanalog U1. One way to check is to gently push sideways on the pins to see if they move. Pins 9, 10, 14,15 should have continuity to the screw terminals.

    As I said before there is 470 ohms termination. So across all 4 + to - inputs there measure 470 ohms. Now that you paralleled two channels it should be half of that. This is likely why it now reads a bit less voltage than the others. But only 0.2V differential is required so it should still work fine.

    Its always surprised me that the inputs work at all with a floating input. I think stray capacitance causes the floating input to lag the other by 0.2V so it sort of works. It wouldn't surprise me that higher frequencies may not work.


    Problem with Y axis, need help!!-diffinput-png



    Can you help me make the changes to my init file to use channel 6 instead of 1? Why is there 2 input channels for each axis? Is this normal? A little confused here.
    Some Input Modes require 2 devices. Encoders only need one so only InputChan0 matters. InputChan1 is ignored. So the change would be:

    ch1->InputChan0=6;


    Also whats the proper C code to get the current encoder position? I want to do something like this:

    YAxisDifference = Channel1position - Channel6postion;
    You probably only care about the magnitude of the difference so:


    YAxisDifference = fast_fabs(ch1->Position - ch6-> Position);

    Regards
    TK http://dynomotion.com


  2. #22
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Problem with Y axis, need help!!

    Hi Tom,

    One more question. When I first tested this, Ch6 was counting in the wrong direction. I added the following line to my init to make it count the same direction as CH1:

    ch6->InputGain0=-1;

    So just to be sure I dont end up missing something here, or getting a double negative and somehow end up with a runaway. Before I enable the axis again, can you confirm this is what I need:

    ch1->InputMode=ENCODER_MODE;
    ch1->OutputMode=DAC_SERVO_MODE;
    ch1->Vel=1020000;
    ch1->Accel=3500000;
    ch1->Jerk=200000000;
    ch1->P=2;
    ch1->I=0.025;
    ch1->D=0;
    ch1->FFAccel=0;
    ch1->FFVel=0;
    ch1->MaxI=500;
    ch1->MaxErr=300;
    ch1->MaxOutput=1000;
    ch1->DeadBandGain=0;
    ch1->DeadBandRange=2;
    ch1->InputChan0=6;
    ch1->InputChan1=2;
    ch1->OutputChan0=1;
    ch1->OutputChan1=3;
    ch1->MasterAxis=-1;
    ch1->LimitSwitchOptions=0x10;
    ch1->SoftLimitPos=1188720; // set limit to +9.75 inches
    ch1->SoftLimitNeg=-1188720; // set limit to -9.75 inches
    ch1->InputGain0=-1;
    ch6->InputGain0=-1;
    ch1->InputGain1=1;
    ch1->InputOffset0=0;
    ch1->InputOffset1=0;
    ch1->OutputGain=-1;
    ch1->OutputOffset=0;
    ch1->SlaveGain=1;
    ch1->BacklashMode=BACKLASH_LINEAR;
    ch1->BacklashAmount=48; // 48 for 0.0004" 12.192 COUNTS PER TENTH
    ch1->BacklashRate=2000;
    ch1->invDistPerCycle=1;
    ch1->Lead=0;
    ch1->MaxFollowingError=150; // reduced from 300 to hopefully trip if loosing counts
    ch1->StepperAmplitude=250;

    //Pole zero 45, 180
    ch1->iir[0].B0=14.849600;
    ch1->iir[0].B1=-28.946699;
    ch1->iir[0].B2=14.106600;
    ch1->iir[0].A1=1.804700;
    ch1->iir[0].A2=-0.814233;

    ch1->iir[1].B0=1.000000;
    ch1->iir[1].B1=0.000000;
    ch1->iir[1].B2=0.000000;
    ch1->iir[1].A1=0.000000;
    ch1->iir[1].A2=0.000000;

    //Low pass 500
    ch1->iir[2].B0=0.123861;
    ch1->iir[2].B1=0.123861;
    ch1->iir[2].B2=0.000000;
    ch1->iir[2].A1=0.752278;
    ch1->iir[2].A2=0.000000;



  3. #23
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default Re: Problem with Y axis, need help!!

    Hi Mark,

    No need to set ch6->InputGain0 you are not using KFLOP axis 6. The input gain for KFLOP axis 1 is all that matters.

    If wrong the following error should disable the axis before running away much.

    Regards
    TK http://dynomotion.com


  4. #24
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Problem with Y axis, need help!!

    Hi Tom,

    I went ahead and enabled it with that single change you posted and everything worked fine. Y axis seems smoother then ever. I did a looping program to move around and return to hit an indicator and everything is good. Hopefully this solves my problem.

    I still have the signals going to both inputs. Had a look in Kmotion while that test program was running and the position had moved off about 1000 counts but there was no further change in the error while I was watching it. So still some kind of intermittent problem with CH1 input for sure.

    I dont need to use all inputs at once so everything should be good again now. Thanks again so much for the help. Love the flexibility of this controller. Pretty awesome how this allowed me to use another input to diagnose a problem and then just switch to another input to fix it!



Page 2 of 2 FirstFirst 12

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

Problem with Y axis, need help!!

Problem with Y axis, need help!!