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

    Key word INIT

    Scheduled Pinned Locked Moved Mervis
    2 Posts 2 Posters 1.9k Views
    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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post