anchor.diff:      procedure OnMTBStop(Sender:TObject);
       procedure OnMTBOpen(Sender:TObject);
       procedure OnMTBClose(Sender:TObject);
  -    procedure OnMTBErrOpen(Sender:TObject; errValue: word; errAddr: byte; errMsg:string);
  +    procedure OnMTBErrOpen(Sender:TObject; errMsg:string);
       procedure OnMTBErrClose(Sender:TObject; errValue: word; errAddr: byte; errMsg:string);
  -    procedure OnMTBErrStart(Sender:TObject; errValue: word; errAddr: byte; errMsg:string);
  +    procedure OnMTBErrStart(Sender:TObject; errMsg:string);
       procedure OnMTBErrStop(Sender:TObject; errValue: word; errAddr: byte; errMsg:string);
       procedure OnMTBReady(Sender:TObject; ready:boolean);
   
  
positive.code:   try
      MTB.Start();
    except
     on E:Exception do
      begin
       AppEvents.LogException(E, '----- MTB START FAIL -----');
       Self.LogStatus('MTB: START FAIL - '+E.Message);
       if (SystemData.Status = starting) then
        begin
         SystemData.Status := TSystemStatus.null;
         Self.A_System_Start.Enabled := true;
        end;
       Application.MessageBox(PChar('Chyba pri zapinani komunikace'+#13#10+E.Message), 'Chyba', MB_OK OR MB_ICONERROR);
      end;
    end;
  end;
  
  
negative.code:  SB1.Panels.Items[_SB_MTB].Text := 'MTB closed';
  
   Application.MessageBox(PChar('Pri uzavrn MTB nastala chyba '+#13#10+errMsg+#13#10+'Chybovy kod: '+IntToStr(errValue)+':'+IntToStr(errAddr)),'Chyba',MB_OK OR MB_ICONERROR);
   writelog('----- MTB CLOSE FAIL - '+errMsg+' - errValue='+IntToStr(errValue)+' -----', WR_ERROR, 21);
  end;//procedure
  
  procedure TF_Main.OnMTBErrStart(Sender:TObject; errMsg:string);
  begin
    A_MTB_Close.Enabled := true;
    A_System_Start.Enabled := true;
    A_MTB_Go.Enabled := true;
  
    SB1.Panels.Items[_SB_MTB].Text := 'MTB openned';
    S_MTB_Start.Brush.Color := clRed;
  
    SystemData.Status := TSystemStatus.null;
    Self.A_System_Start.Enabled := true;
    Self.A_System_Stop.Enabled := true;
  
    //defaultni hodnota padu
    Konfigurace.ini := TMemIniFile.Create(F_Options.E_dataload.Text);
    Konfigurace.ini.WriteInteger('SystemCfg','RunError',0);
    Konfigurace.ini.UpdateFile;
    Konfigurace.ini.Free;
  
    Self.LogStatus('ERR: MTB START FAIL: '+errMsg);
    writelog('----- MTB START FAIL - '+errMsg+' -----',WR_ERROR,21);
  
    Application.MessageBox(PChar('Pi zapnn komunikace nastala chyba:'+#13#10+errMsg), 'Chyba', MB_OK OR MB_ICONWARNING);
  end;//procedure
  
  procedure TF_Main.OnMTBErrStop(Sender:TObject; errValue: word; errAddr: byte; errMsg:string);
  begin
    with (F_Main) do
     begin
  