standeven
Member
"Function block call requires a function instance" when calling action in Codesys
Using Codesys 2.3, I'm getting the following error:
"A function block call requires a function block instance."
My call to the function is in a PRG as follows:
Any idea why this won't build? The function block is instantiated, so I'm not sure what's going on. I suspect I might be calling the action wrong.
Thanks for any help!
Using Codesys 2.3, I'm getting the following error:
"A function block call requires a function block instance."
My call to the function is in a PRG as follows:
Code:
PROGRAM TestProgram
VAR
[INDENT]testFunctionBlock:MyFunctionBlock;
callAction:BOOL;
[/INDENT]
END_VAR
testFunctionBlock(inputVar:=1);
IF (callAction) THEN
[INDENT]testFunction.testAction();[/INDENT]
END_IF;
Any idea why this won't build? The function block is instantiated, so I'm not sure what's going on. I suspect I might be calling the action wrong.
Thanks for any help!