Showing results 1 to 2 of 2

Thread: Acces variable identification/tagname straton

  1. #1
    Join Date

    Default Acces variable identification/tagname straton


    I am using the identification of a variable in VBA for some calculations.
    I want to do something similar but using straton, but i canīt see how to acces the variable Tagname/Identification.
    Is there a way to do this?
    Thank you very much

  2. #2
    Join Date

    Default Re: Acces variable identification/tagname straton


    In straton there is a way to access to a variable value from its name.
    This is in the 'XML' section because related to it, but you can use it without having an XML file on the runtime.
    You have to use the "XMLGETSYBVALUE" function.
    The first input is the variable name as a STRING, the second one is TRUE is you want the function to be case sensitive and FALSE if not.
    The output is the variable's value as a STRING.

    For example for a Global variable:
    GlobalVarValue := XMLGETSYBVALUE ( 'MyGlobalVar', FALSE );

    For a local one in the program called MainProgram:
    LocalVarValue := XMLGETSYBVALUE ( 'MainProgram.MyLocalVar', FALSE );

    For a variable in a table at index 'i':
    MyVariableAtIndex_i := XMLGETSYBVALUE ( 'MyVar[' + ANY_TO_STRING(i) + ']' , FALSE );


    IMPORTANT: The 'Syb' checkbox of the variable you want to read must be checked (properties must be Embedded on the target)

Similar Threads

  1. Variable Identification in REMA
    By diemon in forum zenon Service Engine Supervisor
    Replies: 3
    Last Post: 13th January 2015, 11:14
  2. Replies: 7
    Last Post: 15th January 2014, 10:48
  3. Trending display with variable identification
    By yitlilee in forum zenon Service Engine Operator
    Replies: 6
    Last Post: 19th December 2013, 15:27
  4. variable Identification
    By paruvathakumar in forum VBA
    Replies: 3
    Last Post: 13th September 2012, 00:31
  5. How to use Variable tagname in link text element?
    By softart2 in forum zenon Service Engine Supervisor
    Replies: 2
    Last Post: 17th June 2010, 08:11

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts