anchor.diff:     SInput:array [0..15] of TShape;
      SOutput:array [0..15] of TShape;   
   
  +   LInput:array [0..15] of TLabel;
  +   LOutput:array [0..15] of TLabel;
  +
       procedure CreateSInput;
       procedure CreateSOutput;
       procedure SOutputMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
  
positive.code:  end;//procedure
  
  procedure TF_Tester.CB_MtbAdrChange(Sender: TObject);
  var cyklus:Integer;
   begin
    for cyklus := 0 to 15 do
     begin
      SInput[cyklus].Brush.Color  := clGray;
      SOutput[cyklus].Brush.Color := clGray;
     end;//for cyklus
  
    if ((CB_MtbAdr.ItemIndex > -1) and (CB_MtbAdr.ItemIndex < Length(CB_MTBAdrData))) then
     begin
  
negative.code:     InputState:TRCSInputState;
      LastState:TRCSInputState;
      stateStr:string;
      inCnt:Cardinal;
   begin
    if ((not RCSi.NoExStarted()) or (MTBAddr < 0) or (RCSi.IsModuleFailure(MTBAddr))) then
     begin
      for i := 0 to 15 do
       begin
        SInput[i].Brush.Color := clGray;
        SInput[i].Visible := true;
       end;
      Exit();
     end;
  
    try
      inCnt := RCSi.GetModuleInputsCount(MTBAddr);
    except
      inCnt := 16;
    end;
  
    for i := 0 to 15 do
     begin
      SInput[i].Visible := (i < Integer(inCnt));
      LInput[i].Visible := (i < Integer(inCnt));
  
      if (i < Integer(inCnt)) then
       begin
        try
          InputState := RCSi.GetInput(MTBAddr, i);
        except
          InputState := failure;
        end;
  
        if (F_Tester.CHB_LogZmeny.Checked) then
         begin
          case (SInput[i].Brush.Color) of
           clRed :LastState := isOff;
           clLime:LastState := isOn;
           clGray:LastState := failure;
           clSilver:LastState := notYetScanned;
          else
           LastState := failure;
          end;
  
          if (InputState <> LastState) then
           begin
            case (InputState) of
             isOff         : stateStr := '0';
             isOn          : stateStr := '1';
             failure       : stateStr := 'F';
             notYetScanned : stateStr := '?';
            end;
  
            F_Tester.LB_Changes.Items.Add('Zmena:: MTB:'+Format('%3d' ,[MTBAddr])+', port: '+Format('%2d' ,[i])+', state:'+stateStr);
            Beep;
           end;//if (InputState <> LastState)
         end;//if F_Tester.CHB_LogZmeny.Checked
  
        if (InputState = isOn) then
          SInput[i].Brush.Color := clLime
        else if (InputState = isOff) then
          SInput[i].Brush.Color := clRed
        else if (InputState = notYetScanned) then
          SInput[i].Brush.Color := clSilver
        else
          SInput[i].Brush.Color := clGray;
       end;//if i < inCnt
     end;//for i
   end;//procedure
  
  