News:

  • July 01, 2022, 01:05:50 AM

Login with username, password and session length

Author Topic: H0-ECOM100 PLC Communication  (Read 962 times)

JeffS

  • Sr. Member
  • ****
  • Posts: 63
H0-ECOM100 PLC Communication
« on: March 09, 2022, 05:33:24 PM »
I have noticed in the past year or two that we have had more issues with H0-ECOM100s not communicating with the PLC.  If you use Netedit to test the CPU connection when the card is configured just after taking it out of the box, very often it fails to see the PLC and you are unable to program the PLC. 

I have tried resetting factory defaults and configuring again, this usually doesn't work. If I leave my dip switches set (typically set to 41-60 for our products) and I try to update the firmware, it will fail to download the firmware with error 126.  Now the card will show as if it has firmware version 0.0.000 and my module ID will now read 9 instead of 41 and the error light flashes.  To get the firmware to load I have to set all dip switches to off, then I can reload the firmware.  To get the cards to work I have to reload firmware and booter, set defaults, then configure them for our setup and now it will see the PLC and I can program the PLC.

I don't recall having this much trouble with H0-ECOM100s in the past and wanted to post this to see if you had any ideas as to what is going on.  On all of our products we also have dip switch 7 turned on and have done this for many years.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 648
  • Hmmm...
    • Host Engineering, Inc.
Re: H0-ECOM100 PLC Communication
« Reply #1 on: March 10, 2022, 11:20:35 AM »
If I leave my dip switches set (typically set to 41-60 for our products) and I try to update the firmware, it will fail to download the firmware with error 126. Now the card will show as if it has firmware version 0.0.000 and my module ID will now read 9 instead of 41 and the error light flashes.

What's happening here is you using Module IDs in the 41-60 range. The reason being, starting at firmware v4.0.320 (Jan-2012) Dipswitch #5 was designated to write-protect the firmware, network, node, peer-to-peer, and SMTP (email) configurations. So since 41 decimal = 0010 1001 binary for the dipswitches, then what you are actually getting is "Write Protect" (Bit5) for the firmware because Bit5 is ON and you are then getting a Module ID of only 9 (0 1001 binary) instead of 41 (0010 1001). This accounts for the error 126 you are seeing when trying to update the firmware, and may account for why you cannot connect if you happen to also be using Module ID in your DirectSOFT links. BTW, "Error 126" means simply "Protection Error" in our code.

So, if you need your Module IDs to be in that range, then you need to set all the dipswitches to zero (except #7) and then use NetEdit3 to set the Module ID. This allows you to use the full range for Module ID instead of limiting yourself to a range of 1-31 via the dipswitches.

You can see this dipswitch change in the H0-ECOM100 firmware history on our website, or you can also see it in ECOM FAQ0123:
- Goto https://www.hosteng.com
- In the left pane, click on FAQs
- Choose ECOM/ECOM100 as the product
- Scroll down to FAQ0123
« Last Edit: March 10, 2022, 11:23:01 AM by Greg »
There are two types of people in the world; those that can extrapolate from incomplete data sets.

JeffS

  • Sr. Member
  • ****
  • Posts: 63
Re: H0-ECOM100 PLC Communication
« Reply #2 on: April 18, 2022, 06:22:45 PM »
So I see in my advanced settings that Dip #5 is not enabled, so I should be able to use Dip 5 for addressing correct?  If so then something seems to not be working correctly.

I also notice that after I set my dip switches I can no longer pass the "Test CPU Access".  Is Dip 5 intended to do this when working in the protect function?

With dip 5 enabled unchecked and I try to re-write firmware to test firmware updating (Dips set to ID 41) and I get error 126 and the firmware version on my card goes to 0.0.0 and flashes a red error light even after a power cycle.  I also can no longer connect to the PLC over ethernet (connection configured for IP address not Module ID). 

I would figure that if the protect was working, as it seems to be since I got error 126, that the firmware would be protected and not cause an error and prevent me from being able to connect to the PLC until I perform a full firmware update.

Anyway, it seems that one way or the other something isn't working as it should.  Using NetEdit 3.17F

**Edit**
Did more testing and if I check Dip 5 enable and have my Dips set to 41 then I show module ID 9 and if I attempt a firmware is stops with 126 but doesn't zero the firmware or cause an error.  So seems the Dip 5 disable doesn't appear to be working 100% correctly.
« Last Edit: April 18, 2022, 06:34:32 PM by JeffS »

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 648
  • Hmmm...
    • Host Engineering, Inc.
Re: H0-ECOM100 PLC Communication
« Reply #3 on: April 19, 2022, 02:43:52 PM »
So I see in my advanced settings that Dip #5 is not enabled, so I should be able to use Dip 5 for addressing correct?  If so then something seems to not be working correctly.

True, if Enable DIP Switch 5 Lockout is unchecked (disabled) in Advanced Settings, then the physical Dipswitch #5 can be used as part of the H0-ECOM100's Module ID (i.e. with Dipswitch #5, #3, #0 all ON, and Enable DIP Switch 5 Lockout unchecked, then this is binary 10 1001 = 0x29 hex = 41 decimal Module ID).

Quote
I also notice that after I set my dip switches I can no longer pass the "Test CPU Access". Is Dip 5 intended to do this when working in the protect function?

No. Dipswitch #5 ON or OFF should not affect the Test CPU Access function.

Quote
With dip 5 enabled unchecked and I try to re-write firmware to test firmware updating (Dips set to ID 41) and I get error 126 and the firmware version on my card goes to 0.0.0 and flashes a red error light even after a power cycle.  I also can no longer connect to the PLC over ethernet (connection configured for IP address not Module ID).

You seem to be unclear: "With dip 5 enabled unchecked". A typo? Either way, if Enable DIP Switch 5 Lockout is checked (enabled), and the physical Dipswitch #5 is ON, then the configuration of the H0-ECOM100 is write-protected (read-only). If you try to change the configuration in any way (update firmware, add peer-to-peer configuration, modify the flags in Advanced Settings, etc.), you will get errors like the Error 126 you are experiencing.

The flashing red error light simply means that for some reason your H0-ECOM100 does not have a valid firmware. This can be caused by a failure of the update process for any reason. So, it is always best to not have anything at all talking to the H0-ECOM100 if you perform a firmware update. The solution is to just attempt the update again. The reason you can no longer connect is because the booter has determined the firmware is invalid for whatever reason and is flashing the red ERR light to let you know. That is also why you see the version of the firmware go to 0.0.000.

Quote
Did more testing and if I check Dip 5 enable and have my Dips set to 41 then I show module ID 9 and if I attempt a firmware is stops with 126 but doesn't zero the firmware or cause an error.  So seems the Dip 5 disable doesn't appear to be working 100% correctly.

Actually that is exactly what I would expect.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

JeffS

  • Sr. Member
  • ****
  • Posts: 63
Re: H0-ECOM100 PLC Communication
« Reply #4 on: April 20, 2022, 09:44:29 AM »
Quote
You seem to be unclear: "With dip 5 enabled unchecked". A typo? Either way, if Enable DIP Switch 5 Lockout is checked (enabled), and the physical Dipswitch #5 is ON, then the configuration of the H0-ECOM100 is write-protected (read-only). If you try to change the configuration in any way (update firmware, add peer-to-peer configuration, modify the flags in Advanced Settings, etc.), you will get errors like the Error 126 you are experiencing.

So this is the root of my issue.   Enable DIP Switch 5 Lockout is unchecked (disabled) with my module ID set with DIP switches to 41 and I am still getting error 126 when I attempt a firmware update, and it erases part of the firmware and flashes the error light.  My attached screenshots on the previous post, the first 3 were in order, I checked that my Enabled DIP Switch 5 Lockout was unchecked, then attempted to re-write firmware.   I then got error 126 and the firmware version goes to 0.0.0 and flashes the red error light and my Module ID starts showing 9.
« Last Edit: April 20, 2022, 09:54:59 AM by JeffS »

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 648
  • Hmmm...
    • Host Engineering, Inc.
Re: H0-ECOM100 PLC Communication
« Reply #5 on: April 20, 2022, 03:05:44 PM »
I have duplicated this issue by using the latest H0-ECOM100 hardware. Sounds like a bug in the latest booter (v5.0.53) for the H0-ECOM100 latest hardware (9A). I was using the latest booter (v4.1.10) for the older hardware (1A), and it was working with mine as expected. We had to redesign the hardware due to the chip shortage thing. So, standby...
« Last Edit: April 20, 2022, 03:54:59 PM by Greg »
There are two types of people in the world; those that can extrapolate from incomplete data sets.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 648
  • Hmmm...
    • Host Engineering, Inc.
Re: H0-ECOM100 PLC Communication
« Reply #6 on: April 21, 2022, 01:14:11 PM »
@JeffS, this was an error with the booter (v5.0.53). When you request a firmware update, the H0-ECOM100 must reboot itself and stop in the booter so it can update the firmware. The booter was basically defaulting to Dipswitch #5 protection mode irrespective of the flag setting because of the compiler directives we used to generate the code. The corrected version (v5.0.54 BETA) now checks the flag first and I have tested it for pass. It works. But we must run it through a full gambit of testing before we release it. But it should be available for download soon. Thanks for your patience.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 648
  • Hmmm...
    • Host Engineering, Inc.
Re: H0-ECOM100 PLC Communication
« Reply #7 on: April 22, 2022, 10:09:59 AM »
@JeffS, I sent you an email from support at hosteng dot com with a copy of the BETA version of H0-ECOM100 booter v5.0.54. I tested this to pass, and it worked and fixes the issue you were having. However, we will release the booter officially when it passes all the rest of its testing.
There are two types of people in the world; those that can extrapolate from incomplete data sets.