Autor Thema: motorised valve  (Gelesen 238 mal)

Offline srd

  • Full Member
  • ***
  • Beiträge: 148
motorised valve
« am: September 23, 2026, 08:43:38 Vormittag »
Bit of a weird one, we have a storage tank just over 4m with a 4-20ma / 5m transducer in to give levels. we have a motorised valve at the bottom of the tank to empty it. the motorised valve will take a 4-20ma signal to open / close. what we need to do is when the level is between 0 and 1m open it a bit, between 1m and 2m a bit more, 2m and 3m a bit more again and 3m and 4m open fully. what would be the best way of doing this. if possible can i have any examples in function block please as i am no good with structured text although i wish i would. any help would be much appreciated.

Offline JansenDa

  • Administrator
  • easy god
  • *****
  • Beiträge: 10143
Antw:motorised valve
« Antwort #1 am: September 23, 2026, 10:34:25 Vormittag »
Hi,

Not weird at all. I know you asked for FBD, but in Structured Text this is only a few short, commented lines. Paste it in and adjust the numbers. But i did both.

I used a Microsoft Cowork Skill Suite which we have for easySoft supported programming which is in a beta state.

So please verify everything carefully before implementing anything into the real world!

Hardware: the base-unit analog inputs are 0–10 V only. Use an analog expansion such as the EASY-E4-DC-6AE1 with both channels set to 4–20 mA. In that mode the raw value is 819 (4 mA) to 4095 (20 mA).

The full commented code and a PDF guide (scaling, fault handling, commissioning checklist) are attached.

Please note: this is an untested example, not a safety function. Run the plausibility check and simulation in easySoft first, then commission carefully. Check which way the valve fails on loss of signal or power. Also make sure that opening the bottom valve can't cause uncontrolled discharge or overflow downstream. Overfill and emergency protection must be independent of this logic.

Hope that helps!

Daniel

Online Konni66

  • Global Moderator
  • Full Member
  • *****
  • Beiträge: 323
  • Keine Panik!
    • Eaton Trainingscenter Bonn
Antw:motorised valve
« Antwort #2 am: September 23, 2026, 11:08:29 Vormittag »
Hello srd,
here's a quick an dirty idea.
You have to check values for level calculation, percentages of valve opening and
to think about what happens to valve set value if water surface doing waves!

Pay attention to the change in the manipulated variable at the range limits. If these can change rapidly, the valve opening degree will also change rapidly.
So the solution is not ready, yet. Do the commissioning very carefully. No guaranty to correct function.

//Calculate water level in cm
LS01 (
   EN := ,
   I1 := IA05,         //read water level
   X1 := 819,         //Inc @ 4 mA
   Y1 := 400,         //short distance -> water level 400 cm
   X2 := 3440,         //Inc @ ~13 mA (400 cm) CHECK @ EMPTY TANK!!!
   Y2 := 0,                 // long distance -> water level 0 cm
   QV =>            //water level in cm
);

//Set analogue output for valve depending on water level
CASE LS01QV OF
   0..100:     QA05:=1638;      //water level 0..100 cm -> valve 25% open
   101..200:   QA05:=2457;      //water level 101..200 cm -> valve 50% open
   201..300:   QA05:=3276;      //water level 101..300 cm -> valve 75% open
   301..400:   QA05:=4095;      //water level 301..400 cm -> valve 100% open   
ELSE
   ;
END_CASE;
« Letzte Änderung: September 24, 2026, 12:06:07 Nachmittag von Konni66 »
Die Programmierbeispiele sind zu Schulungszwecken gedacht. Trotz sorgfältiger Erstellung und Funktionsprüfung können Fehler nicht ausgeschlossen werden. Daher erfolgt die Verwendung der Programmteile in eigener Verantwortung.