function move(H,pos0,pos1,pos2)

globalVar;

pos0 = round((((pos0+ANGLE_MAX)*VAL_ANGLE_RANGE)/ANGLE_RANGE)+VAL_ANGLE_MIN);
param1 = bitand(pos0,MASK_HIGH) / 256;
param2 = bitand(pos0,MASK_LOW);

pos1 = round((((pos1+ANGLE_MAX)*VAL_ANGLE_RANGE)/ANGLE_RANGE)+VAL_ANGLE_MIN);
param3 = bitand(pos1,MASK_HIGH) / 256;
param4 = bitand(pos1,MASK_LOW);

pos2 = round((((pos2+ANGLE_MAX)*VAL_ANGLE_RANGE)/ANGLE_RANGE)+VAL_ANGLE_MIN);
param5 = bitand(pos2,MASK_HIGH) / 256;
param6 = bitand(pos2,MASK_LOW);

sendServo(H,22,param1,param2,param3,param4,param5,param6);            
[command,return1,return2,return3] = readServo(H);

if(~(command == INV_KIN && ~return1 && ~return2 && ~return3))
    disp('OPERATION FAILED: Testing Move');
end

end