A reachable Raspberry Pi proves only that the PC can exchange ICMP traffic with the target. The CODESYS engineering connection follows a longer path: the development environment sends a request to the local or configured gateway, the gateway service processes it, and the selected route continues to the runtime. Follow that packet and prove each hop independently.
Where Does the CODESYS Connection Stop?
Start by identifying the sender, intermediate process, and destination. The missing four-square notification-area icon does not by itself prove that the gateway is stopped. That icon belongs to GatewaySysTray.exe; the actual communication function depends on the gateway service.
| Path element | Function | Decisive check |
|---|---|---|
| Engineering PC | Sends the connection request | CODESYS opens normally and uses the intended gateway configuration |
| PC network interface | Carries IP traffic toward the Raspberry Pi | Link is active and the correct interface and route are selected |
CODESYS Gateway V3 |
Accepts and forwards CODESYS communication | The Windows service is running or the executable remains active in debug mode |
| Raspberry Pi runtime | Receives the forwarded request | The runtime appears when the route is scanned or accepts an online connection |
The first commissioning check is therefore not the tray icon. Open the Windows service-management console and locate both CODESYS ServiceControl and CODESYS Gateway V3. Record whether each service exists, whether it is running, and whether it stops again after startup. Proceed only after identifying the first failed hop.
How Do You Prove the Physical and IP Path?
Layer one first. Check the PC and Raspberry Pi link indications, cable or switch connection, and the network interface that owns the route to the target. A PC with multiple Ethernet, Wi-Fi, VPN, or virtual interfaces can return a successful ping through a path different from the one expected by the engineering configuration.
| Item | Known value | Commissioning action |
|---|---|---|
| Target address | Not specified | Compare the ping destination with the address selected in CODESYS |
| Gateway address | Local PC or configured gateway; not specified | Read the active gateway entry rather than inferring it from the target address |
| TCP/UDP port | Not specified | Read the configured endpoint and inspect firewall rules without guessing a port |
| Response timing | Not specified | Compare repeated tests for loss or intermittent delay; do not impose an unsupported timeout |
Run repeated pings to the exact Raspberry Pi address used for commissioning, then inspect the PC routing decision for that address. Ping tests ICMP reachability; it does not prove that the gateway process is listening, that a required port is permitted, or that the target runtime is ready. The check passes when the correct PC interface reaches the exact configured target without intermittent loss.
How Do You Restore the Two Windows Services?
Open the Services console with an account permitted to control services. Locate CODESYS ServiceControl and CODESYS Gateway V3. Start a stopped service, or restart a running gateway service to clear a stalled process. Then refresh the service list and watch whether the state remains Running.
- Confirm that both service entries exist.
- Start
CODESYS ServiceControl. - Start or restart
CODESYS Gateway V3. - Wait for Windows to report the resulting state; no fixed startup time is specified.
- If either service stops again, inspect the Windows service error and event records before repeating the start command.
A service that starts and immediately exits has a different fault from an unregistered service. Repeatedly clicking Start hides that distinction. Capture the executable path, service state, and Windows error text. The check passes when both entries remain running and the gateway process is present after the service console is refreshed.
How Do You Recover a Missing Gateway Tray Icon?
The tray utility can be started directly from the installation directory:
"C:\Program Files\CODESYS 3.5.x.0\GatewayPLC\GatewaySysTray.exe"
The 3.5.x.0 segment represents the installed CODESYS directory shown by this installation pattern. Select the directory that actually exists on the PC; do not create a literal replacement folder. After launching the executable, check both the visible notification area and its hidden-icons panel.
| Observation | Meaning | Next action |
|---|---|---|
| Icon appears and services run | The user-interface utility and service layer are both present | Return to CODESYS and test the route |
| Icon appears but gateway service is stopped | The tray utility is not proof of gateway operation | Repair or start the service |
| No icon but gateway service runs | The service may still be usable | Test connectivity and troubleshoot only the tray utility if needed |
| Executable is missing | The installed path or installation components differ | Locate the installed GatewayPLC directory before running commands |
This check passes when the tray utility starts from the real installation path or when a direct CODESYS connection proves that only the icon is absent.
How Do You Re-register or Debug the Gateway?
If the service entries are missing or were not registered correctly, open Command Prompt with administrator rights, change to the confirmed installation directory if desired, and register each executable separately:
"C:\Program Files\CODESYS 3.5.x.0\GatewayPLC\CoDeSysControlService.exe" -i
"C:\Program Files\CODESYS 3.5.x.0\GatewayPLC\GatewayService.exe" -i
Use the actual installed path. Administrative rights are required because service registration changes Windows service configuration. After registration, reopen the Services console and verify that CODESYS ServiceControl and CODESYS Gateway V3 both appear. Start them and confirm that they remain running.
When service operation still fails, run the gateway interactively as a diagnostic workaround:
"C:\Program Files\CODESYS 3.5.x.0\GatewayPLC\GatewayService.exe" -d
Keep the command window open while testing. Interactive debug mode separates gateway execution from Windows service startup and exposes immediate messages that a background service can hide. It is a troubleshooting state, not proof that service registration has been repaired. The check passes when the debug process remains active and CODESYS can traverse the gateway during the test.
How Do You Verify the Complete Route?
Return to the CODESYS communication configuration and confirm which gateway entry is active. If the CODESYS SL product on the target provides an embedded gateway, another supported path is to add that gateway using the PLC IP address. Treat this as a distinct route: selecting an embedded target gateway is not the same as repairing the PC-hosted CODESYS Gateway V3 service.
- Confirm physical link and ping the exact configured Raspberry Pi address.
- Confirm that the selected CODESYS gateway matches the route being tested: the PC gateway or the embedded gateway at the PLC IP.
- For the PC route, verify that both Windows services remain running.
- Scan or refresh the communication path and select the intended runtime.
- Attempt the normal online connection.
- Repeat the connection after closing debug mode or restarting the PC-hosted service, depending on the permanent route chosen.
The route is commissioned only when CODESYS reaches the intended runtime through the selected gateway and repeats the connection after the temporary diagnostic state has been removed.
FAQ
How do I restart CODESYS Gateway V3?
Open Windows Services, locate CODESYS Gateway V3, and select Restart. Also verify that CODESYS ServiceControl is present and remains running.
How do I start the missing CODESYS four-square icon?
Run GatewaySysTray.exe from C:\Program Files\CODESYS 3.5.x.0\GatewayPLC\, using the directory for the installed version. Check the hidden notification-area icons, but verify the gateway service separately.
How do I register the CODESYS gateway service again?
Open Command Prompt as administrator and run CoDeSysControlService.exe -i and GatewayService.exe -i from the confirmed GatewayPLC directory. Reopen Windows Services and start both registered entries.
How do I verify the gateway when ping already works?
Confirm the active gateway entry, verify both PC services or run GatewayService.exe -d, then scan for the intended runtime and make an online connection. Remove the debug workaround and repeat that end-to-end connection as the final verification step.