KHB Can Bus

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Kelly KHB/HP High Power Brushless Motor Controller User’s Manual V 3.

Table 2: KHB/HP Controller


CAN Commands List
Version 1.1

You should specify when sending:


ID:Our default ID is 0x6B, so only the data frame with ID 107 can be received by our controller.
However, it can be set by configuration program.
Frame type:data frame
Frame format:standard 11 bits ID
Length:the number of data field bytes
Data field:data[0] is the command which indicates the operation.

Controller response:
ID:The controller sends data frames with ID 115, 0x73. It also can be set by configuration program.
Frame type:data frame
Length:the number of data field bytes
Data field:The controller sends one or two data frames in response.

Commands definitions

Command CCP_FLASH_READ
Length 3
data[0] 0xF2
data[1] INFO_MODULE_NAME
data[2] 8
Controller response
Length 8
data[0]~data[7] Controller’s model in ASCII format, 8 bytes.
Description: Getting controller’s model no. E.g. 0x4B,0x42,0x4C is 'K' , 'B', 'L', 0x30 is '0' .
INFO_MODULE_NAME constant is defined as 64.

Command CCP_FLASH_READ
Length 3
data[0] 0xF2
data[1] INFO_SOFTWARE_VER
data[2] 2
Controller response
Length 2
data[0]~data[1] software version in BCD alike format, two bytes.
Description: Getting controller’s software version, it also define as the controller’s version, BCD
alike format storage. E.g. 0x0A,0x01 should be parsed to ASCII characters ‘0’ ‘A’ ‘0’ ‘1’ as the software
version. INFO_SOFTWARE_VER constant is defined as 83.

Command CCP_FLASH_READ
Length 3
data[0] 0xF2
data[1] CAL_TPS_DEAD_ZONE_LOW
data[2] 1
Controller response
Length 1
data[0] TPS_Dead_Zone_Low

Page 24
Kelly KHB/HP High Power Brushless Motor Controller User’s Manual V 3.3

Desccription: Getting controller’s Throttle low-end dead zone. CAL_TPS_DEAD_ZONE_LOW


constant is defined as 4.

Command CCP_FLASH_READ
Length 3
data[0] 0xF2
data[1] CAL_BRAKE_DEAD_ZONE_LOW
data[2] 1
Controller response
Length 1
data[0] Brake_Dead_Zone_Low
Desccription: Getting controller’s Brake low-end dead zone. CAL_BRAKE_DEAD_ZONE_LOW
constant is defined as 5.

Command CCP_FLASH_READ
Length 3
data[0] 0xF2
data[1] CAL_TPS_DEAD_ZONE_HIGH
data[2] 1
Controller response
Length 1
data[0] TPS_Dead_Zone_High
Desccription: Getting controller’s Throttle high-end dead zone. CAL_TPS_DEAD_ZONE_HIGH
constant is defined as 38.

Command CCP_FLASH_READ
Length 3
data[0] 0xF2
data[1] CAL_BRAKE_DEAD_ZONE_HIGH
data[2] 1
Controller response
Length 1
data[0] Brake_Dead_Zone_High
Desccription: Getting controller’s Brake high-end dead zone. CAL_BRAKE_DEAD_ZONE_HIGH
constant is defined as 39.

Command CCP_A2D_BATCH_READ1
Length 1
data[0] 0x1b
Controller response
Length 5
data[0] Brake A/D
data[1] TPS A/D
data[2] Operation voltage A/D
data[3] Vs A/D
data[4] B+ A/D
Description: Data batch reading.
1) For operation voltage, B+, A/D value and voltage mapping relation is:
V = Vad / 1.84. (For 120V controller).
V = Vad / 1.39. (For 144V controller).
2) Vs is defined as the 5V power supply for Hall sensor, control panel,ect. A/D value
and voltage mapping relation is:120 ~ 134 mapping to 4.75 ~ 5.25V.
3) Brake and TPS are defined as the Brake and the Throttle analog input. A/D value
and voltage mapping relation is: 0 ~ 255 mapping to 0 ~ 5V.

Page 25
Kelly KHB/HP High Power Brushless Motor Controller User’s Manual V 3.3

Command CCP_A2D_BATCH_READ2
Length 1
data[0] 0x1a
Controller response
Length 6
data[0] Ia A/D
data[1] Ib A/D
data[2] Ic A/D
data[3] Va A/D
data[4] Vb A/D
data[5] Vc A/D
Description: Data batch reading.
1) For Va, Vb, Vc, A/D value and voltage mapping relation is:
V = Vad / 1.84. (For 120V controller).
V = Vad / 1.39. (For 144V controller).
2) Ia, Ib and Ic are defined as the three phase current.

Command CCP_MONITOR1
Length 1
data[0] 0x33
Controller response
Length 6
data[0] PWM
data[1] enable motor rotation
data[2] motor temperature
data[3] Controller’s temperature
data[4] temperature of high side FETMOS heat sink
data[5] temperature of low side FETMOS heat sink
Description: Data batch reading.
1) PWM is output duty cycle, from 0 to 100.
2) data[1] indicates enabling motor rotation or disabling. 1 - enable, 0 - disable.
3) data[2] is defined as the temperature of motor in Celsius temperature. If the
temperature sensor is not connected, the controller returns 0xFF.
4) data[3]-data[5] are defined as controller inside temperature in Celsius temperature.
The value of data[4] and data[5] are inaccurate below 30℃.

Command CCP_MONITOR2
Length 1
data[0] 0x37
Controller response
Length 5
data[0] MSB of mechanical speed in RPM
data[1] LSB of mechanical speed in RPM
data[2] present current accounts for percent of the rated current of controller
data[3] MSB of error code
data[4] LSB of error code
Description: Data batch reading.
1) Mechanical speed calculation: (MSB << 8) | LSB. If the speed out data is not match
the real speed value, please configure the motor poles calibration data of the controller
based on the driven motor.
2) Controller error status:(data[3] << 8) | data[4],
data[3]M 7 6 5 4 3 2 1 0 data[3]L
0x44 0x43 0x42 0x41 0x34 0x33 0x32 0x31
data[4]M 7 6 5 4 3 2 1 0 data[4]L
0x24 0x23 0x22 0x21 0x14 0x13 0x12 0x11

Page 26
Kelly KHB/HP High Power Brushless Motor Controller User’s Manual V 3.3

if(data[3] << 8) | data[4]=0x4008,The corresponding error code is 0x43and 0x14.

Command COM_SW_ACC
Length 2
data[0] 0x42
data[0] COM_READING
Controller response
Length 1
data[0] Current throttle switch status
Description: Getting Throttle switch status, 1 – active, 0 – inactive. COM_READING constant is
defined as 0.

Command COM_SW_BRK
Length 2
data[0] 0x43
data[0] COM_READING
Controller response
Length 1
data[0] Current Brake switch status
Description: Getting Brake swith status, 1 – active, 0 – inactive. COM_READING constant is defined
as 0.

Command COM_SW_REV
Length 2
data[0] 0x44
data[0] COM_READING
Controller response
Length 1
data[0] Current Reverse switch status
Description: Getting Reverse swith status, 1 – active, 0 – inactive. COM_READING constant is
defined as 0.

NOTICE:
1.CAN bus rate should be configured to 250Kbit/s for J1939.
2.If the command is out of above commands
Controller response
Length 1
data[0] CCP_INVALID_COMMAND
Description: CCP_INVALID_COMMAND constant is defined as 0xe3.

Page 27
Kelly KHB/HP High Power Brushless Motor Controller User’s Manual V 3.3

Contact Us:

Kelly Controls, LLC

Home Page:
http://www.KellyController.com

E-mail:
[email protected]

Phone:
(01) 224 637 5092

Page 28

You might also like