Offset changes with new RevPi Core

Topics about the Hardware of Revolution Pi
Post Reply
imerledragon
Posts: 18
Joined: 30 Sep 2021, 02:39
Answers: 0

Offset changes with new RevPi Core

Post 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
User avatar
nicolaiB
KUNBUS
Posts: 878
Joined: 21 Jun 2018, 10:33
Answers: 8
Location: Berlin
Contact:

Re: Offset changes with new RevPi Core

Post by nicolaiB »

Hi Torpi,

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

Thanks,

Nicolai
imerledragon
Posts: 18
Joined: 30 Sep 2021, 02:39
Answers: 0

Re: Offset changes with new RevPi Core

Post 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
User avatar
nicolaiB
KUNBUS
Posts: 878
Joined: 21 Jun 2018, 10:33
Answers: 8
Location: Berlin
Contact:

Re: Offset changes with new RevPi Core

Post 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
imerledragon
Posts: 18
Joined: 30 Sep 2021, 02:39
Answers: 0

Re: Offset changes with new RevPi Core

Post by imerledragon »

OK, makes sense. Thank you very much.
Post Reply