Showing results 1 to 4 of 4

Thread: Zenon Logic to check if a Zenon Variable is online

  1. #1
    Join Date
    13.02.2019
    Posts
    19

    Default Zenon Logic to check if a Zenon Variable is online

    Hello everyone!

    I'm using Zenon Logic to check if a 61850 variable on Zenon (External Visibile) is Invalid through VsiGetBit

    IsInvalid := vsiGetBit ( {QSACC!QSACCUPCIN/DP8GGIO6/DPI1/stVal[ST]}, 18 )

    But in the first 10 seconds of start of the Runtime, the driver 61850 is going up while Zenon Logic is already run but IV_Bit is 0 and compromises logic even if I assign an initial value (My internal variable "IsInvalid" with initial value 1 is overwritten by 0 by the function VsiGetBit).

    How I can introduce an operator like IsOnline() on VBA to check if in my Zenon Logic the variable is online and then check if is Invalid or not ?

    IF (unknown operator or method like VBA isOnline () = true) THEN
        IsInvalid := vsiGetBit ( {QSACC!QSACCUPCIN/DP8GGIO6/DPI1/stVal[ST]}, 18 )
    END_IF


    Thank You!




  2. #2
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    757

    Default Re: Zenon Logic to check if a Zenon Variable is online

    May I ask why you need to evaluate in Logic the INVALID status bit of a process variable? What is the use-case?

    Would be not simpler to evaluate the value of ConnectionState variable instead?
    And anyway, to improve your code you can evaluate the value of ConnectionState before you evaluate the values or status bits of stVal variables.

    Alternatively to Logic, you can create in zenon a reaction matrix which detects INVALID and then calls a 'write set value' function for an additional, internal BOOL variable.


  3. #3
    Join Date
    13.02.2019
    Posts
    19

    Default Re: Zenon Logic to check if a Zenon Variable is online

    I would like to evalutate a invalid status bit of a 850 variable because maybe the connection with IED it's ok, but the IED sends really a invalid information because, for example, it has a problem on the I/O modules

  4. #4
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    757

    Default Re: Zenon Logic to check if a Zenon Variable is online

    What you are doing with the IsInvalid  in Logic (or in zenon)? An alarm or some calculations?

    In such scenarios suitable could be the evaluation of the */q[ST] variable value.

    Do you know, that:
    • a zenon variable which has a legal value has status bit SPONT (bit 17), so to check only bit INVALID is not distinguishing the situations:
      - when IED sends Quality.Validity>0 (INVALID and SPONT)
      - while connection loss or when variable is not present in the IED's data model (only INVALID)
      - and from situation when values are not received yet at all (neither SPONT, nor INVALID). This is probably your case - shortly after RT start when Logic is ready but zenon iec850 driver is associating and checking the data model of the IED. Depending how fast the IED is and the size of the data model the variables are without any value (empty).
    • you can configure the iec850 driver o use 'Symbolic Address' and then you can rename zenon variables to human-friendly names; and name syntax valid in IEC 61131 - then no need of "{}" in code and the online debug shows values. 
    • you can use in Logic SymbVSIGetBit('io1_stVal', ...) to access variable information via its name. Could be useful if you have as many IsInvalid variables as stVal variables - then together with XMLSetSymbValue('io1_IsInvalid', ...) you can create an UDFB/Subprogram with input parameter: a string with name prefix, like e.g. 'io1'. Then you can use the same Subprogram for all stVal variables.
      With smart names - you can execute Subprogram from a FOR loop with code generated prefixes io1, io2, ...

     



Similar Threads

  1. Zenon logic watchdog variable
    By doublem in forum zenon Energy Edition
    Replies: 2
    Last Post: 25th March 2019, 12:07
  2. Zenon to Zenon Logic communication issue
    By joelprasad in forum zenon Supervisor
    Replies: 1
    Last Post: 23rd February 2019, 18:03
  3. Changing Variable Name in Zenon Logic
    By hamiiiz in forum straton / zenon Logic
    Replies: 2
    Last Post: 23rd June 2015, 13:50
  4. zenon logic doesn't communicate with external variables in zenon
    By mashjj in forum straton / zenon Logic
    Replies: 6
    Last Post: 27th February 2015, 13:10
  5. Re: zenon logic doesn't communicate with external variables in zenon
    By anjali.gk.nair@gmail.com in forum straton / zenon Logic
    Replies: 2
    Last Post: 22nd August 2014, 10:51

Posting Rules

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