WAGO 750-8212 CODESYS TCP Server Works Only While CODESYS Is Running / Boot Application Causes 750-891 Issues

WAGO 750-8212 Custom TCP Server and 750-891 Modbus TCP Coupler – Boot Application Issue

Hello,

I am working with two WAGO devices:

  • WAGO 750-8212 PFC200 Controller

  • WAGO 750-891 Modbus TCP Coupler

Both devices have I/O modules connected.

My PC runs an MFC/C++ application. The application needs to communicate with both WAGO systems.

Network Configuration

WAGO 750-8212

I created a CODESYS application using CFC (Continuous Function Chart).

The 750-8212 is configured as a custom TCP server:

  • IP Address: 10.10.15.254

  • TCP Port: 2000

I created an array in CODESYS and assigned the required variables to the array. My MFC application communicates with these variables through the TCP server.

WAGO 750-891

The 750-891 is used as a Modbus TCP coupler:

  • IP Address: 10.10.15.252

  • Modbus TCP Port: 502

My MFC application communicates with the 750-891 using Modbus TCP.

Therefore, I have two separate TCP communications:

PC / MFC Application
        |
        |---- Custom TCP
        |     10.10.15.254 : 2000
        |
        +---- Modbus TCP
              10.10.15.252 : 502

Scenario 1 – Boot Application NOT Used

When I download/run the CODESYS application normally, the custom TCP communication with the 750-8212 (10.10.15.254:2000) works correctly.

My MFC application can connect and communicate with the controller.

However, after powering OFF and powering ON the 750-8212, the application does not automatically start.

The MFC application cannot connect to:

10.10.15.254:2000

unless I open CODESYS and run/download the application again.

So, it appears that the CODESYS application is not automatically starting after a power cycle.

Scenario 2 – Boot Application Used

I then downloaded the CODESYS application as a Boot Application.

After this, the 750-8212 starts the application automatically after power ON, and my MFC application can connect directly to:

10.10.15.254:2000

without opening CODESYS.

However, after using the Boot Application, I experience problems with the 750-891 Modbus TCP communication at:

10.10.15.252:502

The 750-891 and/or its I/O modules do not behave as expected.

At this point, I am not sure whether the problem is related to:

  1. The 750-8212 Boot Application configuration

  2. The 750-891 Modbus TCP configuration

  3. IP/network configuration

  4. CODESYS configuration

  5. I/O mapping

  6. Communication between the 750-8212 and 750-891

  7. A conflict between the two WAGO devices

  8. Some configuration that is required when the 750-8212 application starts automatically

My Requirement

I need both systems to work simultaneously after power ON:

                     PC / MFC Application
                            |
              +-------------+-------------+
              |                           |
              | Custom TCP                | Modbus TCP
              |                           |
              v                           v
       WAGO 750-8212                 WAGO 750-891
       IP: 10.10.15.254              IP: 10.10.15.252
       Port: 2000                    Port: 502
              |                           |
              v                           v
          I/O Modules                 I/O Modules

The desired behavior is:

  1. Power ON the WAGO system.

  2. The 750-8212 CODESYS application should automatically start as a Boot Application.

  3. The custom TCP server should automatically become available at 10.10.15.254:2000.

  4. The MFC application should connect to the 750-8212 without opening CODESYS.

  5. The MFC application should also communicate with the 750-891 through Modbus TCP at 10.10.15.252:502.

  6. All I/O modules connected to both WAGO devices should operate normally.

Questions

What is the correct procedure for configuring the 750-8212 CODESYS application as a Boot Application?

Is there any additional configuration required in the 750-8212 WBM/CODESYS runtime settings to ensure the application starts automatically after power cycling?

Also, can a Boot Application on the 750-8212 affect communication with a separate 750-891 Modbus TCP coupler, or should these two TCP communications operate independently?

Any guidance on the correct configuration or troubleshooting procedure would be appreciated.

Thank you.

Two things to clear up:

  1. Download vs Boot Application.
    Your explanation of the behavior is 100% expected. The “Download” operation puts the compiled plc project into volatile “working memory” but does not save anything to the flash memory. So cycling power means the code is gone. Think of “Create Bootproject” as, essentially, “save to flash”. The compiled code is stored on the flash memory and the controller will run that “boot project” on powerup as long as the Run/Stop switch is in the Run position. But the behavior of the project should be the exact same in either case.

  2. Modbus Client vs Server
    I see your actual issue in your screenshots. You have added a Modbus Client service to the PFC200, with your 750-891 assigned as the Modbus Server (including the 891’s IP address and port). This means the PFC200 is opening and maintaining a TCP connection to the 891 I/O modules. If your MFC also connects to the 891, there are now TWO clients controlling the same server! Any Modbus WRITE operations on the output I/O can and will be immediately overwritten by subsequent WRITE operations from the other client. And if both clients are polling at different cyclic rates, it is no surprise you are seeing unpredicted operation of the 891s output modules.

It is typically not advised to try to control remote I/O from two clients at the same time for exactly this reason. Care should be taken either to ensure only one client is allowed to send WRITE commands at a time (using Application-based triggers instead of cyclic), or limit each client to only WRITE to registers within its own allowed and designated range to create separation and remove the potential for conflicts.

Hi,

I had already tried to add a Modbus Slave Device, but I was not getting the option to add one.

The issue is now solved. I deleted the Modbus Master from the 750-8212 CODESYS configuration, and everything is now working correctly.

The WAGO 750-891 already contains the required configuration/program and I/O modules, so it can operate independently. I first took a backup of the existing 750-891 configuration. Then I removed the Modbus Master from the 750-8212 and continued with the existing 750-8212 configuration and program. Finally, I downloaded the application to the controller.

After simply removing the Modbus Master from the 750-8212, the system is now working properly.

Thank you, Mr. AdamReeve, for your explanation and solution. It helped me identify and solve the problem.

Also, thank you Mr. Matthewkim for your solution and support.

The issue is now resolved.