Page 1 of 1

Offset changes with new RevPi Core

Posted: 03 Dec 2021, 03:54
by imerledragon
Hello everyone,

I have been working on a project with RevPi Core + 2 IO Modules and bought a spare RevPi Core and modules.
When using PiCtory to configure my spare system, I realize that the offset are completely different from my first setup while the OS and PiCtory (2.0.3) are both the same version.
Even the integrated RevPi Core LED have different offset (123 on my first RevPi Core, 6 on the new one)

My question is: how to fix the offset so I can replace faulty hardware in the future without changing all the program running on the core module?
I have a backup of _config.rsc and project.rsc (the same) but not sure it is of any help.

Thank you for any advice,
Torpi

Re: Offset changes with new RevPi Core

Posted: 04 Dec 2021, 14:05
by nicolaiB
Hi Torpi,

please share both config.rsc so we can have look.

Thanks,

Nicolai

Re: Offset changes with new RevPi Core

Posted: 07 Dec 2021, 05:32
by imerledragon
Unfortunately I did not keep both setup, I only have one setup with RevPi Core and IO modules, and a spare with juste one RevPi Core.

What I found strange is the internal LED offset of those 2 RevPi are different. I am planning to light A1 and A2 if modules are either not connected, have no power or are not well configured but it seems that I cannot since the LED offset is not the same when not configured properly?!

So I tried to understand where the problem comes from and found that if you have 1 RevPi Core and 1 Module, depending if you add the module to the right or to the left, the offset are different for the internal LED of the RevPi. That is a problem for me if I want to use the internal LED as an error status in the case it has been configured on the wrong side.

Is there anything I could do?

Torpi

Re: Offset changes with new RevPi Core

Posted: 07 Dec 2021, 09:20
by nicolaiB
Hi Torpi,

the offset of the base device is changing in dependency of your module configuration and order. That's a normal behavior as our modules do not have fixed positions. Therefore you can't rely on a fixed offset for the LEDs and will have to read the configuration from the config / proccess image. Depending on the language you want to use in your project you might have a look at the python library revpimodio2 whichs does all the necessary abstraction for you. Even if you don't plan to use Python this might a good starting point for your own implementation.

Nicolai

Re: Offset changes with new RevPi Core

Posted: 09 Dec 2021, 01:23
by imerledragon
OK, makes sense. Thank you very much.