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_chiusura AND ((NOT "sensore_ganasce_aperte" ) AND
- "sensore_ganasce_chiuse")) AND (NOT "occupato")) THEN
- "reset_timer_ganasce" := 0;
- "sequenza" := 3;
- RETURN;
- END_IF;
- // avvio del temporizzatore e attivazione del comando
- IF ((((#richiesta_chiusura AND (NOT "sensore_ganasce_chiuse")) AND
- (NOT "comando_valv_ganasce")) AND (NOT "occupato")) AND
- (NOT "stato_timer_ganasce")) THEN
- "reset_timer_ganasce" := 0;
- "comando_valv_ganasce" := 1; // chiusura ganasce
- "occupato" := 1;
- "start_timer_ganasce" := 1;
- RETURN;
- END_IF;
- // arresto del temporizzatore
- IF (((#richiesta_chiusura AND "stato_timer_ganasce") AND "occupato") AND
- ("sensore_ganasce_chiuse" AND (NOT "sensore_ganasce_aperte"))) THEN
- "reset_timer_ganasce" := 1;
- "start_timer_ganasce" := 0;
- "occupato" := 0;
- RETURN;
- END_IF;
- // test per avvenuto errore
- IF ((((#richiesta_chiusura AND (NOT "stato_timer_ganasce")) AND
- "comando_valv_ganasce") AND (NOT "sensore_ganasce_chiuse")) AND
- "occupato") THEN
- "comando_valv_ganasce" := 0;
- "occupato" := 0;
- "start_timer_ganasce" := 0;
- "errore" := 'C'; //errore in Chiusura ganasce
- RETURN;
- END_IF;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement