Codesys 3.5 - Creating a New PLC Project
A Project houses all programs, devices and configurations that make up your end solution for your system.
Should your system consist of many PLCs, you can have a single project with multiple PLCs based inside, however it is usually best practice to have a separate project per PLC and/or HMI, although not in all cases.
A project can be created in CoDeSys in three ways:
- Click the New Project icon on the tool bar
- Click File >> New Project (Ctrl + N)
- Click “New Project” from the start page
The above screen will be presented
From here, an empty project can be created or some templates can be used to create a pre-populated project. (For the purpose of this lesson, only the Empty Project option will be used).
Once a new Empty Project has been created, the main development environment will be loaded.
Note that the only object added to the Devices Navigation pane on the left of the screen is “Untitled 1” (or the name of your project when you created it). This is the topmost object, everything that is created in your application will be a child of this object.
The next step to creating your project is to add a device. For the purposes of this lesson, we will be using a “CODESYS Control Win V3” PLC.
To add a device:
- Right click on your project in the Device Navigation pane and select “Add Device”
- The “Add Device” screen will open, expand the PLC selection and choose “CODESYS Control Win V3”
- Click “Add Device” to add it to your project, click “Close” to close the selection window
Your Device Navigation pane should now look something like this
A PLC has now been added to the project and some new child objects have been added to the PLC automatically.
- PLC Logic
- A placeholder, this object does nothing but act as the link between the device and the software application
- Application
- The topmost object for your software, all software components are a child of this object
- Library Manager
- This object manages all libraries that are available to your application. A library is a collection of pre-made functions, function blocks or programs that can be used in your main application. A library may be locked and require a password to view or edit. Libraries can also contain references to other libraries and you can even make your own.
This current project setup serves as the basis of almost all PLC applications. You currently have a PLC device, an Application Manager and a Library Manager. You can now start to develop your code modules, known as a POU – Program Organisation Unit.
Your new project structure is now complete in its most basic form.