Hallo Andrus,
teste mal diesen Code
M01:= MB2 > 0;
//Rampe hoch 2000ms
T01 (
EN := I01 and not T01Q1,
RE := ,
ST := ,
I1 := T#20ms,
I2 := ,
Q1 => ,
QV => );
//Rampe runter 5000ms
T02 (
EN := not I01 and not T02Q1,
RE := ,
ST := ,
I1 := T#50ms,
I2 := ,
Q1 => ,
QV => );
// Counter 0 - 100%
IF T02Q1 and MB2 > 0 THEN
MB2:= MB2 - 1;
ELSIF T01Q1 and MB2 < 100 THEN
MB2:= MB2 + 1;
ELSE
;
END_IF;
//salierung 0-100% -> 12Bit
LS01 (
EN := true,
I1 := MB2,
X1 := 0,
Y1 := 0,
X2 := 100,
Y2 := 4095,
QV => );
PW01 (
EN := M01,
SV := LS01QV,
PD := 50,
ME := 0,
E1 => );
Gruß Thomas