![RoboteQ CANBus Series User'S Reference Manual Download Page 15](http://html1.mh-extra.com/html/roboteq/canbus-series/canbus-series_users-reference-manual_1471291015.webp)
CANBus Networking Manual
15
Using MiniCAN Mode
Header:
RPDO1: 0x200 + NodeID
RPDO2: 0x300 + NodeID
RPDO3: 0x400 + NodeID
RPDO4: 0x500 + NodeID
Data:
Byte1 Byte2 Byte3 Byte4 Byte5 Byte6 Byte7 Byte8
RPDO1
VAR9
VAR10
RPDO2
VAR11
VAR12
RPDO3
VAR13
VAR14
VAR15
VAR16
RPDO4
BVar
33-40
BVar
41-48
BVar
49-56
BVar
57-64
Byte and Bit Ordering:
Integer Variables are loaded from frame with the Least Significant Byte first. Example, a
frame with data as 0x78 0x56 0x34 0x12 will load in an Integer Variable as 0x12345678.
Boolean Variables are loaded from a frame as shown in the table above, with the lowest
Boolean Variable occupying the least significant bit of each byte. Example a received byte
of 0x01 will set Boolean Var 33 and clear Vars 34 to 40.
MiniCAN Usage Example
MiniCAN can only be used with the addition of MicroBasic scripts that will give a mean-
ing to the general variables in which the CAN data are stored. The following simple script
uses VAR1 that is transported in RPDO1 as the incoming motor command and puts the
Motor Amp VAR9 so that it is sent in TPDO1.
top:
speed = getvalue(_VAR, 9)
setcommand(_G, 1, speed)
motor_amp = getvalue(_A, 1)
setcommand(_VAR, 1, motor_amp)
wait(10)
goto top:
Note: This script does not check for loss of communication on the CAN bus. It is provided
for information only.