Key word INIT
-
I try to get the OSCAT Libs to work in Mervis.
Example: FUNCTION_BLOCK _RMP_B
VAR
tx, tl, tn : TIME;
init : BOOL;
last_dir : BOOL;
start : BYTE;
END_VARError: In 'variables declaration', missing 'Keyword_END_VAR' at ''init''
Error In 'init block', mismatched input '':'', expecting 'Keyword_END_INIT'
Error In 'typed bit string literal', mismatched input '';'', expecting 'Special_HASH' -
@RainerK The function block declaration in Mervis requires the following schema but the INIT variable name to must not be used. This is a bug of course that needs to be fixed. But thanks for the info. I saw that you have already reported the issue via the Mervis report form.
FUNCTION_BLOCK fb_name (* EXTENDS //base type IMPLEMENTS //interface type list *) VAR (* add local variables here *) END_VAR VAR_INPUT (* add in variables here *) END_VAR VAR_OUTPUT (* add out variables here *) END_VAR (* METHOD abc //: return type // method's body END_METHOD *) (*function block body*) END_FUNCTION_BLOCK```