Host Engineering Forum
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 22, 2012, 03:06:34 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: H2ECOM throughput when used with SDK  (Read 2102 times)
keith
Jr. Member
**
Posts: 18


« on: June 20, 2007, 02:26:27 pm »

I am using a H2ECOM with the SDK.  I am talking to a system with a D2-250-1 CPU.  I read a 28 word block of vmemory and write a 18 word block of vmemory in a continuous update cycle from a PC.

I do the read with HEICCMRequest a single read, followed by a single write:
[simplified code with error handling and other details removed]
  for ( ; ; )
    {
    s = HEICCMRequest (&device, FALSE, 0x31, rstart + 1, 2 * nr, (BYTE *) rblock);
    s = HEICCMRequest (&device, TRUE, 0x31, wstart + 1, 2 * nw, (BYTE *) wblock);
    [there is also code to check the return value s on each call,  not included here]
    SleepEx for 100 MS
    }

[I also tried sleeping 50Ms between the 2 HEICCMRequest calls]

My reads & writes don't fail, but my update rate is slow.  It takes 1 - 3 seconds for the
PLC to see the data changes.  I would like to see the data in 100 to 500 miliseconds. 

I am not using the card for any other purpose at the same time (I.E. there is no I/O to it in my  ladder).

Is there a better way to get a faster update cycle ?
What kind of throughput can I expect from the H2ECOM ?
whold a H2ECOM100 give me more throughput ?
Is there some luckey number of words the card transfers per PLC scan ?
Which is better, K-Sequence or DirectNet ?

I also want to know about throughput when using a 06 PLC with a H0-ECOM.
[some of my smaller systems use this configuration]

Keith
« Last Edit: June 20, 2007, 02:33:30 pm by keith » Logged
franji1
Bit Weenie
Host Moderator
*****
Posts: 1035



WWW
« Reply #1 on: June 20, 2007, 02:33:47 pm »

Did you run this "simplified" code ONLY?  The code you've eliminated could be the bottle neck (e.g. database access)Huh
Logged

keith
Jr. Member
**
Posts: 18


« Reply #2 on: July 02, 2007, 12:31:21 am »

Sure enough, I was doing somthing else in the same thread which was slowing it down.  Restructured the threads in my program, and everything works great.

I actually wrote a test program to transfer 18 words in and 28 words out once
every 25 miliseconds.  In the block I increment a count, and in my test ladder logic, I check for missing counts.  It can run all day and never generate a missed count.  (in other words, whenever the ladder logic sees the value change, it is
always in a increment of 1)

I also put a GetTickCount () call in the C program, to monitor for the longest time between
update loops.

works better than I could have dreamed it would work.

Thanks
Keith
« Last Edit: July 02, 2007, 12:48:46 am by keith » Logged
franji1
Bit Weenie
Host Moderator
*****
Posts: 1035



WWW
« Reply #3 on: July 02, 2007, 10:06:37 am »

Cool!    Cool
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM