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
- Log in to your PLC Studio AI dashboard
- Navigate to Settings → CODESYS Bridge
- Click Download Bridge Script
- Save the
plcstudio_bridge.pyfile to a known location
Step 2: Locate the Script Commands Folder
CODESYS stores custom scripts in a specific folder. To find it:
- Open CODESYS
- Go to Tools → Script Engine → Script Commands
- 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
- Copy the downloaded
plcstudio_bridge.pyfile - Paste it into the Script Commands folder
- 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
- Open CODESYS
- Go to Tools → Script Engine → Script Commands
- You should see "PLC Studio AI Bridge" in the list
First-Time Configuration
When you run the bridge for the first time:
- Go to Tools → Script Engine → Execute Script Command
- Select PLC Studio AI Bridge → Connect
- A browser window will open for authentication
- Log in with your PLC Studio AI credentials
- 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:
- Open your CODESYS project
- Go to Tools → Script Engine → Execute Script Command
- Select PLC Studio AI Bridge → Start
- 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:
- Download the new version from your PLC Studio AI dashboard
- Replace the existing script file in the Script Commands folder
- Restart CODESYS
Uninstalling
To remove the bridge:
- Navigate to the Script Commands folder
- Delete the
plcstudio_bridge.pyfile - 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.