CODESYS FAQ
- 1 License
- 2 Runtime
- 2.1 I use Boolean accesses for I/O data, and unfortunately, it does not work as desired, what can I do?
- 2.2 Can I deactivate a CODESYS program?
- 2.3 I encountered an error with the KunbusIoDrvRevPiBridge library, “Unable to convert LWORD … “
- 2.4 I get a strange PiBridge error when trying to set up CODESYS, what am I doing wrong?
- 2.5 How can I read analog inputs of the RevPi Compact Module under CODESYS?
- 2.6 I have a RevPi Core S, which device in CODESYS I should choose?
- 2.7 I have a RevPi DIO and the channels above 8 are switched incorrectly, what can I do?
- 2.8 I notice that outputs flicker when operating with CODESYS, what can I do?
- 2.9 Would it be possible to use a Revolution Pi with CODESYS as a Real-Time Soft-PLC, with the CODESYS Soft-Motion-Bundle?
- 2.10 Would it be possible to use the CODESYS Control for Linux ARM SL runtime?
- 2.11 RevPi Connect 4 with CODESYS does not seem to work right away - what could be the reason?
- 2.12 I cannot see data of an I/O module via CODESYS – what can I do?
- 2.13 Would it be possible to implement a PROFIBUS master with a Revolution Pi module under CODESYS?
- 2.14 How could I point Revolution Pi IO as DWORD value?
- 2.15 How can I use the CODESYS Redundancy Configuration module?
- 2.16 What is a difference between Standard and Multicore CODESYS runtime?
- 2.17 Does Revolution PI hardware's support retain and persistence variables in CODESYS?
- 2.18 Is it possible with CODESYS runtime for raspberry MC to use WebVisu via Ethernet (web server) and Connect an HDMI monitor to RevPi and open a browser to show the Webvisu in kiosk like mode?
- 2.19 Does CODESYS override the configuration of PiCtory?
- 2.20 How can I configure a DIO module under CODESYS, is there a manual?
- 2.21 Would it be possible to run CODESYS in RevPi Core S?
- 2.22 How to order the devices in CODESYS
- 2.23 The outputs are behaving strangely in my application. What can be the cause of this.
- 2.24 Can we use simulation mode with CODESYS for RevPi without real hardware?
- 2.25 I would like to control the RS485 interface of the RevPi Connect under CODESYS.
- 2.26 I have a RevPi Connect with CODESYS. Now I would like to set up a Modbus master on the RS485 interface on the device. Do you have a tutorial for this?
- 2.27 I have a connection issue RevPi Connect+ MIO CODESYS, what can I do?
- 2.28 I am unable to install device configuration in CODESYS for RevPi DIO Module, What can I do?
- 2.29 I have an issue with my RevPi with CODESYS. We get the error message that a driver for the PiBridge is missing.
- 2.30 I am unable to find any option within CODESYS to set the parameters for Analog outputs. How can I configure it?
- 2.31 If I am using RevPi+CODESYS to control PROFINET slave, for example PROFINET IO, what is the fastest control cycle I can do?
- 2.32 The connection via CODESYS to my Revolution Pi device does not work.
- 2.33 Where can I find documentation about the Revolution Pi CODESYS library?
- 2.34 Can the CODESYS license of a RevPi Connect+ feat. CODESYS be transferred to another device?
- 2.35 Can RevPi S/SE install CODESYS runtime?
- 2.36 I would like to clone a RevPi Connect+ feat. CODESYS. What do I have to consider?
- 2.37 Would it be possible to install CODESYS on the RevPi Core device?
- 2.38 I get an error message when installing components such as “Revolution Pi Library for CODESYS” that access has been denied.
- 2.39 Is there please a tutorial on how to set the safety module in CODESYS?
- 2.40 The LEDs on the RevPi Connect are controlled, although my program does not use them, what can I do?
- 2.41 I get error messages that indicate version conflicts in CODESYS. What can I do?
- 2.42 I have purchased a RevPi feat. CODESYS. Now I lost the CODESYS license because I flashed the image, what can I do?
- 2.43 I get an error “Field bus lost synchronicity” with an EtherCAT master following
- 2.44 I get an error in the RevPi library when compiling. Even the code example does not work. How can this be, and what can I do?
- 2.45 I’m trying to use the RevPi with CODESYS, but I can’t communicate with it. Once I try to log in, after the download there’s a message that says, “Connection to device closed”.
- 2.46 The menu Update Raspberry Pi seems missing, what can I do?
- 2.47 I would like to use the WebVisu on an HDMI monitor, does that work?
- 2.48 How can I check or install a CODESYS License?
- 2.49 I do not see any information about the license in the license manager.
- 2.50 Is there a CODESYS support for the X2 input of the RevPi Connect devices and outputs? How?
- 2.51 Which RevPi products are supported in CODESYS with the “Revolution Pi library for CODESYS”?
- 2.52 I am getting errors when compiling my CODESYS project that originate from the Revolution Pi Library. What can I do?
- 2.53 How can I modify the CODESYS bus cycle task priority?
- 2.54 I can no longer log into CODESYS, what can I do?
- 2.55 I want to use the RevPi Con CAN Module with CODESYS to implement CANopen communication. However, things didn't go so smoothly. What can I do?
- 2.56 I have bought a RevPi Connect+ feat CODESYS and I would like to use it as a soft PLC and I would like to communicate with a sensor via CANopen. How can I implement something like this?
- 3 Docker
- 4 Is there a docker image of CODESYS runtime (“CODESYS Control for Raspberry Pi MC SL”)?
License
I have problems restoring a CODESYS license, what can I do?
Update the CODESYS runtime to 4.11.0.0.
I would like to try out CODESYS, do I need a license?
No, there is a demo mode that runs about 1 hour until the runtime is stopped - take a look at this FAQ:
Q: Why will the Raspberry Pi MC SL licenses be discontinued next year, but not Raspberry Pi SL
Where did the Raspberry Pi MC SL license go, or is there an alternative?
Take a look here at: Why will the Raspberry Pi MC SL licenses be discontinued next year, but not Raspberry Pi SL?
Which CODESYS license can I use for my Revolution Pi device?
CODESYS changed the license model for the start of 2024. The new application-based licenses apply to all CODESYS Control SL products. They are based on the software function used and no longer on the performance of the device. This means that the licenses can be used equally on all CODESYS Control SL-capable devices.
Division into performance classes
The function of a control system is largely determined by the software, whereas the hardware is responsible for providing the required resources. For this very reason, the application-based licenses no longer refer to the hardware, but to the software used in the IEC application.
For this purpose, all applications are divided into different performance classes based on suitable characteristics. Behind this are use cases that are covered. The limits of a class are derived from the use cases:
You can see more information here:
Runtime
I use Boolean accesses for I/O data, and unfortunately, it does not work as desired, what can I do?
Please switch to WORD access. Since version 1.3.0 of the Revolution Pi Library for CODESYS this access is no longer possible.
Can I deactivate a CODESYS program?
To restore your RevPi to a clean state, you can simply install a new image: https://revolutionpi.com/en/tutorials/images-2/safe-and-install-new-image-jessie-and-stretch
I encountered an error with the KunbusIoDrvRevPiBridge library, “Unable to convert LWORD … “
Please change the access in the project to WORD access. Alternatively, use the supplied example projects from the Revolution Pi Library for CODESYS.
Original discussion
I get a strange PiBridge error when trying to set up CODESYS, what am I doing wrong?
The actual error is shown on the right in the picture, it is because the PiCtory configuration could not be written:
Please follow the steps of the
Alternatively, you can switch to the 64-bit compatible version of the Revolution Pi Library for CODESYS V1.4.1.99 or higher.
Original discussion
How can I read analog inputs of the RevPi Compact Module under CODESYS?
I have a RevPi Core S, which device in CODESYS I should choose?
You should select RevPi Core 3.
I have a RevPi DIO and the channels above 8 are switched incorrectly, what can I do?
I notice that outputs flicker when operating with CODESYS, what can I do?
Create an https://kunbus-gmbh.atlassian.net/wiki/spaces/SUP/pages/2809364531 and check whether there are any entries in the codesyscontrol.log file:
AR consumer DHT expired
If this is the case, please contact the manufacturer of the bus device you are using and CODESYS Support
The firmware of a bus device may need to be updated
Would it be possible to use a Revolution Pi with CODESYS as a Real-Time Soft-PLC, with the CODESYS Soft-Motion-Bundle?
Here is a discussion
Would it be possible to use the CODESYS Control for Linux ARM SL runtime?
Yes, but in the form of a public beta
RevPi Connect 4 with CODESYS does not seem to work right away - what could be the reason?
The module is shipped with the 64 Bit image but currently, CODESYS does not deliver a 64 bit runtime.
Please use a 32 bit image and follow the steps from here:
Alternatively, use this:
I cannot see data of an I/O module via CODESYS – what can I do?
Disable CODESYS, connect an output to an input pin, and run the commands on the shell. See here: https://revolutionpi.com/forum/viewtopic.php?t=3920#p13994
Would it be possible to implement a PROFIBUS master with a Revolution Pi module under CODESYS?
Yes, this is technically possible, see here:https://de.codesys.com/produkte/codesys-fieldbus/profibus.html
How could I point Revolution Pi IO as DWORD value?
Another variable can be used for converting to the required type instead of direct mapping. This can then be called in Main task cyclically to update required RevPi I/O variables accordingly.
https://help.codesys.com/api-content/2/codesys/3.5.16.0/en/_cds_operator_convert_integer/
How can I use the CODESYS Redundancy Configuration module?
There are discussions about this in the Revolution Pi forum
What is a difference between Standard and Multicore CODESYS runtime?
The Multi Core version uses all cores of the processor.
https://store.codesys.com/en/codesys-control-for-raspberry-pi-mc-sl.html
Does Revolution PI hardware's support retain and persistence variables in CODESYS?
Retain Persistent variable is not supported with RevPi since it requires a separate EEPROM interface to store the variables.
As a workaround, the variable status could be saved to a file and read again on startup.
Write and Read File using CODESYS
https://forge.codesys.com/forge/talk/Engineering/thread/d5550f2e37/
Is it possible with CODESYS runtime for raspberry MC to use WebVisu via Ethernet (web server) and Connect an HDMI monitor to RevPi and open a browser to show the Webvisu in kiosk like mode?
CODESYS runtime for raspberry MC supports webvisu on RevPi devices. The default browser on RevPi device could be used with webvisu with an HDMI connection; however, you will have to look out if some functionalities are not curtailed in that browser. CODESYS Target visu works well with remote browser, but may have limitations with inbuilt browser. I suggest you also to install the Chrome browser on RevPi if you have issues with the inbuilt browser.
You can perhaps check on CODESYS webvisu forum for possible solution or post a query on the CODESYS forum.
Does CODESYS override the configuration of PiCtory?
Yes, that's right. If you use CODESYS, this is the leading system.
How can I configure a DIO module under CODESYS, is there a manual?
Yes, look here at the example Blinking Light
https://revolutionpi.com/tutorials/beispiel-blinking-light-2-2/
Would it be possible to run CODESYS in RevPi Core S?
Currently, there is no RevPi Core S as an option in the hardware selection of CODESYS, but you can select RevPi Core 3. The Core S is 100% compatible with the Core 3, so it is sufficient if you select the Core 3 in CODESYS.
How to order the devices in CODESYS
In the following video, you can see how the devices are to be arranged in CODESYS.
Sort device arrangement
The outputs are behaving strangely in my application. What can be the cause of this.
Please verify the execution sequence.
https://revolutionpi.de/forum/viewtopic.php?f=6&t=2711#p10016
Can we use simulation mode with CODESYS for RevPi without real hardware?
The simulation mode in CODESYS for the Revolution Pi is not supported.
I would like to control the RS485 interface of the RevPi Connect under CODESYS.
Edit the file “/etc/codesyscontrol.cfg” to set the value “/dev/ttyRS48” (without 5!). Then in CODESYS set the RS485 to port 6.
I have a RevPi Connect with CODESYS. Now I would like to set up a Modbus master on the RS485 interface on the device. Do you have a tutorial for this?
https://revolutionpi.com/tutorials/beispiel-modbustcp-rtu-master-2-2/?noredirect=en_US
I have a connection issue RevPi Connect+ MIO CODESYS, what can I do?
Please follow the instructions in the Forum: Verbindungsprobleme RevPi Connect + mit CODESYS - Revolution Pi Forum
I am unable to install device configuration in CODESYS for RevPi DIO Module, What can I do?
There is an example in Forum: unable to install device configuration in CODESYS for RevPi DIO Module - Revolution Pi Forum
I have an issue with my RevPi with CODESYS. We get the error message that a driver for the PiBridge is missing.
Always place the RevPi device at the root of the CODESYS device tree.
For example:
The RevPi device should be placed at the root of the device (CODESYS Control for Raspberry Pi MC SL) in the CODESYS device tree. Other devices such as Ethernet (see image below) should be placed after the basic RevPi device (Core/Connect/Compact/Flat) in the CODESYS device tree.
I am unable to find any option within CODESYS to set the parameters for Analog outputs. How can I configure it?
To configure the Analog outputs, you must log into PiCtory and make the changes there.
https://revolutionpi.de/forum/viewtopic.php?t=3377
If I am using RevPi+CODESYS to control PROFINET slave, for example PROFINET IO, what is the fastest control cycle I can do?
The default PROFINET IO task cycle in the CODESYS control for the Raspberry Pi MC runtime is 1 ms.
This is the recommended task cycle. Faster task cycles below 1 ms may cause PROFINET communication errors.
The connection via CODESYS to my Revolution Pi device does not work.
This error message appears:
There may be a problem with the user management:
Reinstall the CODESYS runtime environment on Revolution Pi Connect.
Check the configured gateway in the Devices→Communication Settings tab.
Click Scan Network and select the RevPi CODESYS device found and click the OK button.
The first time you log in, you will be asked again to configure username and password,
then try to go online again.
Please install a suitable version of https://store.codesys.com/codesys-control-for-raspberry-pi-mc-sl.html the CODESYS Runtime
Where can I find documentation about the Revolution Pi CODESYS library?
Please look at your PC under your administrator profile for this file:
C:\Users\[USERNAME]\Revolution Pi\Help\RevPi CodesysLibHelp.chm
Can the CODESYS license of a RevPi Connect+ feat. CODESYS be transferred to another device?
No, the license is bound to the device.
Can RevPi S/SE install CODESYS runtime?
Yes, the RevPi S / SE will be compatible with the upcoming CODESYS Release.
I would like to clone a RevPi Connect+ feat. CODESYS. What do I have to consider?
You have to buy a new license for the target device.
Would it be possible to install CODESYS on the RevPi Core device?
No, it is not possible
https://revolutionpi.de/forum/viewtopic.php?f=49&t=3016
I get an error message when installing components such as “Revolution Pi Library for CODESYS” that access has been denied.
Run your application as administrator
https://revolutionpi.de/forum/viewtopic.php?f=49&t=3138#p11167
https://forge.codesys.com/forge/talk/Engineering/thread/cef51eb0d0/
Is there please a tutorial on how to set the safety module in CODESYS?
There is a module from CODESYS, see here:
https://de.codesys.com/produkte/codesys-safety/safety-sil2.html
Please contact the support and the community of CODESYS. Original discussion:
https://revolutionpi.de/forum/viewtopic.php?f=4&t=3068
The LEDs on the RevPi Connect are controlled, although my program does not use them, what can I do?
This issue has been reported here https://revolutionpi.de/forum/viewtopic.php?f=6&t=3023#p10839
Please disable the GPIO’s in the CODESYS device tree like so:
I get error messages that indicate version conflicts in CODESYS. What can I do?
There may be several reasons for this. Please look at the following article:
Codesys Resolving Version Conflicts
I have purchased a RevPi feat. CODESYS. Now I lost the CODESYS license because I flashed the image, what can I do?
Please send us the following information to support@kunbus.com
Your invoice copy
Serial number of the device. You can find this information here.
We will restore your CODESYS license. Take a look here about the license import handling:
https://www.codesys.com/the-system/licensing.html
I get an error “Field bus lost synchronicity” with an EtherCAT master following
After a random time, the EtherCAT stops working and the log shows this error “Field bus lost synchronicity”.
Please look at the following post on our forum:
https://revolutionpi.de/forum/viewtopic.php?f=6&t=3007#p10748
I get an error in the RevPi library when compiling. Even the code example does not work. How can this be, and what can I do?
Here is a typical error message:
The problem occurs with older CODESYS project when trying to use this project in a new CODESYS Runtime version. For Example, load the project from CODESYS 3.5.16.0 to 3.5.17.0. The solution to this is to rebuild the project with 3.5.17.0 and reconfigure the CODESYS device tree as in the previous project.
In the next version of the CODESYS Revolution Pi Package, the examples will default to CODESYS Runtime V3.5.17.0.
Here already in advance the modified examples for download:
I’m trying to use the RevPi with CODESYS, but I can’t communicate with it. Once I try to log in, after the download there’s a message that says, “Connection to device closed”.
There might be some Application code in CODESYS, breaking the SSH connection.
The CODESYS control runtime might be getting stopped when the application is downloaded.
Try initially by downloading an empty CODESYS application to see if the problem exists
The menu Update Raspberry Pi seems missing, what can I do?
CODESYS menu entry "Update Raspberry Pi" missing
I would like to use the WebVisu on an HDMI monitor, does that work?
Yes, this works – check out the included tutorials, e.g. the traffic light. These are installed in the form of a Windows help file together with the RevPi CODESYS Library. Also, take a look at these helpful links:
How can I check or install a CODESYS License?
I do not see any information about the license in the license manager.
There is a message with green: license available, yellow license available but invalid and red no license. Does not show any of the three icons for the product.
https://revolutionpi.de/forum/viewtopic.php?f=8&t=2983#p10851
Is there a CODESYS support for the X2 input of the RevPi Connect devices and outputs? How?
Yes, you just have to download the Revolution Pi Library for CODESYS.
Together with the instructions on the page, you can make a configuration for your expansion modules.
This way you can also access the X2 input. Take a look at the help file in CODESYS after you have installed everything. There you will find more interesting code examples that can support you during commissioning.
Which RevPi products are supported in CODESYS with the “Revolution Pi library for CODESYS”?
I am getting errors when compiling my CODESYS project that originate from the Revolution Pi Library. What can I do?
Please update the Revolution Pi Library. You can find it in the Downloads section, see here:
https://revolution.kunbus.com/tutorials/downloads/?noredirect=en_US#driver
How can I modify the CODESYS bus cycle task priority?
I can no longer log into CODESYS, what can I do?
Verify which CODESYS control for Raspberry Pi is installed on RevPi Connect
Go To Tools → update Raspberry Pi
enter username password, IP address and click System infoThis version should be the same as the one configured in CODESYS application project in IDE.
For first login, CODESYS user management asks for configuring user/password. If that was not asked, uninstall CODESYS runtime on RevPi Connect and install it again.
(Same version as the one configured in CODESYS project)
Installing CODESYS Runtime
https://revolutionpi.com/codesys-runtime-installieren-3/If login does not work, try disabling user management.
Edit /etc/CODESYSControl_User.cfg and add the following:[CmpSecureChannel] CertificateHash=5ab21d81c63a48b3410f1f3e95bd463645986590 SECURITY.CommunicationMode=PLAIN_AND_ENCRYPTED
[CmpUserMgr] AsymmetricAuthKey=c6c2a088595c3fe17cf23ff5705a134b3e9cff9f SECURITY.UserMgmtEnforce=NO
Save and exit. Restart CODESYS control or do a system reboot
sudo systemctl codesyscontrol restart
Install new Image
I want to use the RevPi Con CAN Module with CODESYS to implement CANopen communication. However, things didn't go so smoothly. What can I do?
https://revolutionpi.de/forum/viewtopic.php?f=3&t=2655#p9747
I have bought a RevPi Connect+ feat CODESYS and I would like to use it as a soft PLC and I would like to communicate with a sensor via CANopen. How can I implement something like this?
You can use a https://revolutionpi.de/shop/de/canbus-module module for your project to read and process sensor values: See here for details about this module:
There is also a constructive discussion here:
Docker
Is there a docker image of CODESYS runtime (“CODESYS Control for Raspberry Pi MC SL”)?
Docker image on Docker Hub that might be interesting. You can find it at the following link: https://hub.docker.com/r/hilschernetpi/netpi-codesys-basis.