• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Key word INIT

    Mervis
    2
    2
    1006
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      RainerK last edited by

      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_VAR

      Error: 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'

      T 1 Reply Last reply Reply Quote 1
      • T
        tomas_hora administrators @RainerK last edited by tomas_hora

        @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```
        1 Reply Last reply Reply Quote 0
        • First post
          Last post