Hello Guest it is April 27, 2024, 11:42:15 PM

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 - TheSuperior

Pages: « 1 2 3 4
31
Modbus / Re: Arduino Modbus, Complete, Documented and free
« on: March 24, 2022, 01:06:43 PM »
Has there been any further developments on this?

32
Thank you TPS. Will see how far I get.

33
SendSerial(“Hello, world!” & chr(10) & char(13))

I see the above would work. Except for in the place of Hello World I would need a variable
This variable should be the data that was entered into the command line (If that is what it's named?)
or from the G-codes whenever it encounters the M6 code for a toolchange.

I'm not sure how to code this?

the sequence should be something like:

Sub Main()

        Dim Tool_Change As String

        'for the first tool:
        'how do you grab the data from the g-code after m6 or from the command line??

    If the command line value = M6 T0101 Then

        ReadLine(Tool_Change) 'Or here the function for whatever is used for the command line??
       
        SendSerial("1") 'send the number 1 to the arduino

    end if

        'for the second tool:

    If the command line value = M6 T0202 Then

        ReadLine(Tool_Change) 'Or here the function for whatever is used for the command line??
       
        SendSerial("2") 'send the number 2 to the arduino

    end if

         'for the third tool:

   If the command line value = M6 T0303 Then

        ReadLine(Tool_Change) 'Or here the function for whatever is used for the command line??
       
        SendSerial("3") 'send the number 3 to the arduino

    end if
       
and so on for the rest of the tools or maybe later on an array for all 12 tools, just as simple as possible as the arduino already does everything it just needs that number from the serial.

    End Sub


34
Thank you so much! I'm going try this and see how it goes.

35
General Mach Discussion / Write a Integer to Arduino using the M6Start
« on: March 23, 2022, 01:34:55 AM »
Hi There,

I have built an arduino-based tool changer for a conventional 2-axis turning lathe machine. It works by receiving a input of 1 to 12 through either the serial monitor or a bluetooth device.

I would like to be able to use this with Mach 3. If I have a tool change in the G-Codes ex. M6 T0101 it should send "1" to the arduino and run the code to do the change.

I have read that this can be done by building a brain in mach 3 using modbus.

Is there anyone who rather has a M6Start Macro that might just do this?

Or anyone that could point me in the right direction?

Thank you

Pages: « 1 2 3 4