Can't Get value of 1 from DIO module Input

Topics about the Hardware of Revolution Pi
User avatar
JEPOYTEK
Posts: 3
Joined: 12 Dec 2019, 00:47
Answers: 0

Can't Get value of 1 from DIO module Input

Post by JEPOYTEK »

Hi Everyone,
In our factory floor, we've been using RevPi Connect for automation projects. Now we need DIO module to read any state of an Andon light. For example when it turn to green we should get value 1 because we used DMM to monitor dc 24v when the specific color turn ON.

Moreover, we noticed unusual power led indicator of RevPi connect it stays in RED even though we have a separated power supply for DIO module X2 but the RevPi Connect and DIO module main supply share power source.
See attached photos.
Looking for an advise and right solution for this. Thanks in advance!

BTW, I'm from the Cabuyao Laguna, Philippines.
Attachments
Capture.JPG
Capture.JPG (140.35 KiB) Viewed 7188 times
WhatsApp Image 2019-12-12 at 7.42.45 AM.jpeg
WhatsApp Image 2019-12-12 at 7.42.45 AM.jpeg (87.43 KiB) Viewed 7188 times
IMG_20191008_141654_BURST002.jpg2.JPG
IMG_20191008_141654_BURST002.jpg2.JPG (138.57 KiB) Viewed 7188 times
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Can't Get value of 1 from DIO module Input

Post by dirk »

Hi Jepoytek, there might be a problem with the power supply ramp up time and the RevPi devices. Try to use a power supply from our shop or similar.
User avatar
JEPOYTEK
Posts: 3
Joined: 12 Dec 2019, 00:47
Answers: 0

Re: Can't Get value of 1 from DIO module Input

Post by JEPOYTEK »

Hi Dirk,

Thanks for your respond. I already fixed the power issue but still I can't get a bit value of 1. RevPi DIO module and Andon light are on the common ground.
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Can't Get value of 1 from DIO module Input

Post by dirk »

Hi Jepoytek, ok we need some more information here. What does "piTest -d" show? Can you attach the kern.log file? Do the power LEDs light green?
User avatar
JEPOYTEK
Posts: 3
Joined: 12 Dec 2019, 00:47
Answers: 0

Re: Can't Get value of 1 from DIO module Input

Post by JEPOYTEK »

Hi Dirk,

Happy New Year!

Attached here are the RevPi-Conenct & DIO Module with their separate PSU and pTest -d commands. At the beginning it says module is present but NOT CONFIGURED!!!
If I follow this tutorial https://revolution.kunbus.com/tutorials ... 2/pictory/, both module will reset and pTest -d module is NOT present, data is NOT available.
Then the DIO module power LED becomes red.

Thanks for your kind help.

Regards,
Jepoytek
Attachments
Capture.JPG
Capture.JPG (60.64 KiB) Viewed 7012 times
Capture.JPG
Capture.JPG (33.36 KiB) Viewed 7012 times
Capture.JPG
Capture.JPG (139.01 KiB) Viewed 7012 times
Harry
Posts: 8
Joined: 15 Dec 2019, 07:42
Answers: 0

Re: Can't Get value of 1 from DIO module Input

Post by Harry »

Hi all,

I am probably having the exact same Problem.

I was using a setup with a RevPi Core and a DIO-Module for several weeks now without any problems. Today I replaced the RevPiCore with a RevPiCore 3 and a new DIO Module. I configured it with Pictory and tried my Application but had no responses to any inputs or outputs.
piTest -d shows different things.
1. 2 modules present, no indication of problems.
2. Module is NOT present, data is NOT available!!!
3. Module is present, but NOT CONFIGURED!!!

- reading inputs always showed 0 values
- writing outputs did not show up

This varies with every startup or after applying the configuration with "Reset driver".

Could anyone help here? Again, this setup was working fine with the very slow and old RevPiCore module.

Best regards,
Harry
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Can't Get value of 1 from DIO module Input

Post by dirk »

Hi Harry and JEPOYTEK, please send us the output of "dmesg" and "piTest -d".
Harry
Posts: 8
Joined: 15 Dec 2019, 07:42
Answers: 0

Re: Can't Get value of 1 from DIO module Input

Post by Harry »

Hi Dirk,

thanks for the quick replay.

I did some sequences, full logs are attached, I copied only parts here:

1. current state of system. running for about 1 day. LEDs green for Core3 and DIO. but DIO not configured

Address: 0 module type: 95 (0x5f) RevPi Core V1.2
Module is present
input offset: 0 length: 6
output offset: 6 length: 5

Address: 32 module type: 96 (0x60) RevPi DIO V1.4
Module is present, but NOT CONFIGURED!!!
input offset: 11 length: 70
output offset: 81 length: 18

2. Reconfiguration via PicTory. Clear Config. Adding RevPiCore3 + DIO module. Save Config + Reset Driver.
- Result: Core3 LED green. DIO LED red

3. PowerCycle
- Result: DIO LED red

Address: 32 module type: 32864 (0x8060) RevPi DIO V0.0
Module is NOT present, data is NOT available!!!
input offset: 11 length: 70
output offset: 81 length: 18

4. 2 more PowerCycles. 1st one is similar to point 3
- LED Core is red
- LED DIO is green
- System should be operatable

Address: 0 module type: 95 (0x5f) RevPi Core V1.2
Module is present
input offset: 0 length: 6
output offset: 6 length: 5

Address: 32 module type: 96 (0x60) RevPi DIO V1.4
Module is present
input offset: 11 length: 70
output offset: 81 length: 18

5. Read and Write via piTest
- Read delivers always 0 even when Input should be 1
pi@RevPi31438:~ $ piTest -r I_1
Bit value: 0
Bit value: 0
- Write does not have an effect to the hardware. will not switch on

pi@RevPi31438:~ $ piTest -w O_1,1
Set bit 0 on byte at offset 81. Value 1
pi@RevPi31438:~ $ piTest -w O_2,1
Set bit 1 on byte at offset 81. Value 1
pi@RevPi31438:~ $ piTest -w O_3,1
Set bit 2 on byte at offset 81. Value 1
- Dmesg
pi@RevPi31438:~ $ dmesg
[ 217.855744] piControl: too many communication errors -> set inputs to default 0 255 0 0 0 0 0 0
[ 217.856269] piControl: write error -5

Note:
Only one power supply is used for the RevPiCore3 and the DIO-module. Picture is attached.
If this is an issue why was it working with the old configuration wiht the RevPiCore?

Help is very much appretiated! Thanks in advance!

B/R
Harry
Attachments
PowerSupply.jpg
PowerSupply.jpg (93.95 KiB) Viewed 6749 times
piTest.zip
(3.21 KiB) Downloaded 324 times
dmesg.zip
(36.68 KiB) Downloaded 346 times
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Can't Get value of 1 from DIO module Input

Post by dirk »

Hi @Harry and @JEPOYTEK, please do a "cat /etc/revpi/image-release" and verify if you have "2019-03-14-revpi-stretch" installed.
If not please update to the latest image, see here How to Update Your System.

Code: Select all

sudo apt update
sudo apt upgrade
Or via the latest image from the shop, here: https://revolution.kunbus.de/shop/en/stretch
And to write the that image have a look here:
Tutorial 01 – Creation of an image
Harry
Posts: 8
Joined: 15 Dec 2019, 07:42
Answers: 0

Re: Can't Get value of 1 from DIO module Input

Post by Harry »

Hi Dirk,
thanks for the reply!

The correct version is already installed:
pi@RevPi31438:~ $ cat /etc/revpi/image-release
2019-03-14-revpi-stretch.img

Then I was trying to update the system as suggested but got some errors with memory.
The system does not boot to desktop anymore. It is stuck and showing a black screen.

How should I proceed now? I guess the system needs to be restored?

Best regards,
Harry

pi@RevPi31438:~ $ sudo apt update
Holen:1 http://archive.raspberrypi.org/debian stretch InRelease [25,4 kB]
Ign:1 http://archive.raspberrypi.org/debian stretch InRelease
Holen:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15,0 kB]
Ign:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Holen:3 http://archive.raspberrypi.org/debian stretch Release [24,8 kB]
Fehl:3 http://archive.raspberrypi.org/debian stretch Release
Fehler beim Schreiben der Ausgabedatei - write (28: Auf dem Gerät ist kein Speicherplatz mehr verfügbar) Fehler beim Schreiben in Datei - write (28: Auf dem Gerät ist kein Speicherplatz mehr verfügbar) [IP: 2a00:1098:88:26::1 80]
Holen:4 http://raspbian.raspberrypi.org/raspbian stretch Release [14,4 kB]
Fehl:4 http://raspbian.raspberrypi.org/raspbian stretch Release
Fehler beim Schreiben der Ausgabedatei - write (28: Auf dem Gerät ist kein Speicherplatz mehr verfügbar) Fehler beim Schreiben in Datei - write (28: Auf dem Gerät ist kein Speicherplatz mehr verfügbar) [IP: 2a00:1098:0:80:1000:75:0:3 80]
Holen:5 http://packages.revolutionpi.de stretch InRelease [5.678 B]
Ign:5 http://packages.revolutionpi.de stretch InRelease
Holen:6 http://packages.revolutionpi.de stretch Release [4.828 B]
Fehl:6 http://packages.revolutionpi.de stretch Release
Fehler beim Schreiben der Ausgabedatei - write (28: Auf dem Gerät ist kein Speicherplatz mehr verfügbar) Fehler beim Schreiben in Datei - write (28: Auf dem Gerät ist kein Speicherplatz mehr verfügbar)
OK:7 https://teamviewer-revpi.teamviewer.com/deb tvstable InRelease
Fehl:7 https://teamviewer-revpi.teamviewer.com/deb tvstable InRelease
Splitting up /var/lib/apt/lists/teamviewer-revpi.teamviewer.com_deb_dists_tvstable_InRelease into data and signature failed
0% [Wird verarbeitet]
OK:8 http://repository.teamviewer.com/deb stable InRelease
Fehl:8 http://repository.teamviewer.com/deb stable InRelease
Splitting up /var/lib/apt/lists/repository.teamviewer.com_deb_dists_stable_InRelease into data and signature failed
Paketlisten werden gelesen... Fehler!
E: The repository 'http://archive.raspberrypi.org/debian stretch Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://raspbian.raspberrypi.org/raspbian stretch Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://packages.revolutionpi.de stretch Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://teamviewer-revpi.teamviewer.com/deb tvstable InRelease: Splitting up /var/lib/apt/lists/teamviewer-revpi.teamviewer.com_deb_dists_tvstable_InRelease into data and signature failed
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repository.teamviewer.com/deb stable InRelease: Splitting up /var/lib/apt/lists/repository.teamviewer.com_deb_dists_stable_InRelease into data and signature failed
E: Schreibfehler - write (28: Auf dem Gerät ist kein Speicherplatz mehr verfügbar)
E: E/A-Fehler beim Speichern des Quell-Zwischenspeichers
E: Die Paketliste oder die Statusdatei konnte nicht eingelesen oder geöffnet werden.

pi@RevPi31438:~ $ sudo apt-get install pictory
Paketlisten werden gelesen... Fehler!
E: Schreibfehler - write (28: Auf dem Gerät ist kein Speicherplatz mehr verfügbar)
E: E/A-Fehler beim Speichern des Quell-Zwischenspeichers
E: Die Paketliste oder die Statusdatei konnte nicht eingelesen oder geöffnet werden.
pi@RevPi31438:~ $

pi@RevPi31438:~/grt/v1.00.00 $ free -m
total used free shared buff/cache available
Mem: 926 30 752 6 144 841
Swap: 0 0 0

pi@RevPi31438:~/grt/v1.00.00 $ cd ..
pi@RevPi31438:~/grt $ cd v-bash: Kann die temporäre Datei für das Hier Dokument nicht anlegen: Auf dem Gerät ist kein Speicherplatz mehr verfügbar
Attachments
htop.png
htop.png (131.39 KiB) Viewed 6666 times
Post Reply