Page 1 of 2

Modbus TCP Remote DRO

PostPosted: Wed May 03, 2017 3:41 am
by nm156
Hi All!

New to the forum, been around CNC for almost 20 years. I'm building a new machine and while waiting for parts to arrive I decided to do a little programming.

remote.jpg


You can use an old Windows laptop, desktop or tablet as a remote DRO. (Or even a wallboard with an LCD screen)


This is more of a proof of concept, but it is functional.

Paul

Sorry, had to break up the files due to upload size limitations.

Re: Modbus TCP Remote DRO

PostPosted: Wed May 03, 2017 9:35 am
by cncdrive
This is a really nice work.
Thank you for sharing!!!

Re: Modbus TCP Remote DRO

PostPosted: Wed May 03, 2017 8:28 pm
by nm156
Hello again!

I refined the program somewhat and made it prettier! (I think)

DRORemote2.png


It is now a stand-alone executable without a need for the DLL or font install. It also now runs under the .NET 2.0 framework (same as UCCNC)
README is included in new package. As usual, full source code and example included.

I think the Modbus addition to UCCNC was a great idea. I'm now working on an Arduino Modbus TCP project. :D

Paul

Re: Modbus TCP Remote DRO

PostPosted: Thu May 25, 2017 8:13 pm
by A_Camera
This is really very nice, and I agree that the built in Modbus is a great thing, easy to use and is extremely flexible. I have full control over my VFD through those three wires, very good and useful. I am not only controlling the RPM and the CW/CCW/ON/OFF but also reading a lot of parameters back and update the necessary UCCNC fields with what I want to see, like temperature, current, voltage, real RPM, spindle speed reached and so on. I have also abandoned the spindle start dwell delay and checking the "spindle speed reached" LED to see if the spindle is up and running with the right speed before the M3 or M4 macros are exited. A very simple modification of the macros, and is even compatible with the traditional dwell use if I'd not want to use the VFD flag, just normal delay.

Actually, the built-in Modbus support was a major reason why I bought this software. It is miles ahead of Mach3 Brains... :lol:

Re: Modbus TCP Remote DRO

PostPosted: Thu May 25, 2017 8:19 pm
by A_Camera
nm156 wrote:I'm now working on an Arduino Modbus TCP project. :D

...and I am working on a PIC Modbus project (just started yesterday).

Re: Modbus TCP Remote DRO

PostPosted: Sun Dec 29, 2019 11:41 am
by Blaise
Hi nm156, I am new to a lot of things, pretty much in study mode! New to UCCNC, C# macros, MODBUS... Even Windows! (MAC user).
I am pretty good with Arduino, ESP32.

I am working on a diy build router CNC. The mechanical side of the project is still at the drawing stage.
CNC.png


In parallel to cading, I am working on the electronics part of the project. I am quite pleased with my progress! I have, on a bench, UCCNC connected to a UC300ETH, driving a large servo using a DG4S-16035 drive. I got a Huanyang VFD connected via RS485 and the Huanyang plugin! Also started adding external controls like physical buttons for cycle start, pause and so on. I have an MPG working also! So far, so good!

If you look closely on the side of the gantry, I have a basic control panel and I would like to have a LCD with most of what you have in your demo here but a simple LCD driven by an Arduino would suffice. Maybe a ESP32 over WiFi and Modbus TCP?

I feel quite at ease understanding the code in the macro and I am confident, I could modify it to my needs but on the Arduino side, I don’t know where to start. It’s the Modbus protocol that I have a hard time wrapping my head around.

I was wondering if you have progressed with your Arduino code?

Many thanks for sharing!

- Blaise

Re: Modbus TCP Remote DRO

PostPosted: Fri Jan 03, 2020 2:12 pm
by Blaise
Never mind... It took some fiddling around but I got the Arduino talking over Modbus RTU.
This is gonna make wiring of the CNC and electronics so much easier and cleaner!

Re: Modbus TCP Remote DRO

PostPosted: Thu Jan 09, 2020 9:56 pm
by thesleepydog
Blaise wrote:Never mind... It took some fiddling around but I got the Arduino talking over Modbus RTU.
This is gonna make wiring of the CNC and electronics so much easier and cleaner!


Would you consider posting some info on how you got it to work? Maybe some screenshots ? Would greatly appreciate it.

Re: Modbus TCP Remote DRO

PostPosted: Fri Jan 10, 2020 4:13 am
by Blaise
thesleepydog wrote:Would you consider posting some info on how you got it to work? Maybe some screenshots ? Would greatly appreciate it.


It will be my pleasure. I would like to clean things up a little in the code first. And, also, there are still a few things I need to figure out but as soon as I have something that makes sense, I'll post it here.

Re: Modbus TCP Remote DRO

PostPosted: Sun Feb 02, 2020 12:32 am
by Soler
A tutorial for this would be great