Automatic overwriting of _config.rsc

Post Reply
cnt
Posts: 6
Joined: 06 Dec 2019, 10:46
Answers: 0

Automatic overwriting of _config.rsc

Post by cnt »

Hello,
I am migrating my project to CODESYS and have an issue with "_config.rsc" file automatic generation.

1. If I create _config.rsc using Pictory (has about 5kB) everything works as it should, RevPi Core 3 and DIO module is active and operational.
2. If I create CODESYS project with only Core3 module added, _config.rsc (about 1,3kB) is again generated correctly prom CODESYS and everything works. (CODESYS Control for Raspberry Pi 4.4.0.0, Revolution Pi Library for CODESYS v1.2.0.0 is istalled)
3. BUT if I add piBrigdeLeft with RevPi_DIO inside to the project tree, CODESYS runtime after its start generates almost empty _config.rsc (no modules, about 500B) and of course revpi driver is reporting not configured modules and project does not work.

I have come up with a workaround, but it would be really nice if it will work from CODESYS environment.
Workaround is to manualy or programaticaly overwrite the _config.rsc AFTER the CODESYS runtime starts with the saved one created through Pictory and restart driver using piControlReset.

If I traced the problem correctly, the _config.rsc file is generated every time the CODESYS runtime is started.

The almost empty _config.rsc is attached.

Thank You for any help.

Code: Select all

Address: 0 module type: 95 (0x5f) RevPi Core V1.2
Module is present
     input offset: 113 length: 6
    output offset: 119 length: 5

Address: 31 module type: 96 (0x60) RevPi DIO V1.5
Module is present
     input offset: 0 length: 70
    output offset: 70 length: 18
Attachments
_config.zip
(360 Bytes) Downloaded 179 times
zachbtek
Posts: 6
Joined: 30 Mar 2022, 07:26
Answers: 0

Re: Automatic overwriting of _config.rsc

Post by zachbtek »

Hello,

I'm having the same problem. Can someone help please?

Thanks

Zach
zachbtek
Posts: 6
Joined: 30 Mar 2022, 07:26
Answers: 0

Re: Automatic overwriting of _config.rsc

Post by zachbtek »

Hey I just figured out the problem. I've been messing with this all day long!

In CODESYS add all of your submodules to the RIGHT BRIDGE instead of using the LEFT BRIDGE and it will congregate to PiCtory just fine.

It's a weird bug in my opinion.

Hope it works for you!

Zach
cnt
Posts: 6
Joined: 06 Dec 2019, 10:46
Answers: 0

Re: Automatic overwriting of _config.rsc

Post by cnt »

THANK YOU!
I have moved all modules to the right bridge and it works now.
It is definitely cleaner solution than mine. I made the config file read only...

Thank you again,
Tomas.
S_wauters
Posts: 7
Joined: 02 Aug 2022, 17:37
Answers: 0

Re: Automatic overwriting of _config.rsc

Post by S_wauters »

Hi all in this thread, since i have the same issue i tought i would reply here. Since you are all commenting to use the right slots i suppose you are using the core? Since my connect can only accept modules on the left this is sadly no solution for me.

I have read somewhere that is is not yet compatible with sp18 ( which i am currently using ) would downgrading to 17 solve the issue? Or is it possible to turn off this overwriting? Since it works perfectly fine if after booting i overwrite the config in pictory and restart the driver.

I hope someone can give me a good solution since not being able to define the hardware makes it useless to the industry. I have wasted so much time on stupid things that could just have been documented better.
User avatar
nicolaiB
KUNBUS
Posts: 869
Joined: 21 Jun 2018, 10:33
Answers: 7
Location: Berlin
Contact:

Re: Automatic overwriting of _config.rsc

Post by nicolaiB »

Hi,

as you already found out SP18 is not support, yet. Therefore downgrading to SP17 is the only officially supported solution.

Nicolai
Post Reply