Host Engineering Forum

General Category => ECOMs and ECOM100s => Topic started by: ycloo on November 03, 2010, 02:16:42 AM

Title: ECOM comm with Ethernet SDK
Post by: ycloo on November 03, 2010, 02:16:42 AM
Just want to know what is the return value of a successful call to Ethernet SDK calls like
1) HEIOpen
2) HEIOpenTransport
3) HEIQueryDevices

So far, I'm getting a return value of 0 to all of these calls.
Thanks.
Title: Re: ECOM comm with Ethernet SDK
Post by: franji1 on November 03, 2010, 08:45:19 AM
Just want to know what is the return value of a successful call to Ethernet SDK calls like
1) HEIOpen
2) HEIOpenTransport
3) HEIQueryDevices

So far, I'm getting a return value of 0 to all of these calls.
Thanks.
That's it!  0 means "no error code".  If you look at the HEI.H file, there are some HEIE_* "error" return codes like
#define HEIE_TIMEOUT 0x8006   /* Timeout error */
Title: Re: ECOM comm with Ethernet SDK
Post by: ycloo on November 03, 2010, 10:05:51 PM
Thanks Franji1!

I'm currently able to read V memory register using HEICCMRequest. Can I know what command to use to read Input & Coils?
Title: Re: ECOM comm with Ethernet SDK
Post by: franji1 on November 03, 2010, 11:39:44 PM
It's the same call, just different parameters.  I don't have the DirectNET specification, but bits are read on byte boundaries, a byte at a time (note that C, X, and Y bits are "octal").

The offsets, I'm sure, are byte offsets, so the offset for C0 is OFFSET, then the offset for C10 (octal) is (OFFSET + 1).  Again, these are in the DirectNET specification, which is available free from ADC's website.
Title: Re: ECOM comm with Ethernet SDK
Post by: ycloo on November 03, 2010, 11:51:38 PM
Oh, it's using the same call? I was trying to use HEIReadIO/HEIWriteIO...
Title: Re: ECOM comm with Ethernet SDK
Post by: franji1 on November 04, 2010, 08:34:30 AM
Actually, I'm wrong.  It is those methods (HEIReadIO/HEIWriteIO).  What I was referring to was the CCM Request, which is not applicable for EBCs, but only ECOM* modules with PLC CPUs, not EBC CPUs.
Title: Re: ECOM comm with Ethernet SDK
Post by: MikeS on November 04, 2010, 09:16:59 AM
on our web, on the same page you downloaded the ethernet sdk, there is a PDF (CCMDetails.PDF) that contains the CCM protocol details you'll use to read & write all of the PLC data types.

You'll use the same API call - HEICCMRequest() - to read and write all of the PLC data types. There is a parameter for read vs write, one for data type, one for offset, and one for length.
Title: Re: ECOM comm with Ethernet SDK
Post by: ycloo on November 07, 2010, 09:34:05 PM
Hi MikeS

I can't seem to find the definition of the data types. I have no idea 0x31 refers to which data type. Please advice.
Title: Re: ECOM comm with Ethernet SDK
Post by: MikeS on November 08, 2010, 02:16:44 PM
data type 31 is used to read and write ladder program memory. our intention for the ethernet sdk is reading and writing v-memory and i/o memory, but not to change the ladder program.

information regarding reading and writing ladder memory is not available from us.
Title: Re: ECOM comm with Ethernet SDK
Post by: BobO on November 09, 2010, 11:21:37 AM
Ummm...actually data type 0x31 is registers...V memory. Data type 0x37 is program memory.

All of the data types should be described in the DirectNet manual...where ever that is.
Title: Re: ECOM comm with Ethernet SDK
Post by: b_carlton on November 09, 2010, 01:08:49 PM
Manual is here: http://www.automationdirect.com/static/manuals/dadnet/dadnet.pdf (http://www.automationdirect.com/static/manuals/dadnet/dadnet.pdf). Data type numbers on page 6-5
Title: Re: ECOM comm with Ethernet SDK
Post by: BobO on November 09, 2010, 01:58:48 PM
Thanks Bernie!
Title: Re: ECOM comm with Ethernet SDK
Post by: MikeS on November 10, 2010, 08:34:17 AM
oops, my bad ... i was off by one line in my own chart. geez.
Title: Re: ECOM comm with Ethernet SDK
Post by: Controls Guy on November 10, 2010, 10:23:46 AM
Damned parallax!   ;D
Title: Re: ECOM comm with Ethernet SDK
Post by: BobO on November 10, 2010, 10:32:05 AM
Hey, easy there Darth...physics is our phriend! And it's phun, too! At least that's what my physics teacher always used to say. He was kinda weird though. Big forehead, mostly bald, short....crap...he was an alien. Can't believe it took this long to figure that out...
Title: Re: ECOM comm with Ethernet SDK
Post by: Controls Guy on November 10, 2010, 11:04:41 PM
Was he phat?
Title: Re: ECOM comm with Ethernet SDK
Post by: BobO on November 11, 2010, 10:36:42 AM
Nah, his weight was phine; he looked phabulous. Our phormer phootball coach here at University of Tennessee was affectionately known as Phat Phil however.

Sheesh...you'd think I didn't have any work to do.
Title: Re: ECOM comm with Ethernet SDK
Post by: Controls Guy on November 11, 2010, 10:47:34 AM
Meh, this is more phun than work!   ;D