3.3.2. User program

The table below shows the function of the individual program parts:

Program part

Function

Execution in the DP master

I/O program

Reading and writing the distributed I/O

In all series of measurements

HMI program

Supplying the images of the operator panels (OP)

In all series of measurements

CP program

Communication via CP342-5

Only in series of measurements with CP342-5

Measuring program

Measuring and evaluating the cycle time

In all series of measurements

The following table shows the basic realization of the above-listed program parts:

Program part

Realization

I/O program in OB1

The measuring signal is read at the DIx input of the ET200 measurement station and output at the DOx output of the same station. The DP master reads the signal via the process image and outputs it via the process image:
Program fragment:
      U  Ix
      =  Ox

I/O program in OB40 The measuring signal is read at a DIy input of the ET200 measurement station that has been configured as an alarm input and output at the DOy output of the same station. The DP master reads the signal in the OB40 program via direct commands and outputs it to the DOy output via direct commands:
Program fragment:
      L PIB y
      T PQB y

HMI program

For the operator panels, the images are configured with variables.
These variables are dynamized by the HMI program in the DP master. This is where the variables are cyclically updated. Also the programming unit accesses these variables with the "Status" function.

CP program

The following FCs are required in the DP master for the communication of the DP master via the CP342-5:

      DP_SEND(..)
      DP_RECV(..)

The communication blocks are called once per cycle at the beginning of the user program!
No process alarms can be generated for configurations with the CP342-5.

Measuring program

The measuring program performs the following tasks:
- Saving the cycle time per OB1 cycle
- Determining the minimum, typical and maximum cycle time