PathPilot controlled lathe toolchanger

More
04 Jan 2016 21:02 - 04 Jan 2016 22:23 #67876 by micknucam

Hello
I have developed an 8 position toolchanger for my lathe I am using a 5i25 and 7i76. The bit files that come with the 5i25 are set up to produce 5 step and direction channels. I have used a pic micro to decode the pwm signals produced by PathPilot but had to implement a software pwm gen. Is it possible to change one of the step and direction channels to a hardware pwm. Has anyone already done this or could explain how this is done or should I contact Mesa ???
Attachments:
Last edit: 04 Jan 2016 22:23 by micknucam. Reason: Added pictures

Please Log in or Create an account to join the conversation.

More
05 Jan 2016 02:32 #67896 by PCW
Its possible to change one of the step or dir outputs to be a PWM output instead but would require a custom bit file
(its not a big deal if you have the tools setup. Ive got a stack of custom bitfile requests I will try and get to end of this week or early next week )

Please Log in or Create an account to join the conversation.

More
05 Jan 2016 08:20 #67909 by cncbasher
sure just let us know what pin arrangment you need
and what current pinfile your using ( sticker on the back of the 5i25 )

Please Log in or Create an account to join the conversation.

More
05 Jan 2016 12:53 #67918 by andypugh
One simple solution might be to find an existing firmware with the channels you require.
The Hosmot2 firmware is here:
git.linuxcnc.org/gitweb?p=hostmot2-firmw...fe5a983ab494e0a49b49
You are probably using the 7i76x2 pinout here: (scroll to the bottom to see the pins)
git.linuxcnc.org/gitweb?p=hostmot2-firmw...fe5a983ab494e0a49b49
However, if you were to use the 7i76P_7i76 firmware:
git.linuxcnc.org/gitweb?p=hostmot2-firmw...fe5a983ab494e0a49b49

Then there are some PWM channels. However it looks like the PWM is on the external DB25 and the stepgens are on the internal one, so you would need an extra DB25 breakout connector to connect your existing 7i76.

It might be worth looking through the other PIN_*7i76* .vhd files to see if there is any better fit.

Out of interest, what does the PWM output actually do?

Please Log in or Create an account to join the conversation.

More
05 Jan 2016 14:45 #67926 by micknucam
Hi Andy
Will have a look at the pins later. PathPilot outputs a pulse width relevant to the tool number I have programmed the following using the capture compare registers on a pic and a timer. Works Perfect.

rise = get_capture(1); // CCP_1 is the time the pulse went high
fall = get_capture(2); // CCP_2 is the time the pulse went low


The times are in Milliseconds for 1ms the range is 900 to 1050 as the PWM gen is software generated it gitters around a bit hence was wondering if I could get a more stable hardware PWM signal.

int tool_found(long new_width){
/// printf("\r\n in Tool found function");
int tool;
if (new_width >= 900 && new_width <= 1050){
tool = 1; }

else if (new_width >= 1900 && new_width <= 2050){
tool = 2; }

else if (new_width >= 2900 && new_width <= 3050){
tool = 3; }

else if (new_width >= 3900 && new_width <= 4050){
tool = 4; }

else if (new_width >= 4900 && new_width <= 5050){
tool = 5; }

else if (new_width >= 5900 && new_width <= 6050){
tool = 6; }

else if (new_width >= 6900 && new_width <= 7050){
tool = 7; }

else if (new_width >= 7900 && new_width <= 8050){
tool = 8; }

else if (new_width >= 8900 && new_width <= 9050){
tool = 0; }
else
tool = 0;

return tool;
}// end func

Please Log in or Create an account to join the conversation.

More
05 Jan 2016 14:53 #67927 by andypugh
PWM output to transmit an integer number? I find that distasteful...

You can transmit 8 positions on 3 IO pins in gray-code. Admittedly that uses 2 more pins, but if you have them it would save a lot of messing about.

Please Log in or Create an account to join the conversation.

More
05 Jan 2016 15:30 #67928 by PCW
The 7I76 has lots of I/O
That does seem like a more direct route

That is, you are not working under the same constraints that Tormach
was when they designed their Tool changer interface
(Mach and only one output pin available on parallel port to select tool changer position)

Please Log in or Create an account to join the conversation.

More
05 Jan 2016 15:35 #67929 by cncbasher
Mike , sent you a pm , their are other ways to do this , but depends on if your using a tormach bit file
i can easily add a toolchanger into pathpilot easier probably than your trying to do ..

Sarah

Please Log in or Create an account to join the conversation.

More
20 Jan 2016 20:31 #68848 by micknucam
Thanks CNCBASHER the bit file works fantastic the pwm signal is rock solid have done some testing and all is great. Glad I could help with the setup of PathPilot have put a picture of the toolchanger mounted on George's myford lathe.

Thanks

Micknucam
Attachments:

Please Log in or Create an account to join the conversation.

More
18 Mar 2016 01:51 - 18 Mar 2016 01:56 #71837 by Iron-Man


Hello
I have developed an 8 position toolchanger for my lathe I am using a 5i25 and 7i76. The bit files that come with the 5i25 are set up to produce 5 step and direction channels. I have used a pic micro to decode the pwm signals produced by PathPilot but had to implement a software pwm gen. Is it possible to change one of the step and direction channels to a hardware pwm. Has anyone already done this or could explain how this is done or should I contact Mesa ???


Micknucam may I ask what PIC you used in your tool changer. I was able to get a Emco PC Turn 50 tool turret and will convert it for use on the NovaTurn. Your method seems to be straight forward. Can you share your code?


Thanks,

Iron-Man
Last edit: 18 Mar 2016 01:56 by Iron-Man. Reason: Emco tool turret.

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.132 seconds
Powered by Kunena Forum