Showing results 1 to 7 of 7

Thread: screen template

  1. #1
    Join Date
    25.03.2008
    Posts
    14

    Frage screen template

    Is there a way to create a template screen on witch a can only change the variable linked to the container animation object?

    This is what a want to do. I have an array of a structure for a motor. For each element of the array of motor, I want to display those values by using the same screen template for each motor. It could be up to 200 motors. I want to monitor those values and be able to modify them.

  2. #2

    Default Re: screen template

    there are actually several ways to do this

    One way for example is to draw your motor in a normal zenOn picture, and link the variables of the first structure in the array. (e.g. MotorArray[1].Motor.Temperature and MotorArray[1].Motor.Status)

    Now select all the elements for this motor, and create a symbol out of this motor. When you insert this symbol in the symbol library, you can simply drag a new copy of this symbol in your picture, and substitute the links by using a string. (e.g. replace MotorArray[1]* by MotorArray[2]. All variable links in the symbol will be replaced by the second motor structure in your array.

    All properties of the linked symbol are inherited from the symbol in the library. So if you change something at the symbol in the library, all symbols in the picture change as well. However, in zenOn 6.22 and higher, you can also export properties at a linked symbol, which then can be set linked symbol in the picture. This way you have a linked symbol with all properties you want to change globally and directly at linked symbol in the picture still the possibility to change the exported properties, like e.g. a text.

    Another way is to use variable substitution at the picture directly. You can create one (popup) picture of a motor, which again uses the 1st item of your motor array. When you have finished the picture, you can create a new zenOn "picture switch" function to call this picture and have the possibility to replace all functions and variables in this picture. For an array of 200 motor items, you would have one picture, and 200 functions to call this picture (and fill it with different variables)

    the above methods show efficient ways of using variable names and substitution. There are other ways of course, which migth suit you better:

    You could create a small VBA wizard in the zenOn editor, which automatically creates a zenOn picture with elements and a function to call it, for each array-element. (See e.g. the project wizard)

    Also you can export a picture in XML, modify it, and import it again with a new name for the picture in the .xml file.

    Also you can copy a picture, paste it (once or 200 times) and select all items in the picture. In the context menu, then you can choose to replace the links (variables and functions) in all elements

  3. #3

    Default Re: screen template

    Quote Originally Posted by MarkClemens View Post

    Another way is to use variable substitution at the picture directly. You can create one (popup) picture of a motor, which again uses the 1st item of your motor array. When you have finished the picture, you can create a new zenOn "picture switch" function to call this picture and have the possibility to replace all functions and variables in this picture. For an array of 200 motor items, you would have one picture, and 200 functions to call this picture (and fill it with different variables)
    I got a hint from my colleague regarding the functionality "replacing indexes", which I did not mention here. For the variable substitution at the picture switch function, it is possible to pass the array-index to the function, by means of a variable. This way you have one function, and one variable which affects the motor being displayed. If the variable contains the value "1", the picture opened in the runtime is filled with the variables of array-index [1].

    Click image for larger version

Name:	replace_indexes.JPG
Views:	87
Size:	55.0 KB
ID:	82

  4. #4
    Join Date
    25.03.2008
    Posts
    14

    Default Re: screen template

    Thanks for your answer! I'm looking to do this substitution to each object inside of my screen with an ODBC connection. I think that it's going to be more manageable. I know how to retrieve my data from an ODBC connection but I will need some help for changing the variable of the object over VBA. Do you have some example?

    Or

    Is there a programming guide for the Zenon object who describes the properties and method of that object?

  5. #5

    Default Re: screen template

    Although I do not really understand what you want to do with the ODBC connection, you will find an object overview, the VBA help, and several samples here:

    VBA Forum

    What would you like to change at the variable? And where? In the runtime or in the edior?

    What information would you like to retrieve over this ODBC connection?

    How does this fit into the substitution concept?

  6. #6
    Join Date
    25.03.2008
    Posts
    14

    Default Re: screen template

    It look likes VBA is not supported with windows CE. This is not an option!

    I tried the substitution at the picture switch function with a variable for index and it works but my refreshing time to get the new screen takes about 30 sec. It's too long! I'm running with a Pentium III 1.83 GHz, 2 GB of Ram with XP Pro SP 2.

    Also I have 4 mode for each motor and each time I press a button for the actual motor I need to set 4 bit in the PLC. But this substitution is done only with the object in the screen and not to the function Call by this screen. When I press a Button to select a mode for this motor, I have to set a bit related to this motor to 1 and 3 others to 0. Is there a way to execute the function call with the offset number of this motor?

    Thanks!

  7. #7

    Default Re: screen template

    you are right, unfortunaley VBA is not supported on Windows CE.

    What exactly is delayed when opening the new picture? Normally on a machine like this with Windows XP Pro the picture with substitution should be displayed within a second.

    Perhaps you are experiencing a driver communication problem to some variables in your PLC, and therefore the variables which are communicating are retrieved with a delay. You could try and set the option "keep update-list in memory" in the driver configuration. This does not solve the possible communication errors, but keeps the latest value from the PLC in the memory, and uses this value to display the picture instead of waiting for the value from the PLC.

    You can use the diagnosis viewer to track down any possible communication errors, or alternatively send us the log-files and your project backup, for us to take a look at it.

    Regaring your questions about the functions, you can also substitute functions which are in the motor pictures, provided that the naming convention of the functions allows substitution. But maybe I do not understand you correctly. I can offer you to take a look at your project, if you send us a backup. (to the support e-mail address)

Similar Threads

  1. Monitor administration and screen resolution
    By markclemens in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 0
    Last Post: 14th September 2007, 07:13

Posting Rules

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