Hello Guest it is March 28, 2024, 07:02:25 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Fuzer

Pages: 1
1
Modbus / Re: Arduino ModBus and Mach3 for tool turret changer
« on: September 03, 2014, 09:38:29 AM »
Hello Brett and thanks for your info! It seems that has a lot to be done!
Sooooo back to research once again! But thanks for giving me the path that i have to walk through!
Really helpfull and appreciated! I will be back again on here and i hope it will be for the results of my project!
Thanks once again Brett!

Constantine

2
Modbus / Re: Arduino ModBus and Mach3 for tool turret changer
« on: September 03, 2014, 07:37:52 AM »
It may be a really stupid question but do i need any modIO board to connect my arduino there?  ??? ???
Through the research i have done already no one was mentioning any kind of these boards.  ::) ::)

3
Modbus / Re: Arduino ModBus and Mach3 for tool turret changer
« on: September 03, 2014, 06:30:27 AM »
Here is my macro code that i have found here around on the forum for the tool changer

Code: [Select]
Sub Main()

NumSlots=6
OldTurretPos=(GetOEMDRO(803))
OldToolSlot=Abs(GetOEMDRO(803))
NextTool = GetSelectedTool()
NextToolSlot = (NextTool-1)*60


If OldToolSlot = NextToolSlot Then
SetCurrentTool(NextTool)
Exit Sub
End If

If NextTool>6 Or NextTool<1 Then
Message("Next Tool out of range")
Exit Sub
End If

MoveDis = (NextToolSlot-OldTurretPos)

 If Abs(MoveDis) <180 Then
   If MoveDis > 0 Then     
     MoveDis = 360 + MoveDis     
   Else     
     MoveDis = MoveDis - 360   
   End If     
 End If
 
ActivateSignal(OUTPUT3)  'Release Turret holding pin
Code "G4 P0.5"
While IsMoving ()       
Wend
Code "G00 G91 a" & MoveDis       
While IsMoving ()       
Wend

DeActivateSignal(OUTPUT3)  'Engage Turret holding pin     

SetCurrentTool(NextTool)
Code "G90"
End Sub 

But how i will make this macro to give a signal to my arduino to rotate the motor so the tool to be changed?
My goal is whenever there is spotted in g-code this ---> M6 T*********x
i want the spindle to stop rotating,
then  my turret tool changer to move in a safe spot and
then to trigger my arduino to rotate the motor at the specific tool
and after all these have been done i want my TC to move back
at the work station where it was and the spindle to start rotating again.

My thought was to connect the arduino through modBus.
Then somehow , i guess through a brain, to check all the time the G-code
and if M6 T*********x is spotted then M6start.m1s has to be triggered.
I am thinking that all the above i want to be done will be in that macro
and that macro i have found already it's not doing all these things i want.

4
Modbus / Re: Arduino ModBus and Mach3 for tool turret changer
« on: September 02, 2014, 02:37:54 PM »
Hello Alex and thanks for your reply! I have checked this about the macros but how i will make it? I mean how the macro will talk with the ModBus and the arduino? Or the ModBus connection is not necessary to be done since it's with macro? Or if it's necessary the ModBus connection how i will ask from the ModBus to enable that macro M6start so my arduino will be asked to make that proccess? I hope that i am understandable with my yoda-style-english that i am talking! :)

5
Modbus / Arduino ModBus and Mach3 for tool turret changer
« on: September 02, 2014, 07:53:59 AM »
Hello people! I need some help with my project cause after all the research i have done i still feel lost in the space.  :(

I have an emco5 cnc lathe. I am controlling 2 stepper motors through mach3 and a BOB for X-Z axis. My tool turret changer is being controlled through a dc motor and my arduino. Now i want to make the exact thing: to control my tool turret changer with my arduino through mach. I have found out a way through modBus. I have succeed in making mach3 and my arduino to talk to each other through some tutorials i found here on the forum. But how i will tell to my arduino to do this(change tool) when you see this M6 T0101in g-code? I am thinking that i have to do it somehow through the modBus and brains or through a macro.

P.S.1 I am not sure if the info i have provided are enough i am totally new at both arduino and mach3.

P.S.2 Excuse me for my english but it's not my native/mother language.

Thanks in advance people!  :)

Constantine

6
Modbus / Re: Arduino Modbus, Complete, Documented and free
« on: September 02, 2014, 05:58:32 AM »
Quote
As found elsewhere on the internets, the answers are relatively simple: replace (or as I did, copy) all instances of WProgram.h to Arduino.h - the newer compilers changed this after this thread was created.

How did you do that? Did you just type #include <Arduino.h>  or you did something different? Would you mind to upload the correct sketch? I am newbie at arduino and mach3. Thanks in advance.

Constantine

Pages: 1