Automated Engineering with zenon. part 2: When do you use automated engineering?

Creating a program for automated engineering yourself is time consuming and requires specialist knowledge. You should thus first always ask yourself the question: manual or automated?

Reasons for choosing automation are as follows:

  • Repeated tasks:
    For example, creating the same users, variables, functions etc. for each new machine
  • Information is already available in digital form:
    For example, variables in external data sources or screen information that can be derived from the PLC program
  • Results should be reproducible:
    For example, critical elements that should always be the same
  • The task is so comprehensive that automation is beneficial:
    For example, creating 500 screens or processing 10,000 variables

Automation is worthwhile particularly when there are large amounts of data, the tasks are repetitive or certain data is already available electronically in databases or other systems.

This series of blog posts does not provide instructions on how to implement customized automated engineering. However, we have suggestions and ideas for you, for how you can enter into the world of automated project creation, most of all for:

  • Programming in VBA
  • Programming in VSTA (C# or VB.NET)
  • Programming in external software, such as Excel
  • XML export/import
Abb1a-zenon API in zenonVBA

The zenon API in zenon VBA

Abb1b-zenon API in zenonVSTA

The zenon API in zenon VSTA

Abb1c-zenon API in Microsoft Excel

The zenon API in Microsoft Excel

Yes, that’s right: you can also easily program zenon from Excel – using Excel VBA. You thus have exactly the same possibilities as in zenon directly. It’s very simple if, for example, you have variables in Excel and want to create these in zenon: you open the Excel table from zenon VBA or VSTA and read off the values. This is how the zenon Automotive Generator (zag) works, for example. On the other hand, you can also access the zenon Editor from Excel directly and create, modify or also delete zenon objects.

You have a range of entry points available to start your automation solution in zenon:

  • Wizard
  • Macro that is started from the macro toolbar
  • Macro that is triggered by an Editor event. A very good possibility for starting actions fully automated. E.g. relevant events are triggered when loading a project or when a backup is created. However, it is also possible, when editing a screen for instance, to evaluate a double click on a screen element
  • External program that is incorporated in the zenon main menu

In the next blog post, you will find out more about automating with XML and practical examples.

Tags: , ,

Leave a Reply