K
Dear sirs,
I want to use a function block with an instance DB in a function that is called from another function twice, and this second function is called from OB1 with actual parameters.
So the situation is something like below:
FC1(first common function):
VAR_IN
DB_In : Block_DB
END_VAR
...
call FB1, DB_In
...
FC2(second function called by OB1):
VAR_IN
FC2_DB_1 : Block_DB
FC2_DB_2 : Block_DB
END_VAR
...
Call FC1
DB_In := FC2_DB_1 <--- ***
Call FC1
DB_In := FC2_DB_2 <--- ***
...
END_FUNC
At *** i get illegal parameter assignment
OB1:
...
Call FC2
FC2_DB_1 := DB1
FC2_DB_2 := DB2
...
So how may I do it?
Best regards,
k.zonouzi ahmad
I want to use a function block with an instance DB in a function that is called from another function twice, and this second function is called from OB1 with actual parameters.
So the situation is something like below:
FC1(first common function):
VAR_IN
DB_In : Block_DB
END_VAR
...
call FB1, DB_In
...
FC2(second function called by OB1):
VAR_IN
FC2_DB_1 : Block_DB
FC2_DB_2 : Block_DB
END_VAR
...
Call FC1
DB_In := FC2_DB_1 <--- ***
Call FC1
DB_In := FC2_DB_2 <--- ***
...
END_FUNC
At *** i get illegal parameter assignment
OB1:
...
Call FC2
FC2_DB_1 := DB1
FC2_DB_2 := DB2
...
So how may I do it?
Best regards,
k.zonouzi ahmad