Incorrect pictory configuration.

Topics about the Hardware of Revolution Pi
Post Reply
Makoto G
Posts: 15
Joined: 11 Oct 2022, 06:11

Incorrect pictory configuration.

Post by Makoto G »

I have connected the MIO module to the RevPi Connect SE and am controlling the inputs and outputs using Python.
About a year ago, I was able to control the outputs of the MIO module without any issues using RevPiModIO.


However, when I recently tried to control the outputs again, I encountered the following error message. I haven't made any changes to the Pictory settings, so I'm puzzled by this issue.
If anyone knows a solution, please let me know.

Thank you in advance.

Code: Select all

import revpimodio2
import time

rpi = revpimodio2.RevPiModIO(autorefresh=True)
rpi.io.AnalogOutput_1.value=8000
time.sleep(1)
print(rpi.io.AnalogOutput_1.value)
rpi.io.AnalogOutput_2.value=8000
time.sleep(1)
print(rpi.io.AnalogOutput_2.value)
rpi.io.AnalogOutput_3.value=8000
time.sleep(1)
print(rpi.io.AnalogOutput_3.value)
rpi.io.AnalogOutput_4.value=8000

time.sleep(1)

rpi.io.AnalogOutput_1.value=0
rpi.io.AnalogOutput_2.value=0
rpi.io.AnalogOutput_3.value=0
rpi.io.AnalogOutput_4.value=0
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
/usr/lib/python3/dist-packages/revpimodio2/io.py:302: Warning: ignore io 'ReservedDI_1', as an io already exists at the address '0 Bit 0'. this can be caused by an incorrect pictory configuration.
Warning,
/usr/lib/python3/dist-packages/revpimodio2/io.py:302: Warning: ignore io 'ReservedDI_2', as an io already exists at the address '0 Bit 1'. this can be caused by an incorrect pictory configuration.
Warning,
/usr/lib/python3/dist-packages/revpimodio2/io.py:302: Warning: ignore io 'ReservedDI_3', as an io already exists at the address '0 Bit 2'. this can be caused by an incorrect pictory configuration.
Warning,
/usr/lib/python3/dist-packages/revpimodio2/io.py:302: Warning: ignore io 'ReservedDI_4', as an io already exists at the address '0 Bit 3'. this can be caused by an incorrect pictory configuration.
Warning,
/usr/lib/python3/dist-packages/revpimodio2/io.py:302: Warning: ignore io 'ReservedDO_1', as an io already exists at the address '34 Bit 0'. this can be caused by an incorrect pictory configuration.
Warning,
/usr/lib/python3/dist-packages/revpimodio2/io.py:302: Warning: ignore io 'ReservedDO_2', as an io already exists at the address '34 Bit 1'. this can be caused by an incorrect pictory configuration.
Warning,
/usr/lib/python3/dist-packages/revpimodio2/io.py:302: Warning: ignore io 'ReservedDO_3', as an io already exists at the address '34 Bit 2'. this can be caused by an incorrect pictory configuration.
Warning,
/usr/lib/python3/dist-packages/revpimodio2/io.py:302: Warning: ignore io 'ReservedDO_4', as an io already exists at the address '34 Bit 3'. this can be caused by an incorrect pictory configuration.
Warning,
u.biakoup
KUNBUS
Posts: 182
Joined: 14 Apr 2022, 13:04

Re: Incorrect pictory configuration.

Post by u.biakoup »

Hello Makoto G,
The warning messages you are seeing indicate that there might be an issue with the configuration of the RevPi Connect SE's PiCtory settings. It appears that some of the I/Os you are trying to use are conflicting with existing configurations.

Here are a few steps you can take to troubleshoot and resolve the issue:

1. Check PiCtory Configuration:
- Open the PiCtory
- Ensure that the I/O addresses used in your Python code are correctly configured and not conflicting with other I/Os.

2. This behaviour is very strange because you said that, you haven't made any change since one year, and it's worked before.
Please post here the output of the following commands.

Code: Select all

cat /proc/version
cat /etc/revpi/image-release
uname -a
Best Regards,

Ulrich Kouatang Biakoup | Technical Support
Makoto G
Posts: 15
Joined: 11 Oct 2022, 06:11

Re: Incorrect pictory configuration.

Post by Makoto G »

Thank you for your reply.

1. Does the I/O address mean the name of each output? I checked PiCtory, and there were no duplicates. I have not changed it from the initial name when I first connected MIO and configured PiCtory.

2. I entered the commands, and here is the output:

Code: Select all

$ cat /proc/version
Linux version 5.10.152-rt75-v7l (support@kunbus.com) (arm-linux-gnueabihf-gcc (Debian 8.3.0-2) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1 SMP PREEMPT_RT Tue, 26 Sep 2023 09:43:32 +0200
$ cat /etc/revpi/image-release
2022-07-28-revpi-buster.img
$ uname -a
Linux RevPi82736 5.10.152-rt75-v7l #1 SMP PREEMPT_RT Tue, 26 Sep 2023 09:43:32 +0200 armv7l GNU/Linux
The RevPi seems to be changing its output even though an error occurs. However, the output voltage is not stable. For example, with the current python code, when 8V should be output, the value fluctuates between 7 and 2V.
Could this be a mechanical problem?

Then, I have several sets of RevPi connect SE and MIO modules, and the python code seems to work without error on another RevPi to which I copied the image of this RevPi a month ago.
I haven't touched PiCtory on the another RevPi in a month.
u.biakoup
KUNBUS
Posts: 182
Joined: 14 Apr 2022, 13:04

Re: Incorrect pictory configuration.

Post by u.biakoup »

Hello Makoto G,

Could you change the MIO_module connected to that RevPi and see if the error still occurs?

Best Regards,
Ulrich Kouatang Biakoup | Technical Support
Makoto G
Posts: 15
Joined: 11 Oct 2022, 06:11

Re: Incorrect pictory configuration.

Post by Makoto G »

Hi, thank you for your support.

I replaced the problematic RevPi's MIO module with one that was working on another RevPi.
Since the same error occurred again, it seems to be a problem with the RevPi itself.

On a different note, the reason why the MIO output voltage is not stable may be due to insufficient capacity of the power supply.
When I looked into the simple power supply I'm currently using, it seems that it only outputs 1A at maximum.
I'm currently arranging a power supply with sufficient capacity.
Gijs
Posts: 1
Joined: 21 Dec 2023, 15:40

Re: Incorrect pictory configuration.

Post by Gijs »

Hi,

I find I have the same problem as stated in the first post in this thread. From what I can see, when adding a MIO module, PiCtory is defining DigitalOutput_1 through DigitalOutput_4 and DigitalInput_1 through DigitalOutput_4 by default. It seems to also define the 'hidden' variables ReservedDO_1 through ReservedDO_4 and ReservedDI_1 through ReservedDI_4 by default. The addresses of these last variables may or may not be the same as the ones used by the DigitalOutput_x and DigitalInput_x. I am saying may or may not because I have had two types of this failure:

1. Only four errors were displayed and only for the ReservedDO_1 through ReservedDO_4 variables,
2. Seven errors were displayed for ReservedDO_2 through ReservedDO_4 and ReservedDI_1 through ReservedDI_4.

The revpimodio2 library will give a warning when it encounters a variable that is bound to an address to which another variable is already bound to. PiCtory doesn't seem to mind. An example is given below:

Code: Select all

$ piTest -v DigitalOutput_1
variable name: DigitalOutput_1
       offset: 147
       length: 1
          bit: 0
$ piTest -v ReservedDO_1
variable name: ReservedDO_1
       offset: 147
       length: 1
          bit: 0
Also, I can't change ReservedDO_1 through ReservedDO_4 and ReservedDI_1 through Reserved_DI4 as I can't see them in PiCtory. So far, I have only seen those variables in /var/www/revpi/pictory/projects/_config.rsc.

What can I do so that these warnings go away?
User avatar
nicolaiB
KUNBUS
Posts: 897
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Incorrect pictory configuration.

Post by nicolaiB »

Hi Gijs,

this should only be a warning and no real issue as long as you don't write to the hidden reserved IOs. But it would be good to fix the rap file and get rid of these warning. Could you please test this updated RAP file and give me feedback if this will solve the issue? If yes I will prepare an package update.

https://gist.github.com/nbuchwitz/af588 ... e1b15eb385

Instructions are below the file content.

Nicolai
Gijs
Posts: 1
Joined: 21 Dec 2023, 15:40

Re: Incorrect pictory configuration.

Post by Gijs »

Hi nicolaiB,


Thank you for your answer. I updated my own RAP file by removing the ReservedDO_x and ReservedDI_x entries and yes, it works. I do not get these warnings anymore. It is a hot fix though, I am afraid these entries may come back into the RAP file at anytime when I update something in PiCtory. I'll test yours as well to see whether it works and report back.

== Update ==
I tested the file you linked to nicolaiB. I removed all modules, saved, reset the driver, then put all modules back, saved, reset the driver. When starting my program, no warnings were displayed. I put the old file back and repeated the test and warnings were displayed again, put your file back once more, repeated the test, no warnings were displayed.

In other words, your file works. Thanks!
Last edited by Gijs on 22 Dec 2023, 09:10, edited 3 times in total.
Makoto G
Posts: 15
Joined: 11 Oct 2022, 06:11

Re: Incorrect pictory configuration.

Post by Makoto G »

Thank you for your support.

The issue with the error message has been resolved.

However, the problem of unstable analog and digital output voltage has not been resolved.
I changed the power supply unit to one with 24VDC and 2.5A output, but the digital and analog output values still fluctuate between the set value and 0V.

For example, I shorted AnalogOutput_1 and AnalogInput_1 on the MIO module and ran the following code.
The value of AnalogInput_1 is unstable at a value near 5000, and sometimes takes a value below 100 for 10 seconds.

Code: Select all

import revpimodio2
import time

rpi = revpimodio2.RevPiModIO(autorefresh=True)

rpi.io.AnalogOutput_1.value=5000
time.sleep(1)
print(rpi.io.AnalogOutput_1.value)
print(rpi.io.AnalogInput_1.value)

for num in range(10):
    time.sleep(1)
    print(rpi.io.AnalogInput_1.value)

rpi.io.AnalogOutput_1.value=0
time.sleep(1)
print(rpi.io.AnalogOutput_1.value)
print(rpi.io.AnalogInput_1.value)
I also checked with a digital multimeter, and the output voltage is not stable for both digital and analog outputs.

Since I want to use it to control IC chips, I would be in serious trouble if the voltage was not stable.
Is there any solution?
This is off-topic, but I'll create a separate topic if necessary.

Thank you in advance.
Makoto G
Posts: 15
Joined: 11 Oct 2022, 06:11

Re: Incorrect pictory configuration.

Post by Makoto G »

I found out the cause.
The cause is that multiple python codes that used RevPiModIO are running with systemd.

I've started a new thread about this.
I would appreciate it if you could reply if you know the solution.
I apologize if starting a new thread is a problem.

Thank you for your support.
Post Reply