Académique Documents
Professionnel Documents
Culture Documents
sur les
CI 11 SYSTMES LOGIQUES ET algorigrammes.doc
NUMRIQUES 1re
I 10 SYSTMES NUMRIQUES : IMPLANTATION DUN
ALGORITHME EN LANGAGE LITTRAL STRUCTUR Page:1/8
Objectifs du COURS :
- Ce cours sur les algorigrammes traitera essentiellement les points suivants :
- Dfinitions des principaux termes et symboles utiliss.
- Exemples d'applications aux systmes automatiss.
- Approche comparative entre algorigramme et GRAFCET.
GNRALITS - RAPPELS
- PROCESSUS :
L'enchainement chronologique des activits qui confrent la matire d'uvre sa valeur
ajoute est appel processus.
Un chronogramme
Un GRAFCET
Un algorigramme
- ALGORITHME :
NUMRIQUES 1re
I 10 SYSTMES NUMRIQUES : IMPLANTATION DUN
ALGORITHME EN LANGAGE LITTRAL STRUCTUR Page:2/8
- ALGORIGRAMME :
Le diagramme est une suite de directives composes d'actions et de dcisions qui doivent
tre excuts selon un enchanement strict pour raliser une tche (ou squence).
REMARQUE :
NUMRIQUES 1re
I 10 SYSTMES NUMRIQUES : IMPLANTATION DUN
ALGORITHME EN LANGAGE LITTRAL STRUCTUR Page:3/8
Exemple en langage C
If ( Condition )
{ Action 1 ; } { Action 1 ; }
{ Action 2 ; } Else
{ Action 2 ; }
Exemple en Basic11
If ( Condition ) then
Action 1
Action 1
Else
Action 2
Action 2
End if
REMARQUE :
Les algorithmes utilisent un ensemble de mots cls (dbut, fin, faire, tant que,
rpter, jusqu', ). L'avantage de ce langage est sa transcription facile en langage de
programmation dit volu (Basic, Pascal, C, ).
Fichier: Cours
sur les
CI 11 SYSTMES LOGIQUES ET algorigrammes.doc
NUMRIQUES 1re
I 10 SYSTMES NUMRIQUES : IMPLANTATION DUN
ALGORITHME EN LANGAGE LITTRAL STRUCTUR Page:4/8
On teste dabord la condition, la squence Laction est excute au moins une fois,
est excute tant que la condition est vraie elle est rpte tant quelle est fausse
Algorithme
Action
Tant que Condition vraie
Rpter Action
Faire Action
Jusqu Condition vrai
Exemple en langage C
Do
While (Condition)
{ Action ; }
{ Action ; }
While (Condition fausse)
Exemple en Basic11
Do while (Condition) Do
Action Action
Loop Loop until Condition vraie
EXEMPLES
Un four micro-ondes fonctionne pendant un temps Tf, jusqu' ce que Tf atteigne le temps Tp
programm par lutilisateur.
NUMRIQUES 1re
I 10 SYSTMES NUMRIQUES : IMPLANTATION DUN
ALGORITHME EN LANGAGE LITTRAL STRUCTUR Page:5/8
Tf<Tp
Tf=Tp
Algorigramme Algorithme
Dbut
Mesurer Tf
Tant que Tf<Tp
Activer micro-ondes
Mesurer Tf
Fin tant que
Arrter micro-ondes
Fin
Thermostat
Rsistance chauffante
RC
c
Fichier: Cours
sur les
CI 11 SYSTMES LOGIQUES ET algorigrammes.doc
NUMRIQUES 1re
I 10 SYSTMES NUMRIQUES : IMPLANTATION DUN
ALGORITHME EN LANGAGE LITTRAL STRUCTUR Page:6/8
RADIATEUR
Hystrsis du thermostat :
19 C plage de +/- 0,5C +/- 1C
= 18C
(selon type de thermostat
lectronique ou bulbe)
17 C
Temprature <= 17 C
10 ALIMENTER RC
Temprature >= 19 C
Fichier: Cours
sur les
CI 11 SYSTMES LOGIQUES ET algorigrammes.doc
NUMRIQUES 1re
I 10 SYSTMES NUMRIQUES : IMPLANTATION DUN
ALGORITHME EN LANGAGE LITTRAL STRUCTUR Page:7/8
2 - Par un radiateur eau chaude pilot par une vanne motorise selon le schma
page suivante :
Vanne motorise 2 sens (Ouverture / fermeture)
NUMRIQUES 1re
I 10 SYSTMES NUMRIQUES : IMPLANTATION DUN
ALGORITHME EN LANGAGE LITTRAL STRUCTUR Page:8/8
0 FERMER vanne
Temprature <=17 C
10 OUVRIR vanne
Temprature >=19 C
REMARQUES :