News:

  • June 06, 2026, 09:37:32 PM

Login with username, password and session length

Author Topic: Do-more to ESA Automation VT580 HMI via Modbus  (Read 21011 times)

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Do-more to ESA Automation VT580 HMI via Modbus
« on: June 23, 2016, 10:29:13 AM »
Bob, I got my DoMore CPU the other day. I set up a home routine with just 3 lines of code and it worked great. That is until I hooked up my HMI and found out DoMore does not support DirectNet protocol. Do you have a work around for this so I don't have to learn Modbus or rewrite the HMI program?

DirectNet serial? Yuk. I have a sample app where I wrote a DirectNet server for Do-more, but that would be very heavy. I would bite the bullet and do Modbus. We're happy to help you with it, but it's super simple.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Do-more to ESA Automation VT580 HMI via Modbus
« Reply #1 on: June 23, 2016, 10:36:12 AM »
Not hard to set up Modbus. Go to the SysConfig->CPU Configuration page. Upper left corner, choose Modbus RTU Server. Click the "Change @IntSerial Device Settings..." button change change baud rate, etc. Write to the PLC.

When the HMI reads a Modbus input, it is reading from Do-more MI memory. Modbus Input Registers come from Do-more MIR, Coils go to MC, and Holding Registers go to MHR. You can reference those locations directly from program code, or you can use PUBLISH and SUBSCRIBE to move data between Modbus guest memories MI, MC, MIR, MHR and normal Do-more memory.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

MVetrano

  • Full Member
  • ***
  • Posts: 27
Do-more to ESA Automation VT580 HMI via Modbus
« Reply #2 on: June 23, 2016, 01:29:25 PM »
OK Bob I'll give this Modbus thing a shot. I must warn you, nothing is super simple for me when it comes to programming and I will have a ton of questions, just let me know when to stop asking.
 First question, I looked at the configuration for the serial port, do I use the default settings for Transmit Control and RTS Control? What do you mean by "Write to PLC"?
2. If the HMI using DirectNet is referencing X1 and C20, then using Modbus it should reference MI1 (for Input 1) and MC20 (for Contact C20)?
3. What's the difference between MIR and MHR?
4. Do they make a Modbus for Dummies book?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Do-more to ESA Automation VT580 HMI via Modbus
« Reply #3 on: June 23, 2016, 01:44:03 PM »
OK Bob I'll give this Modbus thing a shot. I must warn you, nothing is super simple for me when it comes to programming and I will have a ton of questions, just let me know when to stop asking.

No worries!

First question, I looked at the configuration for the serial port, do I use the default settings for Transmit Control and RTS Control? What do you mean by "Write to PLC"?

Take the defaults. You'll probably need to change baud rate, and possibly parity. Write to PLC == download the project to the PLC.

2. If the HMI using DirectNet is referencing X1 and C20, then using Modbus it should reference MI1 (for Input 1) and MC20 (for Contact C20)?

Would have to know something more about the HMI, but no. When you talk to a Do-more Modbus slave, you are talking to Do-more memory blocks MI, MC, MIR, and MHR. Each of those memory regions corresponds to a Modbus Function Code, and the HMI will have some mechanism for addressing each.

3. What's the difference between MIR and MHR?

Just two different regions of memory addressed by two different Modbus function codes. I think Inputs, Coils, Input Registers, and Holding Registers were Modicon PLC memory types back in the day.

4. Do they make a Modbus for Dummies book?

Not that I'm aware of, but we'll help. It's really not that bad. Best thing you could do at this point is to look at what your HMI is doing for Modbus, then we'll help you understand how that maps to Do-more.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Do-more to ESA Automation VT580 HMI via Modbus
« Reply #4 on: June 23, 2016, 01:45:39 PM »
What is the brand and model of your HMI?
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

MVetrano

  • Full Member
  • ***
  • Posts: 27
Do-more to ESA Automation VT580 HMI via Modbus
« Reply #5 on: June 23, 2016, 02:42:21 PM »
Esa Automation VT580WOPTET

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Do-more to ESA Automation VT580 HMI via Modbus
« Reply #6 on: June 23, 2016, 02:51:14 PM »
Having trouble getting a manual. Once you start looking for downloads, it switches to Italian. Do you have a manual as a PDF?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

MVetrano

  • Full Member
  • ***
  • Posts: 27
Do-more to ESA Automation VT580 HMI via Modbus
« Reply #7 on: June 23, 2016, 03:22:51 PM »
I have the manual for the hardware and software but the files are too big too send over the forum.I can email if that's ok?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Do-more to ESA Automation VT580 HMI via Modbus
« Reply #8 on: June 23, 2016, 04:34:24 PM »
I have the manual for the hardware and software but the files are too big too send over the forum.I can email if that's ok?

Email to support@hosteng.com
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Do-more to ESA Automation VT580 HMI via Modbus
« Reply #9 on: June 24, 2016, 10:06:02 AM »
I don't see any meaningful references to comm drivers in either document. I'm guessing the comm drivers are documented in another manual or manuals, since they would be adding them over time. If you can send whatever document you have that describes DirectNet and the Modbus one as well, that would be great.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

MVetrano

  • Full Member
  • ***
  • Posts: 27
Do-more to ESA Automation VT580 HMI via Modbus
« Reply #10 on: June 24, 2016, 11:17:14 AM »
That's all the documentation I have. When I setup the HMI, I choose what the HMI is connected to. I am assuming these are the drivers you are referring to. For example, under PLC, I choose Koyo and then DirectNet (only choice). I can also choose Modbus. Four choices; RTU Master (fast peripherals), RTU Master (slow peripherals), RTU Slave, RTU Slave (fast peripherals) and TCP/IP Modbus.

I heard from the manufacturer about converting my existing project. He said to delete the DirecNet Driver and insert the Modbus RTU Master. Then Reinsert the variable data area and addressing. When I do that it is referencing a "B" register. Don't know what to do with that. I'll send a screen shot.

Where can I find a memory register table for the DoMore?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Do-more to ESA Automation VT580 HMI via Modbus
« Reply #11 on: June 24, 2016, 12:11:13 PM »
That is an unusual presentation of Modbus addressing, but at some level, it will translate to standard Modbus function codes. Modbus supports 4 basic areas of memory they call Inputs, Coils, Input Registers, and Holding Registers. Inputs and Input Registers are read only via Modbus. Coils and Holding Registers are Read/Write via Modbus.

Modbus requests target Do-more's built-in Modbus memory blocks:
1. Inputs - MI
2. Coils - MC
3. Input Registers - MIR
4. Holding Registers - MHR

Meaning, when your HMI reads Input 1, it is reading MI1 in the Do-more controller. When you read Holding Register 10, you are reading MHR10 in the Do-more controller. No map required. Only consideration might be 0 or 1 based addressing. Modbus addresses are 1-based, but the protocol itself is 0-based. Your product is showing a 0 based range, so that might be raw Modbus.

The Modbus read function codes are:
a) Coils - FC 1 - accesses Do-more MC
b) Inputs - FC 2 - accesses Do-more MI
c) Holding Registers - FC 3 - accesses Do-more MHR
d) Input Registers - FC 4 - accesses Do-more MIR

The Modbus write function codes are:
a) Write single Coil - FC 5 - accesses Do-more MC
b) Write multiple Coils - FC F - accesses Do-more MC
c) Write single Register - FC 6 - accesses Do-more MHR
d) Write multiple registers - FC 10 - accesses Do-more MHR

It's usually pretty obvious from the master side which function code your requests use.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

MVetrano

  • Full Member
  • ***
  • Posts: 27
Re: Do-more to ESA Automation VT580 HMI via Modbus
« Reply #12 on: June 28, 2016, 02:50:10 PM »
OK, I decided to give DoMore another chance. I was able to set up a link to the HMI via Modbus TCP/IP this morning. Great! Progress!
Created a simple button on the HMI to toggle a contact using Function Code 05. That worked great as well.
Created status lights on the HMI for the inputs (X0-X15).Each light uses a Function Code 02 to read Input registers MI0-MI15 respectively.
In ladder, add rung to Publish X0:SW to MI0:sw 16 elements as unsigned Byte.
Everything is off by 1. Example: 1. in Data view, X0 is ON, MI0 is ON but nothing on the HMI. 2. in Data view, X1 is ON, MI1 is ON and X0 status light on HMI is ON.
I tried changing the address assignments on the HMI, changed X0 address from 0 to 1, X1 from 1 to 2 etc. but everything was off by 2.

What am I doing wrong?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Do-more to ESA Automation VT580 HMI via Modbus
« Reply #13 on: June 28, 2016, 03:45:57 PM »
X0 => MI1
X1 => MI2
X2 => MI3
...
X15 => MI16

So, use a MOVER - Move Range of Values with Source starting at X0 and Destination starting at MI1.  Set the Number of Elements equal to 16.  See the attached screen shot.


BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Do-more to ESA Automation VT580 HMI via Modbus
« Reply #14 on: June 28, 2016, 04:32:33 PM »
OK, I decided to give DoMore another chance. I was able to set up a link to the HMI via Modbus TCP/IP this morning. Great! Progress!
Created a simple button on the HMI to toggle a contact using Function Code 05. That worked great as well.
Created status lights on the HMI for the inputs (X0-X15).Each light uses a Function Code 02 to read Input registers MI0-MI15 respectively.
In ladder, add rung to Publish X0:SW to MI0:sw 16 elements as unsigned Byte.
Everything is off by 1. Example: 1. in Data view, X0 is ON, MI0 is ON but nothing on the HMI. 2. in Data view, X1 is ON, MI1 is ON and X0 status light on HMI is ON.
I tried changing the address assignments on the HMI, changed X0 address from 0 to 1, X1 from 1 to 2 etc. but everything was off by 2.

What am I doing wrong?

As Franj already alluded to, Modbus logical addressing is 1-based, but the associated memory is 0-based. MI0 is a physical location in the Do-more controller, but it can't be addressed from Modbus, since a Modbus request of the first input (which Modbus numbers 1 to the user) is actually 0 on the wire. Legacy crap.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO