News:

  • May 01, 2026, 02:10:27 PM

Login with username, password and session length

Author Topic: ECOM Module Information via Modbus  (Read 24740 times)

petersrj

  • Jr. Member
  • **
  • Posts: 10
ECOM Module Information via Modbus
« on: April 22, 2016, 11:18:19 AM »
Is it possible to get the ECOM Module information (Name, Description, Module Type, etc...) through Modbus calls?

Our existing software uses the SDK and uses the EtherQuery call but more and more customers are not allowing Broadcast Messages and therefore the EtherQuery is not helpful.  We would like to convert to strictly using a Modbus driver but would like some of the functionality of the EtherQuery.

Thank you.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: ECOM Module Information via Modbus
« Reply #1 on: April 22, 2016, 07:49:55 PM »
I don't think so, but I'll check when I'm back in the office.

The only thing that you absolutely must use a broadcast for is to discover devices on a network, something that Modbus can't even do. If you want to use hard IPs for everything except discovery, you can. We're happy to help.
"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

petersrj

  • Jr. Member
  • **
  • Posts: 10
Re: ECOM Module Information via Modbus
« Reply #2 on: April 28, 2016, 04:21:31 PM »
Bob, Thank you for the help.  Typically our devices are in a group where I know the IP range.  Broadcasting is perfect to identify which devices exist when I can use it.  If not, I would like to scan my range of IPs and get back the Module Name or Description which is easier to identify rather than the IP.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: ECOM Module Information via Modbus
« Reply #3 on: April 28, 2016, 04:41:29 PM »
Are you directly on the API...using calls like HEIQuery and HEIOpenDevice?
"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

petersrj

  • Jr. Member
  • **
  • Posts: 10
Re: ECOM Module Information via Modbus
« Reply #4 on: April 28, 2016, 05:01:13 PM »
In a nutshell, Yes, but with a layer in between.  We have a compiled DLL that has a routine EtherQuery() which is in turn making the calls to HEIQuery and HEIOpenDevice.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: ECOM Module Information via Modbus
« Reply #5 on: April 29, 2016, 10:24:02 AM »
This is what NetEdit does to open a connection to a specified device, without using broadcast. TP is the transport you opened previously. The key parameter is the UseAddressedBroadcast being set to FALSE.

If you want to scan a bunch of addresses and the network environment is fast, that timeout can be much, much lower.

pHEIDev->Address.AddressIP.Family =   AF_INET;
pHEIDev->Address.AddressIP.Port = 0x7070;
pHEIDev->Address.AddressIP.AddressingType.bAddr.b1 = IPAddr[0];
pHEIDev->Address.AddressIP.AddressingType.bAddr.b2 = IPAddr[1];
pHEIDev->Address.AddressIP.AddressingType.bAddr.b3 = DevIPAddr[2];
pHEIDev->Address.AddressIP.AddressingType.bAddr.b4 = IPAddr[3];

HEIOpenDevice(&TP, pHEIDev, HEIAPIVERSION, 2000, 1, FALSE);
"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

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: ECOM Module Information via Modbus
« Reply #6 on: April 29, 2016, 12:57:08 PM »
Is it possible to get the ECOM Module information (Name, Description, Module Type, etc...) through Modbus calls?

A group of 90 words is available via Modbus TCP with some of that information from Modbus Input Registers / Modbus Holding Registers (both; read-only):

17511   Version of device data (currently 1)
17512   Family
17513   Processor
17514   Module Type
17515   Status Code
17516-17518   Ethernet Address
17519   RAM Size
17520   Flash Size
17521   Batt RAM Size
17522   DIP Settings
17523   Media Type
17524-17525   EPF Count (if supported)
17526   Run Relay State (if supported)
17527   Batt Low (if supported)
17528   Model Number
17529   Ethernet Speed
17530-17600   Reserved

See hxecomm.PDF manual pg. 5-21 (page attached)
There are two types of people in the world; those that can extrapolate from incomplete data sets.