CODESYS
On this page
AnyAutomation Studio can open a CODESYS project, show the objects inside it as a tree, and export them to and import them back from PLCopenXML files, the open, vendor-neutral exchange format for IEC 61131-3 code. This lets you get CODESYS blocks out as standard files you can archive, keep under version control or bring into another tool, and later bring them back into the project. You can also create, rename, move and delete objects, edit the Structured Text of a block right in the editor, save it back into the project, compile the project to check it, compare the project with an export folder, go online to the controller, and test function blocks and functions on CODESYS Control Win. What AI can do with a CODESYS project, and which AI tools exist for CODESYS, is summarised on CODESYS AI.
CODESYS support opens in the side bar, on the left. Open it in any of these ways:
- Click the CODESYS icon in the Activity Bar (left edge).
- Open the Command Palette (
Ctrl+Shift+P) and run CODESYS. - Click the CODESYS entry in the status bar (bottom left).
The status bar entry also tells you the current state: CODESYS: Connected once Studio is connected (hover over it to see the CODESYS version), and CODESYS: followed by the project name while a project is open.
Requirements
- A Pro plan or higher. CODESYS is available on Pro, Pro+ and Enterprise. On the free tier or the Basic plan, opening CODESYS shows an upgrade prompt instead, and the AI assistant offers neither the CODESYS tools nor the CODESYS specialist. Going online and unit tests need the Pro+ plan.
- CODESYS installed on your machine. AnyAutomation Studio works with your own local CODESYS Development System (3.5). If CODESYS is not installed, the view shows a "CODESYS is not installed on this computer" message and the rest of Studio keeps working normally.
- For going online: a Pro+ plan or higher and a controller you are allowed to access, such as CODESYS Control Win on your computer, reachable through the gateway of your CODESYS installation, and the user and password of a user of that controller.
- For unit tests: a Pro+ plan or higher. Tests run in the CODESYS simulation without further setup; to test on CODESYS Control Win, it has to run on the same computer.
Connecting
When the CODESYS side bar opens it shows a Connect button. Click it (on the welcome screen, or in the toolbar at the top of the view) to connect to your local CODESYS installation. Connecting starts the CODESYS session of Studio in the background and takes a few seconds, it does not take over a CODESYS window you already have open; while it runs, a progress indicator appears with a Cancel option.
If the connection is ever lost, click Connect again.
Opening a Project
- Click Open Project in the toolbar at the top of the CODESYS side bar.
- Pick a CODESYS project file (
.project) in the file dialog.
The project's objects load into a tree below. Opening takes a moment; after that, objects open in a fraction of a second, because CODESYS keeps the project open in the background while it is open in Studio.
A project that is already open in another CODESYS session, for example in a CODESYS window on your machine, cannot be opened at the same time. You will see a clear "already open in another session" message, whatever display language your CODESYS uses. Close it in the other session and try again.
The other way round, while a project is open in Studio, a CODESYS window shows it as in use. To edit it in CODESYS, choose Close Project in Studio first. After about 15 minutes without any action and without an online connection, Studio lets go of the project in the background; the next action then takes a few seconds again.
Browsing Objects
The tree shows the objects in the open project (applications, devices, folders, programs, function blocks, functions, interfaces, data types, global variable lists and more), each with an icon for its kind, nested the same way as in CODESYS. Methods, properties and actions appear below their block, and the language of an object, for example ST or CFC, appears next to its name. Hover over an object to see its kind, language, path and comment. Expand and collapse the branches to navigate, and start typing to filter the tree to matching names.
Select one or several program blocks (hold Ctrl or Shift for a multi-selection). Use Refresh (the toolbar button at the top of the view, or F5 while the view is focused) to reload the tree from CODESYS after the project has changed.
Editing a Block's Code
Click a program block (a POU), a method, a property or a global variable list in the tree to open its declaration in the editor, with syntax highlighting. Objects without a declaration, such as an action, open their implementation instead. Folders, devices, and applications do not open.
The declaration and the implementation of an object open as two separate tabs. To switch between them, click Go to Implementation Part or Go to Declaration Part in the title bar of the editor (both are also in the Command Palette).
Edit the code and save it (Ctrl+S). Studio writes your change into the CODESYS project and saves the project. Saving one part leaves the other part unchanged, and saving text that did not change does not touch the project.
- Changed in the meantime. If the object was changed in the project after you opened it, for example in CODESYS itself, Studio does not overwrite it. The editor tells you that the content is newer and lets you compare your version with the current one before you decide.
- Other languages. This editor changes the declaration and an implementation in Structured Text. Ladder Diagram, Function Block Diagram, Sequential Function Chart and Continuous Function Chart are changed as a document, see Graphical Languages. Instruction List cannot be changed, and Studio shows only its declaration.
- Project open in CODESYS. While the same project is open in a CODESYS window, saving fails with the "already open in another session" message. Close it there and save again.
- After a restart. Studio reopens your CODESYS tabs, but not the project. Until you open it, each tab explains this and offers Open CODESYS Project; once the project is open, the tabs show the code again. Tabs with unsaved changes keep your changes.
- Deleted objects. When you delete an object in the project tree, its tab closes. A tab with unsaved changes stays open with your changes. A tab whose object is no longer in the open project says so and never offers to create a file.
While you type, Studio checks the Structured Text for syntax errors, such as a missing ; or END_IF, and marks them in the code. The Outline shows the block with its methods and properties, and object-oriented keywords, pragmas, pointers and references are highlighted. Whether a name or type exists is checked when you compile. Format Document leaves CODESYS code unchanged. Local .st files that contain CODESYS code are checked the same way.
Compiling a Project
To check the open project for errors, choose Compile from the ... menu at the top of the CODESYS view, from the right-click menu of the project tree, or from the Command Palette. Rebuild compiles the whole application from scratch. Studio compiles with your CODESYS installation in the background, a progress message with Cancel appears while it runs, and the project itself is not changed.
When the compile is done, a message tells you how many errors and warnings were found. Click Show Problems to open the Problems view: it lists each message with its CODESYS message number, for example C0046. Click an entry to open the declaration or implementation of the object at the reported line. Messages that belong to no single block, for example on the application, are listed under the project file.
The list is replaced by the next compile and cleared when you close the project. If CODESYS reports more than 500 messages, the first 500 are listed and the message says so.
Creating and Organizing Objects
Creating an Object
- Select the application or folder that should hold the new object, or the function block, program or interface that should get a method, property or action.
- Click New Object... in the toolbar at the top of the CODESYS view, or right-click and choose New Object....
- Pick the kind of object. Under an application or folder you can create a program, function block, function, interface, structure, enumeration, union, alias, global variable list, persistent variable list or folder; under a function block or program a method, property, action or transition; under an interface a method or property.
- Type the name. Names use letters, digits and underscores and start with a letter or an underscore; Studio tells you right away if a name is not allowed or already exists at that place.
- Depending on the kind, Studio asks for more: the return type of a function (and, optionally, of a method), the data type of a property, the data type an alias stands for, the function block or interface a new one extends, and the interfaces a function block implements. Leave an optional prompt empty to skip it.
For a program, function block, function, method, property, action or transition, Studio also asks for the language: Structured Text, Ladder Diagram, Function Block Diagram, Sequential Function Chart or Continuous Function Chart, also page-oriented. Sequential Function Chart is not offered for a function, method, property or transition. Studio creates the object, saves the project and opens it. To create an object in Instruction List, use CODESYS or import a PLCopenXML file.
Renaming, Moving and Deleting
- While logged in. New objects, rename, move and delete need you to log out of the controller first. Studio tells you so and changes nothing.
- Rename. Select an object and press
F2or right-click and choose Rename.... References to the old name in other objects are not updated: use Rename with References for that. - Move. Right-click and choose Move To..., then pick a folder or application, or drag the objects onto a folder or application in the tree. Studio asks before it moves them.
- Delete. Select one or several objects and press
Deleteor right-click and choose Delete. Studio asks first, because the objects and everything below them are removed from the project and this cannot be undone in Studio.
Studio saves the project after each of these actions and updates the tree in place. Open editors follow a renamed or moved object, editors of a deleted object close, and Problems entries of these objects disappear. Devices, applications and the library manager cannot be renamed, moved or deleted from Studio.
Graphical Languages
Click an object in Ladder Diagram, Function Block Diagram or Sequential Function Chart in the project tree, and it opens in the block editor: its variables as a table on top, its networks or its sequence as a drawing below. The view is for reading. Right-click an object and choose Show Graphical View to open it again, or click Edit Declaration in the editor title bar to change its variables. An object in Continuous Function Chart or Instruction List shows the table and a note: read it as XML.
To change a graphical body:
- Right-click the object and choose Open as XML. You can also use the button in the title bar of the graphical view. The object opens as a PLCopenXML document.
- Change the document. Mistakes are marked while you type.
- Save. Studio checks the document and writes it into the project. If something is wrong, a message names the line and nothing changes. If the object changed in the meantime, Studio shows a conflict.
What to keep in mind:
- Keep the name of the object and its language. To rename an object, use Rename with References.
- The document of a method, action, transition or property accessor also shows the object it belongs to. Change only the part of the method, action, transition or accessor.
- The object stays the same object. Its task call, the objects below it and its build properties are not touched.
- In Continuous Function Chart, connect through
connectorelements as in the document you opened. CODESYS does not accept an output element without a connection, so finish unfinished networks in CODESYS first. - A document holds this one object. Studio refuses to save a document with further objects in its project element.
- Instruction List opens read-only and shows only the declaration, because CODESYS does not export its instructions. Read them in CODESYS. Rename with References lists such objects to check by hand, and analysis results say they are incomplete.
- You need to be logged out of the controller to save.
Exporting Objects
Export and import share a single Import / Export area in the CODESYS side bar. When you export, Studio writes one file per object into your export folder, in the format you choose under Export Format:
- PLCopenXML (.xml) is the open exchange format, good for reading and for other tools. Visualizations, recipes, alarms, text lists and image pools have no PLCopenXML form, so they are written as native files.
- CODESYS Native (.export) keeps everything CODESYS stores, for every object, and opens only in CODESYS.
To export a single device, visualization, recipe, alarm, text list or image pool, right-click it and choose Export as Native File.
There are two ways to export:
- Tick objects in the project tree. Every object in the tree has a checkbox. Tick the objects you want (tick a folder to select all of its objects at once) and click Export Selected.
- From the right-click menu. Select the program blocks you want in the tree, right-click, and choose Export Selected.
To export every object of the project at once, right-click in the project tree and choose Export All, use Export All in the ... menu at the top of the view, or click Export All in the Import / Export area.
You can also drag objects from the project tree onto the export folder tree to export them there. A dragged folder contributes every object beneath it.
If you have not set a default export folder, a folder picker opens each time. After the export a message tells you how many objects were written and where, for example Exported 12 object(s) to C:\Exports.
Default Export Folder
To skip the folder prompt, set a default export folder once: open Settings (Ctrl+,), search for CODESYS, and enter a folder path. Exports then go straight to that folder. Leave it empty to be asked for a folder each time.
The Export Folder Tree
Below the export folder path, the Import / Export area shows the files and subfolders already in that folder as a tree: each row with expand arrows, an icon for its kind, and a checkbox. This lets you see at a glance what is in the folder and pick files to import.
At the top of the area there are three small buttons:
- Filter: type part of a name to narrow the folder tree to matching files and folders.
- Refresh: re-reads the export folder so files added or changed outside Studio also show up.
- Reveal in File Explorer: opens the export folder in Windows Explorer.
Managing Files in the Export Folder Tree
Right-click a row in the folder tree for a file-management menu: Open and Open to the Side to view a file, Reveal in File Explorer, Copy Path, and New File, New Folder, Rename, Delete, Cut, Copy, and Paste. This lets you organize the export folder right in Studio, without switching to Windows Explorer.
Importing Objects
You bring exported files back into the open project from the same Import / Export area:
- Tick the files you want in the export folder tree and click Import Selected.
- Use Import All to import every file in the folder. Choose Replace the Whole Program there to delete the program of the application and import it again from the folder. Studio first shows which objects are deleted, replaced and new. Devices, tasks and libraries stay unless the folder contains them. Objects that use a deleted object may no longer build. If the folder holds an object in more than one file, for example after exports in both formats, Studio names the files and changes nothing; remove the one you do not want.
- If you import PLCopenXML and native files together and a native file fails, the PLCopenXML objects are already saved. Studio tells you which part was imported.
Studio takes both PLCopenXML and native files. Native files can replace or skip an existing object, not keep both.
Before the import, Studio asks what should happen when an object with the same name already exists in the project:
- Replace: the existing object is removed and imported again from the file.
- Keep Both: the imported object is added under a new name and the existing object stays unchanged.
- Skip: files whose object already exists are not imported.
Studio remembers your choice and suggests it again the next time. Press Escape to cancel the import.
You can also drag files from the export folder tree onto the project tree to import them the same way, with the same choice.
The import goes into the folder or application you have selected in the project tree, or into the folder or application that holds the selected object; with nothing selected it goes to the top level of the project. The import prompt names the target. To pick files for a particular folder directly, right-click the folder or application and choose Import Into....
An import is all or nothing: if one file cannot be imported, no change is saved to the project. The message after the import tells you how many files were imported and skipped, and for a failed import it names the first file that failed together with the reason CODESYS gives.
Comparing with an Export Folder
To see how the open project differs from an export folder, for example a folder under version control or one from a colleague:
- Choose Compare with Folder... from the toolbar at the top of the CODESYS view, from the right-click menu of the project tree or from the Command Palette.
- Pick the folder.
Studio exports the project in the background and compares it with the folder. The Compare view opens in the CODESYS side bar and groups the objects: Changed, Only in Project, Only in Folder, Not Compared and Equal (collapsed). Export timestamps are ignored, so an object counts as equal when its content is the same. If the folder holds an object in both formats, for example after exports in PLCopenXML and in the native format, Studio names the files and compares nothing; remove the one you do not want.
- Click an object to open both versions side by side, the project on the left and the folder on the right.
- Right-click a row and choose Import Folder Version into Project to replace the object in the project with the version from the folder, or Export Project Version to Folder to write the project version into the folder. Studio asks before it replaces or overwrites anything and updates the row afterwards.
- Compare Again repeats the comparison, Close Comparison closes the view.
Comparing with Another Project
- Choose Compare with Project... from the ... menu of the CODESYS view, from the right-click menu of the project tree or from the Command Palette.
- Pick the other project. If it is protected, Studio asks for the password and can remember it on this computer.
The Compare view groups the objects: Changed, Only in the Open Project, Only in the Other Project and Equal. Each row says what differs.
- Click an object to see both versions side by side, Structured Text as text and everything else as XML. Very large objects cannot be shown.
- Take Over into the Open Project and Take Over into the Other Project in the right-click menu bring one project in line with the other for that object. Studio asks first and says whether the object is replaced, added, moved or removed. Objects below it follow, and the project that changed is saved.
- An object that moved appears as two rows. Taking over either of them moves it.
- Compare Options... ignores whitespace or includes hidden and generated objects.
- If one of the two projects was saved after the comparison, Studio takes nothing over, compares again and tells you; check the comparison and take over again.
- While you are logged in to the controller, nothing can be taken over, in either direction; log out first.
Text Lists
Click a text list in the project tree or choose Text Lists from the Command Palette. To add a list, choose New Object... on the application and then Text List.
The table shows the ID, the Default text and one column per language. Edit the cells directly and click Save.
- Add Row... and the bin icon of a row add and remove rows.
- Add Language... and Remove Language... add and delete a language column.
- Export File... and Import File... exchange the texts as a file, for example with a translator. They always cover all text lists of the project. Import File... asks first, because it overwrites the texts of every row whose ID is in the file and adds the new rows.
Image Pools
Click an image pool in the project tree or choose Image Pools from the Command Palette. To add a pool, choose New Object... on the application and then Image Pool.
Select an image to see its preview. Add Image... asks for the file, an ID and whether the project embeds the image, links to the file, or both. Remove Image... takes it out; visualizations that show this image then no longer find it. Every change is saved right away.
Visualizations, Recipes and Alarms
Visualizations, recipes and alarms appear in the project tree with their own icons. You can export, import and compare them, and rename, move or delete them where CODESYS allows it. Studio does not edit their content: use CODESYS for that.
Going Online
With the project open, Studio can go online to the controller the project is configured for, for example the CODESYS Control Win soft PLC on your computer. Going online with all the actions of this section belongs to the Pro+ plan and is unlocked in the free trial. The online actions are in the ... menu at the top of the CODESYS view, in the right-click menu of the project tree, in the Command Palette, and in the online entry of the status bar.
Logging In
- Choose Login.
- If the controller asks for a user, the CODESYS Runtime Login prompt asks for the user name and the password of a user of the controller.
- Choose Use for This Login Only, or Remember in the OS Secret Store to log in to the controller of this project without being asked next time.
If the controller refuses the user name or password, Studio asks again. Forget Saved Runtime Password in the Command Palette removes a remembered password.
Logging in never changes the application on the controller. If the project differs from the application there, or the controller runs a different application, Studio tells you so and offers Download and Online Change. Logout goes offline again; values you forced stay forced on the controller, and the message says how many.
Download and Online Change
- Download compiles the project and replaces the application on the controller. The application is stopped and its variables start from their initial values.
- Online Change compiles the project and loads the changes into the running application without stopping it. If the changes cannot be applied that way, Studio says so; use Download instead.
Both ask for your confirmation first and log in by themselves when needed. If the project has compile errors, nothing is loaded; compile the project, fix the errors and try again.
Starting, Stopping and Resetting
While you are logged in, Start and Stop run and stop the application. Reset Warm stops the application and sets all variables except retain variables to their initial values, Reset Cold also resets the retain variables, and Reset Origin deletes the application from the controller and logs you out. Each of them asks for your confirmation first.
The Online Status in the Status Bar
While a project is open, a status bar entry shows Offline, Logged In, Running or Stopped, followed by Application Differs when the project differs from the application on the controller and by the number of forced values. Click it to choose one of the online actions that fit the current state.
Watching, Writing and Forcing Values
The Watch view in the CODESYS side bar shows the values of the variables you choose while you are logged in.
- Add to Watch... adds one or more variables, separated by commas, for example
PLC_PRG.nCounter, GVL_Machine.aValues[2], PLC_PRG.fbMotor.xRun. Variables are written relative to the application. Single values can be watched; a whole array, structure or function block instance cannot, so add its elements or members instead. - The values update about once per second while the view is visible.
- Write Value... in the right-click menu of a variable writes a new value once, typed as an IEC literal, for example
TRUE,42,T#500msor'text'. If the controller does not accept a value, nothing is written. - Force Value... holds a value on the controller in every cycle, whatever the program writes, until you release it. Forced variables show a lock icon. Release Force releases the selected variables, Release All Forces every forced value. Forced values stay active after you log out.
- Remove from Watch and Clear Watch tidy up the list. Studio keeps the list per project.
Online Settings
Open Settings (Ctrl+,) and search for CODESYS to change how often the Watch view reads its values, and the gateway Studio uses when your CODESYS installation does not know the gateway the project's controller is configured for. The default gateway is the one of this computer.
Compare with the Device
While you are logged in, Compare with Device in the ... menu of the CODESYS view or in the right-click menu of the project tree compares the open project with the application on the controller. The Compare view lists the objects that are changed, the ones only in the open project and the ones only on the device. Click an object to see what differs. To read the text of the device version, use Upload from the Device.
This needs the project source on the controller. If it is missing, protected or unreadable, Studio says so and shows the state of the application instead. Download Source stores the saved project on the controller after you confirm; anyone with access to the controller can read it there, and the application is not changed.
Before Download and Online Change, the confirmation lists the objects you changed since your last download from Studio, says whether an online change is possible, and names values that are forced on the controller, because an online change releases them. After the first download from Studio the list starts.
Upload from the Device
- Upload from Device... saves the project source stored on the controller as a project archive on your computer. Open as Project in the message logs out, asks for an empty folder and opens the uploaded project. Save your changes first, because the open project is closed.
- Create Boot Application... writes the boot application On the Device, which starts it at its next restart, or As a File... on your computer.
- Device Information shows vendor, device, runtime version, operating mode, the state of each application, the IEC tasks and the load of the controller. Log in to see the state of the applications and the load.
- If the controller uses encrypted communication with a certificate your computer does not trust yet, Studio shows the certificate with its thumbprint when you log in or download. Compare the thumbprint with the one shown by the controller or its administrator and choose Trust Certificate only when they match; Studio then logs in again. Trust Device Certificate... in the Command Palette does the same at any time.
Device Users and Log Files
Device Users lists the users and groups of the controller you are logged in to.
- Add User..., Remove User... and Change Password... manage users, Add Group..., Remove Group... and Group Members... manage groups. Group Members... sets the users of a group; groups inside the group stay as they are, and the confirmation names both.
- Back Up... saves all users to a file in a folder you choose, protected by a password you enter. Restore... replaces all users and groups with such a backup.
- Set First User... is offered on a controller without users and turns on its user management: from then on every login needs a user name and a password.
Studio asks for every password itself, twice, and asks you to confirm each change. A change to users or groups that would leave nobody who can log in and manage the controller is refused. If a backup restored with Restore... would leave you without the right to manage the controller, Studio tries to put the previous users back and tells you whether it worked; the controller can refuse this once your user has lost its rights. If your user is not in the backup or has a different password there, Studio cannot log in again with it and forgets its remembered password. In that case, and when the previous users cannot be put back, Studio keeps a copy of the previous users, protected with the password of the restored backup, and names the file in the message: log in with a user of the restored backup and restore that copy with Restore... to undo the change. Check the backup before you restore it. When you change the password of the user you are logged in with, Studio forgets its remembered password and asks at the next login.
Device Log Files lists the log files of the controller. Open shows a file in the editor, Save As... saves a copy as a log, CSV or text file. Studio only reads them, at most the last 8 MB of a file, and cannot change or delete files on the controller.
Trace
Traces of the project appear in the project tree with a curve icon.
- Right-click the application and choose Add Trace..., then enter the name, the task that records it, for example
MainTask, and the variables separated by commas. - The trace opens in its own page. Set Variables, Record Every N Cycles, Time Resolution, Start After Download, a Record Condition and, under Trigger, the Trigger Variable, the Trigger Edge, the Trigger Level and the Samples After Trigger. Save writes the trace into the project. Changes need a logout.
- Log in and choose Download and Start: the controller records while the application keeps running. Stop halts the recording, Reset Trigger waits for the next trigger, Status shows the state. If the trace records a variable, or uses a trigger variable, that the application does not have, Studio names it and sends nothing to the controller.
- Save Recording... writes the recording as
.csv, as.tracefor CODESYS or as.txt. Open in Trace in the message, or Open Trace Recording... later, shows a CSV recording in the Trace editor with cursors, zoom and FFT, up to eight variables.
Show Live Curve in the trace page or in the title of the Watch view draws up to eight variables as a live curve in the Trace editor while you are logged in, without a trace on the controller. When you log out, the live curve stops and the Trace editor says so; after a live curve has stopped, Start and Browse in the Trace editor work with your OPC UA connections again.
Watch Lists and Snapshots
- Save Watch List... in the title of the Watch view saves its variables under a name next to the project, and Load Watch List... puts a saved list back into the view. Export Watch List... and Import Watch List... exchange a list as a file with colleagues.
- Take Snapshot... in the right-click menu of a global variable list or a program reads all its single values from the controller while you are logged in and saves them as a file. Structured values and constants are skipped, and the message counts them.
- Restore Snapshot... writes the values of a snapshot once into the running application. Studio shows the values first and writes only after you confirm; the program can overwrite them in its next cycle. If the controller refuses a value, the message says how many values were already written.
CODESYS Control Win
CODESYS Control Win in the ... menu of the CODESYS view opens a page with the state of the CODESYS Control Win runtime on your computer, also without an open project.
- Start, Stop and Restart change the state of the runtime. Windows asks you for administrator rights for each of these actions, and Studio does not keep them. If you decline, nothing changes.
- Stop and Restart end every application and connection on the runtime, also those of other programs, and need a logout first.
- With a project open, Simulation of the Project Device switches the simulation of the controller on and off, while you are logged out.
Device Users, Device Log Files, Compare with Device, Upload from Device and the boot application belong to the Pro+ plan like going online. The CODESYS Control Win page needs Pro. The AI works with traces, watch lists, snapshots and CODESYS Control Win from Pro+.
Testing Blocks
From the Pro+ plan up, function blocks and functions of the open project can be tested in the CODESYS simulation or on CODESYS Control Win on your computer, with the same Test Bench, history and reports as TIA blocks. Right-click the block in the project tree and choose Create Unit Test Suite or Run Unit Tests; Run with Coverage Instrumentation on the suite shows which lines and branches the tests reach, and Run Mutation Testing on CODESYS Control Win shows whether the tests notice small changes in the block. How to set up and run such tests is described in Unit Testing.
Project Files and Archives
The ... menu of the CODESYS side bar and the Command Palette hold the commands for the project file.
Saving Under a New Name
- Choose Save Project As... and pick the new file. Besides a project file, a library file works too.
- Choose what happens to the password: Keep the Current Protection, Protect with a Password... or Remove the Password.
Studio goes on working in the new file and the original stays as it was. While you are logged in to the controller, log out first. A password you set here cannot be recovered if you lose it.
Pick another file than the one the project is open from: Studio refuses that file. To change the password or the protection of the open file, use Protection. Protect with a Password... and Remove the Password need a project user who may manage users. If the new file loses protection, Studio asks first and names what you lose; the original keeps its protection.
Project Archives
An archive packs the project with the things it needs, for handing over or as a backup.
- Choose Save Project Archive... and pick the file.
- Choose the content of the archive; the list starts with the usual selection.
- Enter a comment if you like, and add further files with Add Files.... An archive keeps one file per name, so rename files that share a name.
To use an archive, choose Open Project Archive..., pick the archive and then an empty folder. Studio extracts it there and opens the project in place of the one that is open. Additional files of the archive are in the subfolder Additional Files. If one of them cannot be extracted, Studio tells you and still opens the project.
Protected Projects
When a project is protected with a password, Studio asks for it as it opens the project. Choose Use for This Opening Only or Remember in the OS Secret Store to open it without asking next time. Forget Stored Project Password in the Command Palette removes the stored password of the open project.
Some projects have their own user management. They open without a login, but some actions are refused until you log in. Choose Log In as Project User... and enter the user and the password: the status bar entry and the Security folder then name the user. If the login is refused and you cancel, the project stays open with the user you had before. See Project Security.
Project Security
The Security folder at the end of the project tree holds the users, groups, rights and protection of the project. Beside it you see who is logged in.
Project users decide who may do what in the project. They do not protect the file: anyone who has the file can read it unless it is encrypted. To protect the content of the file, use encryption under Protection.
Changes need a project user who may manage users, for example a member of the group Owner, and they are saved right away or with Save. While you are logged in to the controller, log out first. Studio refuses a change that would lock you out of the project, and then nothing is changed. It tells you to make the change as another owner.
Logging In
Choose Log In as Project User... in the right-click menu of Security, in the ... menu or in the Command Palette, and enter the user and the password. Log Out of the Project ends the login. After two wrong passwords for a user Studio does not try that user again and shows a message, also when the AI asked for the login: CODESYS deactivates an account at the third wrong password. A correct login starts the count over, and so does opening the project again. The account is active again when the project is opened again, unless a change to users or rights was saved in the meantime. Then it stays deactivated until someone who may manage users activates it under Users. A refused login leaves you logged in as the user you had before. A login you remembered stays stored after Log Out of the Project; Forget Stored Project Password removes it.
Users and Groups
Click Users to see all users of the project. If you may manage users, you also see whether they have a password. Names of users and groups are case sensitive: Bob and bob are two users. Use Add User..., Edit User..., Set Password..., Deactivate and Remove User.... You cannot deactivate or remove the user you are logged in as.
Click Groups for the groups and their members. Use Add Group..., Edit Group..., Add Members..., Remove Members... and Remove Group.... The groups Owner and Everyone are fixed: Owner always keeps every right and needs an active user, Everyone always contains every user.
Rights
Click Rights to see a table with one column per group. Choose what to show: User Management, Objects, Commands or Object Types. Filter narrows the rows by what they show and Show Only Set Rights hides the rows with nothing set. For a single object, right-click it in the tree and choose Object Rights.
Click a cell to go through Default, Granted and Denied, then press Save. The column You shows whether you have the right yourself. Point at a cell to see what it inherits from a parent object.
Files and comparisons do not change users, groups or rights: if a native file, Import All or taking over from a comparison would change them, Studio takes nothing over and names the reason. This also applies to the rights an object carries in its file, and to Project Settings of another project, which holds its users. Change them here instead.
Protection
Click Protection to see the current protection and to choose No Protection, Integrity Check or Encryption with a Password. A project is either encrypted or has an integrity check, never both.
- Save asks for confirmation and names what you lose when protection goes away.
- With a password, Studio asks for it twice and offers to remember it in the OS secret store, as it does when you open a protected project. If you choose Use for This Opening Only, a password remembered earlier is removed too, also when you enter the same password again. A lost password cannot be recovered.
- Change Password... sets a new password for an encrypted project.
- Encryption with a dongle or a certificate is set up in CODESYS. Studio shows it and can remove it.
Project Information and Settings
Project Information in the ... menu opens a page with the title, version, author, company and description of the project, and Generate Accessors, which creates the project information functions on the next build. Project Settings opens a page with the Compiler Defines of the project, the Compiler Version with Update to Newest Compiler, and the Source Download.
Change the values and press Save or Ctrl+S. Reload reads the values again. If the project has changed since you opened the page, Studio tells you and keeps your entries, so you can reload and enter them again.
CODESYS does not report the current source download setting, so Transfer the Source starts at Keep the Current Setting. Choose a value only if you want to replace the setting; Compact Download and the content options need that value too. Update to Newest Compiler asks first, and your other entries are saved only if you confirm. A compiler update also applies to later builds and downloads, and older CODESYS versions may no longer open the project. While you are logged in to the controller, these pages and the Build Properties view only read: log out to save a change.
Build Properties of an Object
Right-click an object in the tree and choose Build Properties, or expand the Build Properties view in the side bar. It shows the values the selected object has: Exclude from Build, External Implementation, Always Link and Compiler Defines. Change them and press Apply, or Reset to go back. While you have unapplied changes, the view stays on that object.
Copy Name and Copy Path in the right-click menu of the tree copy the names or paths of the selected objects, one per line.
Libraries
The Libraries view below the project tree shows every library manager of the project with its references and placeholders. Each row says which version it resolves to, and a warning icon marks a reference that no installed library matches: the project does not compile until you install the library or change the reference. Click Show Libraries in the Command Palette if the view is closed.
Expand a library to see its content. Hover over a function block or function to read its inputs, outputs and comment. While you write Structured Text, the blocks of the referenced libraries appear in the suggestions, and after a variable and a dot you get its inputs and outputs.
Adding and Changing References
- Add Library... in the view header lets you search the installed libraries by name, version or company. Studio adds the reference and saves the project.
- Add Library Placeholder... in the ... menu of the view adds a placeholder with the library it resolves to by default. If the row then shows a warning, CODESYS does not resolve the placeholder by itself: set a redirection in Reference Properties....
- Right-click a reference and choose Reference Properties... to change its namespace, whether it is optional, whether its content needs the namespace, its default resolution, its redirection and its parameters. Each change is saved right away.
- Remove Reference removes it. References that CODESYS added itself stay.
These actions are not available while you are logged in to the controller.
Creating an Instance
Right-click a function block in the view and choose Create Instance.... Pick the program, function block or global variable list that gets the declaration and confirm the name. Studio adds the variable, with the namespace when the library needs it, and saves the project.
The Library Repository
Library Repository in the ... menu shows the libraries installed on this computer. It also works without an open project. Search by name, version or company, or show one repository at a time.
- Install... asks for the files and for the repository. If the same version is already there, Studio asks whether to replace it.
- Uninstall removes the selected library from its repository. Projects that reference this version no longer compile until it is installed again.
- Add Repository... adds a folder as a repository, Move Up and Move Down change the search order, and Remove takes a repository off the list while the folder and its files stay on the disk. The System repository stays.
The list of repositories belongs to this computer, and CODESYS stores it when it closes. If a CODESYS window is open at the same time, it shows your change after a restart, and it can overwrite the change when it closes. If a repository seems to have disappeared, choose Reload and add it again.
Saving as a Compiled Library
Save as Compiled Library... in the ... menu of the CODESYS view checks the project and writes it as a compiled library. A library needs a title, a version and a company: if one is missing, Studio offers to open Project Information. Errors from the check stop the saving.
Upgrading a Project
Upgrade Project... in the ... menu shows the compiler, every library reference and every device with the version it uses and the newest installed one. Nothing changes yet. Switch on what you want to upgrade and choose Upgrade...; after your confirmation, CODESYS reopens the project with the new versions and saves it, and the page lists what changed.
Placeholders keep their own resolution, so change those in Reference Properties.... Older CODESYS versions may no longer open an upgraded project, and Studio cannot undo the upgrade, so keep a copy if you may need the old state.
New Project
Choose CODESYS: New CODESYS Project... from the Command Palette, or New Project... from the ... menu of the CODESYS view. Studio does not need to be connected first. While Studio is logged in to a controller, log out first: Studio opens the new project once it is created.
- Pick the folder and the file name of the new
.projectfile. It has to be on a drive of this computer: network shares and mapped network drives are refused. - Pick the controller from the catalog, for example CODESYS Control Win V3 x64. Only programmable controllers are offered; install a device description first if yours is missing.
- Choose Standard Project for the controller with its application, a program PLC_PRG in Structured Text and a cyclic MainTask that calls it, or Empty Project for the controller and its application only.
Studio checks that the new project builds and then opens it in place of the open project. A file that already exists is only replaced after you confirm the question of the save dialog. The open project itself cannot be the target.
Tasks
Task Configuration in the project tree, in the right-click menu of an application or in the Command Palette (CODESYS: Task Configuration) opens a page for the tasks of the application. If the project has several applications, Studio asks which one you mean.
- The table lists each task with its type, priority, interval or event and the POUs it calls. Click a row to edit that task below.
- Set Type, Priority, Core Binding and, depending on the type, Interval and Interval Unit, Event Variable, External Event or Parent Task. The interval takes a number or a time literal such as
T#20ms. - Under Watchdog, switch on Enable Watchdog and enter Time, Time Unit and Sensitivity.
- Under POUs Called by This Task, drag programs from the project tree onto the list or use Add POU.... Move Up and Move Down set the calling order, Remove from Task takes a call out.
Press Ctrl+S or Save to write the changes to the project. New Task... creates a task right away, and also the Task Configuration if the application has none. Rename Task... and Delete Task... are in the page, and in the right-click menu of a task. The device has its own limits, for example for the priority: compile the project to see what it refuses. New tasks and changes reach the device with the next download.
Symbols
Symbol Configuration in the project tree, in the right-click menu of an application or in the Command Palette decides which variables OPC UA clients and other clients can reach. If there is none yet, click Add Symbol Configuration.
- Expand a list and choose the access of a variable in the Access column. The choices stop at what the variable allows; Effective Access shows what applied at the last save.
- Set All... on a list sets all its variables at once. A variable that has its access set by an attribute in the declaration shows By attribute and cannot be changed here.
- Filter Variables searches names and types, Only Configured hides the rest, Show Library Variables adds the variables from libraries.
- For OPC UA switches the OPC UA features. Options opens the other options, such as comments and attributes in the symbols and direct I/O access. Direct I/O access is meant for debugging, for example to test cables and connections, not for productive operation.
The task and symbol pages belong to one application. If you open another project or use Save Project As while one of these pages has unsaved changes, Studio asks whether to save them first, and Cancel keeps you where you are. A page whose application is not in the newly opened project closes.
Save with Ctrl+S or Save. OPC UA clients see the change only after the next download to the device, and Studio reminds you of that. If the application has build errors, the page shows only the configured variables and their access cannot change until the errors are fixed.
Both pages can only save while you are logged out of the controller.
Devices and Fieldbus
The Devices view in the CODESYS sidebar shows the controller, fieldbuses, modules, slots and axes of the open project. Open it with CODESYS: Show Devices from the Command Palette, or right-click a device in the project tree and choose Device Parameters.
- Add Device... in the view title or the right-click menu of a device searches the catalog by name, vendor or category. Below a device it offers only what fits there. Studio suggests a name and saves the project right away.
- Plug Device... on an empty slot fills it, Unplug Device... empties it. Remove Device... deletes a device with everything below it after you confirm: its parameters, its mapping, its child devices and, on a controller, its application with all POUs and tasks.
- Update Device... changes to another version of the device from the catalog. Values you changed stay, default values follow the new version.
- Enable Device, Disable Device, Switch On Simulation and Switch Off Simulation change the state of a device.
Click a device to open its page. Parameters lists value, default, range, unit and type, grouped by connector, and Filter narrows the list. Press Save to write your changes to the project. Studio checks every value first and writes nothing if one is wrong. The top-level CODESYS Control Win device has no parameters of its own, its address is set under Communication Settings.
A new network device usually needs its network interface set before the project compiles: in the Ethernet device the parameter NetworkInterfaceName, in the EtherCAT Master the network name.
While you are logged in, Parameters has an Online column with the values on the device, and Refresh Online Values reads them again. Write... changes a value on the running device after you confirm it, the project stays as it is. A device can accept a value without using it. Studio then tells you the value the device reports. Changes to the project need a logout first.
SoftMotion axes appear in the same tree and are edited on the same page. A drive of a SoftMotion variant brings its axis with it, a virtual axis is added below the axis pool with Add Device....
Device Descriptions
Install Device Description... in the ... menu of the Devices view adds a device file (.devdesc.xml, .esi, .gsdml, .eds, .dcf) to the catalog. The device is then available in every CODESYS project on this computer, and an installed version of the same device is replaced. Remove Device Description... takes one away again. A description that came with CODESYS or a device package returns only by installing that package again. With Device Repository Folders... you add or remove folders of your own for such files.
Communication Settings
Communication Settings in the title of the Devices view chooses the controller the project connects to: pick the Gateway, then Find the Device by an IP Address, a Device Name or a Device Address. Scan Network... lists the devices the gateway can reach, which takes about ten seconds, and fills in the address of the one you choose. Press Save to keep the setting in the project. The next login goes to that device.
Compare Devices
The ... menu of the Devices view has two comparisons. Both only read.
- Compare Devices With Project... compares the device tree with another project file. The list shows changed devices first, then devices Only in This Project and Only on the Other Side, and for a changed device what differs, such as the version or whether it is enabled. A device renamed on one side shows as changed, with the name among the differences. A protected project asks for its password as when you open it.
- Compare Controller With Device in the Network... scans the network, lets you pick the controller and shows whether it is the device the project expects.
I/O Mapping
The I/O Mapping tab of a device lists its channels with direction and type.
- Under Variable, type a new name to create a variable, or the name of an existing one with the application in front, such as
Application.PLC_PRG.xRunor the array elementApplication.GVL_Machine.aInputs[3]. The field suggests variables of the project. A name that does not exist shows up when you compile. - Under Address, enter a manual address such as
%IW2, or leave the field empty for the automatic address shown in grey. - Include Child Devices adds the channels of the devices below.
- Bus Cycle and Stop Behaviour sets the Bus Cycle Task, what happens When the Application Stops, when variables are updated and whether I/O is updated while stopped.
Export I/O Mapping (CSV)... writes the mapping to a file in the CODESYS format. Import I/O Mapping (CSV)... reads such a file: rows with a variable replace the mapping of their channel, rows without one change nothing, and the file may hold only some of the channels. Only the variables are read, addresses in the file are not applied. If a row does not fit, nothing is imported and the message names the rows.
References and Search
Studio reads the whole project into an index of its own the first time you ask, and keeps it up to date as you work. Refresh Analysis in the References view reads the project again. While a project is open, Studio keeps a working copy of its sources on your computer, also for a protected project, and removes it when you close the project.
- Find References. Right-click an object in the project tree or a name in the code and choose Find References. The References view lists every place by object, marked Read, Write, Call, Type, Parameter or Declaration. Click a row to open it at that line. Places in Ladder, Function Block, CFC and SFC bodies name the element.
- Call hierarchy. Choose Show Call Hierarchy and pick Calls Made by or Callers of. Without a selected object, the view starts from the programs your tasks call. Blocks from libraries are marked Library.
- In the code. Go to Definition and Find All References work across objects, and suggestions offer the blocks, lists and data types of the whole project.
- Search in Project. Choose Search in Project from the ... menu of the CODESYS view, type your text and press Enter. Match case, whole word and regular expression are in the search box. Interface and Code choose declarations, implementations or both.
Finding Unused Objects
Choose Find Unused from the ... menu of the CODESYS view and click Find All Unused. Studio lists the POUs, data types and global variables that no task reaches, starting from the programs your tasks call. An entry also names the unused code that still uses it. A project without a task, such as a library, lists only objects that nothing refers to.
Studio does not read visualizations, alarms, traces, the symbol configuration, the I/O mapping or system event calls, so check an entry before you delete it. If a task calls a name Studio cannot find or an object cannot be read, the page says so, because the list is then incomplete. Find Unused needs the same plan as on TIA.
Renaming with References
Right-click an object or a name in the code and choose Rename with References..., then enter the new name. A name that is invalid or already taken is refused right there. The References view shows every line as it will read.
- Apply Rename changes all places in one step and saves the project once. If an object has changed since the preview, nothing is changed and you start again.
- A name that would make a place refer to another variable, for example a local variable of the same name, is refused and the place is named.
- Tasks that call the object follow the new name. The preview lists them under Task Calls.
- Places in Ladder Diagram, Function Block Diagram, Sequential Function Chart and Continuous Function Chart change too. The preview marks them with Graphical.
- Change by Hand lists what stays as it is: the same name in text Studio cannot assign to this object, and objects Studio could not read. Change or check these yourself, then compile.
- Visualizations, alarms, traces, the symbol configuration and the I/O mapping are not read and keep the old name. Check them after the rename.
- Save your open editors first. In the code, the cursor must be on a name.
- Methods and properties are renamed in their base types, derived types and interfaces too.
- You need to be logged out of the controller.
Exporting with Dependencies and Variables
- Export with Dependencies... in the right-click menu of an object exports it together with every data type, global variable list, interface and POU it needs.
- Export Variables... writes global variables with type, address, initial value and comment to a CSV file or an Excel workbook, for the selected list or for all lists.
Closing a Project
Use Close Project in the toolbar at the top of the CODESYS side bar to close the current project. You can then open a different one.
Commissioning, SCADA and Simulation
- Commissioning report: with a CODESYS project open, Collect Project Data in a commissioning report takes the title and author from the project information, the controller and devices from the device tree, the communication settings and one I/O point per input and output channel of the I/O mapping, with variable and address. If a TIA project is connected as well, Studio asks which project to use. Collect Online State needs a login to the controller and records its state; it only records into a report whose project data came from the open project, so open the project of the report first. Create Commissioning Report is also in the right-click menu of devices in the project tree and creates the report for the CODESYS project, also when a TIA project is connected.
- SCADA: right-click global variable lists or structures and choose Export as JSON to write a SCADA export file. In a SCADA project, Load From CODESYS Project... in the Signals view loads the global variable lists you pick as the signals of the project. The signals carry the OPC UA addresses of the CODESYS controller.
- Hardware simulation: connect an OPC UA source to the controller, for example
opc.tcp://localhost:4840for CODESYS Control Win on this computer.
A variable can be read and written over OPC UA only when the symbol configuration of the project publishes it and the project has been downloaded to the controller. The commissioning report, Export as JSON and the hardware simulation are available with Pro+; loading the signals into a SCADA project is included with Pro.
I/O From EPLAN
With an EPLAN project and a CODESYS project open, choose Take Over I/O From EPLAN... in the ... menu of the Devices view.
- Pick the EPLAN PLC, if the EPLAN project has more than one. A PLC station without a CPU name in EPLAN is listed under its station name and configuration project, marked "station without a CPU name". Stations whose names differ only in upper and lower case, or whose signals lack the configuration project in part, are listed apart and cannot be taken over until you give them distinct names, the configuration project or a CPU name in EPLAN.
- The list shows the cards of the PLC with their inputs, outputs and spare channels. Click a card to give it a device: a device already in the project, Add a Device From the Catalog... (choose the parent device, for example the fieldbus master, a free slot and the device) or No Device to leave its signals out. Then choose Continue With These Devices.
- Name the global variable list for the signals (
GVL_Eplanby default). Studio writes this list anew on every take-over, so do not put your own variables into it. A list of that name that Studio did not write stays as it is: the take-over stops without a change, and you choose another name. - Choose how signals meet channels: By Channel Order (the first input of the card goes to the first input channel of the device, spare channels counted) or By I/O Address (when the addresses in CODESYS already match EPLAN).
Studio first tries everything on the project and lists every change before you confirm: new devices, devices whose parameters change with the old and the new value, the variable list it creates or writes anew with its folder, and each channel mapping with the variable it replaces. If the project does not build with them, Studio names the errors and changes nothing. If nothing would change, Studio says so and asks nothing. After Take Over, it adds the devices, writes one variable per signal (named after the symbolic name, typed after the EPLAN data type or the address, with the EPLAN comment), maps the channels and saves. If the project changed after the preview, Studio changes nothing; start the take-over again. Signals without a valid address, with a name that gives no valid variable name or with a data type that is not elementary are left out and named.
Check I/O Against EPLAN compares the project with EPLAN again, with the cards of the last take-over, and lists every deviation: missing devices, another device type, variables missing or with another data type, channels not mapped, mapped differently or mapped only in CODESYS, and the signals not taken over. Studio remembers the cards and options per project. Available with Pro and the EPLAN feature of your plan.
Objects From Forge
Forge generates CODESYS code for block types that carry a CODESYS template: a program, function block, function or interface, a data type or a global variable list per node. After a build of the graph, choose Add Forge Build... in the ... menu of the CODESYS view (or Add Forge Build to Project... in the Command Palette) and pick the graph. Studio lists the objects and adds them to a folder named after the graph below the folder Forge. Objects of the same name and kind in this folder are replaced with the new code. If an object of the same name lies elsewhere in the application, Studio changes nothing. Studio saves the project only when it still builds and reports how many objects were added, replaced or left unchanged. Available with Pro and Forge.
Working with the AI
The AI in the chat can work with your connected CODESYS project. Just describe what you need in plain language and the AI carries out the right steps for you. For example, you can ask the AI to:
- Check the status: whether CODESYS is connected and whether a project is currently open.
- List the objects: the AI reads the object tree of the open project and tells you the applications, devices, folders, and program blocks in it.
- Read a block's code: the AI fetches a block's Structured Text code so it can explain it, summarize it, or answer your questions about it.
- Open a block in the editor: the AI opens the declaration or the implementation of an object in an editor tab so you have it right in front of you.
- Change a block's code: the AI replaces the declaration, the Structured Text implementation, or both, and saves the project. Ask it to compile afterwards and it checks its change right away.
- Compile the project: the AI compiles the open project, reads the errors and warnings and can correct the code it has changed.
- Export objects and import files: the AI writes selected objects as files into your export folder and brings files back into the project, also into a particular folder.
- Create, rename, move and delete objects: the AI adds programs, function blocks, methods and other objects, renames them, moves them into folders and deletes them.
- Compare with an export folder or another project: the AI compares the open project and tells you which objects differ, shows both versions and takes objects over into either project after you confirm. It never sees a project password.
- Exchange files: the AI exports in the format you set under Export Format; it cannot change that format. It imports PLCopenXML and native files and can replace the whole program from a folder after you have seen the preview.
- Text lists and image pools: the AI reads and changes them after you confirm.
- Go online: the AI logs in to the controller, tells you whether the application runs and whether it differs from the project, downloads or applies an online change, and starts, stops or resets the application. If the controller needs a password, Studio asks you for it; the AI never sees it.
- Read, write and force values: the AI reads the current values of variables while you are logged in, writes new values and forces or releases them.
- Save and archive the project: the AI saves the project under a new name, writes an archive and opens one. Studio asks you for any password itself.
- Read and change project data: the AI reads and changes the project information, the project settings and the build properties of an object.
- Set up tasks and symbols: the AI lists and changes the tasks of an application and the programs they call, and sets which variables OPC UA clients can reach. It tells you that a symbol change reaches the clients with the next download.
- Create and run unit tests: the AI creates a test suite for a function block or function, chooses whether it runs in the CODESYS simulation or on CODESYS Control Win on your computer, and runs it, also with coverage, runs mutation testing on CODESYS Control Win, and lists the blocks, global variables and data types the block uses.
Going online, scanning the network, changing the communication settings, reading, writing and forcing values, the unit tests, device users and log files, traces, watch lists, snapshots and CODESYS Control Win need the Pro+ plan in the chat as well; everything else in this list is included from the Pro plan.
Confirmation for Changing Actions
Every action that changes something asks for your confirmation before the AI runs it: opening a project, closing the project, saving under a new name, writing or opening an archive, changing the project information, settings and build properties, importing, exporting, changing a block's code, creating, renaming, moving and deleting an object, logging in, downloading, an online change, starting, stopping and resetting the application, writing, forcing and releasing values, and creating and running unit tests. The confirmation for a code change shows the new code before anything is saved, and the confirmation for writing or forcing lists every variable with its new value. Allow one once, for the session, or for good and it runs without asking from then on; the same applies when you let the chat approve tool calls for you. Decline the prompt and that call is cancelled. If an action should never run at all, switch its tool off in the chat tool picker. Read-only requests, such as checking status, listing objects, viewing code, compiling, comparing, asking for the online state and reading values, run without a prompt, and so does logging out.
What the AI Has Changed
When the AI changes objects, a row above the project tree counts them. Show lists the objects, and picking one takes you to it in the tree and opens it. Dismiss removes the row.
Graphical Objects with the AI
The AI reads graphical objects, changes them after you confirm the new document, and creates objects in the language you ask for. It can also show you an object in the graphical view or as XML.
The CODESYS Structured Text Specialist
For detailed Structured Text work, the AI hands the task to a dedicated CODESYS Structured Text specialist. It focuses on IEC 61131-3 and the CODESYS style rather than Siemens, so its answers fit your CODESYS project.
Libraries and Upgrades with the AI
The AI can read the references and the content of the libraries, so it uses the real inputs and outputs of a block. After you confirm, it can add and change references, declare instances, install libraries into the repository you name and upgrade the project. The confirmation shows the values, files and expected version changes.
Analysis and Rename with the AI
The AI answers from the same index: it lists the references of an object, follows the call hierarchy, finds unused objects, searches the project and reads the interface of an object, all without asking, because nothing changes. It renames with references after you confirm a card that names the places, the objects and what stays for you to change by hand, and it exports an object with its dependencies or global variables as CSV or Excel after you confirm.
Devices and I/O Mapping with the AI
The AI reads the device tree, the catalog, parameters, the I/O mapping and axes without asking. It adds, plugs, updates and removes devices, sets parameters, maps channels, exports and imports CSV files, installs device descriptions, changes the communication settings and writes values to a running device after you confirm a card that names the device, the values and the file. It scans through the gateways known on this computer without asking, because that changes nothing. A scan through another gateway address needs your confirmation. It accepts only files on a drive of this computer.
New Projects, Device Compare and Commissioning with the AI
After you confirm a card, the AI creates a new project at a path you named, with a controller from the catalog, and opens it. It never writes the open project, accepts only files on a drive of this computer and replaces an existing file only after you confirm a second dialog. If you log in to a controller while the project is created, the AI creates it but does not open it: log out, then open it. In one step it adds programs, function blocks, global variable lists, data types, tasks and library references to the open project; it saves only when everything was written and the project builds. The build checks only code that a task calls, so a program no task calls is saved even with errors: call it from a task or compile it. The AI compares devices without asking. It fills a commissioning report from the CODESYS project, reads the current values of the mapped I/O variables while you are logged in to check them with you, loads global variable lists into a SCADA project and suggests the mapped I/O variables for the hardware simulation.
EPLAN and Forge with the AI
The AI lists the PLCs, the stations without a CPU name and the cards of the EPLAN project and the deviations from the CODESYS project without asking. It can try a take-over without saving to show the real channels and build errors, and takes the I/O over after you confirm a card that lists the same changes as the dialog. When nothing would change or the project does not build, it shows no card and changes nothing. It adds the objects of a Forge build to the project after you confirm a card that lists each object with its kind, the folder and what happens to objects of the same name; if the build changes after you saw the card, nothing is added.
Project Security with the AI
The AI reads the project users, groups, rights and the protection without asking. After you confirm, it changes users, groups and rights, sets the protection and logs in or out. The AI never sees a password: Studio asks you for it in its own dialog, also when you allowed the action for good, and you should not type a password into the chat. When protection goes away, Studio asks you once more and names what you lose. It also asks once more before the AI gives an account without a password access: a new user, a removed password, a user who gets into the group Owner or gets the right to manage users, also through a nested group, or the right to manage users for the group Everyone. If who has access changed in the meantime, nothing is written. Save Project As by the AI never overwrites the open file, and Studio asks once more before a new file loses protection. When the AI opens a project, a login you remembered is not used: the project opens without a login, and the AI asks you to log in when it needs to. A change that would lock out the logged-in user is refused.
Device, Trace and Control Win with the AI
The AI compares the project with the device, shows the download preview, reads device information, users, log files, traces, watch lists and snapshots without asking. After you confirm a card, it uploads the project source to a file, downloads the source, creates the boot application, creates and runs traces, saves watch lists and snapshots, and starts or stops CODESYS Control Win; the Windows prompt for administrator rights stays with you. Changes to device users, starting, stopping or restarting CODESYS Control Win, restoring a snapshot, trusting a certificate, downloading the source and creating the boot application on the controller also show a Studio dialog that you must confirm, even when you allowed the action for good. Through the AI, Studio restores snapshots of at most 50 values, and both the card and the dialog list the values; restore a larger snapshot yourself with Restore Snapshot.... The AI never sees a password: Studio asks you for it itself. It cannot change or delete files on the controller.
What the AI Cannot Do Yet
- Read or change the instructions of Instruction List. The AI sees only the declaration and says so.
What Is Not Supported Yet
- Drawing graphical code. The graphical view is for reading. You change graphical code as a document with Open as XML.
- A drawing of Continuous Function Chart. Read and change it with Open as XML.
- Changing or creating Instruction List. Studio shows only its declaration; read the instructions in CODESYS.
- Editing visualizations, recipes and alarms. Studio exchanges and compares them as files; edit their content in CODESYS.
- Watching whole arrays or structures. The Watch view shows single values; add the elements or members you need.
Besides going online through CODESYS, you can also reach the published variables of a CODESYS controller through its OPC UA server in PLC / OPC UA / MQTT, without a CODESYS installation.
Notes
- CODESYS support works through the CODESYS installation on your own machine. It connects to a controller only when you or the AI, after your confirmation, log in, download or run unit tests, and only with the user and password you enter for that controller.
- Object names in CODESYS use plain ASCII identifiers; accented characters in names are rejected by CODESYS itself, while accented characters inside code content are preserved.
- Siemens-specific surfaces (Safety, HMI, Software Units) do not appear in the CODESYS view; they apply only to TIA Portal.