ELS on Mini-Lathe?

I didn't even bother switching in my case since I was able to switch the encoder direction right on the lathe with a lever.

If you are using the KL-5080H like me, there are no switches to change direction. However, you can use the serial port and their software to configure it.

But, it's simple to do in the code. You already compiled and downloaded it once, correct?
 
So here's the deal, it seems the Ti software doesn't want to open the edited files. Almost as if they are already open (somewhere, I don't see them) and it doesn't see any changes. When I try to debug/upload, it doesn't see changes and gives some error message. I am uploading the latest version hoping that clears the cache (?) and opens the code files so I can upload. Doing everything as I did originally which was crazy easy, this time it almost seems to not want to do the same thing again even though I have doubled checked that the config file DOES have the removal of the " //" so the invert direction should work.
 
I had to use an older version of the TI software. I'm using Code Composer Studio 9.1.0. Same for Clough42's code. I used 1.1.02.
 
issue.jpg
It won't let me hit select all, it won't let me check them either. This is using code composer 9 and 10
 
Hmm. I don't know. Try rebooting? :)
 
There were duplicate files so bring in new ones that had same name...issues. Fixed that, but now when it gets to "ice pick" running, I immediately get this message.
issue2.jpg
 
Dear LORD! What a day. LITERALLY 6 HOURS monkeying with that. and LITERALLY every problem possible... it happened to me.
I could share, but it will be TLDR. I have one outcome question for you all;
If I have the controller in reverse, everything moves towards chuck....I assume that is the opposite for everyone else? With the forward/reverse button, I can get both directions, it just seems backwards. Perhaps its one of the other lines of code?
Anyone know what
Invert step pin is?
invert enable pin?
This is my line 71 through 74
71// #define INVERT_STEP_PIN true
72#define INVERT_DIRECTION_PIN true
73#define INVERT_ENABLE_PIN true
74#define INVERT_ALARM_PIN true
Being the stepper motor and the encoder are backwards versus Clough, I might need 2 items commented/uncommented? Maybe they cancel each out but would still be reversed? I feel like there is a time/space continuum thing going on here. :p
 
The invert settings just set it up for high or low level for logic signals. I believe all you should have to do is set INVERT_DIRECTION_PIN false and it should switch the direction of the stepper driver. I'm 90% sure "FWD" on the controller and FWD on the lathe send the carriage toward the chuck. I'll check next time I'm in the shop.
 
Well, ran the first test as everything is in, mounted and polished. The problem I'm having must have something todo with the config.H file. I ran 8 TPI and the score marks are pretty much touching each other, looks more like a rough finish pass than threading. Here my config settings (keeping in mind I have the same lathe as Clough and the exact same encoder/stepper-servo.)
Thoughts?

#ifndef __CONFIGURATION_H
#define __CONFIGURATION_H




//================================================================================
// LEADSCREW
//
// Define the type and pitch of leadscrew you have in your lathe. If you have an
// imperial leadscrew, define LEADSCREW_TPI. If you have a metric leadscrew,
// define LEADSCREW_HMM (pitch in hundredths of a millimeter). Do not define
// both.
//================================================================================

// For Imperial leadscrews: pitch in Threads Per Inch (TPI)
#define LEADSCREW_TPI 12

// For metric leadscrews: pitch in hundredths of a millimeter (HMM)
// Example: 200hmm = 2mm
//#define LEADSCREW_HMM 200




//================================================================================
// STEPPER/SERVO
//
// Define the number of steps and microsteps for your stepper motor, the pin
// polarity of the driver, and whether to use additional features, like servo
// alarm feedback.
//
// NOTE: If you are using a servo drive with something other than a 1:1 drive
// ratio, you can use the STEPPER_MICROSTEPS to compensate. For example, if you
// have a servo configured for 1000 steps/revolution and it drives the leadscrew
// through a 3:1 reduction, you can set STEPPER_RESOLUTION to 1000 and
// STEPPER_MICROSTEPS to 3.
//================================================================================

// Steps and microsteps
#define STEPPER_MICROSTEPS 1
#define STEPPER_RESOLUTION 1000

// Step, direction and enable pins are normally active-high
// #define INVERT_STEP_PIN true
#define INVERT_DIRECTION_PIN true
#define INVERT_ENABLE_PIN true
#define INVERT_ALARM_PIN true


// Enable servo alarm feedback
#define USE_ALARM_PIN




//================================================================================
// ENCODER
//
// Define the type of encoder you are using on the spindle. The firmware assumes
// the encoder is turning at a 1:1 ratio with the spindle.
//
// NOTE: the firmware is concerned with the quadrature edge count, which is
// four times the number of pulses. For example, if you have a 1024 P/R
// encoder, you need to enter 4096 here.
//================================================================================

// Encoder resolution (counts per revolution)
#define ENCODER_RESOLUTION 4096

// Which encoder input to use
#define ENCODER_USE_EQEP1
//#define ENCODER_USE_EQEP2




//================================================================================
// CALCULATIONS
//
// Define how calculations should be performed. Most users will not need to
// touch these settings.
//================================================================================

// Use floating-point math for gear ratios
#define USE_FLOATING_POINT




//================================================================================
// HARDWARE
//
// Define which hardware you're using:
//
// 1 - LaunchXL F280049C with ELS BoostXL v1
// 2 - LaunchXL F280049C with ELS BoostXL v2
//================================================================================

// See hardware version table above
#define HARDWARE_VERSION 2


//================================================================================
// CPU / TIMING
//
// Define the CPU clock, interrupt, and refresh timing. Most users will not need
// to touch these settings.
//================================================================================

// Stepper state machine cycle time, in microseconds
// Two cycles are required per step
#define STEPPER_CYCLE_US 5

// User interface refresh rate, in Hertz
#define UI_REFRESH_RATE_HZ 100

// RPM recalculation rate, in Hz
#define RPM_CALC_RATE_HZ 10

// Microprocessor system clock
#define CPU_CLOCK_MHZ 100
#define CPU_CLOCK_HZ (CPU_CLOCK_MHZ * 1000000)


#endif // __CONFIGURATION_H
 
Back
Top