Description: Sometimes, when you activate/deactivate WinCC, you get the message "Could not start/terminate Alarm Logging in allotted time" or "Could not start/terminate Tag Logging in allotted time". In this case, you can correct this behavior by changing the timeout for Runtime.
Proceed as follows:
Instructions:
No.
Procedure
1
First click on "Start" in the task bar and select the "Run..." option.
2
In the window that opens you enter "regedit" and confirm with "OK".
3
Under "HKEY_LOCAL_MACHINE\SOFTWARE\SIEMENS\WINCC\ControlCenter\Constants" enter a DWORD named "Application Deactivation" and a DWORD named "Application Activation". The value must be specified in milliseconds (decimal). The default value is one minute. Reboot the PC after making the changes.
IMPORTANT In general, no warranty can be given for direct changes in the registry because this is entirely the responsibility of the user.
In any event, you are advised to make a backup of the Registry before undertaking the actions described here. Furthermore, these settings are computer-specific. This means that when you copy the project to another computer, you must make the settings again.
In WinCC, how can you assign the functions of the toolbar buttons of Online Trend Controls to external buttons?
Description Below are descriptions for the two Online Trend Controls available as from WinCC V7.0. The two descriptions show examples of starting and stopping the display.
Instructions for Online Trend Control as from WinCC V7.0
No.
Procedure
1
Import the Online Trend Control into your picture. Import a button into your picture.
2
Open the Object Properties of the button and select the "Event" tab. Under mouse click, open the "Direct Connection" action.
3
Select "Constant" as source and enter the value 20 (Start/Stop). Select "Object in Picture" as target. Select "Control1" (or your Online Trend Control) as object and the "ToolbarButtonClick" property of the control.
Fig. 01
Note:
A description of the constants (ID) is available in the WinCC Online Help under "Archiving Process Values > Output of Process Values > Process Value Output in Trend Form in Process Pictures > Operation in Runtime > Operation of Online Trend Control in Runtime".
4
Save the picture.
Now, when you click this button, the display starts or stops.
More information and examples for controls as from WinCC V7.0 are available in Entry ID: 35102867.
Online Trend Control before WinCC V7.0 - This control is also available as Online Trend Control (Classic) as from V7.0
No.
Procedure
1
Import the Online Trend Control (as from WinCC V7.0 the Online Trend Control (Classic)) into your picture. Import a button into your picture.
2
Open the Object Properties of the button and select the "Event" tab. Under mouse click, open the "C action" action.
3
From "Standard functions > TAGLOG > Toolbar buttons" (as from WinCC V7.0 "Standard functions > Obsolete functions > TAGLOG > Toolbar buttons") you select the "TlgTrendWindowPressStartStopButton" function with a double-click.
Parameterize the value of the "IpszWindowName" parameter with the title window name of the Online Trend Control.
Fig. 02
4
The title window names are located in the Control Properties of the Online Trend Controls.
Fig. 03
5
Compile the function and save the picture.
Fig. 04
Now, when you click this button, the display starts or stops.
Why, when you select the curve window with the "Read data immediately from archive" option activated, isn't there any data displayed?
Description Up to WinCC V4.02:
the variable names of the archive variables include illegal signs such as ( / ).
As of WinCC V4.02:
if you use quotes ( " ) in the names of the project variables, those variables are not archived in Tag Logging.
Most other special characters are processed. As far as possible do not use any special characters in the names of the project variables. If you do use special characters, then test whether the variables concerned can actually be archived.
There are characters that Tag Logging converts automatically. For example, the Tag Logging editor converts hyphen ( - ) and hash ( # ) to underscore ( _ ).
Configuration Notes: A series of Smart Tools are supplied with WinCC. You can find these tools (if installed) by going to "Start > SIMATIC > WinCC > Tools".
In the WinCC Information System (Online Help) you will also find a detailed description under "Smart Tools".
WinCC Configuration Tool
After installation, help for this tool is available directly in Microsoft Excel under the menu item "WinCC".
The Configuration Tool is a simple and powerful tool for configuring mass data in WinCC. Microsoft Excel serves as user interface. In this way you can create, import and edit a WinCC project in Microsoft Excel. Here you can use the operating advantages offered to you by Microsoft Excel. You can use the Configuration Tool to configure the data of the Data Manager, Alarm Logging, Tag Logging and the Text Library.
WinCC Archive Configuration Tool The WinCC Archive Configuration Tool is an Excel add-In. The tool permits simply and powerful configuration of mass data for archiving WinCC process values.
Here, you can handle quantity frameworks for which the Tag Logging Editor provides insufficient support.
WinCC Cross Reference Wizard
This tool searches all scripts for picture names and tags and extends them such that they can be recognized by the WinCC component "Cross Reference".
This tool includes the functions of the "Script Upgrade" tool familiar from WinCC V 5.1.
WinCC Communication Configurator
The Communication Configurator was already available in previous versions. In WinCC V6.0 it is assigned to the Smart Tools. Using the Communication Configurator you can adapt the WinCC communication parameters to existing situations in order to ensure an optimum balance between interference susceptibility and connection stability.
Registration files OnIOff.reg, OnIOn.reg Using these two registration files you can display/hide the button for calling the "WinCC Online Help". With this step you can suppress a Windows operator control.
Export/Import Tags
The program exports all the connections, data structures and tags in corresponding CSV files from an open project. You can then import these into a second project. The CSV format permits you to process the files with a spreadsheet program before importing them again.
Tag Simulator
The tag simulator is used for simulating internal tags and process tags.
A typical field of application for the tag simulator is testing a configuration without process I/Os being connected, or with process I/Os connected but without the process running. If process I/Os are not connected, you can only simulate internal tags.
If process I/Os are connected, you can use the tag simulator to supply the process tags directly with values. This permits you to run a function test of the HMI system with the original hardware.
Another possible field of application for the tag simulator is in producing a project for demonstration purposes. Often there is no system connection available for presenting the HMI system, so here the simulator controls the internal tags.
Dynamic Wizard Editor
You can use the Dynamic Wizard Editor to create your own Dynamic Wizard. Dynamic Wizards are used to automate frequently recurring configuration processes.
WinCC Documentation Viewer
Print jobs of the WinCC logging system can be diverted into a file. In the case of large volumes of data, one file is created for each log page. You can use the WinCC Documentation Viewer to display and print these files.
SmartTools up to WinCC V6.x
EasyLanguage
EasyLanguage is a tool for exporting and importing language-dependent objects in and out of process images of WinCC. It helps when creating multilingual pictures by providing the option of translating language-dependent objects outside WinCC. Objects and user objects managed by the WinCC Text Library are not processed by EasyLanguage.
SmartTools up to WinCC V5.x
UnlockMultiUse
In a multiuser system it is possible to configure from different computers. Some editors can only be started once project-wide. If one of these editors is started, then WinCC locks starting of this editor on the other computers of the same project. Once the editor is closed, WinCC automatically releases the lock.
Now the error case might arise when this lock is not released. The cause of this, for example, could be interruption of the network connections.
UnlockMultiUse clears such locking situations.
ScriptUpgrade
ScriptUpgrade searches scripts for picture names/tags and upgrades the scripts so that the WinCC Cross Reference component finds the picture names/tags and puts them in the cross-reference list.
Redundancy Test Tools: DCOMTest and RtFileView
DCOMTest:
For checking the DCOM connection between two computers. RtFileView:
For reading out important redundancy data and checking the aligning procedure of the failure times and aligned measuring points.
Address List Import
Text address lists exported from KOMED (COROS LS-B) or PMCPRO (SIMATIC-S5) can be imported into the WinCC database using Address List Import.
Address List Import also permits you to edit block access paths in text address lists from PMCPRO (SIMATIC-S5).
Note:
Please also refer to the following entries on the topic of "WinCC Smart Tools":
Configuration Notes: When considering questions with
licensing law implications, a general distinction can be made
between internal, external and archive tags. Only external tags and
archive tags count as far as licensing is concerned.
The table below contains an overview of the different types of
tags and explains their significance in terms of licensing.
Tag type
Meaning
External WinCC tags
The number of
external WinCC tags is of significance for RC and RT license
types.
Note: RC means that a certain number of external
WinCC tags can be used both in configuration and in runtime mode
depending on the license. RT means a certain number of external
WinCC tags can be used in runtime mode depending on the license.
Configuration can be limited with an RT license to max. one hour in
"demo mode".
Internal WinCC tags
Internal WinCC tags
are of no significance to licensing.
Archive tags
The number of
archive tags is only of significance in connection with the
licenses for WinCC archive power packs.
Notes:
Licenses for WinCC archive power packs have been introduced
since WinCC version V6. Archive tags were of no significance
to licensing in earlier versions of WinCC.
From WinCC version V6.0.0.3 licenses for WinCC archive
power packs are only necessary for the runtime mode of an archive
configuration with more than 512 archive tags. You can also
configure more than 512 archive tags without this license in CS
without "demo mode".
Since WinCC version V6.0 SP3, archive tags in
compressed archives have no longer been of
significance to licensing.
Example:
If, for example, you have installed an RC128 PowerTags license on
your computer, you can configure 128 external tags and use them in
runtime. If you create an instance tag for a type of structure with
five external structural elements, five external tags are created
which count according to the license.
A raw data tag counts as one external tag. It uses a
counter irrespective of its size.
Keywords: License, Authorization
Why are archive tags not deleted in the Tag Logging editor ?
Discription
In versions of WinCC prior to V6.2 or PCS 7 prior to V7.0) If archive tags are created in an integrated project in WinCC using "OS compile", they cannot be deleted in the WinCC Tag Logging editor.
If attempts are made to delete the archive tags in the Tag Logging editor, the error message "The archive tags cannot be deleted with this editor" appears.
These archive tags can only be deleted in the ES. Set the archive property to "No archiving" in the block connection properties. Then run "OS compile". You only need to compile the changes.
However, make sure that the "Archive tags" check box is selected. The corresponding archive tag is then deleted in Tag Logging.
From WinCC V6.2 (PCS 7 V7.0) archive tags which are created automatically can be deleted in the Tag Logging editor. They are re-created during the next complete OS compilation if no changes have been made in the ES. The required changes also have to be configured here on the ES.
Notice: The archive tags are not created again when changes are compiled.
What does parameter "Supplying tags" mean for a process tag in Tag Logging?
Description If the option "Supplying tags > System" is enabled, the WinCC tag data is transferred automatically to the archive.
If the option "Supplying tags > Manual input" is enabled, data input in the tag is manual.
Fig. 1: Settings for supplying tags
Note The internal structure for assigning parameters to archive tags has changed as from WinCC V6.2. The input interface has also been changed accordingly. This does not affect any information contained in the FAQ about supplying tags.
Fig. 2: Settings for supplying tags from WinCC V6.2 onwards.
How can you make changes to the project on the configuration computer while the existing process values continue to be acquired and archived on the customer computer?
Instructions: This entry describes the application case of how measuring points are added to a WinCC project on a running system. However the configuration is not to be made on the running system (customer computer), but on another computer (e.g. configuration computer at the engineering consultants'). During configuration, the process data already configured continues to be acquired and archived on the WinCC computer at the customer's. Once the configuration has been completed and tested on a separate computer, the WinCC project is to be transferred from the configuration computer to the WinCC computer at the customer's.
Important requirement: The Runtime data acquired in the meantime must not be lost!
No.
Procedure
1
Perform data backup on the customer computer Do a data backup of the complete WinCC project of the system running on the customer computer.
You can proceed as follows to perform a complete backup of the WinCC project:
Close WinCC Runtime. Note: Please note that unless a redundant WinCC computer is available, you will not be able to perform any operation and monitoring functions during this time.
Close the WinCC Explorer.
Archive the WinCC project directory using an appropriate archiving tool. You can use "WinZip" or "WinRar", for example. The advantage of these two tools is that they create a compressed archive file of your project. You can name this archive file accordingly and store it on a removable medium (e.g. CD/DVD or USB removable medium) or on network drives. Notes: If errors occur during archiving, restart your computer. Make sure that WinCC is not started automatically when the computer restarts. Now it should be possible to perform data backup without any error messages.
Restart WinCC Runtime.
Once you have done the data backup, no more configuring should be performed on the customer computer, because any changes in the configuration will be overwritten when the configuration data is loaded from the configuration computer.
2
Unpack the data backup of the customer computer Unpack the data backup of the WinCC project of the customer computer on your configuration computer.
3
Configure on the configuration computer
Make sure that the configuration computer has the same WinCC version as the customer computer.
Change the configured name of the computer in the WinCC project to the local computer name.
Configure and test the new measuring points.
Notes:
You can create new tags, pictures, messages and archives and/or change existing ones. However, make sure that you never delete existing archive tags to create them anew possibly with different parameters. When you create new tags, archives or messages, the system gives them an internally unique number (ID). These IDs change when the tags, archives or messages are created anew. If the ID of an archive tag changes, or the ID no longer exists, because the archive has been deleted, then the old data of that archive tag can no longer be displayed.
You can also test newly created measuring points without a real controller by using the "S7-PLCSIM" software. The "S7-PLCSIM" software permits you to control/monitor the external WinCC tags. The requirement is that the software products STEP 7, S7-PLCSIM and WinCC are installed together on the configuration computer. Up to and including S7-PLCSIM V5.3.x, you can use only the MPI channel unit for simulating external WinCC tags. FromS7-PLCSIM V5.4 onwards, you can also use the PROFIBUS and Ethernet channel units for simulation. You cannot use the Named Connections channel unit for simulating with S7-PLCSIM.
You can move the external tags to be tested to the MPI channel if the customer computer uses a channel unit other than MPI. After the test you must move the tags moved to the MPI channel back again to the original channel.
4
Perform data backup on the configuration computer Do a data backup on the configuration computer of the complete WinCC project. Proceed here as described in Step 1.
Note: To save storage space and archiving time you can reset the Runtime database of the WinCC Tag Logging and Alarm Logging on the configuration computer before archiving. The Runtime data of the configuration computer will later be replaced by the Runtime data of the customer computer. Notes on deleting the Runtime data are available in Entry ID 17853608.
5
Perform data backup again on the customer computer
Do another backup of the complete WinCC project of the system running on the customer computer. For this proceed as described in Step 1. Do not start WinCC after data backup.
Rename the WinCC project path in order to later move the relevant Runtime data from this path to the updated project path.
Notes:
The repeated data backup saves the actual status of the Runtime data. The last backup might have been made some time ago.
If you have made changes to the configuration since the last backup of the project on the customer computer, then this data backup saves these changes.
6
Unpack the data backup of the configuration computer Unpack the data backup of the WinCC project of the configuration computer on the customer computer.
7
Move the Runtime database from the renamed project path to the current project path
In the current project directory you delete the following files and directories:
The relevant files/directories are marked in the following figure. The name of the WinCC project is "faq2"
Fig. 01
Copy the following files and directories from the renamed WinCC project path into the current project path:
ArchivManager
<Project>RT.mdf
<Project>RT.ldf
Do not copy the following files, because if not available, they are regenerated automatically the next time the Runtime starts:
<Project>Tlg.mdf
<Project>Tlg.ldf
<Project>Alg.mdf
<Project>Alg.ldf
If one of the backup paths (destination paths) configured is located in the WinCC project path, you must also replace this path with the identically named path of the renamed WinCC project path.
Note:
The backup configuration is performed in the Tag Logging and Alarm Logging editors. For this you select the pop-menu for the archives listed in the "Archive Configuration" entry. Select the "Properties" entry. The Archive Configuration dialog opens. Switch to the "Backup Configuration" tab. Check the paths (Destination path) for the backup configuration.
Fig. 02
Fig. 03
8
Change the WinCC project on the customer computer
Change the configured name of the computer in the WinCC project to the local computer name if necessary.
Check the settings in the "Redundancy" editor.
9
Start Runtime Start the WinCC Runtime on the customer computer. Test the functionality.
How can you set the archiving parameters of multiple archive tags at the same time?
Instructions: You can edit the WinCC archive tag parameters individually for each archive tag in the Tag Logging editor. Using the smart tool "WinCC Configuration Tool" you can read the Tag Logging configuration into Microsoft Excel, edit the archive parameters in Excel and then write the changes back to WinCC. Using the "WinCC Configuration Tool" you can also create new archive tags or delete existing archive tags.
If the "WinCC Configuration Tool" is not available, you have the alternative of using the presettingfor an archive tag to preset the archive parameters when creating a new archive tag. The presetting for a process tag is not valid separately for a single archive, but for all archives. The archive tags to be created can be divided into groups with identical archive parameters. You can assign archive tags with identical archive parameters to the same archive tag group. You can only ever preset the archive parameters of one archive tag group and then create all the archive tags of that group at once. You then have to repeat this procedure for each archive tag group.
Requirements:
The requirement is that configuration of the WinCC tags to be archive is completed in the Tag Management.
From the names of the WinCC tags you can derive the main archive parameters (acquisition and archiving cycle, actual value, mean value and maximum value):
Example:
All process tags of the Pressure or Flow rate type should be acquired every second and the mean value archived every 10 seconds.
All other process variables (e.g. temperature, levels, pH values ...) should be acquired every 10 seconds and a mean value archived every 60 seconds.
The following table describes the basic procedure for creating archive tags.
No.
Description
1
Define presettings for archive tags
In the Tag Logging editor you right-click "Archives" and then in the pop-up menu that opens you select "Pre-Settings > Analog Tag".
Fig. 01
The "Default values for process tag" dialog opens. Here you can specify the parameters that are to be used as presettings when creating a new tag.
Example: Enter the archive parameters for the process tags of the type Pressure and Flow rate, e.g.:
Acquisition type = cyclic continuous
Acquisition = 1 second
Archiving/display = 10 * 1 second
Processing = Mean value
Click the "OK" button to quit the dialog.
2
Create archive tags Now create all the archive tags whose archive parameters are identical with the presetting.
Note:
It is recommended to create a separate archive for each group of archive tags to be created.
Example:
Create a process value archive called "PFAST", for example.
In the pop-up menu of the process value archive "PFAST" you select the "New Tag..." entry.
The tag selection dialog opens. In the tree you select the entry "List of all tags". In the "Filter" field you enter a filter criterion that permits you to acquire all the process tags of a group. Mark all the process tags that are relevant for archiving.
Fig. 02
Quit the tag selection dialog with the "OK" button. This then creates the selected archive tags.
Repeat the tag selection procedure until you have created all the tags of the archive tag group.
Fig. 03
3
Repeat Steps 1 and 2
Repeat Steps 1 and 2 until you have created all the archive tags for each archive tag group.
The steps are practically identical to the previous steps. The only differences are in Presettings and Archive names and in the Selection of archive tags.
Which changes can be made when configuring WinCC Tag Logging?
In versions of WinCC prior to WinCC V6, renaming an archive tag resulted in a new blank archive, with a new name, being created internally in the Runtime database the next time Runtime was started. The archive with the old name was then no longer accessible using standard WinCC resources (Online Trend Control or Online Table Control) because the old archive tag name was no longer available for selection.
Beginning with WinCC V6, archive tags can be renamed because it is not the name that is accessed internally, it is an ID.
Changes to archiving parameters for an archive tag You can make changes to the archiving parameters for an archive tag (e.g. Acquisition Type, Acquisition Cycle, Archiving/Display Cycle, ...) without losing any of the existing data.
Changes to the archive configuration If you make changes to the archive configuration (Archive size, Time of the segment change, ...), data may be overwritten depending on the new settings of the short-term archive in the RT database. If you have configured a data backup (from WinCC V6), this data can be reconnected with the database.
Note:
Avoid online configuration changes in Alarm Logging and Tag Logging.
As a result of changes in configuration in Runtime, the memory space required on the hard drive may temporarily rise considerably. As a result of the additional memory space requirements, the configured maximum time range may no longer be available for archiving.
Warning:
Short-term archives prior to WinCC V6 do not have a standard backup function.
If the system time is reset, data in the short-term archive in the Runtime database may be overwritten.
How can you achieve archiving cycles of less than 500ms in WinCC Tag Logging?
Instructions: The smallest archiving cycle in WinCC Tag Logging is 500ms. There is no way of reducing this archiving cycle time through settings in WinCC Tag Logging. Shorter archiving cycles can be achieved through process-controlled archiving.
There are the following options for this:
"AR_SEND" (SFB37)
In an S7-400 CPU you can implement the "AR_SEND" (SFB37) block for process-controlled archiving in WinCC. With this method the archive data is collected in the controller and then transferred to WinCC as raw data. A conversion DLL on the WinCC side interprets the data sent and enters it in the WinCC archives. You must also interconnect AR_SEND block appropriately in the controller. In WinCC you only have to assign parameters, no programming is required. Information on how to use "AR_SEND" is also available in Entry ID 23629327 and Entry ID 23629424.
ODK for user-specific processing of raw data Also with this method the data is collected in the controller and transferred to WinCC as raw data. The data is processed and archived using a conversion DLL. The "AR_SEND" (SFB37) block is not available for smaller controllers (S7-300). You have to program this function yourself. The WinCC option "WinCC Open Development Kit" (ODK) provides information on how you can process the raw data received in WinCC using your own conversion DLL.
Keywords 21738145
How can you use process-driven archiving in WinCC for a process tag with SFB37 (AR_SEND)?
Instructions: This entry shows how you can use SFB37(AR_SEND) to transfer one process value into a WinCC process value archive. This entry follows the procedure described in Entry ID 23629327.
No.
Procedure
1
Defining the data format of the data to be archived Archiving using the AR_SEND block supports different versions regarding the structure of the data to be transferred. Choose one of the possible data formats. A detailed description of the structure of the data block to be transferred is available in the WinCC Online Help under "WinCC Information System > Communication > SIMATIC S7 Protocol Suite > Special functions > Data exchange with the S7 function block AR_SEND".
The following format has been chosen for this example in which one value of a process tag is transferred:
Header Type (INT := 9)
Year
Month
Day
Hours
Minutes
Seconds
1/10s
1/100s
1/1000s
Weekday
Cycle (DINT := 1)
Unit (Type) (BYTE := B#16#1)
Unit (Range) (BYTE := B#16#1)
AR_ID Subnumber (INT := 1)
Process data - data type (INT := 5)
Number of process values (INT := 1)
Process value (REAL)
Description of the data structure elements:
Header Type = 9 Header with time stamp and AR_ID subnummer.
Date and Time (Year, Month, Day, Hours, Minutes, Seconds, ...) The time stamp is filled with current system time during runtime.
Cycle= 1 The process values are read out equidistantly. The starting time point is specified in the header's time stamp and is absolutely necessary. The time units of Unit (Range) and "Cycle" factor are valid for the time intervals between process values.
Unit (Type)= 1 The time stamp entered in the header is valid for the process value.
Unit (Range)= 1 Reserved.
AR_ID subnumber= 1 Defines the assignment between the PLC process value and the WinCC archive tag.
Process data - data type= 5 S7 data type = REAL.
WinCC data type = float.
Number of process values = 1 Only one process value is transferred.
Process value The process value is filled with the current value during runtime.
2
Configuring the AR_SEND send block in the STEP 7 project For this example a function block (FB) has been created, which only realizes the core functionality of data exchange using the AR_SEND block. The data structure defined in Step 1 is filled with values and the AR_SEND block transferred for "Sending". The SFB37 (AR_SEND) is called as a multi-instance. The relevant inputs and outputs of the AR_SEND block are run on the interface of the newly created FB. In practice, depending on the case in question, you might have to program more functionalities, for example:
To ensure data consistency when transferring, you should not change the data during the transfer procedure. For example, you may only write to the Send area again for this purpose when the "DONE" output of the AR_SEND block has the value "1".
In order to reduce the communication load it is also possible to transfer data to WinCC only when there is a change in the process value. It is also possible to collect the process data upon change of value in the data structure to be transferred and then send it upon the occurrence of an event that you define. For example, the data could be sent only after expiry of a maximum time or upon exceeding a defined value change (hysteresis).
Since you can only call the AR_SEND block a limited number of times in the S7 program, you should select a different version of data transfer using the AR_SEND block if there is a large number of measuring points to be archived. You can also transfer multiple values of different measuring points within one data block.
More information:
The block has been created in the SCL language. The procedure is identical if you use a different language (STL).
The data structure for the data to be transferred has been defined as UDT and is used in the FB's interface.
Fig. 01
You parameterize the length of the data block to be transferred with the LEN parameter of the AR_SEND block. You can determine the length of the data area to be transferred by opening the UDT directly from the STEP 7 program's block container. In the STL editor, the length of the structure (UDT) is then shown in bytes in the last line.
Fig. 02
You run the input AR_ID AR_SEND block externally and assign the system attributes S7_server:='alarm_archiv' and S7_a_type:='ar_send'. In this way STEP 7 assigns a unique, continuous AR_ID when incorporating the FB in the program. The following two figures show the block for the languages SCL and STL.
SCL
STL
Fig. 03
Fig. 04
The following two figures show the block call in the CFC chart and in STL.
CFC
STL
Fig. 05
Fig. 06
If you use the block in the STEP 7 program, you can determine the current system time via SFC1 (READCLK Read System Clock) and store it in a global data block. You can interconnect this data with the block's "Time Stamp" input.
You can use Copy/Paste to insert the relevant source in the SCL or STL editor. In order to compile this source successfully, you should define the the numbers for the UDT and the FB beforehand in the symbol table.
Fig. 07
3
Configuring process-driven archiving in WinCC Configuration of this step is described in detail in the Entry ID 23629327 mentioned above and in the WinCC Online Help. For the sake of completeness we will list the major steps again:
WinCC Tag Manager: set up connection in the SIMATIC S7 Protocol Suite
WinCC Tag Manager: create the raw data tag of the raw data type "Archive Data Link"
WinCC Tag Logging: create process-controlled archive tag
How do you use SFB37 (AR_SEND) for process-driven archiving of process values in WinCC Tag Logging archives?
Instructions With SFB37 (AR_SEND) you can transfer one or more process values on a process-driven basis to WinCC Tag Logging archives. For this the process values are collected together with the associated time stamps in a relevant data area and transferred to the AR_SEND block. When an event defined by the user occurs, the AR_SEND block sends the archive data to WinCC in one or more data blocks. WinCC enters the raw data received into the corresponding archives. WinCC uses the normalization DLL "nrms7pmc.nll" to interpret the raw data. In order for the archive data to be interpreted correctly by the functions of the normalization DLL, the data must be put into the data format required by the normalization DLL before being sent. The following figure gives an overview of process-driven archiving.
Fig. 01
Notes
The conversion DLL does not check the data for correct chronological order. This means that also "old" process values can be archived with the AR_SEND block, even if data with more recent time stamps is already in the archive.
Process-driven archive tags are stored by default in the "TagLoggingFast" archive (see also Entry ID 21738144). Pay attention to the settings for maximum size and time period of the archive segments and of the complete archive. You make these settings in the Tag Logging editor under "Archive Configuration".
Proceed as follows to configure process-driven archiving via AR_SEND.
No.
Procedure
1
Defining the data format of the data to be archived The normalization DLL for WinCC Tag Logging, "nrms7pmc.nll", defines different data formats for different cases of application. Thus in one AR_SEND send procedure data can be sent by one or more process tags. Here one or more values can be transferred with different time stamps to one process tag. The WinCC normalization DLL differentiates between various methods of date/time stamping:
Process values with equidistant time intervals with predefined start time value
Process values with own time stamp for each value
Process values with time differences relative to the start time value
A detailed description of the structure of the data block to be transferred is available in the WinCC Online Help under "WinCC Information System > Communication > SIMATIC S7 Protocol Suite > Special functions > Data exchange with the S7 function block AR_SEND".
Fig. 02 shows the principle structure of the data block when several time-dependent process values with associated time stamps are transferred to a process tag (archive variable).
Fig. 02
2
Configuring the AR_SEND send block in the STEP 7 project Fig. 03 shows the AR_SEND block when it is inserted in a CFC plan from the block library. In this case it is not interconnected, because this figure simply shows the inputs and outputs available on the block. Fig. 04 shows the corresponding STL code.
Fig. 03
Fig 04
The AR_SEND is configured as follows in STEP 7.
Create a data area to accept the data to be transferred. The structure of this data area must correspond to a format supported by the WinCC normalization DLL. This data area is transferred to the AR_SEND block as an ANY pointer at the input "SD_1" (ANY). At the "LEN"(WORD) input the length of the data area to be transferred must be specified hexadecimally in bytes.
Note The length specification in the ANY pointer is not used by the AR_SEND block.
The system automatically assigns the "AR_ID"(DWORD) uniquely when the AR_SEND block is incorporated and it cannot be changed. The value "W#16#EEEE" is assigned by default for the "ID"(WORD) input when incorporated in the CFC. You must not change this value. When you incorporate the AR_SEND block in an STL or SCL source, you must assign this value manually.
Program a program section to fill the data area to be transferred with the process values during runtime. Once the data area has been completely filled with valid values, the send procedure can be triggered by a positive edge at the controller input "REQ"(BOOL). The controller input "R"(BOOL) is for interrupting a send job in progress. The output "DONE"(BOOL) shows that the send procedure is completed. If an error occurs during processing, this is shown at the output "ERROR"(BOOL). Detailed error information is given at the output "STATUS"(WORD).
Information on the S7 function block SFB37 (AR_SEND) is available in the reference manual "System Software for S7-300/400 System and Standard Functions" - Entry ID 1214574.
Note In this entry we have purposely left out a description of the direct interconnection of the SFB37 (AR_SEND) block. You should create your own, application-specific function block (FB) that fulfills your specific requirements for the transfer you want.
The advantages of using an application-specific function block for archiving with AR_SEND are as follows:
You only have to set and test the block once. Then you can use it multiple times which saves an enormous amount of time, because the actual interconnection of the AR_SEND is done only once. The time taken for interconnecting the AR_SEND block can under circumstances be quite significant. For example, it might be necessary to collect data of multiple process values over a certain period of time and then send it altogether in one AR_SEND message. If processing of the message is not yet completed, it might be necessary to continue collecting the process data. Evaluation of error information when processing blocks is always useful.
You can avoid configuration errors (e.g. double assignment of storage cells) by using the FB's instance data.
You can interconnect the data to be archived appropriately in the STL source.
The data area to be transferred can be created within the instance DB. You can call the SFB37 (AR_SEND) as a multi-instance. The relevant inputs and outputs of the AR_SEND block should be run on the interface of the newly created FB. Make sure that you run the input AR_ID AR_SEND block externally and assign the system attributes S7_server:='alarm_archiv' and S7_a_type:='ar_send'. In this way STEP 7 assigns a unique AR_ID when incorporating the FB in the program. Entry ID 23629424 includes a practical example in STL and SCL of how to use SFB37 (AR_SEND).
3
Configuring process-driven archiving in WinCC Proceed as follows to configure in WinCC.
WinCC Tag Manager: Create connection in SIMATIC S7 Protocol Suite In the WinCC Tag Management, in a channel unit (e.g. MPI or Industrial Ethernet) of the SIMATIC S7 Protocol Suite you configure a connection that is to be used for communication with the S7 controller.
Note
Make sure that you assign the right parameters, specially the correct "Slot Number" in the "Connection properties" dialog.
WinCC Tag Management: Create the raw data tag of the raw data type "Archive Data Link" In the S7 connection used for data transfer you create a tag of the "Raw Data Type". The name length must not exceed 24 characters, because under circumstances this name might be a constituent part of the archive tag name.
Fig. 05
Via the "Select" button you open the "Address properties" dialog. In the "Address properties" dialog of the raw data tags, in the "Raw Data Type" area, you select "Archive Data Link".
Fig. 06
WinCC Tag Logging: Creating a process-controlled archive tag Open the Tag Logging. Create a process-controlled archive tag in a process value archive. For this you use the pop-up menu "New Process Controlled Tag..." With the "Select" button you open a selection dialog to choose the Raw Data Tag that is to provide the archive tags. In the "Archive tag name" field you can assign a name that is different from the internal archive tag name. In the "Normalization DLL" area you must select "nrms7pmc.nll". This is the default value.
Fig. 07
With the "Options..." button in the "Normalization DLL" area you open the dialog to assign the relevant AR_ID and if necessary the AR_ID-Subnumber.
Fig. 08
Note In the "AR_ID" input field you must enter the number assigned for the parameter "AR_ID" on the associated AR_SEND block in the STEP 7 program.
If process data for multiple archive tags is sent with the AR_SEND block, the AR_ID subnumber is used to assign the process data for multiple process tags in one message to the different archive tags. The AR_ID subnumbers are assigned by the programmer of the AR_SEND block call. If multiple process tags are transferred in one AR_SEND block call, the actual process values together with the associated AR_ID subnumbers are entered in the data area to be transferred. At this point, it is assumed that you know how to assign the AR_ID subnumbers to the process and archive tags of an AR_SEND call.
Additional Keywords
GMP, Pharma, Life Science, Validation, FDA 21 CFR Part 11