Showing results 1 to 4 of 4

Thread: Customising online variable list

  1. #1
    Join Date
    17.03.2016
    Posts
    36

    Default Customising online variable list

    Hi,

    I'm currently trying to create a screen which will give me a list of all variables and their current values. My intention would be to create a screen showing all analog inputs on one screen and antoher screen showing all digital inputs (i.e. binary input as well as legacy double bit binary inputs).
    This screen should be a scrollable list showing the variable name, identification, value and timestamp, as well as the offset.

    I have tried to create a screen using the 'variable diagnosis' screen type which is launched using the screen switch function, however the customisation available here is limited:

    1) I cannot select the column 'offset' in here (required as I'm using DNP3 driver and so want to see the relevant DNP3 address next to the point). The column selection window in the variable diagnosis window is restricted to a subset of the full variable columns.

    2) The variable diagnosis screen requires that you manually select and then add which variables are inlcuded in the list.. I would prefer to include ALL variables which fit the filter of *binary input* for example. With the present configuration, if I add new variables in future it will be required that I go back in to the variable diagnosis configuration and remember to add the new vars... not ideal for future modifications.

    Therefore is it possible to further customise the variable diagnosis window, or alternatively is is possible to roll my own window to achieve what I want with vba? If so I'm not really sure where to get started.

    Many thanks,

    Dave

  2. #2

    Default Re: Customising online variable list

    Hi Dave,

    Thanks for your post and welcome to the forum!

    The variable diagnosis screen would indeed be the quickest way to achieve this. The address column will show the DNP point number.

    What the variable diagnosis screen will not show directly, is the driver object type. By default, when you automatically create variables by doing an import for the DNP3 driver and issue a class 0123 poll, the variable name includes the object group number and point index (e.g. G10_0 for binary output) and the variable identification includes the point index and object group type, in clear text (e.g. Index0.binaryOutput).

    When you automatically create variables by doing an import for the DNP3 driver from an XML device profile, the name and identification is taken over from the XML device profile points list.

    You can display the columns for the variable name and the identification in the variable diagnosis screen, giving you the opportunity to state whether this is a binary input or a legacy double bit binary input.

    The contents and the layout of the variable diagnosis screen, are defined through the screen switch function. Unfortunately it currently is not possible to have dynamically updated contents based on a wild card at the variable selection. This could be an idea for a future version!

    For now, there are several things you can do.

    1) in your workflow, make sure you manually add the variable at the corresponding screen switch function, when you create a new variable

    2) when you create a new variable in the editor, react on the API OnObjectCreated event and check if the variable belongs to the DNP3 driver and if yes, which driver object type the variable is. Next modify the corresponding screen switch function and add the variable.

    3) Instead of directly executing the screen switch function to the variable diagnosis screen in the runtime, execute a VBA or VSTA macro that modifies a dummy screen switch function to the variable diagnosis screen that parses all the variables in the runtime and depending on matching criteria, add the variables to the dummy screen switch function, prior to executing the function from the VBA or VSTA macro.


    2) and 3) are definitely doable, but depending on the amount of variables that will need to be added in future, your experience with the zenon API and your programming skills, you may be better off with solution 1)

    Best regards,
    Mark

  3. #3
    Join Date
    17.03.2016
    Posts
    36

    Default Re: Customising online variable list

    Mark,

    Many thanks for your prompt response. I will not likely be using the import of variables, as our RTUs have many 'spare' points which would report back. Your reply does give me cause to think a little further in detail as to how we will go about our naming convention for variables. I am going to be using the replace links functionality in a number of places so using generic naming such as G10_0 on its own wouldn't be sufficent, although I will have to consider including something along those lines to allow me to apply filters to isolate only binary inputs etc.

    WRT to using the OnObjectCreated event.. I will investigate this as an option... I'm currently trying to build a project template for a number of people to use & I'm far more in favour of automation as opposed to relying on procedures (its too easy for someone to forget to add new variables, especially when they will have many other steps in the build process to consider).

    No. 3) sounds more like the ideal solution & while I do have VBA experience, I currently know nothing about the specifics of the Zenon API, so looks like I have some reading ahead of me.

    Thanks,

    Dave

  4. #4

    Default Re: Customising online variable list

    Hi Dave,

    With the import, (either online through a class 0123 poll or offline from the XML device profile) you still get a selection dialog with filtering options, that allows you to choose which variables should be automatically created.

    "G10_0" is only a part of the name used for the online import. It is further prefixed with "S1" (where "1" is the net address) and "name" (where "name" is the name for the connection in the driver configuration).

    While the driver import can help to avoid mistakes, in some cases it may mean additional work to give sensible names that can be used with substitution, command input, etc. Also with the driver import, the datatype of the variable is automatically set, which may not exactly match the variation of the specific point.

    Best regards,
    Mark

Similar Threads

  1. Replies: 4
    Last Post: 7th August 2015, 14:53
  2. Value of variable in text list
    By martijnvanspijk in forum zenon Supervisor
    Replies: 6
    Last Post: 29th May 2013, 00:25
  3. Update OnLIne User List in VBA
    By d_montini in forum VBA
    Replies: 6
    Last Post: 17th October 2012, 14:23
  4. Online Variable
    By brenner in forum VBA
    Replies: 7
    Last Post: 9th September 2009, 06:39
  5. Picture variable list
    By scotttee in forum zenon Supervisor
    Replies: 2
    Last Post: 7th May 2009, 14:14

Posting Rules

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