function writecurrentsfile(fh, devdescr, values)

n = length(devdescr);
nv = length(values);

if (nv < n) 
  error('Array with values to be set is shorter then array of devices\n');
  return;
end

for i=1:n
  fprintf(fh,'%s = %f ;\n',devdescr(i).madname,values(i));
end

