News:

  • May 02, 2026, 05:51:03 AM

Login with username, password and session length

Author Topic: H2-ECOM100 Error Light  (Read 66968 times)

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: H2-ECOM100 Error Light
« Reply #15 on: August 08, 2011, 05:06:12 PM »
Second video...

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: H2-ECOM100 Error Light
« Reply #16 on: August 08, 2011, 05:38:39 PM »
OK, my guy in the field replaced the ECOMs again with brand new ones and tried using the second code set I posted. It took a while (3-4 minutes), but eventually all three ECOMs were initialized and NetEdit could see them just fine. I did the same thing here in the office using three new ECOMs and it took about 4 seconds to be up and running. All other PLC cards are identical and the software is identical as well.

Not sure what the difference is between here and there other than 20 degrees...

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: H2-ECOM100 Error Light
« Reply #17 on: August 08, 2011, 05:43:40 PM »
Now wondering if the erase and/or programming time of the flash is affected by temperature. I know they get slower the more times they have been erased, but generally that take many, many write cycles to begin to affect them. We'll look into it.
"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

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: H2-ECOM100 Error Light
« Reply #18 on: August 08, 2011, 05:46:49 PM »
Thanks!

At least now I know something to tell my guys... be patient ;)

Wonder if hammering the ECOMs with that timer is good or bad too... maybe I should wait for an error before trying to set the info another time ???


franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: H2-ECOM100 Error Light
« Reply #19 on: August 08, 2011, 05:49:49 PM »
The first version just used a timer to "start the process rolling", and then each successive EC* Write was dependent upon the previous one finishing.

What do you mean by "hammering"?

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: H2-ECOM100 Error Light
« Reply #20 on: August 08, 2011, 06:03:03 PM »
The timer was self resetting so every second it would start the process over again.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: H2-ECOM100 Error Light
« Reply #21 on: August 08, 2011, 06:12:38 PM »
Whoa!  So if it didn't finish in time, it would start over?  NOT GOOD!  Just let it run until it's finished (S1 turns OFF).

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: H2-ECOM100 Error Light
« Reply #22 on: August 08, 2011, 07:28:05 PM »
I've found that many times I have to create a rising edge to those instructions several times before they "take." Maybe I should just use the error bit as a rising edge to try again...

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: H2-ECOM100 Error Light
« Reply #23 on: August 08, 2011, 07:45:23 PM »
You should be able to turn them all on with SP1 (if order does not matter) and then have the SGRST when ALL the Success bits turn ON.  Otherwise, leave S1 ON and look at the error bits at the top of your program and report it as an error of some kind.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: H2-ECOM100 Error Light
« Reply #24 on: August 08, 2011, 07:46:48 PM »
I think the issue is that these instructions DO take time.  Assume they take at least 100ms each (could be more, depending upon the age of the flash).  Just use the success/fail bits to tell you when you're done.

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: H2-ECOM100 Error Light
« Reply #25 on: August 08, 2011, 07:50:21 PM »
As I understand it these instructions occur only once at rising edge. I've seen them fail a lot which is why I resorted to essentially hammering them until they worked. Since the UI is a C-More connected via Ethernet there isn't any way to announce a failure... that and other than try again I'm not sure what one would do about a failure.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: H2-ECOM100 Error Light
« Reply #26 on: August 08, 2011, 07:55:15 PM »
Yeah, they might not work if S1 isn't enabled and executed on the first scan.  I don't have the internal logic in front of me, but there might be a STRN SP0 (not first scan) on the "enable", but maybe not.  But re-executing them again and again will basically lock-up the ECOM100 module while it writes to FLASH again and again.

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: H2-ECOM100 Error Light
« Reply #27 on: August 08, 2011, 08:00:23 PM »
In some cases I think its been a matter of the code execution happening before the ECOM actually got powered up which is why I went with a timer. Early on when I was first testing these instructions I'd frequently run into times when I'd get neither success nor error. I assumed those times were times when the instruction fired before the ECOM was powered up, but that was an assumption and I know all to well what assuming anything does ::)

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: H2-ECOM100 Error Light
« Reply #28 on: August 08, 2011, 08:31:29 PM »
No, it's like you said - it's edge triggered, but it has to see the OFF and then ON.  When they are used in a Stage, this makes it very difficult to edge trigger.  One way to make this work is at the top of your program before ANY stage:

STR S1
OUT C0

So C0 would be OFF every scan S1 is NOT enabled.  Then in the Stage logic for S1, use STRPD C0 (or actually just STR C0) which would cause all those instructions see the edge on the 2nd scan that S1 runs.

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: H2-ECOM100 Error Light
« Reply #29 on: August 08, 2011, 09:23:31 PM »
it's edge triggered, but it has to see the OFF and then ON.
That little jewel of info is VERY helpful! I'll try a couple of things tomorrow and see what happens with my reliability.