Automatic overwriting of _config.rsc
Posted: 30 Jun 2022, 11:12
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.
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