Hello dear engineers,
i made a function block to control 3 reservoirs with different colors for a virtual blinding application, the idea was to make one single FB1 and call it 3 times with 3 instance DBs (DB2, DB3, DB4 ),but the program works in a weird way here is the code for the FB1 :
NETWORK1
OPN "CODE COULEURS" //
L #COLOR_CODE
L 0
<>I
JCN _002
A "SYSTEME MARCHE"
AN #VANNE_CUVE_DOSAGE
A "START"
FP M 200.1
S #VANNE_CUVE_PEINTURE
_002: NOP 0
NETWORK2
OPN "CODE COULEURS"
ON "SYSTEME MARCHE"
O #VANNE_CUVE_DOSAGE
O(
L #CAPTEURS_CUVE_DOSAGE
L #COLOR_CODE
==I
)
R #VANNE_CUVE_PEINTURE
the program just care about the first called instance ( so the first reservoir ) and some how it skip the two others until the value of #COLOR_CODE is 0 than he start reacting with the second one and so.
i tried the BE BEU BEC instruction but it doesnt change anything.
where you think the problem is??
thanks in advance
i made a function block to control 3 reservoirs with different colors for a virtual blinding application, the idea was to make one single FB1 and call it 3 times with 3 instance DBs (DB2, DB3, DB4 ),but the program works in a weird way here is the code for the FB1 :
NETWORK1
OPN "CODE COULEURS" //
L #COLOR_CODE
L 0
<>I
JCN _002
A "SYSTEME MARCHE"
AN #VANNE_CUVE_DOSAGE
A "START"
FP M 200.1
S #VANNE_CUVE_PEINTURE
_002: NOP 0
NETWORK2
OPN "CODE COULEURS"
ON "SYSTEME MARCHE"
O #VANNE_CUVE_DOSAGE
O(
L #CAPTEURS_CUVE_DOSAGE
L #COLOR_CODE
==I
)
R #VANNE_CUVE_PEINTURE
the program just care about the first called instance ( so the first reservoir ) and some how it skip the two others until the value of #COLOR_CODE is 0 than he start reacting with the second one and so.
i tried the BE BEU BEC instruction but it doesnt change anything.
where you think the problem is??
thanks in advance