News:

  • September 17, 2021, 02:21:17 AM

Login with username, password and session length

Author Topic: h2-1 DL205 ecom100 modbus tcp server + external modbus Client (EPICS IOC)  (Read 617 times)

fusedev

  • Newbie
  • *
  • Posts: 3
Hello out there in HE land

I am reaching out for help because I have the above devices and cannot make heads nor tails of the documentation.

Objective:
Use an external modbus client to communicate with the PLC and change bits in the MC memory, read bits in the MI memory and read words in the MHR memory.

I've set up the module with an IP (192.168.42.2) using netedit and has module ID 0. But There is a lot of jargon that is confusing. The modbus support module for EPICS (noted below) asks for a unit id . Fair enough. I simply used 0. I am able to use the PLC simulator to write to modbus memory MI, MC, and read from MHR. But once I switch to the hardware, I cannot read anything. I cannot write anything.

I've looked at the FAQ0038 for Modbus and ECOM100 and I am at a loss. There is no mention of being able to access the MI, MC, MHR, or MIR blocks or what the mapping might be. 

Moreover, in another post about communitcating via the ECOM100, setting up a "Peer-to-Peer configuraiton" in NetEdit added to the confusion, there is a unit ID set to 255 by default and an Rx/Wx number set to 1.

Does anyone have any insight? I'm pulling my hair out.

The external controller framework is here on github https://github.com/epics-modules/modbus/blob/master/iocBoot/iocTest/Koyo1.cmd

I have tried almost everything. But it's non-trivial to modify the EPICS drivers as they are tightly coupled to databases.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 598
  • Hmmm...
    • Host Engineering, Inc.
I've looked at the FAQ0038 for Modbus and ECOM100 and I am at a loss. There is no mention of being able to access the MI, MC, MHR, or MIR blocks or what the mapping might be.

Moreover, in another post about communitcating via the ECOM100, setting up a "Peer-to-Peer configuraiton" in NetEdit added to the confusion, there is a unit ID set to 255 by default and an Rx/Wx number set to 1.

Does anyone have any insight? I'm pulling my hair out.

Don't pull your hair out. Getting Ethernet anything to work in the DL-PLC world was not easy because it wasn't made for it. And then on top of that getting Modbus TCP to work was also not easy. In fact, it certainly is a system hack. But what you want to do can be done. The devil is in the details.

First, that ECOM100 FAQ0038 actually does have mapping in it. Below the table listed there, there is a link to a PDF file that you can download that has the mapping. Basically if the H2-ECOM100 is to be the slave/server, then you do not need a peer-to-peer configuration in it. That is only if the H2-ECOM100 is going to be the master/client. The Unit ID is probably not going to be important, as I'm pretty sure the H2-ECOM100 is going to ignore it and just go by its IP address to receive telegrams.

For example:
- FC01 (Read Coils), the Y output bits in the PLC start at "Modbus" (mapped) address of 2049 (see PDF map in ECOM100 FAQ0038).
- FC02 (Read Inputs), the X input bits in the PLC start at "Modbus" (mapped) address of 2049 as well. In Modbus world that may be designated as 12049 with the leading "1" meaning "Inputs"
- FC03 (Read Holding Registers), the V-memory in the PLC starts at "Modbus" (mapped) address of 1. In Modbus world that may be designated as 40001 with the leading "4" meaning "Holding Registers"

etc.
There are two types of people in the world; those that can extrapolate from incomplete data sets.