I am developing tool changer using an arduino, and have set up communications to Mach4 using the Modbus plugin. This part was way easier to set up than I expected.
I am adding a tool changer tab to the mach4 operator screen. This will show the status of the tool changer arduino, give the capability to do manual control operations, show arduino I/O statuses, etc.
I want to add button to this screen to re-initialize the modbus connection in case it has an error, such as happens if the Ethernet cable is unplugged or the arduino power is cycled. I have discovered that opening and closing the modbus configuration screen will reset the modbus and clear the error. I want to make a button that will perform the same function.
Any advice?