%Release
%
%This command stops the servos position control mechanism. The joint
%can be moved by hand afterwards.
%
%Note: Any following move command on ANY servo on the bus will
%re-enable all servos. A re-enabled servo will move to the last set
%target position with highest possible speed.

function releaseAll(H)

globalVar;
servoReturn1 = 3;
servoReturn2 = 3;

command = RELEASE;
param1 = 0;
param2 = 0;
checksum = 256 - mod((STARTBYTE+command+param1+param2),256);

sendMessage(H,command,param1,param2,checksum);
[return1,return2]=readMessage(H);

if((servoReturn1 ~= return1) || (servoReturn2 ~= return2))
    err = ERR_RELEASE;
    errfcn(H,err);
end
