The SCADA method
The "Digesteur" is the name given by DSA to the interface of communication between the fronts (1 and 2 in redundancy) and the Cemagref (Irstea) tools described below allowing real-time automatic control experiments on the Gignac canal.
The SCADA module marked "Scada_Sic" below is the name given by Cemagref (Irstea) to the regulation module which manages the communication between the files of the Digester given below (csg.txt, data.txt as well as the parameterization files) and the Sirene SIC transient calculation program including standard regulation modules.
Global computing architecture
Variables handled by the SIC Scada regulation module
The variables written to the data.txt file and read on the csg.txt file (by the DSA digester) are defined in the SQL database using the "ItemRegulateur" field. If this field is not specified, then this variable is not managed by the digester, and therefore by the Cemagref control tools. It is very easy to add a new variable in this management. It is enough to fill in this field "ItemRegutaleur". Names follow a certain logic (eg, Data.Avencq.DebitAmont for measured data, Csg.Avencq.PosVanneReg for control variables) that it is good to follow, even if it is not mandatory. The variables thus available are given below as an example for the Avencq site.
Tag | Libelle | ItemRegulateur | Unite | TableHisto |
---|---|---|---|---|
3076 | Consigne débit aval CEMAGREF vanne régulation Avencq | Csg.Avencq.DebitAvalVanneReg | l/s | H_Avencq_Consignes |
3081 | Consigne niveau amont CEMAGREF vanne décharge Avencq | Csg.Avencq.NivAmontVanneDec | cm | H_Avencq_Consignes |
3079 | Consigne position CEMAGREF vanne décharge Avencq | Csg.Avencq.PosVanneDec | cm | H_Avencq_Consignes |
3074 | Consigne position CEMAGREF vanne régulation Avencq | Csg.Avencq.PosVanneReg | cm | H_Avencq_Consignes |
3127 | Seuil bas niveau canal amont Avencq | Csg.Avencq.SeuilBasAmont | cm | H_Avencq_Consignes |
3126 | Seuil haut niveau canal amont Avencq | Csg.Avencq.SeuilHautAmont | cm | H_Avencq_Consignes |
3128 | Seuil haut niveau canal aval Avencq | Csg.Avencq.SeuilHautAval | cm | H_Avencq_Consignes |
Tag | Libelle | ItemRegulateur | Unite | TableHisto |
3015 | Débit amont Avencq | Data.Avencq.DebitAmont | l/s | H_Avencq_DebAmont |
3020 | Débit aval Avencq | Data.Avencq.DebitAval | l/s | H_Avencq_DebAval |
3019 | Débit aval (vitesse, hauteur) Avencq | Data.Avencq.DebitAvalVH | l/s | H_Avencq_DebAval1 |
3018 | Débit déversoir Avencq | Data.Avencq.DebitDeversoir | l/s | H_Avencq_DefbDeversoir |
3017 | Débit vanne décharge Avencq | Data.Avencq.DebitVanneDec | l/s | H_Avencq_DebVDecharge |
3016 | Débit vanne régulation Avencq | Data.Avencq.DebitVanneReg | l/s | H_Avencq_DebVRegule |
3053 | Défaut calcul débit v décharge Avencq | Data.Avencq.DefCalculDebitVanneDec | H_Avencq_Defauts | |
3051 | Défaut calcul débit amont Avencq | Data.Avencq.DefDebitAmont | H_Avencq_Defauts | |
3056 | Défaut calcul débit aval (vanne-déversoir) Avencq | Data.Avencq.DefDebitAval | H_Avencq_Defauts | |
3055 | Défaut calcul débit aval (vitesse-hauteur)Avencq | Data.Avencq.DefDebitAvalVH | H_Avencq_Defauts | |
3054 | Défaut calcul débit déversoir Avencq | Data.Avencq.DefDebitDeversoir | H_Avencq_Defauts | |
3033 | Défaut capteur position v décharge Avencq | Data.Avencq.DefDebitVanneDec | H_Avencq_Defauts | |
3052 | Défaut calcul débit v régulation Avencq | Data.Avencq.DefDebitVanneReg | H_Avencq_Defauts | |
3030 | Défaut capteur niveau canal amont Avencq | Data.Avencq.DefNivAmont | H_Avencq_Defauts | |
3031 | Défaut capteur niveau canal aval Avencq | Data.Avencq.DefNivAval | H_Avencq_Defauts | |
3131 | Défaut niveau trop bas canal amont Avencq | Data.Avencq.DefNivBasAmont | H_Avencq_Defauts | |
3133 | Défaut niveau trop bas canal amont Avencq | Data.Avencq.DefNivBasAval | H_Avencq_Defauts | |
3130 | Défaut niveau trop haut canal amont Avencq | Data.Avencq.DefNivHautAmont | H_Avencq_Defauts | |
3132 | Défaut niveau trop haut canal aval Avencq | Data.Avencq.DefNivHautAval | H_Avencq_Defauts | |
3032 | Défaut capteur position v régulation Avencq | Data.Avencq.DefPosVanneReg | H_Avencq_Defauts | |
3089 | Défaut surverse Avencq | Data.Avencq.DefSurverse | H_Avencq_Defauts | |
3034 | Défaut capteur vitesse aval Avencq | Data.Avencq.DefVitesseEauAval | H_Avencq_Defauts | |
3008 | Niveau canal amont Avencq | Data.Avencq.NivAmont | cm | H_Avencq_NivAmont |
3009 | Niveau canal aval Avencq | Data.Avencq.NivAval | cm | H_Avencq_NivAval |
3011 | Position vanne décharge Avencq | Data.Avencq.PosVanneDec | cm | H_Avencq_PositionV2 |
3010 | Position vanne régulation Avencq | Data.Avencq.PosVanneReg | cm | H_Avencq_PositionV1 |
3012 | Vitesse de l’eau aval Avencq | Data.Avencq.VitesseEauAval | m/s | H_Avencq_VitesseAval |
Files managed by the digester and Scada_SIC
Architecture of the subdirectories:
The Digester handles its various input and output files in a set of subdirectories with the following structure:
- REGULATEUR
- Commande
- Csg
- CsgRepli
- Data
- ParamDigesteur
- SaveCsg
- SaveData
Sub-directory Commande
This sub-directory contains 2 files:
CdeF.txt:
This file contains a single line with:
STOP or START
To indicate whether the Digester is in action or not. It is the Scada_Sic module that writes this variable "START" (at the start of the calculation) or "STOP" (at the end of the simulation) in this file. It is possible at any time to write in this file what one wants with any text editor, such as Notepad for example. This will stop the test in an emergency. This may also be forced at the interface of the Scada_Sic module.
Config.txt:
This file contains information about time periods and the backup option of the data.txt and csg.txt files. The PeriodeData variable is very important since it is the one that will be the cadence of the measurements and creations of the data.txt files. The Scada_Sic module reads this variable and verifies that it is identical to that of the control module. A warning message will be displayed if there is a difference.
'time out (in s) on the sending of instructions from the setpoint file. Afterwards, taking into account the file of fallback setpoints TimeoutCsg=900 'Period (in s) of generation of the acquisition file PeriodeData=300 'Switch to find out if data files are backed up (1 for Yes, 0 for No) ActivationTraceData=1 'Switch to find out if csg files are backed up (1 for Yes, 0 for No) ActivationTraceCsg=1
Sub-directory Csg
It is in the Csg sub-directory that the files csg.txt containing the instructions to be applied in real time to the control structures (instructions sent to the programmable controllers on sites) will be read periodically. As soon as a file csg.txt is read by the digester, it is destroyed. The units are those specified in the database. These are often cm for openings and l/s for flow. Be sure to check these units. These csg.txt files will be created periodically by the Scada_Sic module. The index is incremented with each new file. Attention this variable is important because verified by the digester and must correspond to the index of the file data.txt read. The timestamp is the creation time of the csg.txt file. This timestamp is not managed by the Digester, it is just written for information.
Csg.txt:
[Header] Horodate=25/10/2004 14:43: 7 Index= 1 [Data] CSG.AVENCQ.POSVANNEDEC ;25/10/2004 14:43: 7; +0.520E+01 CSG.AVENCQ.POSVANNEREG ;25/10/2004 14:43: 7; +0.298E+02 [End]
Sub-directory CsgRepli
The file CsgRepli.txt is a file used a priori in the event of a problem, when a file csg.txt has not been supplied during a time specified in the timeoutCsg variable in the file param.txt described below. It has the same format as the csg.txt files. Neither the index nor the timestamp are used in this case.
CsgRepli.txt:
[Header] Horodate=01/01/2000 00:00:00 Index=1 [Data] CSG.AVENCQ.POSVANNEDEC ;25/10/2004 14:43: 7; +0.520E+01 CSG.AVENCQ.POSVANNEREG ;25/10/2004 14:43: 7; +0.298E+02 [End]
Sub-directory Data
This sub-directory will contain the data.txt files generated periodically by the digester at a period specified in the config.txt file described above (variable PeriodeData). These data.txt files will be read by the Scada_Sic module and destroyed at the end of the reading, to leave room for a new file. This file contains all the variables having an ItemRegulator in the SQL database. It is the file location.txt that will indicate the variables that interest us for the Scada_Sic module and which will link the field variables to the internal variables of the Scada_Sic module (U, Y and Z variables of the control module).
Data.txt:
[Header] Horodate=26/10/2004 17:03:02 Index=01 [Data] DATA.AURELLE.DEFPIEZZO ;20/03/2004 10:31:16;0.0000000000E000 DATA.AURELLE.DEFSURVERSE ;20/03/2004 10:31:16;0.0000000000E000 DATA.AURELLE.NIVPIEZZO ;26/03/2004 15:51:07;7.0000000000E001 DATA.AVENCQ.DEBITAMONT ;26/03/2004 15:51:27;5.3100000000E002 DATA.AVENCQ.DEBITAVAL ;26/03/2004 15:51:27;5.3100000000E002 DATA.AVENCQ.DEBITAVALVH ;26/03/2004 15:51:27;7.0100000000E002 DATA.AVENCQ.DEBITDEVERSOIR ;26/03/2004 15:51:27;4.7700000000E002 DATA.AVENCQ.DEBITVANNEDEC ;26/03/2004 10:55:54;0.0000000000E000 DATA.AVENCQ.DEBITVANNEREG ;26/03/2004 15:51:27;5.4000000000E001 DATA.AVENCQ.DEFCALCULDEBITVANNEDEC ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFDEBITAMONT ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFDEBITAVAL ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFDEBITAVALVH ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFDEBITDEVERSOIR ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFDEBITVANNEDEC ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFDEBITVANNEREG ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFNIVAMONT ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFNIVAVAL ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFNIVBASAMONT ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFNIVBASAVAL ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFNIVHAUTAMONT ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFNIVHAUTAVAL ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFPOSVANNEREG ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFSURVERSE ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.DEFVITESSEEAUAVAL ;20/03/2004 10:31:26;0.0000000000E000 DATA.AVENCQ.NIVAMONT ;26/03/2004 15:50:57;8.5200000000E001 DATA.AVENCQ.NIVAVAL ;26/03/2004 15:51:27;5.5200000000E001 DATA.AVENCQ.POSVANNEDEC ;26/03/2004 10:37:08;0.0000000000E000 DATA.AVENCQ.POSVANNEREG ;26/03/2004 10:06:57;0.0000000000E000 DATA.AVENCQ.VITESSEEAUAVAL ;26/03/2004 15:51:27;8.7000000000E-001 DATA.BELBEZET.DEBAMONT ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEBAVAL ;26/03/2004 07:07:45;1.0370000000E003 DATA.BELBEZET.DEBVANNEDECHARGE ;26/03/2004 07:00:45;4.2000000000E001 DATA.BELBEZET.DEBVANNEDROITE ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEBVANNEGAUCHE ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEBVANNEMILIEU ;26/03/2004 07:07:45;1.0370000000E003 DATA.BELBEZET.DEFDEBAMONT ;26/03/2004 07:00:39;1.0000000000E000 DATA.BELBEZET.DEFDEBDECHARGE ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFDEBDROITE ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFDEBGAUCHE ;26/03/2004 07:00:39;1.0000000000E000 DATA.BELBEZET.DEFDEBMILIEU ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFNIVAMONT ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFNIVAVAL ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFNIVBASAMONT ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFNIVBASAVAL ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFNIVBASRETENUE ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFNIVHAUTAMONT ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFNIVHAUTAVAL ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFNIVHAUTRETENUE ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFNIVHERAULT ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFPOSVANNEDECHARGE ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFPOSVANNEDROITE ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.DEFPOSVANNEGAUCHE ;26/03/2004 07:00:39;1.0000000000E000 DATA.BELBEZET.DEFPOSVANNEMILIEU ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.NIVAMONT ;26/03/2004 07:00:45;1.1060000000E002 DATA.BELBEZET.NIVAVAL ;26/03/2004 07:07:45;8.7800000000E001 DATA.BELBEZET.NIVHERAULT ;26/03/2004 07:00:45;1.2550000000E002 DATA.BELBEZET.NIVHERAULTNGF ;26/03/2004 07:00:39;7.2050000000E001 DATA.BELBEZET.POSVANNEDECHARGE ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.POSVANNEDROITE ;26/03/2004 07:00:39;0.0000000000E000 DATA.BELBEZET.POSVANNEGAUCHE ;26/03/2004 07:07:45;3.4400000000E001 DATA.BELBEZET.POSVANNEMILIEU ;26/03/2004 07:00:39;2.4200000000E001 DATA.CEYRAS.DEBITCANALAMONT ;25/03/2004 09:52:27;4.0777196875E005 DATA.CEYRAS.DEBITDEVERSOIR ;25/03/2004 09:52:27;0.0000000000E000 DATA.CEYRAS.DEBITREJET ;25/03/2004 09:52:27;0.0000000000E000 DATA.CEYRAS.DEBITVANNERESERVOIR ;25/03/2004 09:52:27;0.0000000000E000 DATA.CEYRAS.NIVBASCANALAMONT ;25/03/2004 09:51:53;0.0000000000E000 DATA.CEYRAS.NIVCANALAMONT ;25/03/2004 09:52:27;5.4615091173E001 DATA.CEYRAS.NIVHAUTCANALAMONT ;25/03/2004 09:51:53;0.0000000000E000 DATA.CEYRAS.PCTFERMETUREVANNEDEV ;25/03/2004 09:51:53;7.1900511177E001 DATA.GIGNAC.DEFPIEZZO ;20/03/2004 10:31:11;0.0000000000E000 DATA.GIGNAC.DEFSURVERSE ;20/03/2004 10:31:11;0.0000000000E000 DATA.GIGNAC.NIVEAUPIEZZO ;26/03/2004 15:50:28;7.2200000000E001 DATA.LAGAREL.DEBITAMONTTH ;26/03/2004 15:51:28;3.7000000000E001 DATA.LAGAREL.DEBITAVALTH ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEBITAVALVH ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEBITDEVERSOIR ;26/03/2004 15:51:28;3.7000000000E001 DATA.LAGAREL.DEBITVANNEDEC ;25/03/2004 15:15:37;0.0000000000E000 DATA.LAGAREL.DEBITVANNEREG ;20/03/2004 10:31:26;-3.2768000000E004 DATA.LAGAREL.DEFDEBITAMONTTH ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFDEBITAVALTH ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFDEBITAVALVH ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFDEBITDEVERSOIR ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFDEBITVANNEDEC ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFDEBITVANNEREG ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFNIVCANALAMONT ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFNIVCANALAVAL ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFNIVEAUBASAMONT ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFNIVEAUBASDEVERSOIR ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFNIVEAUHAUTAMONT ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFNIVEAUHAUTDEVERSOIR ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFPOSITIONVANNEDEC ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFPOSITIONVANNEREG ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEFSURVERSE ;25/03/2004 18:29:52;0.0000000000E000 DATA.LAGAREL.DEFVITESSEEAUAVAL ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.DEVERSOIR ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.NIVCANALAMONT ;26/03/2004 15:50:58;8.6000000000E001 DATA.LAGAREL.POSITIONVANNEDEC ;24/03/2004 09:56:29;0.0000000000E000 DATA.LAGAREL.POSITIONVANNEREG ;20/03/2004 10:31:26;0.0000000000E000 DATA.LAGAREL.VITESSEEAUAVAL ;20/03/2004 10:31:26;0.0000000000E000 DATA.MOBILE.DEFPIEZZO ;20/03/2004 10:35:53;0.0000000000E000 DATA.MOBILE.NIVPIEZZO ;26/03/2004 17:02:53;9.2000000000E001 DATA.PARTITEUR.DEBDEVERSOIRAMONT ;26/03/2004 11:13:17;0.0000000000E000 DATA.PARTITEUR.DEBITAMONTTH ;26/03/2004 17:03:00;1.6090000000E003 DATA.PARTITEUR.DEBITDECHARGEDROITE ;25/03/2004 18:00:19;0.0000000000E000 DATA.PARTITEUR.DEBITDECHARGEGAUCHE ;20/03/2004 10:31:25;0.0000000000E000 DATA.PARTITEUR.DEBITDROITE ;26/03/2004 17:03:00;9.7300000000E002 DATA.PARTITEUR.DEBITGAUCHE ;26/03/2004 17:03:00;6.3600000000E002 DATA.PARTITEUR.DEBITREGULDROITE ;26/03/2004 17:03:00;8.2100000000E002 DATA.PARTITEUR.DEBITREGULGAUCHE ;26/03/2004 17:03:00;7.4600000000E002 DATA.PARTITEUR.DEFDEBITAMONT ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFDEBITDECHARGEDROITE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFDEBITDECHARGEGAUCHE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFDEBITDROITE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFDEBITGAUCHE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFDEBITREGULDROITE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFDEBITREGULGAUCHE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFNIVBCANALCOMMUN ;20/03/2004 10:31:25;0.0000000000E000 DATA.PARTITEUR.DEFNIVBCANALDROITE ;20/03/2004 10:31:25;0.0000000000E000 DATA.PARTITEUR.DEFNIVBCANALGAUCHE ;20/03/2004 10:31:25;0.0000000000E000 DATA.PARTITEUR.DEFNIVCANALCOMMUN ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFNIVCANALDROITE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFNIVCANALGAUCHE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFNIVHCANALCOMMUN ;20/03/2004 10:31:25;0.0000000000E000 DATA.PARTITEUR.DEFNIVHCANALDROITE ;20/03/2004 10:31:25;0.0000000000E000 DATA.PARTITEUR.DEFNIVHCANALGAUCHE ;20/03/2004 10:31:25;0.0000000000E000 DATA.PARTITEUR.DEFPOSITIONVANNEDECDROITE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFPOSITIONVANNEDECGAUCHE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFPOSITIONVANNEREGDROITE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFPOSITIONVANNEREGGAUCHE ;25/03/2004 11:50:19;0.0000000000E000 DATA.PARTITEUR.DEFVITESSEEAUDROITE ;20/03/2004 10:31:25;0.0000000000E000 DATA.PARTITEUR.DEFVITESSEEAUGAUCHE ;20/03/2004 10:31:25;0.0000000000E000 DATA.PARTITEUR.NIVCANALCOMMUN ;26/03/2004 17:03:00;6.8900000000E001 DATA.PARTITEUR.NIVCANALDROITE ;26/03/2004 17:02:23;1.0510000000E002 DATA.PARTITEUR.NIVCANALGAUCHE ;26/03/2004 17:03:00;8.2100000000E001 DATA.PARTITEUR.POSITIONVANNEDECDROITE ;25/03/2004 18:00:19;0.0000000000E000 DATA.PARTITEUR.POSITIONVANNEDECGAUCHE ;25/03/2004 11:37:30;0.0000000000E000 DATA.PARTITEUR.POSITIONVANNEREGDROITE ;26/03/2004 16:35:18;3.5700000000E001 DATA.PARTITEUR.POSITIONVANNEREGGAUCHE ;26/03/2004 16:27:31;1.4300000000E001 DATA.PARTITEUR.VITESSEEAUDROITE ;26/03/2004 17:03:00;6.9800000000E-001 DATA.PARTITEUR.VITESSEEAUGAUCHE ;26/03/2004 17:03:00;5.3100000000E-001 DATA.PONTLUSSAC.DEBITAMONT ;25/03/2004 07:03:41;5.6315850000E005 DATA.PONTLUSSAC.DEBITAVAL ;25/03/2004 07:03:41;2.0273704960E009 DATA.PONTLUSSAC.DEBITDEVERSOIR ;25/03/2004 07:03:41;8.0417953491E001 DATA.PONTLUSSAC.DEBITREJET ;25/03/2004 07:03:41;8.0417953491E001 DATA.PONTLUSSAC.DEBITVANNECONDUITE ;25/03/2004 07:03:41;0.0000000000E000 DATA.PONTLUSSAC.DEBITVANNEPONT ;25/03/2004 07:03:41;0.0000000000E000 DATA.PONTLUSSAC.NIVBASCANALAMONT ;25/03/2004 07:03:41;0.0000000000E000 DATA.PONTLUSSAC.NIVCANALAMONT ;25/03/2004 07:03:41;6.1597619593E001 DATA.PONTLUSSAC.NIVHAUTCANALAMONT ;25/03/2004 07:03:41;1.0000000000E000 DATA.PONTLUSSAC.PCTFERMETUREVANNECONDUITE ;25/03/2004 07:03:41;0.0000000000E000 DATA.PONTLUSSAC.PCTFERMETUREVANNEPONT ;25/03/2004 07:03:41;2.1484702831E000 DATA.ROUVIERE.DEBITAMONT ;20/03/2004 10:31:27;1.3600000000E002 DATA.ROUVIERE.DEBITAMONTVH ;26/03/2004 15:51:29;2.5400000000E002 DATA.ROUVIERE.DEBITAVAL ;26/03/2004 15:51:29;1.1400000000E002 DATA.ROUVIERE.DEBITDEVERSOIR ;26/03/2004 15:51:29;1.1400000000E002 DATA.ROUVIERE.DEBITVANNEREG ;23/03/2004 07:29:40;0.0000000000E000 DATA.ROUVIERE.DEFBASNIVCANAL ;20/03/2004 10:31:27;0.0000000000E000 DATA.ROUVIERE.DEFDEBITAMONTVH ;20/03/2004 10:31:27;0.0000000000E000 DATA.ROUVIERE.DEFDEBITAVAL ;20/03/2004 10:31:27;0.0000000000E000 DATA.ROUVIERE.DEFDEBITDEVERSOIR ;20/03/2004 10:31:27;0.0000000000E000 DATA.ROUVIERE.DEFDEBITVANNEREG ;20/03/2004 10:31:27;0.0000000000E000 DATA.ROUVIERE.DEFHAUTNIVCANAL ;20/03/2004 10:31:27;0.0000000000E000 DATA.ROUVIERE.DEFNIVCANAL ;20/03/2004 10:31:27;0.0000000000E000 DATA.ROUVIERE.DEFPOSVANNEREG ;20/03/2004 10:31:27;0.0000000000E000 DATA.ROUVIERE.DEFSUSRVERSE ;20/03/2004 10:31:27;0.0000000000E000 DATA.ROUVIERE.DEFVITESSEEAUAMONT ;20/03/2004 10:31:27;0.0000000000E000 DATA.ROUVIERE.NIVCANAL ;26/03/2004 15:51:29;7.3800000000E001 DATA.ROUVIERE.POSVANNEREG ;23/03/2004 07:29:40;0.0000000000E000 DATA.ROUVIERE.VITESSEEAUAMONT ;26/03/2004 15:51:29;1.4600000000E-001 DATA.STJEAN.DEFSUSRVERSE ;20/03/2004 10:31:10;0.0000000000E000 DATA.STJEAN.NIVEAUPIEZZO ;26/03/2004 15:51:38;5.6700000000E001 DATA.STJEAN.POSVANNE ;26/03/2004 15:51:38;1.5600000000E001 [End]
Sub-directory ParamDigesteur
The ParamDigester sub-directory contains the Param.txt file containing a set of useful parameters for the digester. The Scada_Sic module does not read this file. The TimeoutCsg and PeriodeData variables defined below (attention: in ms and not in s) will be overwritten by those defined in the config.txt file described above.
Param.txt:
'N° PORT SOCKET Sck_Port=*** 'Adresse IP Connexion serveur CIA Sck_AdrIP=*** DBPARAMTYPE=MYSQL DBPARAMPATH=reference_gignac DBPARAMSERVER=*** DBPARAMUSER=*** 'DBPARAMPWD=*** 'time out (en ms) prise en compte du fichier de consignes de repli TimeoutCsg=900000 'Période (en ms) de génération du fichier d'acquisition PeriodeData=60000 'Chemin du fichier d'acquisition (Chemin FTP) PathData=/REGULATEUR/Data 'Chemin de sauvegarde des fichiers d'acquisition (Chemin FTP) TraceData=/REGULATEUR/SaveData 'Chemin du fichier de consigne (Chemin FTP) PathCsg=/REGULATEUR/Csg 'Chemin de sauvegarde des fichiers de consigne (Chemin FTP) TraceCsg=/REGULATEUR/SaveCsg 'Chemin du fichier de command (start et stop) (Chemin FTP) PathCdeFrontal=/REGULATEUR/Commande/CdeF.txt 'Chemin du fichier de consignes de repli (chemin local) PathCsgRepli=C:\Outils_DSA\digesteur\CsgRepli 'Paramètres du serveur FTP Ftp_AdrIP=*** Ftp_Login=*** Ftp_Pwd=***
SaveCsg
This sub-directory contains backups of all csg.txt files created with a filename including the timestamp for creating the file. These backup files are created if the ActivationTraceCsg option has been enabled (= 1) in the config.txt file:
SaveData
This sub-directory contains backups of all data.txt files created with a file name including the timestamp for creating the file. These backup files are created if the ActivationTraceData option has been enabled (= 1) in the config.txt file:
Example of controller development
Development under SIC
Develop the regulation module under SIC with the usual procedures (modules ATV, DSS, PID, MATLAB, USER1 to 9, etc.).
For the moment, the Scada_Sic module can control only one SIC regulation module. For complex control (requiring several SIC regulation modules, such as 2 simultaneous PID modules, for example), it may be necessary to use the MATLAB module or a USER module. This limitation will be removed in a future release.
Craation of the Lieu.txt file
The Lieu.txt file links the field data as manipulated in the csg.txt and data.txt files and the Sic data (U, Y, and Z variables of the Scada_Sic module). This file also allows you to define a scaling factor and an offset (SicValue = a * FieldValue + b). This file is very important because it allows to translate the data comprehensible by the Digester and the module Scada_Sic, in both directions. The order of the variables is also important since the correspondence of the U, Y and Z will be done in this order:
[Header]
[Z]
Data.Avencq.NivAmont ;0.01 -.852
Data.Lagarel.NivCanalAmont ;0.01 -.86
[Y]
Data.Lagarel.NivCanalAmont ;0.01 -.86
[U]
Csg.Avencq.PosVanneDec ;0.01 -.052
Csg.Avencq.PosVanneReg ;0.01 -.298
[End]
In the example given above:
- the variable Z(1) will correspond to 0.01 * Data.Avencq.NivAmont - 0.852,
- Z(2) will be 0.01 * Data.Lagarel.NivCanalAmont - 0.86,
- Y(1) will be 0.01 * Data.Lagarel. NivCanalAmont - 0.86,
- Csg.Avencq.PosVanneDec will correspond to (U(1) + 0.052) / 0.01,
- Csg.Avencq.PosVanneReg will correspond to (U(2) + 0.298) / 0.01.
The time stamps of the Y and Z variables are stored in A19 format in the COMMON/HOROYZ/HORODY(100),HORODZ(100)
If the offset "b" is to be initialized automatically to the initial value, it is sufficient to put a non-numeric code. For example:
Data.Lagarel.NivCanalAmont ;0.01 -xx6
Csg.Avencq.PosVanneDec ;0.01 -.*
As soon as the reading of this offset returns a read error, the offset is initialized to the initial value read in the data.txt file. On the screen scada interface will appear the value -9999.0 to mean that this option was used. A file Lieu2.txt is created with the values of offsets updated automatically. This option is useful when retrieving and manipulating variables in relative mode, as is often the case in linear controllers, without having to enter these values manually, which is cumbersome and error-prone.
Note that sometimes the labels (ItemRegulator) of certain variables of the Csg.*** type are not the same as those of the corresponding variables in Data.***. For example, Csg.Partiteur.DebVanneRegDroite and Data.Partiteur.DebitRegulDroite. It would have been more judicious to respect this coherence. It is possible to improve this by modifying the reference SQL database that contains these ItemRegulator labels. In any case, it is essential that the file Lieu.txt contain in its headings [U] the correct label of the variable Csg. Because it is this variable that will wait and decode the Digester (Csg.Partiteur.DebVanneRegDroite in our example above). There will be a warning that this U-control variable has not been found in the DATA.TXT file, so that the number of U variables of the .REG file is not the same as the number of U correctly found in the DATA.TXT file. This is just a warning not posing any particular problem. The only possible disadvantage is that the corresponding variable U which is normally initialized to its values from the field will not be correctly initialized and will therefore be at 0. A future evolution of the SCADA module will be to make it possible to enter 2 labels, one in Csg. and the one in Data., in the case where these two labels are different:
[U]
Csg.Partiteur.DebVanneRegDroite ;0.001 -.652
Data.Partiteur.DebitRegulDroite ;0.001 -.652
[End]
The wording in Csg. will be used for the generation of the CSG.TXT files and the label in Data. will be used to initialize the corresponding U value.
Activation of the module Scada_Sic
Once the control module has been developed in SIC, simply activate the SCADA module with the parameters (PS lines) the same parameters as those of the original module, preceded by a line of parameters in the format (A6,1X,I1,1X,I1,1X,I4) indicating the name of the module (eg MATLAB in the example below), the synchronization flag (0 below), the writing option on the csg.txt files (1 below) and a number of synchronization preheating iterations during which the Scada module does not erase the data.txt to speed up the calculation iterations to synchronize as quickly as possible field data, if necessary:
Editing the control data for the SCADA module
If the synchronization flag is 1, then the U commands will not only be supplied to the digester via the csg.txt files, but will also be applied to the calculation in SIC. This can make it possible to check the evolution in the simulator and in the real channel. On the other hand, it can be dangerous if sudden maneuvers create computational problems in SIC (torrential, dry run, etc.). Indeed, any SIC crash in this kind of simulation will stop the generation of csg.txt files. The instructions given in the fallback file will then be applied after the TimeoutCsg waiting period specified in the config.txt file.
Once the simulation is launched, an interface allows to follow the evolution of the exchanges of files and variables between Sic (via Sirena Scada_Sic) and the Channel (via the Digester):