plcopen standardization in industrial control programming plcopen 1 printed at 29-5-2014 iec...

65
PLCopen Standardization in Industrial Control Programming LCopen 1 printed at 25-04-22 http://www.plcopen.org IEC 61131-3 Tutoriel

Upload: asce-perrot

Post on 04-Apr-2015

116 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 1 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3 Tutoriel

Page 2: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 2 printed at 11-04-23 http://www.plcopen.org

Le futur est là

Eelco van der Wal

Managing Director PLCopen

Trad.: J.M. Boissard

Harmoniser la manière de voir le contrôle

Page 3: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 3 printed at 11-04-23 http://www.plcopen.org

Fiction?Imaginez …

* Vous travaillez dans le domaine du contrôle industriel

* Avec 4 marques de manufacturiers

* Chacun utilisant un dialecte différent pour chacun de ses langages

• Luttant pour harmoniser vos programmes entre vos programmeurs, vos ingénieurs électrique et votre personnel d’entretien dans l’usine

• * et découvrant que vos concurrents font mieux que vous

Pourquoi? Qu’est-ce qui cloche ?

Page 4: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 4 printed at 11-04-23 http://www.plcopen.org

C’est la jungle !!!!!!

Tous ces problèmes peuvent être résolus en grande partie par un standardisation

... Et un tel standard existe

Page 5: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 5 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3

“La meilleure chose qui pouvait arriver dans le contrôle industriel”

“The best thing that happened to industrial control”

Sugar Lantic on Automation Maillist

Page 6: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 6 printed at 11-04-23 http://www.plcopen.org

Les 7 parties du standard IEC 61131

- 1 Présentation générale, définitions

- 2 Quincaillerie (Hardware)

- 3 Langages de programmation

- 4 Guides d’utilisation

- 5 Spécifications du service de messagerie (communications)

- 7 Logique floue (Fuzzy Logic)

- 8 Guides d’implémentation

Page 7: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 7 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3 Langages de programmation /

Programmation du contrôle industriel

L’interface entre le programmeur et le système de contrôle

Page 8: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 8 printed at 11-04-23 http://www.plcopen.org

...avec le support pour les gens ...avec chacun leur approche

IEC 61131-3 Langages de programmation /

Programmation du contrôle industriel

Page 9: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 9 printed at 11-04-23 http://www.plcopen.org

Quels sont les avantages d’un tel standard ?

Page 10: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 10 printed at 11-04-23 http://www.plcopen.org

Utilisateur? Quels utilisateurs?

Formation

InstallationMaintenance

Programmation

Procédé continu

Procédé séquentiel

Intégrateur de système VOUS ??

Page 11: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 11 printed at 11-04-23 http://www.plcopen.org

• Lignes de production automobile

• Usine d’épuration

• Industrie Agroalimentaire et conditionnement

• Fabrication de câble

• Stérilisation de procédés pharmaceutique ou de fabrication de semi-conducteurs

• Manège de parc d’attraction

• Usine de traitement de déchets radioactifs

Cette grande diversité exige beaucoup de différentes compétences, de différentes approches

Utilisateur? Quels utilisateurs?

Page 12: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 12 printed at 11-04-23 http://www.plcopen.org

Réduire le gaspillage de ressources humaines (dans la formation, le déverminage, la maintenance et la documentation)

Quels sont les avantages d’un tel standard ?

Page 13: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 13 printed at 11-04-23 http://www.plcopen.org

Réduire le gaspillage de ressources humaines (dans la formation, le déverminage, la maintenance et la documentation)

Se concentrer sur la solution du problème via la conception de programmes modulaires ré-utilisables (Réduction de l’investissement pour l’application et de la dépendance aux fournisseurs)

Quels sont les avantages d’un tel standard ?

Page 14: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 14 printed at 11-04-23 http://www.plcopen.org

Réduire le gaspillage de ressources humaines (dans la formation, le déverminage, la maintenance et la documentation)

Se concentrer sur la solution du problème via la conception de programmes modulaires ré-utilisables (Réduction de l’investissement pour l’application et de la dépendance aux fournisseurs)

Réduire les erreurs d’interprétation et de compréhension

Quels sont les avantages d’un tel standard ?

Page 15: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 15 printed at 11-04-23 http://www.plcopen.org

Réutiliser des techniques de programmation dans différents environnements (Contrôle industriel général)

Quels sont les avantages d’un tel standard ?

Réduire le gaspillage de ressources humaines (dans la formation, le déverminage, la maintenance et la documentation)

Se concentrer sur la solution du problème via la conception de programmes modulaires ré-utilisables (Réduction de l’investissement pour l’application et de la dépendance aux fournisseurs)

Réduire les erreurs d’interprétation et de compréhension

Page 16: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 16 printed at 11-04-23 http://www.plcopen.org

Combiner harmonieusement différents composants, et procédures de différents projets, locations, compagnies ou pays

Quels sont les avantages d’un tel standard ?

Réduire le gaspillage de ressources humaines (dans la formation, le déverminage, la maintenance et la documentation)

Se concentrer sur la solution du problème via la conception de programmes modulaires ré-utilisables (Réduction de l’investissement pour l’application et de la dépendance aux fournisseurs)

Réduire les erreurs d’interprétation et de compréhension Réutiliser des techniques de programmation dans différents

environnements (Contrôle industriel général)

Page 17: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 17 printed at 11-04-23 http://www.plcopen.org

Accroitre l’interconnectivité des procédés (protection de l’investissement)

Quels sont les avantages d’un tel standard ?

Réduire le gaspillage de ressources humaines (dans la formation, le déverminage, la maintenance et la documentation)

Se concentrer sur la solution du problème via la conception de programmes modulaires ré-utilisables (Réduction de l’investissement pour l’application et de la dépendance aux fournisseurs)

Réduire les erreurs d’interprétation et de compréhension Réutiliser des techniques de programmation dans différents

environnements (Contrôle industriel général) Combiner harmonieusement différents composants, et

procédures de différents projets, locations, compagnies ou pays

Page 18: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 18 printed at 11-04-23 http://www.plcopen.org

Function "LIMIT"

Function "TEST"

Function Block"Turning"

Function Block"Feeding"

Function Block"Heating"

SoftwareLibrary

Quels sont les avantages d’un tel standard ?

Réduire le gaspillage de ressources humaines (dans la formation, le déverminage, la maintenance et la documentation)

Se concentrer sur la solution du problème via la conception de programmes modulaires ré-utilisables (Réduction de l’investissement pour l’application et de la dépendance aux fournisseurs)

Réduire les erreurs d’interprétation et de compréhension

Réutiliser des techniques de programmation dans différents environnements (Contrôle industriel général)

Combiner harmonieusement différents composants, et procédures de différents projets, locations, compagnies ou pays

Accroître l’inter connectivité des procédés (protection de l’investissement)

Page 19: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 19 printed at 11-04-23 http://www.plcopen.org

Les Avantages clés de IEC 61131-3

• Programmes structurés – par l’utilisation de configurations, ressources et des unités d’organisation de programmes UOP (sections) Program Organization Units (POUs)

• Strucure solide des données – à travers l’utilisation de langages qui restreignent les opérations aux types de variables appropriées

• Contrôle de l’exécution – par le découpage en tâches

• Conduite de séquences complexes – par les grafcets (Sequential Function Charts, SFC)

• Encapsulation – par l’utilisation de structures et de données complexes des UOPs (POUs),

Page 20: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 20 printed at 11-04-23 http://www.plcopen.org

Un exemple:

Système de contrôle de fermentation

Courtoisie de Omron Electronics

Page 21: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 21 printed at 11-04-23 http://www.plcopen.org

Procédé de fermentation

Bande chauffante

Agent acide

Agent basique

Valve de sortie du produitVidage

Senseur de pH

Senseur de température

Valve d’alimentationRemplissage

agitateur

Page 22: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 22 printed at 11-04-23 http://www.plcopen.org

Décomposition du procédé de fermentation

• Séquence principale e.g. Principales séquences: - remplissage, chauffage, brassage, fermentation, tirage, nettoyage.

• Contrôle des valves e.g. Opération des valves de remplissage et de vidage

• Contrôle de Temperature pour contrôller la température du réservoir et moduler le chauffage

• Contrôl de l’agitateur pour activer le moteur de l’agitateur selon les consignes de la séquence principale

• Control du pH pour contrôller l’acidité du produit à fermenter et ajouter au besoin un agent acide ou basique

Page 23: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 23 printed at 11-04-23 http://www.plcopen.org

Programme du contrôle de la fermentationCont. Température

Séquence principale

FillState

Agitation

pH

PV

PV

PV

SetPoint

Temp

Positions des valves

Vitesse d’agitation

Capteur de température

Capteur de pHr

Durée

Arrêt

DépartStart

Duration

Stop

Control du pH

Agent basiqueAddAlkali

Agent acide

AddAcidSetPoint

Contrôle de l’agitateur

Vitesse de l’agitateurMotorSpeedSetPoint

Contrôle des valves

RemplissageFill

VidageHarvest

State

RefroidiCool

Chauffe

Heat

Page 24: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 24 printed at 11-04-23 http://www.plcopen.org

Séquence principale(SFC)

N Initialisation S1

N RemplirS2

N ChaufferS3

N FermenterS4

N ViderS5

N NettoyerS6

Montre les principalesphases du procédé

Page 25: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 25 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3

Survol...

Page 26: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 26 printed at 11-04-23 http://www.plcopen.org

Le Standard IEC 61131-3

Éléments communsCommon Elements

Langages de programmationProgramming Languages

Page 27: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 27 printed at 11-04-23 http://www.plcopen.org

Éléments communsCommon Elements

Langages de programmationProgramming Languages

Le Standard IEC 61131-3

Page 28: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 28 printed at 11-04-23 http://www.plcopen.org

Les Langages de Programmation IEC 61131-3

Liste d’instruction Texte structuréInstruction List Structured Text

Diagramme bloc Diagramme en echelleFunction Block Diagram Ladder Diagram

C:= A AND NOT B

A B C

-| |--|/|----------------( )

LD A

ANDN B

ST C

AND

A C

B

Page 29: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 29 printed at 11-04-23 http://www.plcopen.org

Les éléments communs comprennet :

Variables, Types de données et Déclarations

Configuration, Ressources et Tâches

Fonctions, Fonction Blocs et Programmes

Grafcet (Sequential Function Charts)

Page 30: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 30 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3 : Éléments communs

Variables

• Representation symbolique via les étiquettes (labels)

• Zone réservées pour le mapping des E/S

• Le code est indépendant du hardware

Qu’est-ce que ceci?

01010101 10101010

Page 31: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 31 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3 : Éléments communs

Types de données

comme:

BOOL BYTE

INTEGER : SINT, INT, DINT, LINT

USINT, UINT, UDINT, ULINT

REAL, LREAL

DATE

TIME_OF_DAY

DATE_AND_TIME

STRING

Page 32: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 32 printed at 11-04-23 http://www.plcopen.org

Déclaration de variable

Les variables sont déclarées par une étiquette textuelle:

Un but: local (ou global)

Passage paramètres explicites par des variables (entrées ou sorties)

allocation de la mémoire

Lors de leur déclaration on peut y inclure les valeurs initiales

Associées au Unité d’Organisation de Programme (Fonction, Bloc

Fonction ou Programme)

Page 33: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 33 printed at 11-04-23 http://www.plcopen.org

Mot clé Usage de la variable

VAR Interne à l’unité d’organisation (POU)

VAR_INPUT Origine externe, non modifiable dans l’unité

VAR_OUTPUT Générée par l’unité aux entités externes

VAR_IN_OUT Origine externe, mais peuvent être modifiée par l’unité

VAR_EXTERNAL Fournie par configuration via VAR_GLOBAL

VAR_GLOBAL Déclaration variable globale

VAR_ACCESS Déclaration du chemin d’accès

RETAIN Variables rétentives

CONSTANT Constante (ne peu pas être modifiée)

AT Assignement d’une location

Déclaration de variable

Page 34: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 34 printed at 11-04-23 http://www.plcopen.org

Déclarations de variable : exemple

VAR

CONDITION_RED : BOOL;

IBOUNCE : WORD;

MYDUB : DWORD;

AWORD, BWORD, CWORD: INT;

OKAY : STRING[10] := ‘OK’;

END_VAR

Page 35: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 35 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3 : Éléments Communs

Types de données & Variables

Mais aussi:

Vos propres types de

données…

Et types dérivés

Page 36: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 36 printed at 11-04-23 http://www.plcopen.org

Types de données dérivés

Dérivation directe depuis des types élémentaires e.g.:TYPE R : REAL ; END_TYPE

Type de données énumérés, e.g.:TYPE ANALOG_SIGNAL_TYPE : (SINGLE_ENDED, DIFFERENTIAL) ; END_TYPE

Sous-groupe de type de données (Sub-range), e.g.:TYPE ANALOG_DATA : INT (-4095..4095) ; END_TYPE

Types de données en tableau (Array), e.g.:TYPE ANALOG_16_INPUT_DATA : ARRAY [1..16] OF ANALOG_DATA ; END_TYPE

Page 37: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 37 printed at 11-04-23 http://www.plcopen.org

Vos propres types de données: types dérivés

TYPE ANALOG_CHANNEL_CONFIGURATION : STRUCT RANGE : ANALOG_SIGNAL_RANGE ; MIN_SCALE : ANALOG_DATA ; MAX_SCALE : ANALOG_DATA ; END_STRUCT ;

ANALOG_16_INPUT_CONFIGURATION : STRUCT SIGNAL_TYPE : ANALOG_SIGNAL_TYPE ; FILTER_PARAMETER : SINT (0..99) ; CHANNEL : ARRAY [1..16] OF ANALOG_CHANNEL_CONFIGURATION ; END_STRUCT ;END_TYPE

Page 38: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 38 printed at 11-04-23 http://www.plcopen.org

TYPE ANALOG_CHANNEL_CONFIGURATION : STRUCT RANGE : ANALOG_SIGNAL_RANGE ; MIN_SCALE : ANALOG_DATA ; MAX_SCALE : ANALOG_DATA ; END_STRUCT ;

ANALOG_16_INPUT_CONFIGURATION : STRUCT SIGNAL_TYPE : ANALOG_SIGNAL_TYPE ; FILTER_PARAMETER : SINT (0..99) ; CHANNEL : ARRAY [1..16] OF ANALOG_CHANNEL_CONFIGURATION ; END_STRUCT ;END_TYPE

TYPE ANALOG_DATA : INT (-4095..4095) ; END_TYPE

Vos propres types de données: types dérivés

Page 39: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 39 printed at 11-04-23 http://www.plcopen.org

TYPE ANALOG_CHANNEL_CONFIGURATION : STRUCT RANGE : ANALOG_SIGNAL_RANGE ; MIN_SCALE : ANALOG_DATA ; MAX_SCALE : ANALOG_DATA ; END_STRUCT ;

ANALOG_16_INPUT_CONFIGURATION : STRUCT SIGNAL_TYPE : ANALOG_SIGNAL_TYPE ; FILTER_PARAMETER : SINT (0..99) ; CHANNEL : ARRAY [1..16] OF ANALOG_CHANNEL_CONFIGURATION ; END_STRUCT ;END_TYPE

TYPE ANALOG_SIGNAL_TYPE : (SINGLE_ENDED, DIFFERENTIAL) ; END_TYPE

Vos propres types de données: types dérivés

Page 40: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 40 printed at 11-04-23 http://www.plcopen.org

Variables directes : %Préfixe Signification Type par défaut

I Entrée

Q Sortie

M Bit mémoire

X Bit de mot BOOL

None Bit de mot BOOL

B Byte (8 bits) BYTE

W Word (16 bits) WORD

D Double word (32 bits) DWORD

L Long (quad) word (64 bits) LWORD

Page 41: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 41 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3 : Éléments Communs

Éléments communs

Types de données & Variables

Configuration

Ressources

Tâches

Page 42: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 42 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3 Modèle de programmeConfiguration

Communication Function

Page 43: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 43 printed at 11-04-23 http://www.plcopen.org

Configuration

Communication Function

Ressource Ressource

IEC 61131-3 Modèle de programme

Page 44: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 44 printed at 11-04-23 http://www.plcopen.org

Tâche Tâche Tâche Tâche

Ressource Ressource

Configuration

Communication Function

IEC 61131-3 Modèle de programme

Page 45: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 45 printed at 11-04-23 http://www.plcopen.org

Chemin du contrôle de l’exécution

Tâche

Programme Programme

Tâche

Programme

Tâche

Programme

Tâche

Ressource Ressource

Configuration

Communication Function

IEC 61131-3 Modèle de programme

Page 46: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 46 printed at 11-04-23 http://www.plcopen.org

Communication Function

Chemin d’accès

FBTâche

Programme Programme

FB FB

Tâche

Programme

Tâche

Programme

FB FB

Tâche

Ressource Ressource

Configuration

Fonction Bloc

IEC 61131-3 Modèle de programme

Chemin du contrôle de l’exécution

Page 47: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 47 printed at 11-04-23 http://www.plcopen.org

Variables directes et globales

Chemin d’accès

Chemin d’accès deVariableFBTâche

Programme Programme

FB FB

Tâche

Programme

Tâche

Programme

FB FB

Tâche

Ressource Ressource

Configuration

Fonctions de Communication

Fonction Bloc

Variable

Chemin du contrôle de l’exécution

IEC 61131-3 Modèle de programme

Page 48: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 48 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3 vs PLC conventionnel

Variables directes et globales

Chemin d’accès

Chemin d’accès deVariableFBTâche

Programme Programme

FB FB

Tâche

Programme

Tâche

Programme

FB FB

Tâche

Ressource Ressource

Configuration

Fonctions de Communication

Fonction Bloc

Variable

Page 49: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 49 printed at 11-04-23 http://www.plcopen.org

Configuration des éléments

Configuration

Ressources

Tâches

Variables globales

Chemins d’accès

Page 50: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 50 printed at 11-04-23 http://www.plcopen.org

Configuration, Ressources et Chemins d’accès (-Déclaration)

CONFIGURATION … END_CONFIGURATION

VAR_GLOBAL … END_VAR (within CONFIGURATION)

RESOURCE … ON … END_RESOURCE

VAR_GLOBAL … END_VAR (within RESOURCE)

PERIODIC TASK

NON-PERIODIC TASK

Page 51: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 51 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3 : Éléments CommunsÉLÉMENTS COMMUNS

Types de données & Variables

Configuration, Ressources, Tâches

Unités d’organisation de

programmes (POU)

* Fonctions

* Fonction Blocs

* Programmes

Page 52: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 52 printed at 11-04-23 http://www.plcopen.org

Fonctions …..

* Fonctions Standards

ADD, SQRT, SIN, COS, GT, MIN, MAX, AND, OR, etc.

* Fonctions définies: FUNCTION SIMPLE_FUN : REAL

VAR_INPUTA, B : REAL;C : REAL := 1.0;

END_VARSIMPLE_FUN := A*B/C;END FUNCTION

Page 53: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 53 printed at 11-04-23 http://www.plcopen.org

…. & Blocs Fonction Blocs Fonction Standard

FUNCTION_BLOCK

I NPUT OUTPUT I N_OUT EXTERNAL

LocalType

Page 54: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 54 printed at 11-04-23 http://www.plcopen.org

…. & Blocs fonction Blocs fonction standards Blocs fonction additionnels FUNCTION_BLOCK

I NPUT OUTPUT I N_OUT EXTERNAL

LocalType

Page 55: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 55 printed at 11-04-23 http://www.plcopen.org

…. & Blocs fonctions Blocs fonction Blocs fonction additionels Blocs de fonction définis

FUNCTION_BLOCK

I NPUT OUTPUT I N_OUT EXTERNAL

LocalType

Page 56: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 56 printed at 11-04-23 http://www.plcopen.org

FUNCTION_BLOCK

I NPUT OUTPUT I N_OUT EXTERNAL

LocalType

…. & Blocs fonctions Blocs fonction Blocs fonction additionnels Blocs de fonction définis Les blocs de fonctions sont

réutilisables à volonté…

Page 57: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 57 printed at 11-04-23 http://www.plcopen.org

Exemple de bloc fonctionHysterisis

QXIN1

XIN2

EPS

BOOLREAL

REAL

REAL

1

EPSEPS

0

XIN2

Q

Page 58: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 58 printed at 11-04-23 http://www.plcopen.org

FUNCTION_BLOCK HYSTERISIS

VAR_INPUT

XIN1, XIN2 : REAL;

EPS : REAL; (* Hysterisis band *)

END_VAR

VAR_OUTPUT

Q : BOOL := 0

END_VAR

IF Q THEN

IF XIN1 < (XIN2-EPS) THEN

Q := 0 (* XIN1 decreasing *)

END_IF;

ELSIF XIN1 > (XIN2 + EPS ) THEN

Q := 1; (* XIN1 increasing *)

END_IF;

END_FUNCTION_BLOCK

Hysterisis

QXIN1

XIN2

EPS

BOOLREAL

REAL

REAL

1

EPSEPS

0

XIN2

Q

Exemple de bloc fonction

Page 59: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 59 printed at 11-04-23 http://www.plcopen.org

Programmes : conception hiérarchisée

Automation

application

Start : BOOL;

Emergency : BOOL;

Limit : INT;

PROGRAM

GLOBAL

LocalType

FUNCTION

INPUT

LocalType

FUNCTION_BLOCK

INPUT OUTPUT IN_OUT EXTERNAL

LocalType

Page 60: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 60 printed at 11-04-23 http://www.plcopen.org

Modèle de Programmation

LIBRARY ELEMENTS PRODUCTIONS DERIVED ELEMENTS

DATA TYPES

Standard (2.3.1, 2.3.2)

Derived

FUNCTIONS

Standard (2.5.1.5)

Derived

FUNCTION BLOCKS

Standard (2.5.2.3)

Derived

PROGRAMS

RESOURCES

Declaration (2.5.1.3)

IL, ST, LD, FBD

OTHERS

Declaration (2.5.2.2)

IL, ST, LD, FBD

SFC elements (2.6)

OTHERS

Declaration (2.5.3)

IL, ST, LD, FBD

SFC elements (2.6)

Tasks (2.7.2)

Declaration (2.7.1)

Global variables (2.7.1)

Access paths (2.7.1)

Derived

data

types

Derived

functions

Derived

function

blocks

PROGRAM

CONFIGURATION

Declaration (2.3.3)

(1)

(2)

(3)

(4)

(5)(2.5.3)

(2.7.1)

Page 61: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 61 printed at 11-04-23 http://www.plcopen.org

IEC 61131-3 : Éléments CommunsÉLÉMENTS COMMUNS

a.o.Types de données VariablesUnités d’organisation de programmes

* Fonctions* Blocs Fonction* Programmes

Configuration, Ressources, Tâches

Grafcet (SFC)* Étapes* Transitions* Blocs d’action

Page 62: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 62 printed at 11-04-23 http://www.plcopen.org

Grafcet Sequential Function Chart, SFC

Technique graphique puissante pour DÉCRIRE l’évolution séquentielle d’un programme de contrôle

Utile pour décomposer un problème de contrôle

Montre clairement le cheminement et aussi très efficace pour un diagnostique rapide

Step 1 N FILL

Step 3

Step 2 S Empty

Transition 1

Transition 2

Page 63: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 63 printed at 11-04-23 http://www.plcopen.org

Step 1 N FILL

Step 3

Step 2 S Empty

Transition 1

Transition 2

Grafcet Sequential Function Chart, SFC

Technique graphique puissante pour DÉCRIRE l’évolution séquentielle d’un programme de contrôle

Utile pour décomposer un problème de contrôle

Montre clairement le cheminement et aussi très efficace pour un diagnostique rapide

Les éléments de base sont les ÉTAPES avec les BLOCS D’ACTION et les TRANSITIONS avec leur RÉCÉPTIVITÉS

Choix de séquences et séquences parallèles

Page 64: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 64 printed at 11-04-23 http://www.plcopen.org

Le Standard IEC 61131-3

Éléments Communs

Langages de programmation

Descendant

Ascendant

Page 65: PLCopen Standardization in Industrial Control Programming PLCopen 1 printed at 29-5-2014  IEC 61131-3 Tutoriel

PLCopenStandardization in Industrial Control Programming

PLCopen 65 printed at 11-04-23 http://www.plcopen.org

Les environnements de programmation au standard IEC 1131-3

La plus part offrent: Écrans graphiques de

programmation Plusieurs fenêtres

simultanées souris menus déroulant Aide contextuelle Vérification du code durant

la conception