10/2/2015 7:24 PM | |
Joined: 9/23/2005 Last visit: 12/11/2024 Posts: 4365 Rating: (1457)
|
“Simple Samples” are small projects that demonstrate simple features. The target is give a quick overview about the theme and be used as start point for related discussions. Follow there are a short description and the configuration main steps.
Description:
WinCC Professional has already an efficient system alarm diagnose that inform the communication status to the users.
In some applications, however, it is necessary to represent the communication status in another form (like a icon on the screen).
There are many ways to get the controller communication status.
In this simple sample is showed the follow ways: 1 – By evaluation of the substitute value of a controller tag (simplest way). 2 – By Animation of a IO field 3 – Getting a quality code of a controller tag by VB script 4 – Getting a quality code or tag status of a controller tag by C script.
Monitoring the tag status will allow for conclusions on the status of associated links for external tags.
Monitoring the quality code of external tags will also allow for conclusions on the quality of associated tags during the process.
Requirements: WinCC Professional V13 SP1.
Project with a minimum configuration (stop button, tags, etc.).
Configuration main steps:
1 – By evaluation of the substitute value of a controller tag (simplest way).
Notes:
2 – By Animation of a IO field
Note: in this example the IO field was configured as string display format, and text animation Process values text were copied from the value column.
3 – Getting a quality code of a controller tag by VB script
Function ProcessValueValue(ByVal item)
Dim aaa Set aaa = HMIRuntime.Tags("AlwaysTRUE") aaa.Read
ProcessValueValue = aaa.QualityCode
End Function
4 – Getting a quality code or tag status of a controller tag by C script.
#include "GlobalDefinitions.h" double ProcessValueValue(char* screenName, char* objectName, char* propertyName) { //Insert the code starting here DWORD aaa=0, bbb = 0;
GetTagBitStateQC ("AlwaysTRUE",&aaa, &bbb); return bbb; }
#include "GlobalDefinitions.h" double ProcessValueValue(char* screenName, char* objectName, char* propertyName) { //Insert the code starting here DWORD aaa=0; GetTagBitState ("AlwaysTRUE",&aaa); return aaa; }
References: FAQ How do you implement tag status monitoring or connection status monitoring in WinCC? https://support.industry.siemens.com/cs/br/pt/view/382120/en Note this FAQ, despite for WinCC 7.3 gives goods references about the meaning of Quality Code and Tag Status.
Which VBS information and VBS programming tools are there in WinCC (TIA Portal)? https://support.industry.siemens.com/cs/br/pt/view/59885894/en
Tips and tricks for creating scripts in WinCC (TIA Portal) https://support.industry.siemens.com/cs/br/pt/view/57132412/en
Manual WinCC Professional V13.0 https://support.industry.siemens.com/cs/br/pt/view/92323076/en
Online helps system WinCC Professional V13.0 SP1 https://support.industry.siemens.com/cs/br/pt/view/109096785/en
Project: Due a size / format restrictions, the project are first compacted as zip archive (data.zip).
AttachmentData.zip (447 Downloads) |
Denilson Pegaia |
|
This contribution was helpful to2 thankful Users |
Follow us on