simple 2 axis lathe initial lathe set up
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: simple 2 axis lathe initial lathe set up
I suspect there is noise or the hall signal doesn’t do a clean transition so a transition is being counted multiple times. Do you have an oscilloscope to check it?
Approximately how many degrees is the signal high?
You might add something like a 0.01 second delay in the loop so multiple transitions within that time period will only be counted once.
Approximately how many degrees is the signal high?
You might add something like a 0.01 second delay in the loop so multiple transitions within that time period will only be counted once.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: simple 2 axis lathe initial lathe set up
What min max RPM range will you be using?
I don’t think making the sensor target smaller would be helpful.
What do you mean by sloppy?
Because of only 1 pulse per rev the Update and Filter times will need to be set long to have stable readings.
Do you plan to do single point threading?
I don’t think making the sensor target smaller would be helpful.
What do you mean by sloppy?
Because of only 1 pulse per rev the Update and Filter times will need to be set long to have stable readings.
Do you plan to do single point threading?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: simple 2 axis lathe initial lathe set up
Multiple teeth would be helpful. With 2 hall sensors with one shifted N + 1/4 pitch from the other would generate a quadrature signal like an encoder so a hardware encoder input could be used.
You might add a ceramic capacitor and a resistor to reduce high frequency noise. Also consider shielded cables.
60/1000 RPM * 10/360 = 1.6 millisecond minimum pulse length
You might add a ceramic capacitor and a resistor to reduce high frequency noise. Also consider shielded cables.
60/1000 RPM * 10/360 = 1.6 millisecond minimum pulse length
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: simple 2 axis lathe initial lathe set up
it is a shielded cable with one end of the drain wire to the ground on JP11
i can pull another encoder from a servo and get that on the spindle for 2000 count and Z pulse. the hall was just a supper simple and easy install so i wanted to try it first
i can pull another encoder from a servo and get that on the spindle for 2000 count and Z pulse. the hall was just a supper simple and easy install so i wanted to try it first
Re: simple 2 axis lathe initial lathe set up
ok so i am stopping the first idea of a single pulse hall on the spindle. it was a plan of minimal parts and tech but was not hammering out
NOW plan 2!
i am going to just mount my FANUC 10M servo to the spindle by a timing belt. this was the long term idea and is now seems to be the right time
straight 1 to 1 ratio timing belt drive
it has the same 2000 count encoder and now will be an axis right?
does the spindle ( A axis? ) get axis parameters or does the spindle jog C codes do this? or both?
NOW plan 2!
i am going to just mount my FANUC 10M servo to the spindle by a timing belt. this was the long term idea and is now seems to be the right time
straight 1 to 1 ratio timing belt drive
it has the same 2000 count encoder and now will be an axis right?
does the spindle ( A axis? ) get axis parameters or does the spindle jog C codes do this? or both?
Code: Select all
#include "KMotionDef.h"
int main() {
ch0->InputMode=ENCODER_MODE;
ch0->OutputMode=DAC_SERVO_MODE;
ch0->Vel=100;
ch0->Accel=1000;
ch0->Jerk=10000;
ch0->P=1;
ch0->I=0;
ch0->D=0;
ch0->FFAccel=0;
ch0->FFVel=0;
ch0->MaxI=200;
ch0->MaxErr=200;
ch0->MaxOutput=200;
ch0->DeadBandGain=1;
ch0->DeadBandRange=0;
ch0->InputChan0=0;
ch0->InputChan1=0;
ch0->OutputChan0=0;
ch0->OutputChan1=0;
ch0->MasterAxis=-1;
ch0->LimitSwitchOptions=0x100;
ch0->LimitSwitchNegBit=0;
ch0->LimitSwitchPosBit=0;
ch0->SoftLimitPos=1e+09;
ch0->SoftLimitNeg=-1e+09;
ch0->InputGain0=1;
ch0->InputGain1=1;
ch0->InputOffset0=0;
ch0->InputOffset1=0;
ch0->OutputGain=1;
ch0->OutputOffset=0;
ch0->SlaveGain=1;
ch0->BacklashMode=BACKLASH_OFF;
ch0->BacklashAmount=0;
ch0->BacklashRate=0;
ch0->invDistPerCycle=1;
ch0->Lead=0;
ch0->MaxFollowingError=1000000000;
ch0->StepperAmplitude=250;
ch0->iir[0].B0=1;
ch0->iir[0].B1=0;
ch0->iir[0].B2=0;
ch0->iir[0].A1=0;
ch0->iir[0].A2=0;
ch0->iir[1].B0=1;
ch0->iir[1].B1=0;
ch0->iir[1].B2=0;
ch0->iir[1].A1=0;
ch0->iir[1].A2=0;
ch0->iir[2].B0=1;
ch0->iir[2].B1=0;
ch0->iir[2].B2=0;
ch0->iir[2].A1=0;
ch0->iir[2].A2=0;
ch1->InputMode=ENCODER_MODE;
ch1->OutputMode=DAC_SERVO_MODE;
ch1->Vel=100;
ch1->Accel=1000;
ch1->Jerk=10000;
ch1->P=1;
ch1->I=0;
ch1->D=0;
ch1->FFAccel=0;
ch1->FFVel=0;
ch1->MaxI=200;
ch1->MaxErr=200;
ch1->MaxOutput=200;
ch1->DeadBandGain=1;
ch1->DeadBandRange=0;
ch1->InputChan0=1;
ch1->InputChan1=0;
ch1->OutputChan0=1;
ch1->OutputChan1=0;
ch1->MasterAxis=-1;
ch1->LimitSwitchOptions=0x100;
ch1->LimitSwitchNegBit=0;
ch1->LimitSwitchPosBit=0;
ch1->SoftLimitPos=1e+09;
ch1->SoftLimitNeg=-1e+09;
ch1->InputGain0=1;
ch1->InputGain1=1;
ch1->InputOffset0=0;
ch1->InputOffset1=0;
ch1->OutputGain=1;
ch1->OutputOffset=0;
ch1->SlaveGain=1;
ch1->BacklashMode=BACKLASH_OFF;
ch1->BacklashAmount=0;
ch1->BacklashRate=0;
ch1->invDistPerCycle=1;
ch1->Lead=0;
ch1->MaxFollowingError=1000000000;
ch1->StepperAmplitude=250;
ch1->iir[0].B0=1;
ch1->iir[0].B1=0;
ch1->iir[0].B2=0;
ch1->iir[0].A1=0;
ch1->iir[0].A2=0;
ch1->iir[1].B0=1;
ch1->iir[1].B1=0;
ch1->iir[1].B2=0;
ch1->iir[1].A1=0;
ch1->iir[1].A2=0;
ch1->iir[2].B0=1;
ch1->iir[2].B1=0;
ch1->iir[2].B2=0;
ch1->iir[2].A1=0;
ch1->iir[2].A2=0;
ch0->InputMode=ENCODER_MODE;
ch2->OutputMode=DAC_SERVO_MODE;
ch2->Vel=100;
ch2->Accel=1000;
ch2->Jerk=10000;
ch2->P=1;
ch2->I=0;
ch2->D=0;
ch2->FFAccel=0;
ch2->FFVel=0;
ch2->MaxI=200;
ch2->MaxErr=200;
ch2->MaxOutput=200;
ch2->DeadBandGain=1;
ch2->DeadBandRange=0;
ch2->InputChan0=2;
ch2->InputChan1=0;
ch2->OutputChan0=2;
ch2->OutputChan1=0;
ch2->MasterAxis=-1;
ch2->LimitSwitchOptions=0x100;
ch2->LimitSwitchNegBit=0;
ch2->LimitSwitchPosBit=0;
ch2->SoftLimitPos=1e+09;
ch2->SoftLimitNeg=-1e+09;
ch2->InputGain0=1;
ch2->InputGain1=1;
ch2->InputOffset0=0;
ch2->InputOffset1=0;
ch2->OutputGain=1;
ch2->OutputOffset=0;
ch2->SlaveGain=1;
ch2->BacklashMode=BACKLASH_OFF;
ch2->BacklashAmount=0;
ch2->BacklashRate=0;
ch2->invDistPerCycle=1;
ch2->Lead=0;
ch2->MaxFollowingError=1000000000;
ch2->StepperAmplitude=250;
ch2->iir[0].B0=1;
ch2->iir[0].B1=0;
ch2->iir[0].B2=0;
ch2->iir[0].A1=0;
ch2->iir[0].A2=0;
ch2->iir[1].B0=1;
ch2->iir[1].B1=0;
ch2->iir[1].B2=0;
ch2->iir[1].A1=0;
ch2->iir[1].A2=0;
ch2->iir[2].B0=1;
ch2->iir[2].B1=0;
ch2->iir[2].B2=0;
ch2->iir[2].A1=0;
ch2->iir[2].A2=0;
EnableAxis(0);
EnableAxis(1);
EnableAxis(2);
DefineCoordSystem(0,-1,1,2);
}
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: simple 2 axis lathe initial lathe set up
If the Axis is included in the Coordinate System as you have shown it will operate like an A Axis and Spindle Jog Commands should not be used.does the spindle ( A axis? ) get axis parameters or does the spindle jog C codes do this? or both?
If it is excluded from the Coordinate System then it can be operated as a Spindle with Jog Commands.
You can create M Codes to add or remove it from the Coordinate System to switch modes on the fly.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: simple 2 axis lathe initial lathe set up
excellent
i am excited to murder my next code together with chatbot
thanks tom!
i am excited to murder my next code together with chatbot
thanks tom!