Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #tempo_att := S_PEXT(T_NO := "timer_ganasce", S := "start_timer_ganasce",
- TV := #tempo_preimpostato, Q => "stato_timer_ganasce",
- R := "reset_timer_ganasce");
- // salto alla successiva fase
- IF ((#richiesta_apertura AND ("sensore_ganasce_aperte" AND
- (NOT "sensore_ganasce_chiuse"))) AND (NOT "occupato")) THEN
- "reset_timer_ganasce" := 0;
- "sequenza" := 5;
- RETURN;
- END_IF;
- // avvio del temporizzatore e attivazione del comando
- IF ((((#richiesta_apertura AND (NOT "sensore_ganasce_aperte")) AND
- "comando_valv_ganasce") AND (NOT "occupato")) AND
- (NOT "stato_timer_ganasce")) THEN
- "reset_timer_ganasce" := 0;
- "comando_valv_ganasce" := 0; // apertura ganasce
- "occupato" := 1;
- "start_timer_ganasce" := 1;
- RETURN;
- END_IF;
- // arresto del temporizzatore
- IF (((#richiesta_apertura AND "stato_timer_ganasce") AND "occupato") AND
- ("sensore_ganasce_aperte" AND (NOT "sensore_ganasce_chiuse"))) THEN
- "reset_timer_ganasce" := 1;
- "start_timer_ganasce" := 0;
- "occupato" := 0;
- RETURN;
- END_IF;
- // test per avvenuto errore
- IF (#richiesta_apertura AND (NOT "stato_timer_ganasce") AND
- (NOT "comando_valv_ganasce") AND (NOT "sensore_ganasce_aperte")
- AND "occupato") THEN
- "comando_valv_ganasce" := 1;
- "occupato" := 0;
- "start_timer_ganasce" := 0;
- "errore" := 'G'; //errore in apertura Ganasce
- RETURN;
- END_IF;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement