Page 1 of 1

Automatic overwriting of _config.rsc

Posted: 30 Jun 2022, 11:12
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

Re: Automatic overwriting of _config.rsc

Posted: 07 Jul 2022, 00:23
by zachbtek
Hello,

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

Thanks

Zach

Re: Automatic overwriting of _config.rsc

Posted: 07 Jul 2022, 03:27
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

Re: Automatic overwriting of _config.rsc

Posted: 08 Jul 2022, 20:03
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.

Re: Automatic overwriting of _config.rsc

Posted: 02 Aug 2022, 18:14
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.

Re: Automatic overwriting of _config.rsc

Posted: 03 Aug 2022, 09:35
by nicolaiB
Hi,

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

Nicolai