SR = 71615248;
SR = cast(SR, 'uint32');

if(bitget(SR,1))
    disp('Drive OK');
else
    disp('Drive Problem');
end

bits = bitget(SR, 2:4);
if((bits(1) == 0) && (bits(2) == 0) && (bits(3) == 0))
    disp('Drive status OK');
elseif ((bits(1) == 1) && (bits(2) == 0) && (bits(3) == 0))
    disp('Drive status: Under voltage');
elseif ((bits(0) == 0) && (bits(2) == 1) && (bits(3) == 0))
    disp('Drive status: Over voltage');
elseif ((bits(0) == 1) && (bits(2) == 0) && (bits(3) == 1))
    disp('Drive status: Short circuit');
elseif ((bits(0) == 0) && (bits(2) == 1) && (bits(3) == 1))
    disp('Drive status: Overheating');
end

bits = bitget(SR, 8:10);
if((bits(1) == 0) && (bits(2) == 0) && (bits(3) == 0))
    disp('UM = 0');
elseif ((bits(1) == 1) && (bits(2) == 0) && (bits(3) == 0))
    disp('UM = 1');
elseif ((bits(1) == 0) && (bits(2) == 1) && (bits(3) == 0))
    disp('UM = 2');
elseif ((bits(1) == 1) && (bits(2) == 1) && (bits(3) == 0))
    disp('UM = 3');
elseif ((bits(1) == 0) && (bits(2) == 0) && (bits(3) == 1))
    disp('UM = 4');
elseif ((bits(1) == 1) && (bits(2) == 0) && (bits(3) == 1))
    disp('UM = 5');
end

if(bitget(SR,5))
    disp('Motor On');
else
    disp('Motor Off');
end

if(bitget(SR,15))
    disp('Current limit On');
else
    disp('Current limit Off');
end
    
