function robot=robotAVbot(robot);

% Selection of Matlab interface
robot.comlib = 'matlab6';

% Type of controler (default is MARS6)
robot.controler = 'MARS2';

% Communication serial port name
robot.portname = 'COM4';
% Comport baud rate (default 19200 baud)
robot.BaudRate = 19200;

% Number of stop bits (Matlab default is 2)
if strcmpi(robot.controler,'MARS2'),
    robot.StopBits = 2; 
end;

% Robot degree of freedom
robot.DOF = 2;

% Transformation coeficient (degtoirc=1 when degree in IRC)
robot.degtoirc = [1, 10/360];

% Motors we can use. 
% Motor letter if the motor can be used, ' ' if the motor can't be used.
% For example: Type [' BCD F'] to use only motors B,C,D and F.
robot.activemotors=['AB    '];

% Softhome position in degrees (the desired HH position).
% In 'hhirc' is this position in IRC. Position in 'hhirc' is calibrated
% and is unique for each robot. 'hhirc' initialize function ['robot',robotname]
robot.hhdeg = [0, 0];

% hhirc (calibrated position of 'hhdeg'), portname.
% those are documentation numbers, shall be experimentally
% confirmed/refined
robot.hhirc = [0, 0];

% ???
robot.hhflag = 0;

% Robot bounds in degrees which are converted to IRC
robot.bound = [-100000, -10000;...
                 90000,  10000];

% The speed acceleration and max energy of motors
% These values are set according to setup of regulators
robot.defaultspeed = [3000, 100];
robot.defaultacceleration = [200, 10]; 
robot.REGME = [32000, 32000];

% Constants of PID regulators
robot.REGP = [  3, 50];
robot.REGI = [  3,  0];
robot.REGD = [  8,  0];

% Min and max speeds (IRC/256/msec)
robot.minspeed = round(robot.defaultspeed./5);
robot.maxspeed = round(robot.defaultspeed.*2);

% Min a max acceleration
robot.minacceleration = round(robot.defaultacceleration./5);
robot.maxacceleration = round(robot.defaultacceleration.*2);

% Configuration word for each axis
robot.REGCFG = [1369, 1369]; 

% CRS robot shall not release after some time
robot.IDLEREL = 1200;
