Controlling PoRelay8 with Canbus commands, i.e. cansend

Any help on sending simple canbus commands to control a PoRelay8 would be appreciated. I don’t want to use Poblocks or any other middleware.

Thanks!

1 Like

Hi @JRTX and welcome to the forum.

I was looking through the user guide for PoRelay8, but I am not sure if it is possible to use (easily) this board without PoBlocks software and PoKeys57.

I would recommend that you open up a ticket here to check this with PoLabs support: https://support.poscope.com/

Let us know what they say.

Hi, Jeffrey

The default CAN settings are described in the PoRelay8 user manual - 250k baudrate, device expects command to be received at 0x108. Make sure that message is constructed with the correct message length - device status (0x10) message should contain only 1 payload byte (0x10). Device will respond with information as described in the manual, including the device’s ID (that matches the ID printed on the sticker on the device itself).

To control the relays, send the message to 0x108 with the following contents

20 2C 44 DE AB

0x20 - set outputs
0xABDE442C (in LSB) - device’s ID in LSB format

  • 1 byte with 8 bit-mapped output states (output 0 = bit 0, output 7 = bit 7)
1 Like

Perfect! Thank you!

Now I just have to make it work :slightly_smiling_face:

1 Like

Yes, only that :smiley:

You can check this.

1 Like

Easier than expected once you get the incantation right:

cansend can0 108#208546DEAB00

8546DEAB is the device ID and the last byte is the state of the 8 relays.

1 Like