ycloo
Newbie

Posts: 4
|
 |
« 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.
|
|
|
|
|
Logged
|
|
|
|
|
franji1
|
 |
« 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 */
|
|
|
|
|
Logged
|
|
|
|
ycloo
Newbie

Posts: 4
|
 |
« 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?
|
|
|
|
|
Logged
|
|
|
|
|
franji1
|
 |
« 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.
|
|
|
|
|
Logged
|
|
|
|
ycloo
Newbie

Posts: 4
|
 |
« Reply #4 on: November 03, 2010, 11:51:38 pm » |
|
Oh, it's using the same call? I was trying to use HEIReadIO/HEIWriteIO...
|
|
|
|
|
Logged
|
|
|
|
|
franji1
|
 |
« 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.
|
|
|
|
|
Logged
|
|
|
|
|
MikeS
|
 |
« 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.
|
|
|
|
|
Logged
|
Good design costs a lot. Bad design costs even more.
|
|
|
ycloo
Newbie

Posts: 4
|
 |
« Reply #7 on: November 07, 2010, 10: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.
|
|
|
|
|
Logged
|
|
|
|
|
MikeS
|
 |
« Reply #8 on: November 08, 2010, 03: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.
|
|
|
|
|
Logged
|
Good design costs a lot. Bad design costs even more.
|
|
|
|
BobO
|
 |
« Reply #9 on: November 09, 2010, 12:21:37 pm » |
|
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.
|
|
|
|
|
Logged
|
BobO
The Constitution does not guarantee us freedom from being offended...but we can choose not to be, and life gets so much easier.
|
|
|
|
b_carlton
|
 |
« Reply #10 on: November 09, 2010, 02:08:49 pm » |
|
|
|
|
|
|
Logged
|
An output is a PLC's way of getting its inputs to change.
|
|
|
|
BobO
|
 |
« Reply #11 on: November 09, 2010, 02:58:48 pm » |
|
Thanks Bernie!
|
|
|
|
|
Logged
|
BobO
The Constitution does not guarantee us freedom from being offended...but we can choose not to be, and life gets so much easier.
|
|
|
|
MikeS
|
 |
« Reply #12 on: November 10, 2010, 09:34:17 am » |
|
oops, my bad ... i was off by one line in my own chart. geez.
|
|
|
|
|
Logged
|
Good design costs a lot. Bad design costs even more.
|
|
|
Controls Guy
Internal Dev
   
Posts: 1134
Darth Ladder
|
 |
« Reply #13 on: November 10, 2010, 11:23:46 am » |
|
Damned parallax!
|
|
|
|
|
Logged
|
I retract my earlier statement that half of all politicians are crooks. Half of all politicians are NOT crooks. There.
|
|
|
|
BobO
|
 |
« Reply #14 on: November 10, 2010, 11: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...
|
|
|
|
|
Logged
|
BobO
The Constitution does not guarantee us freedom from being offended...but we can choose not to be, and life gets so much easier.
|
|
|
|