Showing results 1 to 3 of 3

Thread: Program access to structure datatype variables

  1. #1

    Default Program access to structure datatype variables

    Guten Tag!
    We have a lot of structure datatype variables in our projects and wish to use their Identification field in our VBA or C# programs. When we tryed to access this variables by .Variables().Items(StructureTypeVarName) we received "null" as result.
    Is there some way to program access to at least Identification field of such variables?

  2. #2
    Join Date
    24.07.2008
    Location
    Salzburg
    Posts
    89

    Default AW: Program access to structure datatype variables

    Hallo,
    it worked for me when I wrote the variables like they are displayed in zenon:
    STRUC[1], STRUC[2]...
    thisProject.Variables.Item("STRUC[1]").Tagname 'Tagname = Identification field
    thisProject.Variables.Item("STRUC[1]").Unit

    Regards,
    Konstantin

  3. #3

    Default Re: Program access to structure datatype variables

    konstantinf
    I don't understand where in zenon complex variables are displayed in such way.
    In other words, I have complex variables which after xml export are looked like this:
    -
    839
    220.1AT.Q.PlakatInf
    ОРУ 220кВ АТ-1 Выключатель
    0
    0
    0
    0
    5
    TRUE
    FALSE
    TRUE
    33
    1
    0
    0
    0
    FALSE

    TRUE




    I cannot get programmable access to such variable by it's name, 220.1AT.Q.PlakatInf, code line like this:
    zenOn.Variable var1 = ObProjectRT.Variables().Item("220.1AT.Q.PlakatInf");
    always returns null, so access to var1 properties is disabled.

    What I do wrong?
    Last edited by stolyarov_as : 8th August 2011 at 14:23

Similar Threads

  1. Replies: 6
    Last Post: 17th November 2011, 00:05
  2. Replies: 1
    Last Post: 19th May 2011, 07:51
  3. Structure varible using OPC Client V2-0
    By bsneddon in forum Drivers
    Replies: 1
    Last Post: 21st April 2011, 23:49
  4. ext. program start in CE5.0 system
    By rgnos in forum zenon Operator
    Replies: 2
    Last Post: 2nd August 2009, 22:28

Posting Rules

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