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.

List of U-control variables available in Avencq
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
List of Z-measured variables available in Avencq
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.

  1. 'time out (in s) on the sending of instructions from the setpoint file. Afterwards, taking into account the file of fallback setpoints
  2. TimeoutCsg=900
  3.  
  4. 'Period (in s) of generation of the acquisition file
  5. PeriodeData=300
  6.  
  7. 'Switch to find out if data files are backed up (1 for Yes, 0 for No)
  8. ActivationTraceData=1
  9.  
  10. 'Switch to find out if csg files are backed up (1 for Yes, 0 for No)
  11. ActivationTraceCsg=1

Download

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:
  1. [Header]
  2. Horodate=25/10/2004 14:43: 7
  3. Index= 1
  4. [Data]
  5. CSG.AVENCQ.POSVANNEDEC ;25/10/2004 14:43: 7; +0.520E+01
  6. CSG.AVENCQ.POSVANNEREG ;25/10/2004 14:43: 7; +0.298E+02
  7. [End]

Download

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:
  1. [Header]
  2. Horodate=01/01/2000 00:00:00
  3. Index=1
  4. [Data]
  5. CSG.AVENCQ.POSVANNEDEC ;25/10/2004 14:43: 7; +0.520E+01
  6. CSG.AVENCQ.POSVANNEREG ;25/10/2004 14:43: 7; +0.298E+02
  7. [End]

Download

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:
  1. [Header]
  2. Horodate=26/10/2004 17:03:02
  3. Index=01
  4. [Data]
  5. DATA.AURELLE.DEFPIEZZO ;20/03/2004 10:31:16;0.0000000000E000
  6. DATA.AURELLE.DEFSURVERSE ;20/03/2004 10:31:16;0.0000000000E000
  7. DATA.AURELLE.NIVPIEZZO ;26/03/2004 15:51:07;7.0000000000E001
  8. DATA.AVENCQ.DEBITAMONT ;26/03/2004 15:51:27;5.3100000000E002
  9. DATA.AVENCQ.DEBITAVAL ;26/03/2004 15:51:27;5.3100000000E002
  10. DATA.AVENCQ.DEBITAVALVH ;26/03/2004 15:51:27;7.0100000000E002
  11. DATA.AVENCQ.DEBITDEVERSOIR ;26/03/2004 15:51:27;4.7700000000E002
  12. DATA.AVENCQ.DEBITVANNEDEC ;26/03/2004 10:55:54;0.0000000000E000
  13. DATA.AVENCQ.DEBITVANNEREG ;26/03/2004 15:51:27;5.4000000000E001
  14. DATA.AVENCQ.DEFCALCULDEBITVANNEDEC ;20/03/2004 10:31:26;0.0000000000E000
  15. DATA.AVENCQ.DEFDEBITAMONT ;20/03/2004 10:31:26;0.0000000000E000
  16. DATA.AVENCQ.DEFDEBITAVAL ;20/03/2004 10:31:26;0.0000000000E000
  17. DATA.AVENCQ.DEFDEBITAVALVH ;20/03/2004 10:31:26;0.0000000000E000
  18. DATA.AVENCQ.DEFDEBITDEVERSOIR ;20/03/2004 10:31:26;0.0000000000E000
  19. DATA.AVENCQ.DEFDEBITVANNEDEC ;20/03/2004 10:31:26;0.0000000000E000
  20. DATA.AVENCQ.DEFDEBITVANNEREG ;20/03/2004 10:31:26;0.0000000000E000
  21. DATA.AVENCQ.DEFNIVAMONT ;20/03/2004 10:31:26;0.0000000000E000
  22. DATA.AVENCQ.DEFNIVAVAL ;20/03/2004 10:31:26;0.0000000000E000
  23. DATA.AVENCQ.DEFNIVBASAMONT ;20/03/2004 10:31:26;0.0000000000E000
  24. DATA.AVENCQ.DEFNIVBASAVAL ;20/03/2004 10:31:26;0.0000000000E000
  25. DATA.AVENCQ.DEFNIVHAUTAMONT ;20/03/2004 10:31:26;0.0000000000E000
  26. DATA.AVENCQ.DEFNIVHAUTAVAL ;20/03/2004 10:31:26;0.0000000000E000
  27. DATA.AVENCQ.DEFPOSVANNEREG ;20/03/2004 10:31:26;0.0000000000E000
  28. DATA.AVENCQ.DEFSURVERSE ;20/03/2004 10:31:26;0.0000000000E000
  29. DATA.AVENCQ.DEFVITESSEEAUAVAL ;20/03/2004 10:31:26;0.0000000000E000
  30. DATA.AVENCQ.NIVAMONT ;26/03/2004 15:50:57;8.5200000000E001
  31. DATA.AVENCQ.NIVAVAL ;26/03/2004 15:51:27;5.5200000000E001
  32. DATA.AVENCQ.POSVANNEDEC ;26/03/2004 10:37:08;0.0000000000E000
  33. DATA.AVENCQ.POSVANNEREG ;26/03/2004 10:06:57;0.0000000000E000
  34. DATA.AVENCQ.VITESSEEAUAVAL ;26/03/2004 15:51:27;8.7000000000E-001
  35. DATA.BELBEZET.DEBAMONT ;26/03/2004 07:00:39;0.0000000000E000
  36. DATA.BELBEZET.DEBAVAL ;26/03/2004 07:07:45;1.0370000000E003
  37. DATA.BELBEZET.DEBVANNEDECHARGE ;26/03/2004 07:00:45;4.2000000000E001
  38. DATA.BELBEZET.DEBVANNEDROITE ;26/03/2004 07:00:39;0.0000000000E000
  39. DATA.BELBEZET.DEBVANNEGAUCHE ;26/03/2004 07:00:39;0.0000000000E000
  40. DATA.BELBEZET.DEBVANNEMILIEU ;26/03/2004 07:07:45;1.0370000000E003
  41. DATA.BELBEZET.DEFDEBAMONT ;26/03/2004 07:00:39;1.0000000000E000
  42. DATA.BELBEZET.DEFDEBDECHARGE ;26/03/2004 07:00:39;0.0000000000E000
  43. DATA.BELBEZET.DEFDEBDROITE ;26/03/2004 07:00:39;0.0000000000E000
  44. DATA.BELBEZET.DEFDEBGAUCHE ;26/03/2004 07:00:39;1.0000000000E000
  45. DATA.BELBEZET.DEFDEBMILIEU ;26/03/2004 07:00:39;0.0000000000E000
  46. DATA.BELBEZET.DEFNIVAMONT ;26/03/2004 07:00:39;0.0000000000E000
  47. DATA.BELBEZET.DEFNIVAVAL ;26/03/2004 07:00:39;0.0000000000E000
  48. DATA.BELBEZET.DEFNIVBASAMONT ;26/03/2004 07:00:39;0.0000000000E000
  49. DATA.BELBEZET.DEFNIVBASAVAL ;26/03/2004 07:00:39;0.0000000000E000
  50. DATA.BELBEZET.DEFNIVBASRETENUE ;26/03/2004 07:00:39;0.0000000000E000
  51. DATA.BELBEZET.DEFNIVHAUTAMONT ;26/03/2004 07:00:39;0.0000000000E000
  52. DATA.BELBEZET.DEFNIVHAUTAVAL ;26/03/2004 07:00:39;0.0000000000E000
  53. DATA.BELBEZET.DEFNIVHAUTRETENUE ;26/03/2004 07:00:39;0.0000000000E000
  54. DATA.BELBEZET.DEFNIVHERAULT ;26/03/2004 07:00:39;0.0000000000E000
  55. DATA.BELBEZET.DEFPOSVANNEDECHARGE ;26/03/2004 07:00:39;0.0000000000E000
  56. DATA.BELBEZET.DEFPOSVANNEDROITE ;26/03/2004 07:00:39;0.0000000000E000
  57. DATA.BELBEZET.DEFPOSVANNEGAUCHE ;26/03/2004 07:00:39;1.0000000000E000
  58. DATA.BELBEZET.DEFPOSVANNEMILIEU ;26/03/2004 07:00:39;0.0000000000E000
  59. DATA.BELBEZET.NIVAMONT ;26/03/2004 07:00:45;1.1060000000E002
  60. DATA.BELBEZET.NIVAVAL ;26/03/2004 07:07:45;8.7800000000E001
  61. DATA.BELBEZET.NIVHERAULT ;26/03/2004 07:00:45;1.2550000000E002
  62. DATA.BELBEZET.NIVHERAULTNGF ;26/03/2004 07:00:39;7.2050000000E001
  63. DATA.BELBEZET.POSVANNEDECHARGE ;26/03/2004 07:00:39;0.0000000000E000
  64. DATA.BELBEZET.POSVANNEDROITE ;26/03/2004 07:00:39;0.0000000000E000
  65. DATA.BELBEZET.POSVANNEGAUCHE ;26/03/2004 07:07:45;3.4400000000E001
  66. DATA.BELBEZET.POSVANNEMILIEU ;26/03/2004 07:00:39;2.4200000000E001
  67. DATA.CEYRAS.DEBITCANALAMONT ;25/03/2004 09:52:27;4.0777196875E005
  68. DATA.CEYRAS.DEBITDEVERSOIR ;25/03/2004 09:52:27;0.0000000000E000
  69. DATA.CEYRAS.DEBITREJET ;25/03/2004 09:52:27;0.0000000000E000
  70. DATA.CEYRAS.DEBITVANNERESERVOIR ;25/03/2004 09:52:27;0.0000000000E000
  71. DATA.CEYRAS.NIVBASCANALAMONT ;25/03/2004 09:51:53;0.0000000000E000
  72. DATA.CEYRAS.NIVCANALAMONT ;25/03/2004 09:52:27;5.4615091173E001
  73. DATA.CEYRAS.NIVHAUTCANALAMONT ;25/03/2004 09:51:53;0.0000000000E000
  74. DATA.CEYRAS.PCTFERMETUREVANNEDEV ;25/03/2004 09:51:53;7.1900511177E001
  75. DATA.GIGNAC.DEFPIEZZO ;20/03/2004 10:31:11;0.0000000000E000
  76. DATA.GIGNAC.DEFSURVERSE ;20/03/2004 10:31:11;0.0000000000E000
  77. DATA.GIGNAC.NIVEAUPIEZZO ;26/03/2004 15:50:28;7.2200000000E001
  78. DATA.LAGAREL.DEBITAMONTTH ;26/03/2004 15:51:28;3.7000000000E001
  79. DATA.LAGAREL.DEBITAVALTH ;20/03/2004 10:31:26;0.0000000000E000
  80. DATA.LAGAREL.DEBITAVALVH ;20/03/2004 10:31:26;0.0000000000E000
  81. DATA.LAGAREL.DEBITDEVERSOIR ;26/03/2004 15:51:28;3.7000000000E001
  82. DATA.LAGAREL.DEBITVANNEDEC ;25/03/2004 15:15:37;0.0000000000E000
  83. DATA.LAGAREL.DEBITVANNEREG ;20/03/2004 10:31:26;-3.2768000000E004
  84. DATA.LAGAREL.DEFDEBITAMONTTH ;20/03/2004 10:31:26;0.0000000000E000
  85. DATA.LAGAREL.DEFDEBITAVALTH ;20/03/2004 10:31:26;0.0000000000E000
  86. DATA.LAGAREL.DEFDEBITAVALVH ;20/03/2004 10:31:26;0.0000000000E000
  87. DATA.LAGAREL.DEFDEBITDEVERSOIR ;20/03/2004 10:31:26;0.0000000000E000
  88. DATA.LAGAREL.DEFDEBITVANNEDEC ;20/03/2004 10:31:26;0.0000000000E000
  89. DATA.LAGAREL.DEFDEBITVANNEREG ;20/03/2004 10:31:26;0.0000000000E000
  90. DATA.LAGAREL.DEFNIVCANALAMONT ;20/03/2004 10:31:26;0.0000000000E000
  91. DATA.LAGAREL.DEFNIVCANALAVAL ;20/03/2004 10:31:26;0.0000000000E000
  92. DATA.LAGAREL.DEFNIVEAUBASAMONT ;20/03/2004 10:31:26;0.0000000000E000
  93. DATA.LAGAREL.DEFNIVEAUBASDEVERSOIR ;20/03/2004 10:31:26;0.0000000000E000
  94. DATA.LAGAREL.DEFNIVEAUHAUTAMONT ;20/03/2004 10:31:26;0.0000000000E000
  95. DATA.LAGAREL.DEFNIVEAUHAUTDEVERSOIR ;20/03/2004 10:31:26;0.0000000000E000
  96. DATA.LAGAREL.DEFPOSITIONVANNEDEC ;20/03/2004 10:31:26;0.0000000000E000
  97. DATA.LAGAREL.DEFPOSITIONVANNEREG ;20/03/2004 10:31:26;0.0000000000E000
  98. DATA.LAGAREL.DEFSURVERSE ;25/03/2004 18:29:52;0.0000000000E000
  99. DATA.LAGAREL.DEFVITESSEEAUAVAL ;20/03/2004 10:31:26;0.0000000000E000
  100. DATA.LAGAREL.DEVERSOIR ;20/03/2004 10:31:26;0.0000000000E000
  101. DATA.LAGAREL.NIVCANALAMONT ;26/03/2004 15:50:58;8.6000000000E001
  102. DATA.LAGAREL.POSITIONVANNEDEC ;24/03/2004 09:56:29;0.0000000000E000
  103. DATA.LAGAREL.POSITIONVANNEREG ;20/03/2004 10:31:26;0.0000000000E000
  104. DATA.LAGAREL.VITESSEEAUAVAL ;20/03/2004 10:31:26;0.0000000000E000
  105. DATA.MOBILE.DEFPIEZZO ;20/03/2004 10:35:53;0.0000000000E000
  106. DATA.MOBILE.NIVPIEZZO ;26/03/2004 17:02:53;9.2000000000E001
  107. DATA.PARTITEUR.DEBDEVERSOIRAMONT ;26/03/2004 11:13:17;0.0000000000E000
  108. DATA.PARTITEUR.DEBITAMONTTH ;26/03/2004 17:03:00;1.6090000000E003
  109. DATA.PARTITEUR.DEBITDECHARGEDROITE ;25/03/2004 18:00:19;0.0000000000E000
  110. DATA.PARTITEUR.DEBITDECHARGEGAUCHE ;20/03/2004 10:31:25;0.0000000000E000
  111. DATA.PARTITEUR.DEBITDROITE ;26/03/2004 17:03:00;9.7300000000E002
  112. DATA.PARTITEUR.DEBITGAUCHE ;26/03/2004 17:03:00;6.3600000000E002
  113. DATA.PARTITEUR.DEBITREGULDROITE ;26/03/2004 17:03:00;8.2100000000E002
  114. DATA.PARTITEUR.DEBITREGULGAUCHE ;26/03/2004 17:03:00;7.4600000000E002
  115. DATA.PARTITEUR.DEFDEBITAMONT ;25/03/2004 11:50:19;0.0000000000E000
  116. DATA.PARTITEUR.DEFDEBITDECHARGEDROITE ;25/03/2004 11:50:19;0.0000000000E000
  117. DATA.PARTITEUR.DEFDEBITDECHARGEGAUCHE ;25/03/2004 11:50:19;0.0000000000E000
  118. DATA.PARTITEUR.DEFDEBITDROITE ;25/03/2004 11:50:19;0.0000000000E000
  119. DATA.PARTITEUR.DEFDEBITGAUCHE ;25/03/2004 11:50:19;0.0000000000E000
  120. DATA.PARTITEUR.DEFDEBITREGULDROITE ;25/03/2004 11:50:19;0.0000000000E000
  121. DATA.PARTITEUR.DEFDEBITREGULGAUCHE ;25/03/2004 11:50:19;0.0000000000E000
  122. DATA.PARTITEUR.DEFNIVBCANALCOMMUN ;20/03/2004 10:31:25;0.0000000000E000
  123. DATA.PARTITEUR.DEFNIVBCANALDROITE ;20/03/2004 10:31:25;0.0000000000E000
  124. DATA.PARTITEUR.DEFNIVBCANALGAUCHE ;20/03/2004 10:31:25;0.0000000000E000
  125. DATA.PARTITEUR.DEFNIVCANALCOMMUN ;25/03/2004 11:50:19;0.0000000000E000
  126. DATA.PARTITEUR.DEFNIVCANALDROITE ;25/03/2004 11:50:19;0.0000000000E000
  127. DATA.PARTITEUR.DEFNIVCANALGAUCHE ;25/03/2004 11:50:19;0.0000000000E000
  128. DATA.PARTITEUR.DEFNIVHCANALCOMMUN ;20/03/2004 10:31:25;0.0000000000E000
  129. DATA.PARTITEUR.DEFNIVHCANALDROITE ;20/03/2004 10:31:25;0.0000000000E000
  130. DATA.PARTITEUR.DEFNIVHCANALGAUCHE ;20/03/2004 10:31:25;0.0000000000E000
  131. DATA.PARTITEUR.DEFPOSITIONVANNEDECDROITE ;25/03/2004 11:50:19;0.0000000000E000
  132. DATA.PARTITEUR.DEFPOSITIONVANNEDECGAUCHE ;25/03/2004 11:50:19;0.0000000000E000
  133. DATA.PARTITEUR.DEFPOSITIONVANNEREGDROITE ;25/03/2004 11:50:19;0.0000000000E000
  134. DATA.PARTITEUR.DEFPOSITIONVANNEREGGAUCHE ;25/03/2004 11:50:19;0.0000000000E000
  135. DATA.PARTITEUR.DEFVITESSEEAUDROITE ;20/03/2004 10:31:25;0.0000000000E000
  136. DATA.PARTITEUR.DEFVITESSEEAUGAUCHE ;20/03/2004 10:31:25;0.0000000000E000
  137. DATA.PARTITEUR.NIVCANALCOMMUN ;26/03/2004 17:03:00;6.8900000000E001
  138. DATA.PARTITEUR.NIVCANALDROITE ;26/03/2004 17:02:23;1.0510000000E002
  139. DATA.PARTITEUR.NIVCANALGAUCHE ;26/03/2004 17:03:00;8.2100000000E001
  140. DATA.PARTITEUR.POSITIONVANNEDECDROITE ;25/03/2004 18:00:19;0.0000000000E000
  141. DATA.PARTITEUR.POSITIONVANNEDECGAUCHE ;25/03/2004 11:37:30;0.0000000000E000
  142. DATA.PARTITEUR.POSITIONVANNEREGDROITE ;26/03/2004 16:35:18;3.5700000000E001
  143. DATA.PARTITEUR.POSITIONVANNEREGGAUCHE ;26/03/2004 16:27:31;1.4300000000E001
  144. DATA.PARTITEUR.VITESSEEAUDROITE ;26/03/2004 17:03:00;6.9800000000E-001
  145. DATA.PARTITEUR.VITESSEEAUGAUCHE ;26/03/2004 17:03:00;5.3100000000E-001
  146. DATA.PONTLUSSAC.DEBITAMONT ;25/03/2004 07:03:41;5.6315850000E005
  147. DATA.PONTLUSSAC.DEBITAVAL ;25/03/2004 07:03:41;2.0273704960E009
  148. DATA.PONTLUSSAC.DEBITDEVERSOIR ;25/03/2004 07:03:41;8.0417953491E001
  149. DATA.PONTLUSSAC.DEBITREJET ;25/03/2004 07:03:41;8.0417953491E001
  150. DATA.PONTLUSSAC.DEBITVANNECONDUITE ;25/03/2004 07:03:41;0.0000000000E000
  151. DATA.PONTLUSSAC.DEBITVANNEPONT ;25/03/2004 07:03:41;0.0000000000E000
  152. DATA.PONTLUSSAC.NIVBASCANALAMONT ;25/03/2004 07:03:41;0.0000000000E000
  153. DATA.PONTLUSSAC.NIVCANALAMONT ;25/03/2004 07:03:41;6.1597619593E001
  154. DATA.PONTLUSSAC.NIVHAUTCANALAMONT ;25/03/2004 07:03:41;1.0000000000E000
  155. DATA.PONTLUSSAC.PCTFERMETUREVANNECONDUITE ;25/03/2004 07:03:41;0.0000000000E000
  156. DATA.PONTLUSSAC.PCTFERMETUREVANNEPONT ;25/03/2004 07:03:41;2.1484702831E000
  157. DATA.ROUVIERE.DEBITAMONT ;20/03/2004 10:31:27;1.3600000000E002
  158. DATA.ROUVIERE.DEBITAMONTVH ;26/03/2004 15:51:29;2.5400000000E002
  159. DATA.ROUVIERE.DEBITAVAL ;26/03/2004 15:51:29;1.1400000000E002
  160. DATA.ROUVIERE.DEBITDEVERSOIR ;26/03/2004 15:51:29;1.1400000000E002
  161. DATA.ROUVIERE.DEBITVANNEREG ;23/03/2004 07:29:40;0.0000000000E000
  162. DATA.ROUVIERE.DEFBASNIVCANAL ;20/03/2004 10:31:27;0.0000000000E000
  163. DATA.ROUVIERE.DEFDEBITAMONTVH ;20/03/2004 10:31:27;0.0000000000E000
  164. DATA.ROUVIERE.DEFDEBITAVAL ;20/03/2004 10:31:27;0.0000000000E000
  165. DATA.ROUVIERE.DEFDEBITDEVERSOIR ;20/03/2004 10:31:27;0.0000000000E000
  166. DATA.ROUVIERE.DEFDEBITVANNEREG ;20/03/2004 10:31:27;0.0000000000E000
  167. DATA.ROUVIERE.DEFHAUTNIVCANAL ;20/03/2004 10:31:27;0.0000000000E000
  168. DATA.ROUVIERE.DEFNIVCANAL ;20/03/2004 10:31:27;0.0000000000E000
  169. DATA.ROUVIERE.DEFPOSVANNEREG ;20/03/2004 10:31:27;0.0000000000E000
  170. DATA.ROUVIERE.DEFSUSRVERSE ;20/03/2004 10:31:27;0.0000000000E000
  171. DATA.ROUVIERE.DEFVITESSEEAUAMONT ;20/03/2004 10:31:27;0.0000000000E000
  172. DATA.ROUVIERE.NIVCANAL ;26/03/2004 15:51:29;7.3800000000E001
  173. DATA.ROUVIERE.POSVANNEREG ;23/03/2004 07:29:40;0.0000000000E000
  174. DATA.ROUVIERE.VITESSEEAUAMONT ;26/03/2004 15:51:29;1.4600000000E-001
  175. DATA.STJEAN.DEFSUSRVERSE ;20/03/2004 10:31:10;0.0000000000E000
  176. DATA.STJEAN.NIVEAUPIEZZO ;26/03/2004 15:51:38;5.6700000000E001
  177. DATA.STJEAN.POSVANNE ;26/03/2004 15:51:38;1.5600000000E001
  178. [End]

Download

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:
  1. 'N° PORT SOCKET
  2. Sck_Port=***
  3.  
  4. 'Adresse IP Connexion serveur CIA
  5. Sck_AdrIP=***
  6.  
  7. DBPARAMTYPE=MYSQL
  8. DBPARAMPATH=reference_gignac
  9. DBPARAMSERVER=***
  10. DBPARAMUSER=***
  11. 'DBPARAMPWD=***
  12.  
  13. 'time out (en ms) prise en compte du fichier de consignes de repli
  14. TimeoutCsg=900000
  15.  
  16. 'Période (en ms) de génération du fichier d'acquisition
  17. PeriodeData=60000
  18.  
  19. 'Chemin du fichier d'acquisition (Chemin FTP)
  20. PathData=/REGULATEUR/Data
  21.  
  22. 'Chemin de sauvegarde des fichiers d'acquisition (Chemin FTP)
  23. TraceData=/REGULATEUR/SaveData
  24.  
  25. 'Chemin du fichier de consigne (Chemin FTP)
  26. PathCsg=/REGULATEUR/Csg
  27.  
  28. 'Chemin de sauvegarde des fichiers de consigne (Chemin FTP)
  29. TraceCsg=/REGULATEUR/SaveCsg
  30.  
  31. 'Chemin du fichier de command (start et stop) (Chemin FTP)
  32. PathCdeFrontal=/REGULATEUR/Commande/CdeF.txt
  33.  
  34. 'Chemin du fichier de consignes de repli (chemin local)
  35. PathCsgRepli=C:\Outils_DSA\digesteur\CsgRepli
  36.  
  37. 'Paramètres du serveur FTP
  38. Ftp_AdrIP=***
  39. Ftp_Login=***
  40. Ftp_Pwd=***

Download

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):

Interface of the Scada module of Sic