Hello Guest it is May 09, 2024, 12:16:44 AM

Author Topic: Modbus Programming guidance needed  (Read 4277 times)

0 Members and 1 Guest are viewing this topic.

Re: Modbus Programming guidance needed
« Reply #10 on: January 02, 2021, 04:59:52 PM »
Some of the modbus devices need to see communication . So read a status of something and it should be good.
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Modbus Programming guidance needed
« Reply #11 on: January 02, 2021, 05:33:52 PM »
That was it. I put in a dummy read coil function and now the write coil function persists.  Seems like problem solved.  Thank you! 
Re: Modbus Programming guidance needed
« Reply #12 on: January 02, 2021, 06:34:35 PM »
Wow, I keep this up people are going to think I have done this before... I don’t need lies like that out there.

Now, to run a spindle the PMC with a small amount of Lua sending over modus is really cool! I set that up for the Maho project that a YouTube guy is doing. If you guys want that I can post a copy here.
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Modbus Programming guidance needed
« Reply #13 on: January 02, 2021, 06:36:33 PM »
Interesting. I always communicate both ways. I never would have thought it would’ve needed that.
Chad Byrd
Re: Modbus Programming guidance needed
« Reply #14 on: January 02, 2021, 06:42:52 PM »
Yeah, if you get really, really, really board some time read manuals for a few VFDs and you will be shocked what they cram in for features. This is done so you have a watchdog. So if the master is gone the slave will shutdown. You can setup VFDs to stay running if coms are lost too. This stuff gets complex fast! So many settings!
« Last Edit: January 02, 2021, 07:15:09 PM by Brian Barker »
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Modbus Programming guidance needed
« Reply #15 on: January 02, 2021, 06:53:29 PM »
I will read and appreciate anything you will share about Modbus and Mach 4. It seems like a very useful way to add remote i/o but there just isn’t enough documentation about setting it up (in Mach specifically) I’m especially interested in using read coils as inputs in Mach, but haven’t had any success sorting through the setup parameters and mapping the functions.  I assume you mean ToT on the Maho project. He was what got me interested in machining and my router is loosely based on his gantry router.  They should play his videos (and others like him) for the kids in school, best shop class ever.
Re: Modbus Programming guidance needed
« Reply #16 on: January 02, 2021, 07:24:05 PM »
Man, I can’t get away with anything! Yes it is TOT... we also added a load meter to his setup ;) .

The issue with modbus is that it is a VERY loose standard. Sometimes it is base 0 sometimes it is base 1 for the registers. Sometimes the manual has the table where the data is in memory and sometimes not. Setting up the VFD for Tony’s machine was a real challenge because it has instructions that are not very clear. But with some goofing around and playing with the settings we got it. Now to help you out I can remote in and take a look at your settings and see if we can make this work. I was thinking that I should make some samples for IO devices that people would like to use. I have been in the forum looking for silly stumbling blocks like this so we can fix them. The issue is will anyone read the manual if we make it :)
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Modbus Programming guidance needed
« Reply #17 on: January 03, 2021, 02:42:24 AM »
Dear Santa(Brian),
I promise to read the manual 3 times if you write it!!!!!


Mike
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: Modbus Programming guidance needed
« Reply #18 on: January 03, 2021, 06:21:54 AM »
Okay, I have not done a manual in a long time so I guess it is time to suffer ;) . I will start this morning and see what happens.  Soon as I get something worth looking at I will put it here so we can see if I am on the right path.

Thanks
Brian
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Modbus Programming guidance needed
« Reply #19 on: January 03, 2021, 08:45:27 AM »
After spending the morning on this I remember why we didn't make a manual. EVERYTHING depends on the slave, and nothing has a simple answer.. I did remember if the registers are bit packed we can very easily unpack them! Use the I/O bitpack setting and it will place the Modbus in your input selections. I put about all the time I want I want to for a Sunday :) I have 3 pages done and by the looks MANY more to go. I have only covered how to get communications and starting on input configuration. I would like to remote in and see if i can make your machine work the way you would like. When I have something that is worth reading I will put it here.
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com