Host Engineering Forum

General Category => ECOMs and ECOM100s => Topic started by: petersrj on April 22, 2016, 11:18:19 AM

Title: ECOM Module Information via Modbus
Post by: petersrj 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.
Title: Re: ECOM Module Information via Modbus
Post by: BobO 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.
Title: Re: ECOM Module Information via Modbus
Post by: petersrj 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.
Title: Re: ECOM Module Information via Modbus
Post by: BobO on April 28, 2016, 04:41:29 PM
Are you directly on the API...using calls like HEIQuery and HEIOpenDevice?
Title: Re: ECOM Module Information via Modbus
Post by: petersrj 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.
Title: Re: ECOM Module Information via Modbus
Post by: BobO 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);
Title: Re: ECOM Module Information via Modbus
Post by: Greg 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)