×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 13406965, Entry date: 03/29/2006
(3)
Rate

# How is numerical integration programmed in S7-SCL and STEP 7?

• Entry
• Associated product(s)

Instructions:
The integral is the mathematical calculation of the area under a given function curve. However, there is often no mathematical correlation in practice, but rather an analog value which varies over time. The integral calculation involving totaling the trapezoidal areas, spread between the last two function values and the time. This trapezoidal area is identical to the product of the average of the two process values and the time interval.

Fig. 01

Fig. 01 illustrates the calculation of the integral of a trapezoidal area:

• Calculation: 0.5*(F(t1)+F(t0))*(t1-t0) + 0.5*(F(t2)+F(t1))*(t2-t1) + ...

The table below contains some sample programs for calculating integrals. Copy the EXE files into a separate folder and then start the files with a double-click. The STEP 7 projects are then extracted automatically with all the associated subfolders. You can then use the SIMATIC Manager to open and process the extracted projects.

Runnability and test environment:
The examples can be used on all the CPU types of SIMATIC S7-300 and S7-400. The following table lists the components that have been used to create this entry and verify the functions described:

 Test environment: Version: PC platform Intel(R) Pentium(R) 4 CPU, 2.40 GHz PC operating system Windows XP SP2 STEP 7 V5.3 SP3 S7 PLCSIM V5.3

Keywords:
Consumption measurement, Flow-rate measurement

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Copy URL
mySupport Cockpit