News:

  • June 10, 2026, 09:51:02 AM

Login with username, password and session length

Author Topic: ECOM comm with Ethernet SDK  (Read 37284 times)

ycloo

  • Newbie
  • *
  • Posts: 4
ECOM comm with Ethernet SDK
« 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.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: ECOM comm with Ethernet SDK
« Reply #1 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 */

ycloo

  • Newbie
  • *
  • Posts: 4
Re: ECOM comm with Ethernet SDK
« Reply #2 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?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: ECOM comm with Ethernet SDK
« Reply #3 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.

ycloo

  • Newbie
  • *
  • Posts: 4
Re: ECOM comm with Ethernet SDK
« Reply #4 on: November 03, 2010, 11:51:38 PM »
Oh, it's using the same call? I was trying to use HEIReadIO/HEIWriteIO...

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: ECOM comm with Ethernet SDK
« Reply #5 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.

MikeS

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 264
    • Host Engineering, Inc.
Re: ECOM comm with Ethernet SDK
« Reply #6 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.
Good design costs a lot. Bad design costs even more.

ycloo

  • Newbie
  • *
  • Posts: 4
Re: ECOM comm with Ethernet SDK
« Reply #7 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.

MikeS

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 264
    • Host Engineering, Inc.
Re: ECOM comm with Ethernet SDK
« Reply #8 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.
Good design costs a lot. Bad design costs even more.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: ECOM comm with Ethernet SDK
« Reply #9 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.
"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

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: ECOM comm with Ethernet SDK
« Reply #10 on: November 09, 2010, 01:08:49 PM »
Manual is here: http://www.automationdirect.com/static/manuals/dadnet/dadnet.pdf. Data type numbers on page 6-5
An output is a PLC's way of getting its inputs to change.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: ECOM comm with Ethernet SDK
« Reply #11 on: November 09, 2010, 01:58:48 PM »
Thanks Bernie!
"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

MikeS

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 264
    • Host Engineering, Inc.
Re: ECOM comm with Ethernet SDK
« Reply #12 on: November 10, 2010, 08:34:17 AM »
oops, my bad ... i was off by one line in my own chart. geez.
Good design costs a lot. Bad design costs even more.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: ECOM comm with Ethernet SDK
« Reply #13 on: November 10, 2010, 10:23:46 AM »
Damned parallax!   ;D
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: ECOM comm with Ethernet SDK
« Reply #14 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...
"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