Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #tempo_att := S_PEXT(T_NO := "timer_pulsante", S := "start_timer_pulsante",
- TV := #tempo_preimpostato, Q => "stato_timer_pulsante",
- R := "reset_timer_pulsante");
- // salto alla successiva fase
- START:
- IF (((NOT #richiesta) AND ("pulsante_dx" AND "pulsante_sx")) AND #consenso) THEN
- "reset_timer_pulsante" := 0;
- "sequenza" := 1;
- RETURN;
- END_IF;
- // avvio del temporizzatore e attivazione del comando
- IF (((#richiesta AND (NOT ("pulsante_dx" AND "pulsante_sx")))
- AND (NOT #consenso)) AND (NOT "stato_timer_pulsante")) THEN
- "reset_timer_pulsante" := 0;
- "start_timer_pulsante" := 1;
- #consenso := 1;
- RETURN;
- END_IF;
- // arresto del temporizzatore
- IF ((#richiesta AND "stato_timer_pulsante") AND ("pulsante_dx"
- AND "pulsante_sx")) THEN
- "start_timer_pulsante" := 0;
- "reset_timer_pulsante" := 1;
- #richiesta := 0;
- GOTO START;
- END_IF;
- // test per avvenuto errore
- IF (((#richiesta AND (NOT "stato_timer_pulsante")) AND #consenso)
- AND (NOT ("pulsante_dx" AND "pulsante_sx"))) THEN
- #richiesta := 0;
- #consenso := 0;
- "pulsante_dx" := 0;
- "pulsante_sx" := 0;
- "start_timer_pulsante" := 0;
- "reset_timer_pulsante" := 0;
- "errore" := 'X'; //errore in emergenza nel consenso
- RETURN;
- END_IF;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement