News:

  • September 25, 2026, 04:31:12 AM

Login with username, password and session length

Author Topic: BRX Email Stopped Working  (Read 43965 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
BRX Email Stopped Working
« on: June 10, 2020, 10:41:15 PM »
I've been sending email with a BRX via Gmail for quite some time now, and using the TLS security for over a year now.
I'm running 2.7.2 on my PLC currently, and have been since shortly after that came out.
My last email successfully sent about 6 hours ago, and have missed several since then.  Forcing a stage with email instruction to run ultimately results in System Information -> System Status -> ERR: "Operation timed out in EMAIL @00002BEC" .  This takes almost (exactly?) 60 seconds to occur.
Going to Configure -> Device Configuration -> @Email -> Edit Device -> Test settings and verify server credentials results in "Your settings are good!"
My scan time ranges from 3.8 to 4.1 ms Avg, and the Max increased from 7.7 to 8.1 ms during the test period.  I do know a few weeks ago I was in the lower 3's for average scan time, but surely that's still a good enough time.

What can I do to further troubleshoot/log what's occurring?

brucek

  • Sr. Member
  • ****
  • Posts: 62
Re: BRX Email Stopped Working
« Reply #1 on: June 11, 2020, 06:58:34 AM »
I've only used the email instruction in 1 project but i had to use the DNS lookup command before the email instruction to get the ip address and move to the email instruction to get it to work. Could gmail have changed the address and you are using a direct address and that is why? Just a thought not sure if that is it or not.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: BRX Email Stopped Working
« Reply #2 on: June 11, 2020, 08:42:57 AM »
What can I do to further troubleshoot/log what's occurring?

Debug->Do-more Logger, and you want to turn ON ST36 so that the EMail instruction will log its status out the Ethernet port and DmLogger will display it.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: BRX Email Stopped Working
« Reply #3 on: June 11, 2020, 08:51:02 AM »
If you have Designer 2.7, the other thing you could do is float your cursor over the wrench in the top right corner of the EMAIL instruction when online to the PLC.  This lists tools specific for THAT instruction.  Select the top one for EMAIL which is Enable PLC Message Dump for EMAIL and Launch Do-more Logger.

See the attachment for a screen shot of the tool menu.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: BRX Email Stopped Working
« Reply #4 on: June 11, 2020, 10:19:54 AM »
I only get a response after 1 minute of "Timed Out! Disconnecting SMTP..." "Operation timed out in EMAIL @00002BEC"
I've tried loading a previous version of my program into the PLC, making no difference in the success of the email instruction.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: BRX Email Stopped Working
« Reply #5 on: June 11, 2020, 10:48:15 AM »
I only get a response after 1 minute of "Timed Out! Disconnecting SMTP..." "Operation timed out in EMAIL @00002BEC"
I've tried loading a previous version of my program into the PLC, making no difference in the success of the email instruction.

If you've enabled the dump as Franj suggested, and run DMLogger, you should be getting quite a bit of info in DMLogger that would give us a clue.
"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

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: BRX Email Stopped Working
« Reply #6 on: June 11, 2020, 11:02:53 AM »
I did. All I gets returned are those two lines.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: BRX Email Stopped Working
« Reply #7 on: June 11, 2020, 11:25:02 AM »
I did. All I gets returned are those two lines.

Set $SysMsgLevel (DST61) to 2.
"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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: BRX Email Stopped Working
« Reply #8 on: June 11, 2020, 11:26:44 AM »
If you have Designer 2.7, the other thing you could do is float your cursor over the wrench in the top right corner of the EMAIL instruction when online to the PLC.  This lists tools specific for THAT instruction.  Select the top one for EMAIL which is Enable PLC Message Dump for EMAIL and Launch Do-more Logger.

See the attachment for a screen shot of the tool menu.

Are we setting $SysMsgLevel to 2 as part of this? Won't return much useful info without 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

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: BRX Email Stopped Working
« Reply #9 on: June 11, 2020, 11:31:29 AM »
Okay, it was set to 1.  Here's the results with 2.
Ignore the 2 lines in the middle, they were triggered by an HTTP request that logs continuously.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: BRX Email Stopped Working
« Reply #10 on: June 11, 2020, 11:34:42 AM »
Are we setting $SysMsgLevel to 2 as part of this? Won't return much useful info without it.
That will be in Designer 2.8, but it is not 2.7.  User must set DST61 manually in 2.7 via Data View or Change Value dialog.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: BRX Email Stopped Working
« Reply #11 on: June 11, 2020, 11:45:57 AM »
Are we setting $SysMsgLevel to 2 as part of this? Won't return much useful info without it.
That will be in Designer 2.8, but it is not 2.7.  User must set DST61 manually in 2.7 via Data View or Change Value dialog.
I did set DST61 in a Data View to 2 and got the increased info in Logger.
I have since successfully sent an email from the same Gmail account with a new app password in DMSim!

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: BRX Email Stopped Working
« Reply #12 on: June 11, 2020, 12:13:16 PM »
Okay, it was set to 1.  Here's the results with 2.
Ignore the 2 lines in the middle, they were triggered by an HTTP request that logs continuously.

That trace suggests that the CPU wasn't ever able to establish the TCP connection to the server. Could be a routing/gateway thing. Make sure the gateway is set properly and the router is happy. Could also be that the server just didn't allow the connection, for whatever reason. It would take a Wireshark to know more, but you would need a switch with port mirroring to see more.
"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

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: BRX Email Stopped Working
« Reply #13 on: June 11, 2020, 12:13:31 PM »
So, I can get it to work in the Simulator, but not in BRX.  Same Gmail app password for each.  Both test out fine in device setup.  See attached screenshots of each program.  Only difference is the BRX has a large program, the Sim only the email logic.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: BRX Email Stopped Working
« Reply #14 on: June 11, 2020, 12:19:07 PM »
So, I can get it to work in the Simulator, but not in BRX.  Same Gmail app password for each.  Both test out fine in device setup.  See attached screenshots of each program.  Only difference is the BRX has a large program, the Sim only the email logic.

It's a fundamental network/routing thing. The program shouldn't be a factor.
"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