Controlling Lathe turret as axis with stepper and no encoder
Posted: Thu Sep 16, 2021 5:39 pm
Hi guys.
So I have an 8-tool turret on an old Rhino ST8 lathe that I am trying to drive as an A axis on the lathe. I have modified it to be spun by a stepper motor and there is a pneumatic cylinder that locks the turret in position when the desired position is achieved. I have a home switch that aligns with Tool 1 on the turret.
I am having a hard time writing the tool change macro for this, even though in theory it seems so simple. There are some a lot of variables that I keep digging for and at the end I have gotten nowhere.
The sequence has to be like this:
1. A certain tool is requested (for example, T0404)
2. Output 2 on the board turns on (M62) to disengage the pneumatic cylider
3. Stepper motor is enabled (M63 to trigger a relay to supply the correct signal to the enable pin of the stepper)
4. A axis spins to A180 (tool # 4 position at 180deg from Tool 1, which is at A0)
5. Motor is disabled (M83)
6. Pneumatic cylinder is engaged to apply brake (M82)
and that's it.
Now in these simple 6 steps there seem to be so many variables/parameters that I just get lost in. Any guidance would be much much appreciated. I have read what seems to be all the sample macros out there but I am still quite lost.
Thanks in advance for all the help.
So I have an 8-tool turret on an old Rhino ST8 lathe that I am trying to drive as an A axis on the lathe. I have modified it to be spun by a stepper motor and there is a pneumatic cylinder that locks the turret in position when the desired position is achieved. I have a home switch that aligns with Tool 1 on the turret.
I am having a hard time writing the tool change macro for this, even though in theory it seems so simple. There are some a lot of variables that I keep digging for and at the end I have gotten nowhere.
The sequence has to be like this:
1. A certain tool is requested (for example, T0404)
2. Output 2 on the board turns on (M62) to disengage the pneumatic cylider
3. Stepper motor is enabled (M63 to trigger a relay to supply the correct signal to the enable pin of the stepper)
4. A axis spins to A180 (tool # 4 position at 180deg from Tool 1, which is at A0)
5. Motor is disabled (M83)
6. Pneumatic cylinder is engaged to apply brake (M82)
and that's it.
Now in these simple 6 steps there seem to be so many variables/parameters that I just get lost in. Any guidance would be much much appreciated. I have read what seems to be all the sample macros out there but I am still quite lost.
Thanks in advance for all the help.