eWon Flexy201 losing modem/internet config

Hi Tim,
Just to be clear, here is the code in the BASIC IDE:
CYCLIC SECTION
END
GetDateTime:
yy% = GetIO “PLC_Year”
yy$ = STR$ yy%
mm% = GetIO “PLC_Month”
mm$ = STR$ mm%
dy% = GetIO “PLC_Day”
dy$ = STR$ dy%
hr% = GetIO “PLC_Hour”
hr$ = STR$ hr%
mn% = GetIO “PLC_Minute”
mn$ = STR$ mn%
ss% = GetIO “PLC_Second”
ss$ = STR$ ss%
DT$ = dy$ + “/” + mm$ + “/” + yy$ + " " + hr$ + “:” + mn$ + “:” + ss$
DT% = FCNV DT$, 40
SetIO “PLC_DateTime”, DT%
END
LogAllOnBoot:
Rem Get status of AB PLC. Value of 1 means connected
plcstatus% = GetIO “PLCStatus”
IF (plcstatus% = 1) THEN
numTags% = GETSYS PRG, “NBTAGS”
FOR i% = 1 TO numTags% STEP 1
Rem LOGIO i%
NEXT i%
Rem Disable timer after log occurs once on boot and PLC connected, historical log config will take care of logging after
TSET 1,0
ENDIF
END
EnableTimer:
plcstatus% = GetIO “PLCStatus”
IF (plcstatus% <> 1) THEN
TSET 1,5
ENDIF
END


INIT SECTION
Rem Set Timer to delay calling label to log all loggable tags after boot
TSET 1, 5
ONTIMER 1,“goto LogAllOnBoot”
Rem Set label to pack PLC date/time when seconds from PLC changes
ONCHANGE “PLC_Second”,“goto GetDateTime”
ONCHANGE “PLCStatus”,“goto EnableTimer”
END

I already have ONTIME and ONCHANGE code in the INIT, so is moving the code all I need to do, for example:

CYCLIC SECTION
END


INIT SECTION
Rem Set Timer to delay calling label to log all loggable tags after boot
TSET 1, 5
ONTIMER 1,“goto LogAllOnBoot”
Rem Set label to pack PLC date/time when seconds from PLC changes
ONCHANGE “PLC_Second”,“goto GetDateTime”
ONCHANGE “PLCStatus”,“goto EnableTimer”
END
GetDateTime:
yy% = GetIO “PLC_Year”
yy$ = STR$ yy%
mm% = GetIO “PLC_Month”
mm$ = STR$ mm%
dy% = GetIO “PLC_Day”
dy$ = STR$ dy%
hr% = GetIO “PLC_Hour”
hr$ = STR$ hr%
mn% = GetIO “PLC_Minute”
mn$ = STR$ mn%
ss% = GetIO “PLC_Second”
ss$ = STR$ ss%
DT$ = dy$ + “/” + mm$ + “/” + yy$ + " " + hr$ + “:” + mn$ + “:” + ss$
DT% = FCNV DT$, 40
SetIO “PLC_DateTime”, DT%
END
LogAllOnBoot:
Rem Get status of AB PLC. Value of 1 means connected
plcstatus% = GetIO “PLCStatus”
IF (plcstatus% = 1) THEN
numTags% = GETSYS PRG, “NBTAGS”
FOR i% = 1 TO numTags% STEP 1
Rem LOGIO i%
NEXT i%
Rem Disable timer after log occurs once on boot and PLC connected, historical log config will take care of logging after
TSET 1,0
ENDIF
END
EnableTimer:
plcstatus% = GetIO “PLCStatus”
IF (plcstatus% <> 1) THEN
TSET 1,5
ENDIF
END

Thanks,
Mike

Ok, I’ve added a new section, put the labelled code in there. I’ve also modified the code to call GetDateTime on a timer every 5 secs rather then on change of the PLC seconds tag. Letting it run for now and will let you know if it fails again. Thanks for the help.
Mike

1 Like

One of the eWons lost it’s internet configuration again. The log in eCatcher shows that it went offline @2:37AM this morning (June25th). Please have a look at the log file and let me know what could be causing the internet configuration to be lost.

Mike

Did you rerun the internet wizard again this morning or did it come back online on its own?

We have a tech on site. He re-ran the wizard to get it online.
Mike

I’ve got one other idea that might be able to help with this. Can you take a backup of the device and then do a recovery on the unit to the most recent firmware and then restore your backup and see if that makes any difference. I’m wondering if rewriting the device through a recovery would fix this issue. If not I’ll escalate this issue to the team in Belgium and see what I can find out.

Hi Tim,
I’m not able to connect to eWon1 right now because we’re actively using it; however, the other eWon (eWON5) has had the same issue and is at the same site, so I was able to work with our tech to do the recovery procedure.
We had an issue when doing the procedure. Here were the steps:

Take a backup
Perform the recovery procedure
Restore the backup
eWon boots up. won’t go online to talk2m. ewon reboots
Went online to web interface. Can see that opcua WD is causing reboots in the event log. In addition, shows no internet configuration. Appears to have lost config again.
Tags shows red indicator that can’t connect to PLC.
Attempt to run wizard to regain internet, but eWon keeps rebooting during the process due to WD on opcua. FYI, PLC was connected at this time and has been working in the past.
I disabled the OPCUA topic for the PLC. Unplugged the PLC ethernet cable
Re-run the wizard, internet established. Didn’t need to reconfig the vpn, that was still there.
Re-enable OPC topic and connect cable. Able to talk to PLC tags now.

Not sure why OPCUA wd is causing reboots. Is there a way to disable that? Also, not sure why I lost the config right after a restore. Attached is the backup file from after all the above happened. Let me know what you think.
Mike

Can I try and jump on to take a look at this over teamviewer?

Hi Tim,
Our company doesn’t allow TeamViewer. I have not problem with you logging into the eWon directly to have a look. Please do not use eWon1, as it is currently being used to log data for a performance test. eWon5 has had the problem, and I’m okay with you having a look at that one. The SN of that unit is 1922-0025-21. Does that work?
Mike

Hi Tim,

I responded in the forum. Also, we could use Microsoft Teams if that works, or I can set you up as a user on our pro Talk2M account if you need that to log in directly.

Mike

either way works for me

Hi Tim,
I’ve been working with our tech, who is on-site with the eWons. Unfortuntely, eWon1 is in use today at the site for logging data, so we can’t touch that one, and eWon5 appears to have lost it’s internet configuration again (which btw, is the ewon that I have used the recovery procedure on and is running the latest firmware, with the script changes). The tech doesn’t have time to deal with #5 today. The backup I sent previously was for ewon5. Are you able to use that to dig into what’s going on?
Mike

Thanks Mike, I’ll try and take a look through that backup and see if I can find anything that might be causing this issue.

Hi Tim,

Sounds good. Let me know what you can find out. If the eWons become available next week for you to dial in I’ll let you know.

Mike

Hi Tim, I have one of the eWONs that having this problem. Please send me and email invite for a Teams session when you’re available to troubleshoot through my computer.
Mike

Hi Mike,

Sorry I wasn’t able to get back to this yesterday, is the unit still having issues? I escalated this issue to some colleagues in Belgium and they were asking if you could give them a backup of the device after it loses it’s WAN config before you go through the wizard again.

Best Regards,
-Tim

Hi Tim,
Here is a backup of an eWon that lost it’s modem config. I took the backup while it was in the ‘lost config’ state. MOVED TO STAFF NOTE (210 KB)
It is the eWon that we have labelled as eWon4. This unit had not had the recovery procedure done on it yet, so it is at firmware 14.0.s02. In addition, at the moment it lost it’s config, it was on site and I was logged in remotely trying to remove the BASIC code that was in the Cyclic section. While I was online with the unit on the BASIC screen, the unit dropped offline and I couldn’t get it back online to Talk2M. That was the moment it lost the modem config. The unit was shipped back to me and is now in my possession. I was able to connect and modify the BASIC scripts. I have not attempted to run the Wizard to get it back online because I thought you may want to remote in to see it in the failed state. Let me know if you’ll have time to dial in to my laptop and check on it. I’ll leave it like this for now, but I need to get it reconfigured and shipped back to site by the end of this week. I plan to do a complete wipe (recovery), and rather than re-load the backup, I think I’ll will set it up from scratch again.
Thanks,
Mike

I’m going over the backup.tar file and my colleague wanted to verify if this device was also setup to use a modem connection?

Hi Tim,
The first time these units were setup, they were configured to use the WAN connection as the primary connection, and the cellular modem was configured as the fallback (all done through the wizard).
After the units arrived on site, it was determined that there were no hard-wired internet connections available, so the Wizard was run again, and the cellular modem was set as the primary connection. The hard-wired WAN was NOT setup as a fallback. So even though a WAN card is in the eWon rack, it is not being used at all.
Thanks,
Mike

Hi Mike,

We escalated this to some colleagues in Belgium and they asked if you could upgrade the device to the newest firmware 14.2 to make sure that this wasn’t a bug that’s already been looked at.

-Tim