%Set go/stop
%
%Sending a 0 will suspend subsequent changes of the target position
%until sending a value >0. This command does NOT disable the
%position control.
%
%To disable the position control mechanism use command 0xEF.

function goStop(H,sw)

globalVar;
servoReturn1 = 3;
servoReturn2 = 6;

command = GO_STOP;
param1 = 0;
param2 = sw;
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_GO_STOP;
    errfcn(H,err);
end
