Page 1 of 2 1 2 LastLast
Showing results 1 to 10 of 16

Thread: access to variable adress in Runtime

  1. #1
    anahita Gast

    Unglücklich access to variable adress in Runtime

    i really need to access to the variable address in run time
    with this code i finde error

    Public Sub LeftClickDown_Default(obElem As Element)
    Dim var1 As Variable
    Dim myVal
    Set var1 = thisProject.Variables.Item("Feeder 404 Current")
    myVal = var1.Driver.DynProperties("IEC870_IOA1")
    MsgBox myVal
    End Sub

    if fhis DynProperty doesn't exist in the zenon RT, plz tell me an other way to access address variable in runtime
    Thanks a lot

  2. #2
    Join Date

    Default Re: access to variable adress in Runtime

    Take a look here:

    Those variable addressing information (IOA and COA) are only available in the editor - not in the runtime

    A possible workaround would be:
    - a textfile with the needed addressing parameter generated out from the editor
    - in the runtime this file is accessed


  3. #3
    anahita Gast

    Default Re: access to variable adress in Runtime

    thanks for your guidance
    an other question in this case, i need a way to execute macros that i wrote in editor,in runtime environment.
    for exapmle i place a button in runtime project that with click execute editor macros.
    i mean i really need a way to synchronize editor macros with runtime.

  4. #4

    Default Re: access to variable adress in Runtime

    When you compile your runtime files in the editor, and you have created VBA macros in the zenon editor, these VBA macros are available in the runtime after a reload (or a restart) with the compiled runtime files.

    One way to execute a VBA macro in the runtime that is defined in the zenon editor, is to create a zenon function in the editor "execute VBA macro", select the desired macro, and link the function to a button.

    Another way is to create a zenon function "show VBA macro dialog" and link this function with a button.

    A third way, is to create VBA event macros, and link such a macro to a certain button in a screen. For example a LeftClickUp macro can be linked at a button in the editor, which will be executed on this event in the runtime.

  5. #5
    anahita Gast

    Default Re: access to variable adress in Runtime

    the problem is this,i wrote my editor macros in vsta
    when i try to do the first way that you said i see none of my macros to select, whereas i see them in Drop-down list macros

  6. #6

    Default Re: access to variable adress in Runtime

    OK, with VSTA macros, you need to use the function "Execute VSTA Macro".

    Please note, that the VSTA macros for the runtime, are in a different VSTA IDE. (ProjectAddin) The VSTA Macros you see in the dropdownbox in the zenon editor are for the editor only (WorkspaceAddin), and are not available in the runtime.

    Right click on the "Programming interface" project tree node, to open the VSTA IDE for the ProjectAddin (the Alt+F10 notice is incorrect, this opens the WorkspaceAddin), create your VSTA Macros for the runtime here, compile the ProjectAddin, and after that you should be able to select the runtime VSTA macros in the zenon function "Execute VSTA macro"

    The macros must:
    - be public
    - begin with "Macro"
    - not have parameters

  7. #7
    anahita Gast

    Default Re: access to variable adress in Runtime

    sure but my problem is not that!
    the execute vba macros are just for runtime macros
    how can i access to the editor macros that just can be seen in (Drop-down list macros ),
    some of obj are just available in workspace so just editing environment vba can access them
    i dont want to access these obj in runtime but i need to execute those macros that access them and available in editor

  8. #8

    Default Re: access to variable adress in Runtime

    Did you know that you can attend a VBA/VSTA training, where you can learn about the possibilities and limitations of the zenon programming interface, and how to use it properly?

    These 1 day trainings are hosted on a regular basis at COPA-DATA.

    Regarding your problem, I'm not sure what you mean. Are you using VBA? Or VSTA?

    Certain actions, for example creating a variable in the database, are only available in the zenon editor by design.

  9. #9
    anahita Gast

    Default Re: access to variable adress in Runtime

    it s my honor to come and i m sure such a good training can help me so much
    but some problem in getting visa to austria prevent me from comming
    and i have to ask so many question from far way!!!!!
    exactly! something like this (addressing variable)
    i wrote macros in both editor and runtime, i need while im in runtime ,synchronous with executing runtime macro, my editor macro be executed .something like communication between editor and run time environment.
    i dont know, making .dll of editor macro and use it in runtime macro is a correct way to get the aim or not
    i wrote with both vba and vsta

  10. #10

    Default Re: access to variable adress in Runtime

    Maybe you can explain a bit more, what it is exactly that you want to do, and why?

    The zenon editor, where you create your projects, is completely seperated from the zenon runtime.

    In fact, on the PC with the zenon runtime you don't need the zenon editor at all. The zenon runtime works with the compiled runtime files from the editor, but has no access to the engineering data in the editor.

Similar Threads

  1. Replies: 1
    Last Post: 19th May 2011, 07:51
  2. Variable Unreadable in runtime
    By whitetaru in forum Drivers
    Replies: 6
    Last Post: 12th May 2011, 03:23
  3. Access to Excel from SCADA Runtime
    By olga in forum VBA
    Replies: 1
    Last Post: 20th November 2010, 02:27
  4. How to access to IEC 60870 IOA adress in Runtime
    By softart2 in forum zenon Energy Edition
    Replies: 1
    Last Post: 16th September 2010, 23:39
  5. Access array variable from VBA
    By mvj in forum VBA
    Replies: 4
    Last Post: 10th March 2010, 15:04

Posting Rules

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