Hello,
I have ben focusing on the CH0(X) for now and I have tried many combinations of numbers for PID(including P=1,I=0,D=0).
The numbers used here are nowhere close to what I am accustomed to on other devices(they all seem to be different).
I need the magic decoder ring....
Here is the int.c file I am using::
Code:#include "KMotionDef.h" #define QA 26 // define to which IO bits the AB signals are connected #define QB 27 main() { ch0->InputMode=ENCODER_MODE; ch0->OutputMode=DAC_SERVO_MODE; ch0->Vel=100000.000000; ch0->Accel=1000000.000000; ch0->Jerk=10000000.000000; ch0->P=2.00000; ch0->I=0.000000; ch0->D=15.000000; ch0->FFAccel=0.000000; ch0->FFVel=0.000000; ch0->MaxI=2000.000000; ch0->MaxErr=20000.000000; ch0->MaxOutput=2000.000000; ch0->DeadBandGain=0.000000; ch0->DeadBandRange=0.000000; ch0->InputChan0=0; ch0->InputChan1=0; ch0->OutputChan0=0; ch0->OutputChan1=0; ch0->LimitSwitchOptions=0x20; ch0->InputGain0=1.000000; ch0->InputGain1=1.000000; ch0->InputOffset0=0.000000; ch0->InputOffset1=0.000000; ch0->invDistPerCycle=0.000250; ch0->Lead=0.000000; ch0->MaxFollowingError=1000.000000; ch0->StepperAmplitude=100.000000; ch1->InputMode=ENCODER_MODE; ch1->OutputMode=DAC_SERVO_MODE; ch1->Vel=100000.000000; ch1->Accel=1000000.000000; ch1->Jerk=10000000.000000; ch1->P=1.00000; ch1->I=0.00000; ch1->D=24.000000; ch1->FFAccel=0.000000; ch1->FFVel=0.000000; ch1->MaxI=2000.000000; ch1->MaxErr=20000.000000; ch1->MaxOutput=2000.000000; ch1->DeadBandGain=0.000000; ch1->DeadBandRange=0.000000; ch1->InputChan0=1; ch1->InputChan1=1; ch1->OutputChan0=1; ch1->OutputChan1=1; ch1->LimitSwitchOptions=0x20; ch1->InputGain0=1.000000; ch1->InputGain1=1.000000; ch1->InputOffset0=0.000000; ch1->InputOffset1=0.000000; ch1->invDistPerCycle=0.000250; ch1->Lead=0.000000; ch1->MaxFollowingError=1000.000000; ch1->StepperAmplitude=100.000000; /* ch1->iir[0].B0=1.000000; ch1->iir[0].B1=0.000000; ch1->iir[0].B2=0.000000; ch1->iir[0].A1=0.000000; ch1->iir[0].A2=0.000000; 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; ch1->iir[2].B0=1.000000; ch1->iir[2].B1=0.000000; ch1->iir[2].B2=0.000000; ch1->iir[2].A1=0.000000; ch1->iir[2].A2=0.000000; */ EnableAxis(0); EnableAxis(1); SetBit(152); // Amp Enable X SetBit(153); // Amp Enable Y }
Thanks,
Brad Murry