News:

  • August 04, 2026, 06:41:29 PM

Login with username, password and session length

Author Topic: Communication error while reading region  (Read 9128 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
Communication error while reading region
« on: May 22, 2023, 06:24:05 PM »
Upon trying to connect to one of my PLC's remotely, it is very slow, and eventually I get a popup "Communication error while reading region (<name of a custom Memory Block of a UDT type>)! Continue updating?"

Clicking No on the first popup finishes loading the connected program.

If I click Yes, I get a few more of these popups in due time, sometimes Memory Blocks, other times Heap Items.

What causes this? Is it something in the PLC program or memory? Once connected Status View, etc all works just fine.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3839
    • Host Engineering
Re: Communication error while reading region
« Reply #1 on: May 23, 2023, 08:54:53 AM »
"Remotely" is the key word here.

Definitely bump up your timeout.  You have absolutely no control over how a TCP connection is made across the Internet, or the traffic hitting a secure server (if you route securely to a central server).  I would double the timeout and see if that helps.

What is your max PLC scan time?  Is it huge (e.g. > 50ms or 50,000us)?  That can definitely cause very slow communication.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Communication error while reading region
« Reply #2 on: May 23, 2023, 02:23:27 PM »
The timeout was set really low (it was 100ms, re-allocation of an old local connection). Setting it 4950ms it's still really slow, and still gives some Memory Block/Heap Item alerts. Scan times are avg 5ms, max 20ms.

I would say this site has the best internet connection of all my customers (service, speed, and hardware), but it's exponentially slower to connect to this PLC. It uses about 1/3 of the available program memory, and 1/10th of the documentation.

Also, this is not via a StrideLinx VPN like most of mine are, but OpenVPN connection on another router.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3839
    • Host Engineering
Re: Communication error while reading region
« Reply #3 on: May 23, 2023, 02:30:36 PM »
No comm errors? - that's the question.  You will get nagged about any Image blocks because those are not normally updated (think static recipes).

Just to make sure, the timeout setting you tweaked is under the Comm Link Editor's PORT tab's Advanced button.  Timeout of 2000ms with 2 retries is probably good enough.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Communication error while reading region
« Reply #4 on: May 23, 2023, 04:09:19 PM »
No comm errors? - that's the question.  You will get nagged about any Image blocks because those are not normally updated (think static recipes).

Not an actual pop up, no. Nor in a status box that I can see. Link Info is also clean.
Quote
Just to make sure, the timeout setting you tweaked is under the Comm Link Editor's PORT tab's Advanced button.  Timeout of 2000ms with 2 retries is probably good enough.

Nope, I was in the Protocol tab initially. Went back and did it in the Port tab, and same result. over 1 minute of just the "Loading... Reading Memory Image Data" before the first popup.

It seems it's always the same 3 popups, a Memory Block, a Heap Item and a $Counter item that I used in the past that isn't even a Heap Item anymore. Should I delete the data in Memory Image Manager?. It takes about 3 mins to connect to the PLC.
« Last Edit: May 23, 2023, 04:10:57 PM by Bolt »

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3839
    • Host Engineering
Re: Communication error while reading region
« Reply #5 on: May 23, 2023, 04:17:25 PM »
It seems it's always the same 3 popups, a Memory Block, a Heap Item and a $Counter item that I used in the past that isn't even a Heap Item anymore. Should I delete the data in Memory Image Manager?. It takes about 3 mins to connect to the PLC.

Definitely delete those from your MIM, along with any other areas you don't think you need to maintain any values.