Page 1 of 1

Using Relay Contact on RevPi Connect

Posted: 07 Jul 2021, 15:29
by crismancich
Hi,

there were multiple questions regarding the use of the relay contact of the RevPi Connect.
It is controlled via the 6th bit of RevPiLED in the process image.

Here's some details:

Code: Select all

BIN                     DEC        	        DESCRIPTION
00000000		0			all off
00000001		1			LED A1 green
00000010		2			LED A1 red
00000011		3			LED A1 orange (red + green)
00000100		4			LED A2 green
00001000		8			LED A2 red
00001100	        12			LED A2 orange (red + green)
00100000		32			Relay Contact	

The binary flags can be combined like this:

Code: Select all

DEC  256|128|64|32|16| 8| 4| 2| 1
BIN    0|  0| 0| 1| 0| 0| 0| 0| 1   =  33   LED A1 green + relay contact active
                32      +       1   =  33

Usage example:
Log on to revolution pi via ssh.

Code: Select all

cd demo
piTest -w RevPiLED,33

Kind reagrds,
Boris

Re: Using Relay Contact on RevPi Connect

Posted: 23 Jul 2021, 21:48
by bmoeller
Thanks crismancich, This is good information and got me started to understand how it works. But for the revpi connect I think the table is one bit off. The correct value to to set a# to green and activate the realy is 16+64. At least this worked for me this way.