kethort / io-over-tcp-modbus-arduino-mach4

Provides extra inputs and outputs via Modbus over TCP using an Arduino Mega and W5100 or W5500 Ethernet Shield and communicating to Mach4 CNC software.
8 stars 2 forks source link

Add support for messaging (error codes, tool numbers, etc) #8

Closed Brianthechemist closed 1 year ago

Brianthechemist commented 1 year ago

I'm planning to use this library to talk to the Arduino Machine Control board I got to control my tool changer (cheaper and faster than spinning a board for my Mega 2560 Pro).

Is it possible to add functionality to send/receive registers in addition to coils? I'd like to be able to send the message "tool #10" (obviously just the tool number as an int) to the arduino board.

Perhaps this is a slight tweak of the ADC/DAC code. I'll have to dig in more closely.

kethort commented 1 year ago

This repo was designed for input/output expansion via Modbus TCP using coils only, in Mach4. You can find examples of Modbus register use on the Mach4 forums, or if you are comfortable reading code, I have another example here: https://github.com/kethort/esp32-cnc-mpg-handwheel-conversion-mach4, where the encoder value, DRO's and Spindle/feedrates are sent using registers.

There are also examples of reading and writing registers in the Arduino/examples folder of this repo.

Brianthechemist commented 1 year ago

Perfect. I can definitely work with that. I think the important stuff is also there in the adc/dac examples.

On Tue, May 9, 2023 at 1:53 PM kethort @.***> wrote:

Closed #8 https://github.com/kethort/io-over-tcp-modbus-arduino-mach4/issues/8 as completed.

— Reply to this email directly, view it on GitHub https://github.com/kethort/io-over-tcp-modbus-arduino-mach4/issues/8#event-9204946662, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFR4YQAMRTFHOKYSGVYTRXDXFKVFJANCNFSM6AAAAAAX3MZSCI . You are receiving this because you authored the thread.Message ID: <kethort/io-over-tcp-modbus-arduino-mach4/issue/8/issue_event/9204946662@ github.com>

Brianthechemist commented 1 year ago

Hi, I'm making great progress with the modbus stuff, thanks for the help.

I'm wondering if you could share the code you used to make this tab in Mach: (maybe just send me your screenset, i can extract it I think.)

It looks like it would take forever to make using their screen editor!

[image: Mach4Modbus.PNG]

On Tue, May 9, 2023 at 4:46 PM Brian Sparano @.***> wrote:

Perfect. I can definitely work with that. I think the important stuff is also there in the adc/dac examples.

On Tue, May 9, 2023 at 1:53 PM kethort @.***> wrote:

Closed #8 https://github.com/kethort/io-over-tcp-modbus-arduino-mach4/issues/8 as completed.

— Reply to this email directly, view it on GitHub https://github.com/kethort/io-over-tcp-modbus-arduino-mach4/issues/8#event-9204946662, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFR4YQAMRTFHOKYSGVYTRXDXFKVFJANCNFSM6AAAAAAX3MZSCI . You are receiving this because you authored the thread.Message ID: <kethort/io-over-tcp-modbus-arduino-mach4/issue/8/issue_event/9204946662@ github.com>

kethort commented 1 year ago

Hi, I'm making great progress with the modbus stuff, thanks for the help. I'm wondering if you could share the code you used to make this tab in Mach: (maybe just send me your screenset, i can extract it I think.) It looks like it would take forever to make using their screen editor! [image: Mach4Modbus.PNG] On Tue, May 9, 2023 at 4:46 PM Brian Sparano @.***> wrote:

The profiles included in Mach4 Profiles folder have the tab in them. Just run main Mach4 launcher and select import profile. You’ll also need to copy the wxForms.lua file in the Modules directory to the C:/Mach4Hobby/Modules folder

Brianthechemist commented 1 year ago

Awesome thanks!

On Thu, Jul 13, 2023 at 4:20 AM kethort @.***> wrote:

Hi, I'm making great progress with the modbus stuff, thanks for the help. I'm wondering if you could share the code you used to make this tab in Mach: (maybe just send me your screenset, i can extract it I think.) It looks like it would take forever to make using their screen editor! [image: Mach4Modbus.PNG] On Tue, May 9, 2023 at 4:46 PM Brian Sparano @.***> wrote: … <#m-2460089087866306256>

The profiles included in Mach4 Profiles folder have the tab in them. Just run main Mach4 launcher and select import profile. You’ll also need to copy the wxForms.lua file in the Modules directory to the C:/Mach4Hobby/Modules folder

— Reply to this email directly, view it on GitHub https://github.com/kethort/io-over-tcp-modbus-arduino-mach4/issues/8#issuecomment-1634068295, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFR4YQFUEDIPJVWI3HYO263XP7KZVANCNFSM6AAAAAAX3MZSCI . You are receiving this because you authored the thread.Message ID: @.***>