Hi, i've got a sbr that takes 2 input parameters - Time for low state and time for high state and it sets for example a flag for 5 sec. and keeps it reseted for another 5 sec...
Looks like this:
VAR_INPUT
T_Off:WORD;
T_On:WORD;
END_VAR
VAR_OUTPUT
Out:BOOL;
END_VAR
BEGIN
Network 2 // Flag 5 sec.
LD SM0.0
LPS
A M0.5
TON T38, LW0
LRD
A T38
TOF T37, LW2
LRD
A T38
A M0.5
R M0.5, 1
LPP
AN T38
AN T37
AN M0.5
S M0.5, 1
Network 3 // Put to output
LD M0.5
= L4.0
I want to use this subroutine more than once in my project but:
i can't pass specified timers names as an subroutine argument and i can't use the same timer twice, can anyone help me ?
I'm using s7-200 226 and step micro win v4.0 .
I'll be very grateful for Your help.
Looks like this:
VAR_INPUT
T_Off:WORD;
T_On:WORD;
END_VAR
VAR_OUTPUT
Out:BOOL;
END_VAR
BEGIN
Network 2 // Flag 5 sec.
LD SM0.0
LPS
A M0.5
TON T38, LW0
LRD
A T38
TOF T37, LW2
LRD
A T38
A M0.5
R M0.5, 1
LPP
AN T38
AN T37
AN M0.5
S M0.5, 1
Network 3 // Put to output
LD M0.5
= L4.0
I want to use this subroutine more than once in my project but:
i can't pass specified timers names as an subroutine argument and i can't use the same timer twice, can anyone help me ?
I'm using s7-200 226 and step micro win v4.0 .
I'll be very grateful for Your help.