P4088¶
- Code
P4088
- Message
EXTENDS names a type that is not a declared function block
This error occurs when a function block type names a base in EXTENDS
that is not a declared function block: the name is not declared at all, or it
names another kind of type, such as a structure or an interface.
Only a function block can be extended. To provide the methods an interface
declares, use IMPLEMENTS.
Extending a standard function block, such as TON, is not supported yet and
is reported as P9999.
Example¶
The following code will generate error P4088:
FUNCTION_BLOCK FB_Motor EXTENDS FB_Drive (* Error: FB_Drive is not declared *)
END_FUNCTION_BLOCK
To fix this error, declare the base function block, or name one that is declared:
FUNCTION_BLOCK FB_Drive
END_FUNCTION_BLOCK
FUNCTION_BLOCK FB_Motor EXTENDS FB_Drive
END_FUNCTION_BLOCK
See Also¶
EXTENDS —
EXTENDSIMPLEMENTS —
IMPLEMENTSP4070 —
IMPLEMENTSnames a type that is not a declared interface
Think IronPLC is wrong about this?
If you believe this diagnostic is incorrect, open an issue on GitHub with a small sample that demonstrates the problem.