Hi Rod
Sorry I have been absent. Just finished a big job and have been out of town with delivery and installation.
Your " Rotary Table Controller" has grown to be quite a monster , doing much more than originally planned. Funny how projects grow , isn't it ?
I too will be ordering a 48 V supply and trying to get this wrapped up.
Question, I will want to add an external switch to control "Next" or a right button press. We will be adding a proximity switch so my buddies old 3 axis mill can move over to the prox switch and advance the rotary table to the next position.
Should I try to set it up as "that button" or add another on an open analog input calling the same function ?
Thoughts ?
Scott
Scott glad you are back, I wondered where you got to. Yes, I'll get the monster done! I'm not coming at this from a CNC background but I think what you want to add another switch that functions as the right button.
I've thought about this in terms of adding a rotary encoder to enter data. If you only want one button recognised, I think I'd use a digital port for the new switch.
Throughout the sketch you will see a loop with code like this:
Code:
event = lcd.getButton();
switch(event){
case LCD_BUTTON_RIGHT:
...
I'd either edit the lcd.getButton() function in the LCD class to test our new port and return LCD_BUTTON_RIGHT if it sensed your button was pressed.
Alternatively, if its only one procedure you want this to work in, maybe you could modify the piece of code above to look for the extra input. Something like this:
Code:
event = lcd.getButton();
if(myButtonIsPressed())
event = LCD_BUTTON_RIGHT;
switch(event){
case LCD_BUTTON_RIGHT:
...
Just remember your input must be 5 volts max and to debounce the button.
So as a progress update, I got the linear version in the shed last night and gave it a run. I have a few bugs.
- table direction appears reversed and can't be fixed in the config menu
- Linear home goes the wrong way. (Probably because of above)
- Rotary Home broken
- Can't test the distance is correct until I fit a power feed stepper but did check the steps were being calculated correctly.
The home functionality is a bit complex because in rotary mode, it needs to be reset when it passes the 0 degree mark but this is not the case in the linear mode.... and it involves the low level ISR routine.
Nothing I can't sort out when I get a bit of time. TorontoBuilder has been reviewing his hardware design so it will support multiple steppers. Check his thread too.