Installation

Installing the CODESYS Bridge

Step-by-step guide to install the PLC Studio AI bridge script

Installing the CODESYS Bridge

The CODESYS bridge is a Python script that enables communication between your local CODESYS environment and PLC Studio AI.

Prerequisites

Before installing the bridge, ensure you have:

  • CODESYS V3.5 SP16 or later installed
  • A PLC Studio AI account
  • Administrator access to your computer

Installation Steps

Step 1: Download the Bridge Script

  1. Log in to your PLC Studio AI dashboard
  2. Navigate to SettingsCODESYS Bridge
  3. Click Download Bridge Script
  4. Save the plcstudio_bridge.py file to a known location

Step 2: Locate the Script Commands Folder

CODESYS stores custom scripts in a specific folder. To find it:

  1. Open CODESYS
  2. Go to ToolsScript EngineScript Commands
  3. In the Script Commands window, click the folder icon or note the path shown

The default location is typically:

C:\ProgramData\CODESYS\Script Commands\

Step 3: Install the Script

  1. Copy the downloaded plcstudio_bridge.py file
  2. Paste it into the Script Commands folder
  3. The script should now appear in CODESYS

Step 4: Restart CODESYS

Close and reopen CODESYS to ensure the script is loaded properly.

Step 5: Verify Installation

  1. Open CODESYS
  2. Go to ToolsScript EngineScript Commands
  3. You should see "PLC Studio AI Bridge" in the list

First-Time Configuration

When you run the bridge for the first time:

  1. Go to ToolsScript EngineExecute Script Command
  2. Select PLC Studio AI BridgeConnect
  3. A browser window will open for authentication
  4. Log in with your PLC Studio AI credentials
  5. Authorize the connection

Once authorized, the bridge will remember your credentials for future sessions.

Running the Bridge

To start the bridge with an open project:

  1. Open your CODESYS project
  2. Go to ToolsScript EngineExecute Script Command
  3. Select PLC Studio AI BridgeStart
  4. The bridge status will show "Connected" in the output window

The bridge only runs while CODESYS is open and the script is active. You'll need to start the bridge each time you open CODESYS.

Updating the Bridge

When updates are available:

  1. Download the new version from your PLC Studio AI dashboard
  2. Replace the existing script file in the Script Commands folder
  3. Restart CODESYS

Uninstalling

To remove the bridge:

  1. Navigate to the Script Commands folder
  2. Delete the plcstudio_bridge.py file
  3. Restart CODESYS

Troubleshooting

Script Not Appearing

If the script doesn't appear in CODESYS:

  • Verify the file is in the correct Script Commands folder
  • Check that the file extension is .py (not .py.txt)
  • Restart CODESYS

Connection Failed

If the bridge won't connect:

  • Check your internet connection
  • Verify your firewall allows connections to *.plcstudio.ai
  • Try logging out and back in to PLC Studio AI

Authentication Issues

If authentication fails:

  • Clear your browser cache and try again
  • Ensure you're using the correct PLC Studio AI account
  • Check that your subscription is active

For more help, see the troubleshooting guide.

On this page