RevPi Connect 4 + DIO - Strange IO beaviour and crazy LED colors (A1-A5)

SiggiN
Posts: 8
Joined: 02 Nov 2023, 23:49
Answers: 0

RevPi Connect 4 + DIO - Strange IO beaviour and crazy LED colors (A1-A5)

Post by SiggiN »

Hallo,
I'm having some issues with my Connect 4 and the extension module DIO. For setup I followed this:
https://kunbus-gmbh.atlassian.net/servi ... 2687893508 and
viewtopic.php?t=4007
and configured the hardware with Pictory.
Unfortunately, the Inputs show Bad readings and more than one is triggered by one input. In addition, the LEDs A1 to A5 show funny colors. A2 cyan, A3 white, A4 red. The others are of.
pi@RevPi108542:~ $ piTest -d
Found 2 devices:
Address: 0 module type: 136 (0x88) RevPi Connect 4 V1.0
Module is present
input offset: 0 length: 6
output offset: 6 length: 7
Address: 32 module type: 96 (0x60) RevPi DIO V1.5
Module is present
input offset: 13 length: 70
output offset: 83 length: 18
Hopefully someone can help!
Attachments
screenshot.PNG
screenshot.PNG (256.55 KiB) Viewed 8874 times
Best Answerby Amar » 24 Nov 2023, 08:44
Hello Sigmund,
Thank you for bringing the issue to notice.The strange behaviour for controlling RevPiLED for Connect 4 is due to missing parameter RevPiOutput in I/O mapping of Connect4 which was adapted in PiCtory.
This resulted in writing the RevPiLED at incorrect offset in process image.This will be fixed in upcoming release for Revolution Pi Library for CODESYS next month.
Regards,
Amar
Go to full post
User avatar
stefanh
KUNBUS
Posts: 31
Joined: 05 Apr 2023, 10:53
Answers: 0

Re: RevPi Connect 4 + DIO - Strange IO beaviour and crazy LED colors (A1-A5)

Post by stefanh »

Hello SiggiN,

you have to deactivate the GPIOs (GPIO_A_B) because they are not supported by the RevPi and are used differently.

To get CODESYS up and running properly we have a checklist for commissioning: LINK https://kunbus-gmbh.atlassian.net/servi ... 2687893508

TL;DR:
Update your RevPi OS --> RevPi Buster (01/2023) (ID: 6571) or RevPi Bullseye (09/2023) (ID: 7478) with sudo apt update | sudo apt update
RevPi Buster (01/2023) (ID: 6571) LINK: https://revolutionpi.com/download/6571/ ... 1696406763
RevPi Bullseye (09/2023) (ID: 7478) LINK: https://revolutionpi.com/download/7478/ ... 1698915997

Update Codesys driver RevolutionPiBridge --> to Revolution Pi Library for CODESYS V1.4.0.0 (ID: 6985)
LINK: https://revolutionpi.com/download/6985/ ... 1696412791

Update Codesys Runtime --> to CODESYS Control for Raspberry Pi 4.8.0.0 (ID: 6988)
LINK: https://revolutionpi.com/download/6988/ ... 1696412791

Your CODESYS IDE should be version 3.5.19.0, so not the latest version.

Regards
Stefan

Support | KUNBUS
SiggiN
Posts: 8
Joined: 02 Nov 2023, 23:49
Answers: 0

Re: RevPi Connect 4 + DIO - Strange IO beaviour and crazy LED colors (A1-A5)

Post by SiggiN »

Hi Stefan,
thank you very much for the quick response.
I pretty much did everything like it is describe in all the mentioned places.
What I don't know how to is your first point. Where and how do I deactivate the GPIOs (GPIO_A_B)?
Thanks again.
Siggi
SiggiN
Posts: 8
Joined: 02 Nov 2023, 23:49
Answers: 0

Re: RevPi Connect 4 + DIO - Strange IO beaviour and crazy LED colors (A1-A5)

Post by SiggiN »

Found it. Test in progress..
viewtopic.php?f=6&t=3023#p10839
SiggiN
Posts: 8
Joined: 02 Nov 2023, 23:49
Answers: 0

Re: RevPi Connect 4 + DIO - Strange IO beaviour and crazy LED colors (A1-A5)

Post by SiggiN »

Hallo again,
I did disable the GPIOs_A_B in CODESYS but still have the same problem. To get a clean system I flased the RevPi onece again, configured everythig, but after the first run I'm back in the same situation. Funny colored LEDS and the same Errors as posted yesterday.
Before I connected to the RevPi with CODESYS, I used PiCtory for configuration. Now I read that CODESYS is replacing the file anyways. Could this procedure cause the Problem ?
Is there something else I could do?
WebberH
Posts: 5
Joined: 07 Nov 2023, 04:39
Answers: 0

Re: RevPi Connect 4 + DIO - Strange IO beaviour and crazy LED colors (A1-A5)

Post by WebberH »

Hello
I have same issue with crazy I/O, i followed the actual version to install and still get same problem.
MY I/O can't work well , seems like same problem in this topic.

With Input DI module , only Input Ch1 runs normal , the other Channel will show bad current .

With Output DO module , only output Ch1 could run the 24V output , the other Channel will show "True" but only Ch1 has output in the same time.

I used piTest to test my input and output and work fine , so i think the problem is on the Codesys version?

My enviroment :
RevPi Connect S+ 16GB with Buster 01/2023
Codesys : 3.5.19.0 32-BIT
Codesys control for Raspberry pi : 4.8.0.0
Revolution Pi Library for CODESYS : 1.4.0.0

Do i have any way to solve the problem?

Thanks
Webber
WebberH
Posts: 5
Joined: 07 Nov 2023, 04:39
Answers: 0

Re: RevPi Connect 4 + DIO - Strange IO beaviour and crazy LED colors (A1-A5)

Post by WebberH »

Hello

I found my issue's answer , sharing here hope someone also overcome the problem.

With Codesys RevPi Library V1.3.0 and higher you need to change how you assign your I/O.

From Library Release note V1.3.0
- Core/Connect/Compact devices and submodules DI/DO/DIO/MIO shall use word/byte access
for Digital IO's instead of bit access

Maybe you should try assign your I\O at symbol(Byte or word) instead of single bit.

For my eyes , i wish in the feature we could have both way to set up the I/O with Codesys feat RevPi.

Webber
SiggiN
Posts: 8
Joined: 02 Nov 2023, 23:49
Answers: 0

Re: RevPi Connect 4 + DIO - Strange IO beaviour and crazy LED colors (A1-A5)

Post by SiggiN »

Hey Webber,
thank you very much for posting your solution! I'm still struggeling with my issue an I have a hard time figuring out how one can configure the word/byte access. Coul someone give me a hint?
Thanks allot!
Siggi
WebberH
Posts: 5
Joined: 07 Nov 2023, 04:39
Answers: 0

Re: RevPi Connect 4 + DIO - Strange IO beaviour and crazy LED colors (A1-A5)

Post by WebberH »

Hi

Here i offer my way to you, hope this solve your problem.

1.Define your var first , and you can assign in your logic for each bit.
How to code with Word
How to code with Word
Coding.PNG (155.38 KiB) Viewed 7950 times
2.Mapping with device input or output channel
How to map into logic
How to map into logic
Mapping.PNG (326.44 KiB) Viewed 7950 times
Try it !

Webber
SiggiN
Posts: 8
Joined: 02 Nov 2023, 23:49
Answers: 0

Re: RevPi Connect 4 + DIO - Strange IO beaviour and crazy LED colors (A1-A5)

Post by SiggiN »

Hey Webber,
thanks again for your selfless support!
Unfortunately your hints did not help me. I tried to test it your way but no luck so fare. Connecting a Input to power while being connected and running is not followed by any change of input state. To test this in the way you suggested I created a new project using structured text (ST) instead of FUP what I "normally" use (I'm native in Python but was hoping to learn the professional way of industry automation).
While trying around I noticed that the dependencies of the CODESYS Control for Raspberry Pi 4.8.0.0 are automatically installed and updated to the newest version (4.10.0.0). These are the Control SL Extention Package and the Edge Gateway. I now have manually reinstalled them to the version 4.8.0.0.
I will test this configuration on Monday. If this is making no difference, I will test Buster instead of Bullseye.

Thanks you
Sigmund
Post Reply