CAROA04 CAROB08 CAROC16 CAN Protocol Documentation RSA85 relay Modbusfor CANBUS

 

 

Eletechsup CAROC16 CAN Protocol Documentation
================================================

OVERVIEW
--------
The CAROC16 is a 16-channel digital input/output relay module that communicates via CAN bus using either standard or extended frame formats. Default configuration: Address 0x01, Baud Rate 250Kbps.

FACTORY RESET
-------------
Short the RES jumper for 5 seconds to restore factory settings.

CAN FRAME FORMATS
-----------------

Standard Frame Format:
- Frame ID: 11-bit (Function Code << 8 | Address Code)
- Data: 8 bytes

Extended Frame Format:
- Frame ID: 29-bit (0x00AA followed by Function Code and Address Code)
- Data: 8 bytes

CAN ID STRUCTURE (Standard Frame)
---------------------------------
Bits 10-8: Function Code
Bits 7-0:  Address Code (Node ID)

Example: Function 0x01, Address 0x01 → CAN ID = 0x101

FUNCTION CODES
--------------
0x01 - Write Digital Outputs (Relays)
0x02 - Read Digital Outputs (Relays)  
0x03 - Read Digital Inputs
0x07 - Parameter Settings

DATA FORMAT
-----------

All functions use 8-byte data payload:
- Byte 0: Low byte (channels 1-8)
- Byte 1: High byte (channels 9-16)
- Bytes 2-7: Reserved (0x00)

Channel Mapping:
- Byte 0: bit0=CH1, bit1=CH2, ..., bit7=CH8
- Byte 1: bit0=CH9, bit1=CH10, ..., bit7=CH16

FUNCTION 0x01: WRITE RELAYS
---------------------------
Purpose: Control relay outputs
Command: Set desired relay states in data bytes 0-1
Response: Echo of the sent command

Example - Turn ON relays 1, 8, and 16:
Send:    CAN ID 0x101, Data: 81 80 00 00 00 00 00 00
Receive: CAN ID 0x101, Data: 81 80 00 00 00 00 00 00

FUNCTION 0x02: READ RELAYS
--------------------------
Purpose: Read current relay states
Command: Send with data bytes 0-1 as 0x00
Response: Current relay states in data bytes 0-1

Example - Read relay states:
Send:    CAN ID 0x201, Data: 00 00 00 00 00 00 00 00
Receive: CAN ID 0x201, Data: 82 20 00 00 00 00 00 00
(Relays 2, 8, and 14 are ON)

FUNCTION 0x03: READ INPUTS
--------------------------
Purpose: Read digital input states
Command: Send with any data (ignored)
Response: Current input states in data bytes 0-1

Example - Read digital inputs:
Send:    CAN ID 0x301, Data: 00 00 00 00 00 00 00 00
Receive: CAN ID 0x301, Data: 85 81 00 00 00 00 00 00
(Inputs 1, 3, 9, and 16 are active)

FUNCTION 0x07: PARAMETER SETTINGS
---------------------------------
Purpose: Configure device parameters
CAN ID: 0x701 (Function 0x07 + Address 0x01)

Commands:
- 0xA1: Read Address Code
- 0xA2: Read Baud Rate Code  
- 0xB1: Write Address Code (byte 1 = new address)
- 0xB2: Write Baud Rate Code (byte 1 = baud rate code)

Baud Rate Codes:
0x00 = 5Kbps     0x06 = 200Kbps
0x01 = 10Kbps    0x07 = 250Kbps (Default)
0x02 = 20Kbps    0x08 = 400Kbps
0x03 = 50Kbps    0x09 = 500Kbps
0x04 = 100Kbps   0x0A = 800Kbps
0x05 = 120Kbps   0x0B = 1000Kbps

Example - Set baud rate to 500Kbps:
Send:    CAN ID 0x701, Data: B2 09 00 00 00 00 00 00
Receive: CAN ID 0x701, Data: B2 09 00 00 00 00 00 00

EXTENDED FRAME FORMAT
---------------------
For extended frames, prepend 0xAA to the standard frame:

Standard:  CAN ID 0x101, Data: 81 80 00 00 00 00 00 00
Extended:  CAN ID with 0xAA prefix, Data: AA 01 01 81 80 00 00 00

PRACTICAL EXAMPLES
------------------

1. Turn ON relay 1 only:
   CAN ID: 0x101, Data: 01 00 00 00 00 00 00 00

2. Turn ON relays 2, 7, 11, 15:
   CAN ID: 0x101, Data: 42 44 00 00 00 00 00 00

3. Check if input 5 is active (response shows 10 hex = bit 4):
   CAN ID: 0x301, Data: 00 00 00 00 00 00 00 00
   Response: 10 00 00 00 00 00 00 00

4. Change device address to 0x03:
   CAN ID: 0x701, Data: B1 03 00 00 00 00 00 00

SPECIFICATIONS
--------------
- Channels: 16 digital inputs, 16 relay outputs
- CAN Standard: ISO 11898
- Default Address: 0x01
- Default Baud Rate: 250Kbps
- Frame Types: Standard (11-bit) and Extended (29-bit)

 

 

One more question for your engineer. With MODBUS you can enable/disable a single relay per message (0x05), with CANBUS I can’t see documentation about that and that 0x05 did not work. Could you ask how to do single coil/relay with canbus? What is the message id and data?

 

1 MODBUS instructions and CAN instructions are completely different instructions.
2 CAN instructions do not have 0X05 instructions
3 CAN instructions control all channels at the same time, and there are no instructions to control a single channel.

Back to blog

Leave a comment