Fault/Status flag reading from CAN

7 years 5 months ago - 7 years 5 months ago #29528466 by gatorkyu
My HBL2360 motor controller is connected to my MCU through CAN port.
I was able to run the motor but when I tried to read the fault and status message, following codes are shown.

When MCU sending 0 rpm,---> when MCU sending xx rpm
Fault Code: 0b10000000 (0x80) ---> 0b10011000 (0x98)
Status Code: 0b00000001 (0x01) ---> 0b00110001 (0x31)

Refer to the User manual
f1 = overheat
f2 = overvoltage
f3 = undervoltage
f4 = short circuit
f5 = emergency stop
f6 = Sepex excitation fault
f7 = MOSFET failure
f8 = startup configuration fault

f1 = Serial mode
f2 = Pulse mode
f3 = Analog mode
f4 = Power stage off
f5 = Stall detected
f6 = At limit
f7 = Unused
f8 = MicroBasic script running

Which means, the controller normally has startup config fault, and short circuit & emergency stop fault when running.
However the manual does not specifically explain why this code is generated.
Could anyone in this forum can answer why these happens?
FYI, I attached my basic scripts that check and update the fault and status code

dim b as Boolean
for i = 1 AndWhile i<9
b = getvalue(_FF, i)
b = getvalue(_FS, i)

Please Log in or Create an account to join the conversation.

7 years 5 months ago #29528467 by gatorkyu
Solved this issue by changing the scripts as follows.
Manual says getvalue _FF, _FS does not take individual argument.

fc = getvalue(_FF)
fs = getvalue(_FS)
for i = 0 AndWhile i<8
if (fc>>i) and 1 then
end if
if (fs>>i) and 1 then
end if

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.073 seconds