Automatic tool change via serial interface
- lsteele
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
31 Jul 2018 15:05 #115236
by lsteele
Automatic tool change via serial interface was created by lsteele
Hi there,
I'm just getting started with moving over to linuxcnc from Mach3, using it to control a Denford Orac lathe with a custom toolchanger I built myself. The toolchanger has a simple serial interface. I need to send an ascii string to the serial port, wait for a reply indicating success or failure, and proceed accordingly. I'd like to be able to reflect the status back to the user via the gmoccapy messages box.
I'd appreciate some pointers where to start - linuxcnc is a bit overwhelming to the uninitiated! I'm happy programming in Python, C, scripting languages etc, if necessary.
Thanks,
Luke
I'm just getting started with moving over to linuxcnc from Mach3, using it to control a Denford Orac lathe with a custom toolchanger I built myself. The toolchanger has a simple serial interface. I need to send an ascii string to the serial port, wait for a reply indicating success or failure, and proceed accordingly. I'd like to be able to reflect the status back to the user via the gmoccapy messages box.
I'd appreciate some pointers where to start - linuxcnc is a bit overwhelming to the uninitiated! I'm happy programming in Python, C, scripting languages etc, if necessary.
Thanks,
Luke
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7780
- Thank you received: 2075
31 Jul 2018 20:55 #115255
by cmorley
Replied by cmorley on topic Automatic tool change via serial interface
mitsub_vfd.py is a relatively simple python program that sends ASCII commands through serial to a VFD.
There are other serial VFD drivers written in C too.
Chris M
There are other serial VFD drivers written in C too.
Chris M
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4866
01 Aug 2018 01:03 #115271
by andypugh
Do you need to use the serial interface?
I configured an Orac toolchanger 2 weekends ago using all standard LinuxCNC components and the parallel port.
The only special hardware was an off-the-shelf H-bridge driver to run the DC motor.
Replied by andypugh on topic Automatic tool change via serial interface
I'm just getting started with moving over to linuxcnc from Mach3, using it to control a Denford Orac lathe with a custom toolchanger I built myself.
Do you need to use the serial interface?
I configured an Orac toolchanger 2 weekends ago using all standard LinuxCNC components and the parallel port.
The only special hardware was an off-the-shelf H-bridge driver to run the DC motor.
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Offline
- Platinum Member
Less
More
- Posts: 1125
- Thank you received: 184
01 Aug 2018 08:36 #115288
by Mike_Eitel
Replied by Mike_Eitel on topic Automatic tool change via serial interface
Hi Luke
Can publish modbus RTU code.
Written for AVR in BASCOM..
Decoding sequenz should be easy transferable in any languague.
Mike
Can publish modbus RTU code.
Written for AVR in BASCOM..
Decoding sequenz should be easy transferable in any languague.
Mike
Please Log in or Create an account to join the conversation.
- lsteele
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
01 Aug 2018 13:19 - 01 Aug 2018 13:22 #115302
by lsteele
Replied by lsteele on topic Automatic tool change via serial interface
I do need the serial interface, unless I want to rebuild the electronics.
Chris M - that code looks fairly straightforward. Can you give me any pointers to info explaining how this 'interfaces' or is integrated into linuxcnc? Writing a python script to interface to the toolchanger is the easy bit, what I don't understand is how I get linuxcnc to drive that code and exchange info.
Mike, I'd be interested to see the modbus RTU code.
Thanks,
Luke
Chris M - that code looks fairly straightforward. Can you give me any pointers to info explaining how this 'interfaces' or is integrated into linuxcnc? Writing a python script to interface to the toolchanger is the easy bit, what I don't understand is how I get linuxcnc to drive that code and exchange info.
Mike, I'd be interested to see the modbus RTU code.
Thanks,
Luke
Last edit: 01 Aug 2018 13:22 by lsteele. Reason: Hadn't completed email
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Offline
- Platinum Member
Less
More
- Posts: 1125
- Thank you received: 184
01 Aug 2018 13:50 #115305
by Mike_Eitel
Replied by Mike_Eitel on topic Automatic tool change via serial interface
Don't get shocked when you see the code.
Some of the main tricks are a bit complicated interuppt and pointer games plus also something like a "small multitasking part" for the micro..
The decoding part itself is quite short and handled in the "_com_z" to "_com_4"
Have fun
Mike
Some of the main tricks are a bit complicated interuppt and pointer games plus also something like a "small multitasking part" for the micro..
The decoding part itself is quite short and handled in the "_com_z" to "_com_4"
Have fun
Mike
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4866
01 Aug 2018 13:54 #115306
by andypugh
Have a look at hal_manualtoochange.py
That gets automatically added to configs without another toolchanger, and is a Python component that monitors the tool-change HAL pins.
You can probably just edit and rename that to do what you want.
But I still think there might be value in using the (realtime) carousel component, if only because I spent some time the the weekend making changes specifically for the Denford Orac
Replied by andypugh on topic Automatic tool change via serial interface
what I don't understand is how I get linuxcnc to drive that code and exchange info.
Have a look at hal_manualtoochange.py
That gets automatically added to configs without another toolchanger, and is a Python component that monitors the tool-change HAL pins.
You can probably just edit and rename that to do what you want.
But I still think there might be value in using the (realtime) carousel component, if only because I spent some time the the weekend making changes specifically for the Denford Orac
Please Log in or Create an account to join the conversation.
- lsteele
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
01 Aug 2018 17:23 #115328
by lsteele
Replied by lsteele on topic Automatic tool change via serial interface
Hi Andy,
That sounds promising - I'll check it out.
Cheers
That sounds promising - I'll check it out.
Cheers
Please Log in or Create an account to join the conversation.
Time to create page: 0.072 seconds