Advertisement
Guest User

Untitled

a guest
Apr 15th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.72 KB | None | 0 0
  1. with Datos, IO, Control;
  2. use Datos, IO, Control;
  3. with ada.Text_IO; use ada.Text_IO;
  4. procedure controlador is
  5.    ST2 : Temperatura;
  6.    SD1 : Radiacion;
  7.    SC1, SC2 : Caudal;
  8.    cont: Integer:= 1;
  9. begin
  10. -- Inicializamos algunos datos
  11.    ST2:=85.00;
  12.    SC1:=10.00;
  13.    SC2:=500.00;
  14.    for i in 1..8 loop
  15.       -- 50 ms
  16.       lecturaT(ST2);
  17.       SistemaSeguridad(ST2, SC1, SC2);
  18.       if(cont mod 2 = 0) then
  19.          -- 100 ms
  20.          lecturaT(ST2);
  21.          ControlST2(ST2, SC1);
  22.          escrituraC(SC1);
  23.       end if;
  24.       if (cont mod 4 = 0) then
  25.          -- 200 ms
  26.          lecturaR(SD1);
  27.          ControlSD1(SD1, SC2);
  28.          escrituraC(SC2);
  29.       end if;
  30.       cont:= cont+1;
  31.    end loop;
  32. end controlador;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement