How do you configure bit-triggered trends (curves) in WinCC flexible?
A trend is a graphical representation of one or more values from the controller.
By setting a trigger bit in the "trend transfer" variable the operator panel reads in either one trend value or a complete trend buffer. This is defined in the configuration. Bit-triggered trends are usually used to display rapidly changing values. One example of this is the injection pressure in the production of plastic parts. In order to trigger bit-triggered trends, in the configuration you must create the relevant external variables in the "Variables" editor in the WinCC flexible Engineering System and link them to trend areas. The operator panel and controller then communicate with each other via these trend areas.
- Explanation of terms
- Configuration instructions
2.1 Bit-triggered trend
2.2 Bit-triggered trend with switch buffer
- Trend variable (trend buffer):
External variable whose values are displayed as a trend. The variable must be an array variable. The number of array elements must match the trend's number of measured values.
The variable is only available if the archive has not been selected as "Settings source".
- Trend request:
If you open a picture on the operator panel with one or more trends, the operator panel sets the associated bits in the trend request area. After deselecting the picture, the operator panel resets the relevant bits in the trend request area.
Via the trend request area it can be evaluated in the controller which trend is currently being displayed on the operator panel. Trends can also be triggered without evaluation of the trend request area.
- Trend transfer 1:
This area serves to trigger trends. In your controller program you must set the bit assigned to the trend in the trend transfer area and the trend group bit. The trend group bit is the last bit in the trend transfer area. The operator panel recognizes the triggering and reads either one word or the complete buffer from the controller. Then it resets the trend bit and the trend group bit.
The trend transfer area must not be changed by the controller program until the trend group bit has been reset.
- Trend transfer area 2
(trend transfer 2, only required for switch buffer)
The trend transfer area 2 is required for trends that are configured with switch buffer. It is structured in the same way as trend transfer area 1.
- Trigger bit:
Every trend is assigned a specific bit for communication between operator panel and controller. If, for example, you assign the trigger bit "4" to a trend, that trend is identified by Bit 4 in the trend request and in the trend transfers.
Do not use the group bit as trigger bit. The operator panel recognizes the triggering via the group bit. The position of the group bit in the trend transfer depends on the controller set.
- Switch buffer:
The switch buffer is a second buffer for the same trend, which can be installed with the configuration. If the operator panel reads the values out of buffer 1, the controller writes to buffer 2. If the operator panel reads the values out of buffer 2, the controller writes to buffer 1. This prevents the trend values being overwritten by the controller when the operator panel is reading out the trend.
Create data blocks in STEP 7
In the controller you create, for example, DB10 for the trend buffer.
In the controller you create, for example, DB12 for the trend request.
In the controller you create, for example, DB14 for the trend transfer 1.
Configure trend display in WinCC flexible
Parameterizing the trend view:
Here you enter the variables defined beforehand.
If, in the controller program, the bit assigned to the trend is set in trend transfer area 1 (DB14.DBW0) and the trend group bit is set, the operator panel recognizes triggering and reads the complete buffer (because of the configuration "trend type: buffer bit-triggered") out of the controller. Then it resets the trend bit and the trend group bit.
The values transferred are the values stored in the trend buffer. In this example the values are those stored in DB10 as from DBW0.
|1||Create data blocks in STEP 7|
The procedure is primarily the same as for configuration of a bit-triggered trend without switch buffer.
You create the following additional variables in the controller:
|2||Configure trend display in WinCC flexible|
The controller variables for the trend view are added in WinCC flexible.
Here you enter the variables defined beforehand.
If the picture with the trend view is called on the operator panel,
the operator panel sets the associated bits in the trend request area (DB12.DBW0). In this example, Bit "3" has been configured for the "Trend_1" (Fig. 12).
After deselecting the picture, the operator panel resets the relevant bit in the trend request area.
If, in the controller program, the bit assigned to the trend is set in trend transfer area 1 (DB14.DBW0) and the trend group bit is set, the operator panel recognizes triggering and reads either one value or the complete buffer. Then it resets the trend bit and the trend group bit.
If, in the controller program, the bit assigned to the trend is then set in trend transfer area 2 (DB16.DBW0) and the trend group bit is set, the operator panel recognizes triggering and reads the complete buffer (because of the configuration "trend type: buffer bit-triggered") out of the controller. Then it resets the trend bit and the trend group bit.
Through alternating calling of "Trend transfer 1" and "Trend transfer 2", one trend is displayed on the operator panel, respectively with the value from the "trend buffer" and "the switch buffer".
The following download includes a STEP 7 V5.3 project with the functions described above. Integrated in the STEP 7 project is a WinCC flexible 2004 configuration for OP270B. You can change the blocks and WinCC flexible project as you wish to suit your requirements.
ktrigger.zip ( 2956 KB )
Runnability and test environment:
The following table lists the components that have been used to create this entry and verify the functions described.
|Components||Product and version designation|
|PC operating system||Microsoft Windows XP Professional SP1|
|Standard tools||STEP 7 V5.3 SP2|
|HMI software||WinCC flexible 2004 Advanced V1.0 SP1|
|HMI devices||WinCC flexible 2004 Runtime V1.0 SP1|
|Controllers||S7-PLCSIM V5.3 SP1|
Trend curves, Trends, Curves, Trend display, Bar chart, Diagram