Failed to insert library codesys

Topics about the Software of Revolution Pi
Jk#312
Posts: 8
Joined: 03 Nov 2020, 16:44

Failed to insert library codesys

Post by Jk#312 »

hello,

I am new to this forum and working with the Revpi is also a new challenge.

For a school project I want to use the kunbus Revpi core 3 with codesys. Now I have gone through the tutorial on the website to set up codesys.

However, I get the following error message
Failed to insert library IoDrvGPIO, 3.5.16.20

Can someone help me how to fix this error message in order to use codeys for my project?

Best regards,
Jeroen
Attachments
Error message codesys.JPG
Error message codesys.JPG (34.14 KiB) Viewed 11559 times
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: Failed to insert library codesys

Post by dirk »

Hi Jk#312, thank you for your message. Well this is a known problem here and you need an update of the Codesys RevPiLib. It is a pre-release as we are in discussions about some license issues. I'll contact you via PN.
Jk#312
Posts: 8
Joined: 03 Nov 2020, 16:44

Re: Failed to insert library codesys

Post by Jk#312 »

Hi Dirk,

I could not download the file it has error 404 I have tried it a copple of times. But the download link never worked.
Sorry for the late reply I had a very bussy time at school.

Hopefully you could help me again.

Greets
Jeroen
User avatar
Amar
KUNBUS
Posts: 160
Joined: 15 Jul 2019, 12:58

Re: Failed to insert library codesys

Post by Amar »

Hi,
You can try with our current beta version Codesys Package for RevPi Family-
RevolutionPiBridgeV1.0.1.99
The version is not yet released on Revolution Pi Website

https://kunbusgmbh-my.sharepoint.com/:u ... w?e=ZfalcF

Regards,
Amar
KUNBUS
Jk#312
Posts: 8
Joined: 03 Nov 2020, 16:44

Re: Failed to insert library codesys

Post by Jk#312 »

Hello Anwar,

Thank you for the reply.

But when I download the file and go to codesys to package manager and install it and try it again codesys is reporting that the file is installed. So when I then build our programm codesys shows the error message below.

Is there something wrong with our programm or did I install the file wrong?
I don't know where to look to repair these error message for our school project

Best regards,

Jk#312


----- Build started: Application: CODESYS_Control_for_Raspberry_Pi_SL.Application -------
typify code ...

[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_OUT: C0077: Unknown type: 'CmpCharDevice.RTS_IEC_HANDLE'
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_IN: C0077: Unknown type: 'CmpCharDevice.RTS_IEC_HANDLE'
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_OUT: C0032: Cannot convert type 'POINTER TO BYTE' to type 'CmpCharDevice.RTS_IEC_HANDLE'
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_OUT: C0231: Expression of type 'BOOL' expected in this place
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_OUT: C0077: Unknown type: 'CmpCharDevice.RTS_INVALID_HANDLE'
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_OUT: C0063: 'cmpchardevice, 3.5.16.0 (3s - smart software solutions gmbh)' contains no definition for 'RTS_INVALID_HANDLE'
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_OUT: C0032: Cannot convert type 'CmpCharDevice.RTS_IEC_HANDLE' to type 'POINTER TO BYTE'
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_OUT: C0032: Cannot convert type 'CmpCharDevice.RTS_IEC_HANDLE' to type 'POINTER TO BYTE'
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_IN: C0032: Cannot convert type 'POINTER TO BYTE' to type 'CmpCharDevice.RTS_IEC_HANDLE'
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_IN: C0231: Expression of type 'BOOL' expected in this place
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_IN: C0077: Unknown type: 'CmpCharDevice.RTS_INVALID_HANDLE'
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_IN: C0063: 'cmpchardevice, 3.5.16.0 (3s - smart software solutions gmbh)' contains no definition for 'RTS_INVALID_HANDLE'
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_IN: C0032: Cannot convert type 'CmpCharDevice.RTS_IEC_HANDLE' to type 'POINTER TO BYTE'
[ERROR] revolution pi io module interface, 3.0.0.0 (kunbus gmbh): REVPI_CPI_IN: C0032: Cannot convert type 'CmpCharDevice.RTS_IEC_HANDLE' to type 'POINTER TO BYTE'
Compile complete -- 14 errors, 5 warnings
User avatar
Amar
KUNBUS
Posts: 160
Joined: 15 Jul 2019, 12:58

Re: Failed to insert library codesys

Post by Amar »

Hi,
You are using the old library which is not compatible with codesys 3.5.16.0 (CmpCharDevice interface library of codesys is changed in this version).
Please use the newer package which I had send you in previous link. Refer to the CHM help file and the examples folder. You then need to migrate your old project to the newer project created from this Package library for RevPi.
KUNBUS
Jk#312
Posts: 8
Joined: 03 Nov 2020, 16:44

Re: Failed to insert library codesys

Post by Jk#312 »

Hi,

So when I start up codesys it says 3.5 v10 so I need to download the latest version of codesys on the website from codesys?
And where can I find the CHM help file there is only a package file and when I open this my codesys crashed.

Best regards,

Jk#312
User avatar
Amar
KUNBUS
Posts: 160
Joined: 15 Jul 2019, 12:58

Re: Failed to insert library codesys

Post by Amar »

Prerequisites:

1) CODESYS Development System V3
Version: 3.5.16.0 or higher

You are using a older codesys version .You can download recent CODESYS Development System V3
https://store.codesys.com/codesys.html
Version: 3.5.16.30

2) CODESYS Control for Raspberry Pi SL/MC: 3.5.16.0 or higher
https://store.codesys.com/softplc/codes ... pi-sl.html

3) Revolution Pi Codesys package - RevolutionPiBridge : RevolutionPiBridgeV1.0.1.99

4) Image: Stretch 06/2020 for RevPi Core, Connect and Compact or later

Download Link:
https://revolution.kunbus.de/shop/de/stretch

You could otherwise upgrade your current image on your RevPi device as below:
sudo apt-get update && sudo apt-get uppgrade && sudo reboot

To verify the upgrade check the kernel version as following:
$ uname -a
Linux RevPi17643 4.19.95-rt38-v7 #1 SMP PREEMPT RT Tue, 03 Nov 2020 10:05:20 +0100 armv7l GNU/Linux


First install CODESYS Development System V3 .Then install RevolutionPiBridgeV1.0.1.99 Package and during installation it shall show you the folder option for RevPi CHM help file and Examples.
KUNBUS
Jk#312
Posts: 8
Joined: 03 Nov 2020, 16:44

Re: Failed to insert library codesys

Post by Jk#312 »

Hi Amar,

Thank you for the great support.
I have downloaded a new version of Codesys with your Revpi package and it works again without any error.

But I have one other question.

We are currently with the revpi core 3 working on a school project.
And we need to control the conveyorbelt with a frequency generator.

So the question is: How can we setup the revpi as a master and a frequency generator as a slave over the Modbus RTU protocol in Codesys?
Do you have any information about that?

We have a rs485 connector to usb
We have a invertek E3 IP 20 frequency generator that works with MODBUS RTU.

Hopefully you could help me again.

Best regards,

JK#312
User avatar
Amar
KUNBUS
Posts: 160
Joined: 15 Jul 2019, 12:58

Re: Failed to insert library codesys

Post by Amar »

Hi,
Good to here that you proceeded further. You can refer to ModbusTCP-RTU-Master Example .You basically need to set up Codesys Modbus RTU Master in Codesys and you can control the invertek E3 Drive Modbus RTU slave.
Refer to the documentation for setting up your RS485 USB adapter to be used with RevPiCore 3.

Short Summary
For RevPi Connect or Core: Configuring MODBUS RTU port

Add following line in /etc/CODESYSControl.cfg
[SysCom]
Linux.Devicefile=/dev/ttyUSB

Regards,
Amar
KUNBUS
Post Reply