Example 1: Diagnosis and evaluation of input data

Example 1: Diagnosis and evaluation of input data 1:Download: (sample file)

Example 1: Diagnosis and evaluation of input data 2:

Usage of this example program

This example program was created on a powerful Beckhoff C6920 Industrial PC and requires high computing power.
While testing this program, the following factors should be considered:

Example 1: Diagnosis and evaluation of input data 5:

or in the DiagMessages,

Example 1: Diagnosis and evaluation of input data 6:

the frames are not arriving regularly at the EL3773. In this case the above points should be checked.

Example 1: Diagnosis and evaluation of input data 7:
Visualization of example program for EL3773

In this example the input data of an EL3773 will be checked for validity and processed:

The following list shows an overview of the calculation of the values. More details in the item "Performance of the calculations"

Example 1: Diagnosis and evaluation of input data 8:
Overview of the performance of the calculations

Connection diagram:

The program serves as an initial introduction to the options for evaluating the data from a mains monitoring terminal. The user is free to change the program to suit his ideas or to use only part of the code.

Example 1: Diagnosis and evaluation of input data 9:

CPU utilization when using the program

The CPU utilization when using the program strongly depends on the selected cycle time and the selected size of the FIFO data buffer. The results of internal company tests have shown that CPU utilization is approximately anti-proportional to the cycle time (i.e. the faster the cycle time, the greater the CPU utilization) and proportional to the size of the FIFO data buffer. The default settings of a 5 ms cycle time and a FIFO size of 800 places resulted in a CPU utilization of about 35% with the following hardware:

    • CPU Intel Celeron 1.90 Ghz, 2 cores
    • 1024MB DDR3-RAM
    • Windows XP Professional SP3
    • TwinCAT Version 2.11 (Build 2230) 
    • The selected oversampling factor had hardly any effect on the CPU utilization in the tests.
    Example 1: Diagnosis and evaluation of input data 10:

    Use of the program with the oversampling factor 1

    If the operating mode ‘DC Oversampling 1’ is selected in the System Manager, then the PDO assignment 0x1A60 must be activated in the ‘Process Data’ tab for the calculation of the ‘StartTimeNextLatch’. After that the PDO must be linked with the corresponding variable (default: MAIN.fbEL3773.uliStartTimeNextLatch).