MIO module driver not found by CODESYS

Topics about the Software of Revolution Pi
Purecade
Posts: 64
Joined: 07 Sep 2021, 03:39

MIO module driver not found by CODESYS

Post by Purecade »

Hello,

I'm having a hard time with CODESYS, I can't get the data from the DI channel of the MIO module or control the DO channel.
I have configured the Connect S module and the MIO module in PiCtory and have used the piTest -d command to confirm that my configuration is successful!

Code: Select all

root@RevPi87223:/home/pi# piTest -d
Found 2 devices:

Address: 0 module type: 105 (0x69) RevPi Connect V1.0
Module is present
     input offset: 117 length: 6
    output offset: 123 length: 5

Address: 31 module type: 118 (0x76) RevPi MIO V1.0
Module is present
     input offset: 0 length: 34
    output offset: 34 length: 27
However, when I use CODESYS to call the MIO module, it tells me that "no driver found", I don't know why?

Looking forward to your answers!
Best regards,
Cade
Attachments
企业微信截图_16933782906553.png
企业微信截图_16933782906553.png (115.44 KiB) Viewed 9917 times
u.biakoup
Posts: 212
Joined: 14 Apr 2022, 13:04

Re: MIO module driver not found by CODESYS

Post by u.biakoup »

Hello Purecade,
Thank you, joining our forum regarding your issue "MIO module driver not found by CODESYS".
I recommand you first to follow the steps of the CODESYS CHECKLIST.

Best Regards,

Ulrich Kouatang Biakoup | Technical Support
User avatar
Amar
KUNBUS
Posts: 160
Joined: 15 Jul 2019, 12:58

Re: MIO module driver not found by CODESYS

Post by Amar »

Perhaps you have not configured the PlaceholderFilePath for pictory in /etc/CODESYSControl_User.cfg.
A config.rsc is not being created in that case.

Refer release notes RevolutionPiBridgeV1.4.0.0
In the Revolution Pi Library for Codesys, file write access under the following folder, /etc/revpi/, is required in order to create a config.rsc file based on devices configured in the CODESYS application project. The CODESYS project using the KUNBUS RevolutionPiBridge IO library creates a configuration file /etc/revpi/config.rsc, which is basically the PiCtory file /var/www/revpi/pictory/projects/_config.rsc.

Customers using Revolution Pi CODESYS devices will therefore have to manually configure PlaceholderFilePath in /etc/CODESYSControl_User.cfg as mentioned below.

Code: Select all

[SysFile]
PlaceholderFilePath.1=/etc/revpi, $configrsc$
Restart CODESYS Control in order to load the new changes from /etc/CODESYSControl_User.cfg.
Alternatively, you could reboot the device, and the changes will be automatically loaded from the user configuration file at the start of CODESYS Control.

Code: Select all

sudo service codesyscontrol restart

Regards, Amar
KUNBUS
Purecade
Posts: 64
Joined: 07 Sep 2021, 03:39

Re: MIO module driver not found by CODESYS

Post by Purecade »

Amar wrote: 30 Aug 2023, 15:56 Perhaps you have not configured the PlaceholderFilePath for pictory in /etc/CODESYSControl_User.cfg.
A config.rsc is not being created in that case.

Refer release notes RevolutionPiBridgeV1.4.0.0
In the Revolution Pi Library for Codesys, file write access under the following folder, /etc/revpi/, is required in order to create a config.rsc file based on devices configured in the CODESYS application project. The CODESYS project using the KUNBUS RevolutionPiBridge IO library creates a configuration file /etc/revpi/config.rsc, which is basically the PiCtory file /var/www/revpi/pictory/projects/_config.rsc.

Customers using Revolution Pi CODESYS devices will therefore have to manually configure PlaceholderFilePath in /etc/CODESYSControl_User.cfg as mentioned below.

Code: Select all

[SysFile]
PlaceholderFilePath.1=/etc/revpi, $configrsc$
Restart CODESYS Control in order to load the new changes from /etc/CODESYSControl_User.cfg.
Alternatively, you could reboot the device, and the changes will be automatically loaded from the user configuration file at the start of CODESYS Control.

Code: Select all

sudo service codesyscontrol restart

Regards, Amar
Hello Amar,

Hi, as I understand it, it's because the CODESYS file about the IO module is not complete. I need to modify the configuration of /etc/CODESYSControl_User.cfg to add the code:

Code: Select all

[SysFile]
PlaceholderFilePath.1=/etc/revpi, $configrsc$
Then reboot the device. This should work fine, right?

Best regards,
Cade
Purecade
Posts: 64
Joined: 07 Sep 2021, 03:39

Re: MIO module driver not found by CODESYS

Post by Purecade »

Amar wrote: 30 Aug 2023, 15:56 Perhaps you have not configured the PlaceholderFilePath for pictory in /etc/CODESYSControl_User.cfg.
A config.rsc is not being created in that case.

Refer release notes RevolutionPiBridgeV1.4.0.0
In the Revolution Pi Library for Codesys, file write access under the following folder, /etc/revpi/, is required in order to create a config.rsc file based on devices configured in the CODESYS application project. The CODESYS project using the KUNBUS RevolutionPiBridge IO library creates a configuration file /etc/revpi/config.rsc, which is basically the PiCtory file /var/www/revpi/pictory/projects/_config.rsc.

Customers using Revolution Pi CODESYS devices will therefore have to manually configure PlaceholderFilePath in /etc/CODESYSControl_User.cfg as mentioned below.

Code: Select all

[SysFile]
PlaceholderFilePath.1=/etc/revpi, $configrsc$
Restart CODESYS Control in order to load the new changes from /etc/CODESYSControl_User.cfg.
Alternatively, you could reboot the device, and the changes will be automatically loaded from the user configuration file at the start of CODESYS Control.

Code: Select all

sudo service codesyscontrol restart

Regards, Amar
Hello Amar,
According to your guide, I solved the CODESYS error reporting problem. However, I am still not able to use the MIO module.The digital channel 1 and digital channel 2 of the MIO module are connected to two photoelectric switches, but I am not able to monitor the status change either through SSH or CODESYS.I am operating according to this link:https://revolutionpi.com/tutorials/digi ... gurieren-2. I would like to know where I am going wrong.

Code: Select all

root@RevPi87223:/home/pi# piTest -r DigitalInput_0_1
Bit value: 0
Bit value: 0
Bit value: 0
Bit value: 0
Bit value: 0
Bit value: 0
Bit value: 0
Bit value: 0
Best regards,
Cade
Attachments
企业微信截图_16934757562144.png
企业微信截图_16934757562144.png (9.12 KiB) Viewed 9771 times
企业微信截图_1693475742172.png
企业微信截图_1693475742172.png (18.99 KiB) Viewed 9771 times
u.biakoup
Posts: 212
Joined: 14 Apr 2022, 13:04

Re: MIO module driver not found by CODESYS

Post by u.biakoup »

Hallo Cade,
Please note that you won't be able to monitor the values of the digital channels with PiTest (using your PiCtory configuration) when CODESYS is in use. It's important to understand that you cannot simultaneously utilize both PiTest and CODESYS for this purpose. The CODESYS configuration takes precedence and overrides the PiCtory configuration. To monitor the status changes of the digital channels, you must configure the MIO Module within CODESYS. Specifically, the two switches connected to digital channel 1 and digital channel 2 need to be configured in the 'Revolution PI MIO Module Parameter' section of CODESYS. You can refer to the picture 1.
Image
You need to assign variable names that will be used in your PLC program within the 'Revolution PI MIO Module E/A-Abbild' menu, as illustrated in the picture 2.
Image
To monitor the channel's status changes, you need to create a PLC program using the declared variables. You can refer to the example shown in the picture 3.
Image
If the switches are correctly connected to digital channels 1 and 2, you should now be able to monitor the changes in the channels. Please refer to the picture 4.
Image

I hope this will help you.
Best Regards

Ulrich Kouatang Biakoup | Technical Support
Attachments
picture 4
picture 4
2023-09-08 16_52_53-MIO.project - CODESYS.png (151.53 KiB) Viewed 9332 times
picture 3
picture 3
2023-09-08 16_48_09-MIO.project - CODESYS.png (106.53 KiB) Viewed 9332 times
picture 2
picture 2
2023-09-08 16_46_25-MIO.project - CODESYS.png (216.24 KiB) Viewed 9332 times
picture 1
picture 1
2023-09-08 16_05_00-RevPiCodesysLibHelp.png (265.68 KiB) Viewed 9332 times
Purecade
Posts: 64
Joined: 07 Sep 2021, 03:39

Re: MIO module driver not found by CODESYS

Post by Purecade »

u.biakoup wrote: 08 Sep 2023, 17:04 Hallo Cade,
Please note that you won't be able to monitor the values of the digital channels with PiTest (using your PiCtory configuration) when CODESYS is in use. It's important to understand that you cannot simultaneously utilize both PiTest and CODESYS for this purpose. The CODESYS configuration takes precedence and overrides the PiCtory configuration. To monitor the status changes of the digital channels, you must configure the MIO Module within CODESYS. Specifically, the two switches connected to digital channel 1 and digital channel 2 need to be configured in the 'Revolution PI MIO Module Parameter' section of CODESYS. You can refer to the picture 1.
Image
You need to assign variable names that will be used in your PLC program within the 'Revolution PI MIO Module E/A-Abbild' menu, as illustrated in the picture 2.
Image
To monitor the channel's status changes, you need to create a PLC program using the declared variables. You can refer to the example shown in the picture 3.
Image
If the switches are correctly connected to digital channels 1 and 2, you should now be able to monitor the changes in the channels. Please refer to the picture 4.
Image

I hope this will help you.
Best Regards

Ulrich Kouatang Biakoup | Technical Support
Hello,

I followed your instructions but I found it to be a failure. I am connecting the DigtalIn channel with a photocell switch and the output voltage of the sensor changes but it cannot be picked up by the DigtalIn channel. The other situation is that the Digtalout channel works fine and is able to output a high level. I think this is something very strange.

Best regards,
Cade
Attachments
picture1(1).png
picture1(1).png (195.75 KiB) Viewed 9199 times
picture3.png
picture3.png (191.25 KiB) Viewed 9199 times
picture2(1).png
picture2(1).png (445.05 KiB) Viewed 9199 times
u.biakoup
Posts: 212
Joined: 14 Apr 2022, 13:04

Re: MIO module driver not found by CODESYS

Post by u.biakoup »

Hello Cade,

Could you please create a schematic circuit for your configuration, including all components such as the sensors (photoelectric switches), and share it here? I'm having difficulty comprehending the issue from the image you previously provided.

Additionally, please note that you cannot access variables with the names DI_1 and DO_4 directly. You must use bitwise access for these variables. DI_1 should be WDin.1 (input for the photoelectric switch), corresponding to digital channel 2 on the MIO modul. DO_4 (output) should be WDout.3, corresponding to digital channel 4 on the MIO modul. You need to configure digital channel 2 and digital channel 4 in the 'Revolution PI MIO Module Parameter' section of CODESYS. You can refer to picture 1 in my previous post for guidance.

Best regards,

Ulrich Kouatang Biakoup | Technical Support
Purecade
Posts: 64
Joined: 07 Sep 2021, 03:39

Re: MIO module driver not found by CODESYS

Post by Purecade »

u.biakoup wrote: 11 Sep 2023, 15:18 Hello Cade,

Could you please create a schematic circuit for your configuration, including all components such as the sensors (photoelectric switches), and share it here? I'm having difficulty comprehending the issue from the image you previously provided.

Additionally, please note that you cannot access variables with the names DI_1 and DO_4 directly. You must use bitwise access for these variables. DI_1 should be WDin.1 (input for the photoelectric switch), corresponding to digital channel 2 on the MIO modul. DO_4 (output) should be WDout.3, corresponding to digital channel 4 on the MIO modul. You need to configure digital channel 2 and digital channel 4 in the 'Revolution PI MIO Module Parameter' section of CODESYS. You can refer to picture 1 in my previous post for guidance.

Best regards,

Ulrich Kouatang Biakoup | Technical Support
Hello,

Here's the schematic of the circuit, I retested it according to the instructions provided, but it still comes up the same way.

Best regards,
Cade
Attachments
picture 1.png
picture 1.png (71.61 KiB) Viewed 9106 times
u.biakoup
Posts: 212
Joined: 14 Apr 2022, 13:04

Re: MIO module driver not found by CODESYS

Post by u.biakoup »

hello Purecade,
The schematic circuit seems to be okay.
could you please send your CODESYS project to support@kunbus.com? You can use SUP-6317 as a reference or object. I will have a look at it and check your configuration.

Best Regards,

Ulrich Kouatang Biakoup | Technical Support
Post Reply