{
Save [CustomParameters]
[Device]
CustomFile    = name.ini
CustomSection = [Section]
}
procedure SaveCustom;
var f:String; i:Integer;
 procedure SaveTag(tag:Integer);
 begin
  if TypeTag(tag)=1 then Writeln(NameTag(tag),' = ',Str(iGetTag(tag)));
  if TypeTag(tag)=2 then Writeln(NameTag(tag),' = ',Str(rGetTag(tag)));
  if TypeTag(tag)=3 then Writeln(NameTag(tag),' = ',sGetTag(tag));
 end;
begin
 f:=ReadIni('CustomFile');
 if Length(f)>0 then begin
  i:=Rewrite(DaqFileRef(f,''));
  writeln(ReadIni('CustomSection'));
  for i:=1 to n do SaveTag(tag[i]);
  i:=Append('');
 end;
 f:='';
end;
{
Load [CustomParameters]
[Device]
CustomFile    = name.ini
CustomSection = [Section]
}
procedure LoadCustom;
var f:String;
 procedure LoadTag(tag:Integer);
 var s:String;
 begin
  s:=ReadIni(f+' '+NameTag(tag));
  if Length(s)>0 then begin
   if TypeTag(tag)=1 then b:=iSetTag(tag,Val(s));
   if TypeTag(tag)=2 then b:=rSetTag(tag,rVal(s));
   if TypeTag(tag)=3 then b:=sSetTag(tag,s);
  end;
 end;
begin
 f:=ReadIni('CustomFile');
 if Length(f)>0 then begin
  f:=DaqFileRef(f,'')+' '+ReadIni('CustomSection');
  for i:=1 to n do LoadTag(tag[i]);
 end;
 f:='';
end;
