====== s4 ====== ===== en ===== ==== name ==== A physical output should be written only once per PLC cycle ==== description ==== A physical output should be written only once per PLC cycle. **Detailed explanation** : Multiple output writing may lead to problems of dependability. Moreover, a code where the outputs are written more than one time is less easy to understand and thus maintain. It should be noted that writing in a loop is considered like a multiple writing and therefore constitutes a violation of this rule.\\ **Example** : if very_complicated_condition then Critical_Output := TRUE; end if; #.... much later in the code if another_very_complicated_condition then Critical_Output := FALSE; end if; In the case where this output is not controlled how it should, it is very difficult to identify which assignment is executed. **Level** : Mandatory\\ ==== errorMessage ==== * a) Output {VARIABLE} is written more than once ===== fr ===== ==== name ==== Une sortie ne doit être écrite qu'une seule fois ==== description ==== Une sortie physique ne doit être écrite qu'une seule fois par tour de cycle automate.\\ **Explication complémentaire** : L'écriture multiple d'une sortie peut conduire à des problèmes de sécurité de fonctionnement. Par ailleurs, un code dans lequel les sorties sont écrites plusieurs fois est moins facile à comprendre et donc à maintenir. A noter que l'écriture dans une boucle est considérée comme une écriture multiple et constitue donc une violation de cette règle.\\ **Exemple**: if condition_tres_complique then ma_sortie_critique := TRUE; end if; #.... beaucoup plus loin dans le code if une_autre_condition tres complique then ma_sortie_critique := FALSE; end if; # Dans le cas où cette sortie n'est pas commandée alors qu'elle le devrait, il est très # difficile d'identifier quelle affectation est exécutée. **Niveau conseillé** : Obligatoire\\ ==== errorMessage ==== * a) La sortie {VARIABLE} est écrite plusieurs fois ===== it ===== ==== name ==== Un output fisico deve essere scritto una sola volta per ciclo di PLC ==== description ==== Un output fisico deve essere scritto una sola volta per ciclo di PLC.\\ **Spiegazione supplementare**: la scrittura ripetuta di un output può causare problemi in termini di sicurezza di funzionamento. Inoltre, è meno facile comprendere e dunque manutenere un codice in cui lo stesso output è scritto più volte. Si noti che la scrittura in un loop è considerata come scrittura multipla e quindi costituisce una violazione di questa regola.\\ **Esempio**: if condizione_molto_complessa then output_critico := TRUE; end if; #.... molto più in là nel codice if un_altra_condizione_molto_complessa then output_critico := FALSE; end if; # Qualora questo output non sia controllato quando dovrebbe, diventa molto # difficile individuare quale assegnazione è stata eseguita. **Livello consigliato**: obbligatorio\\ ==== errorMessage ==== * a) L'output {VARIABLE} è stato scritto più volte ===== de ===== ==== name ==== Ein Ausgang darf nur einmal pro Programmzyklus geschrieben werden ==== description ==== Ein Ausgang darf nur einmal pro Programmzyklus geschrieben werden.\\ **Vertiefende Erklärung** : Ausgänge mehrfach zu schreiben, kann zu Problemen bei der Zuverlässigkeit führen. Darüber hinaus ist ein Programm mit mehrfach geschriebenen Ausgängen schwerer zu verstehen und damit auch zu warten. Es sollte auch erwähnt werden, dass das Schreiben in Schleifen als mehrfaches Schreiben angesehen wird und somit eine Verletzung dieser Regel darstellt.\\ **Beispiel** : if very_complicated_condition then Critical_Output := TRUE; end if; #.... viel später im Code if another_very_complicated_condition then Critical_Output := FALSE; end if; Falls der Output nicht ausgeführt wird wie er sollte, wird eine Identifizierung, welche Zuweisung ausgeführt wurde, sehr schwierig.\\ **Level** : Obligatorisch\\ ==== errorMessage ==== * a) Der Ausgang {VARIABLE} wird mehrfach benutzt