CoDeSys (Controller Development System) is the widest-spread IEC 61131-3 development tool in Europe for industrial automation technology developed by Smart Software Solutions (3S). Basically it consists of two parts:
the programming system
CoDeSys on the PC (downloadable for free after registration at
3S download link) and
-
The runtime system turns any device into an IEC 61131-3 controller programmable with CoDeSys.
Integrated compilers make sure that the program code is processed with optimal speed.
The camera supports the programming system 2.3.x and NOT version 3.x.
ATTENTION: The camera DOES NOT support retain variables itself because of performance reasons, but you can access the FRAM using functions from the Festo_System.lib
.
-
-
-
Furthermore you can also check the state of your CoDeSys license with
/ffx/codesys $ ./check_codesys_license
license ok
/ffx/codesys $
-
download the actual
TSP at
link and unpack it to a temporary directory
choose the program
InstallTarget
from the
CoDeSys tree

in the next dialogue choose Open
choose the correct
TSP selecting the
*.tnf
file
adapt the path section, where the
TSP should be installed
select the target on the left and choose Install
accept creation of the new target directory if not existing
⇒ Now the new target should be found at the right panel side
remove the whole temporary directory
The following example implements a binary counter for the camera outputs with an outputchange intervall of 500 milliseconds
create a new file with [File]/[New]
as configuration choose the Festo SBOx-C → OK → OK
now enter
OUT_ALL := OUT_ALL + 1;
don't forget the semicolon at the end of the line!!
add a cyclic task at tab Ressurces
→ Task configuration
right click → add task
right click on task clock → add program → button … → PLC_PRG();
left click NewTask → on interval enter t#500ms
[Online]/[Communication parameters…] → New → Your_Cam → OK
doubleclick at localhost
enter the camera's
IP (i.g.
192.168.2.10
) and
push RETURN key (ESSENTIAL or your new settings would not be stored) → OK
[Online]/[Login]
Q: Using the oscat library together with Util.lib generates an “Error 3700: A POU with name 'BCD_TO_INT' is already in Util.lib”.
A: The oscat library also implements the BCD-conversion functions.
You have to decide which implementation you want to use and exclude the other one from the build process:
At [Projects]/[Options]/[Build]
→[Exclude objects…]
select the unwanted BCD_TO_INT
and INT_TO_BCD
functions and activate the Exclude
option box.
As a result the unwanted implementation should be green.
Q: How to create a selfstarting bootproject?
A: There aer two possible ways:
Option 1:
activate the following option boxes at tab General of Target Settings
- Download as file
- Download symbolfile
- Load bootproject automatically
go Online [Online] / [Login]
start the application [Online] / [Run]
go Offline [Online] / [Logout]
After reboot the bootproject will be loaded automatically and started (because we logged out during RUNphase)!
Option 2:
Go Online [Online] / [Login]
Start the application [Online] / [Run]
Create a bootproject [Online] / [Create boot project]
Go Offline [Online] / [Logout]
After reboot the bootproject will be loaded automatically and started (because we logged out during RUNphase)!