Autor Thema: mains water valve  (Gelesen 176 mal)

Offline srd

  • Full Member
  • ***
  • Beiträge: 116
mains water valve
« am: Oktober 02, 2024, 15:51:39 Nachmittag »
we have a 4-20ma / 3m transducer i a tank, we have and analogue module on an easy e4what is the best way to open the mains water solenoid valve at 2.2m and close at 2.6m. If somebody has and example in FDB that would be helpful. Cheers

Offline radar17892

  • Sr. Member
  • ****
  • Beiträge: 782
  • Think easy!
    • mollgruppe
Antw:mains water valve
« Antwort #1 am: Oktober 02, 2024, 21:07:29 Nachmittag »
hello srd, When I get back on
 Weekend I can write you a UF block. Because these are comparisons and calculations, I would write them in ST in the UF.

Thomas
Weil Einfach einfach Einfach ist!

Offline radar17892

  • Sr. Member
  • ****
  • Beiträge: 782
  • Think easy!
    • mollgruppe
Antw:mains water valve
« Antwort #2 am: Oktober 06, 2024, 12:51:16 Nachmittag »
Hi srd,
here comes the soucecode for you

Zitat
(*
level controller
I01 = EN
IA1 = analog Input 4-20mA
Q1 = open Valve
QA1 = Level in mm *)
// PT1 Filter
FT01 (
   EN := true,
   I1 := IA01,//analog Input 4-20mA
   TG := 30,
   KP := 100,
   CY => ,
   QV => );
//scale Var to mm Level   
//If the sensor works from top to bottom, swap the level values   
LS01 (
   EN := true,
   I1 := FT01QV,
   X1 := 819,   //4mA
   Y1 := 0,//0mm level
   X2 := 4095,   //20mA
   Y2 := 3000,//3000mm level
   QV => QA1); //Leveloutput in mm
//Level controller with fixed setpoints   
IF (LS01QV >= 2600)OR NOT I01 THEN   //close valve, if higher than 2600mm
   Q01:= false;
ELSIF (LS01QV < 2200) and I01 THEN   //open valve, if lower than 22000mm
   Q01:= true;
ELSE   ;
END_IF;

Please also note: what happens if the analog signal fails, will the tank possibly be overfilled?

and the UF to import in your Project

Thomas
« Letzte Änderung: Oktober 06, 2024, 13:10:05 Nachmittag von radar17892 »
Weil Einfach einfach Einfach ist!

Offline srd

  • Full Member
  • ***
  • Beiträge: 116
Antw:mains water valve
« Antwort #3 am: Oktober 07, 2024, 12:59:08 Nachmittag »
Cheers for that Thomas