problem with wincc 7.0

Fmam89

Member
Join Date
Aug 2015
Location
egypt
Posts
19
Hi Guys
I Work in project using Wincc Comfort (wincc7.0)
I made one picture contain two Push button one for start motor and other for stop
and I cal this picture several times for several motors and it work good
but when i do the same idea for analog values it didn't work
I mean
I made one picture contain bar and trend window show speed of motor
and I cal the picture window several time like start stop picture but it didn't work

I attach Two files
1- my project view
2- what I did for Start_Stop Picture
 
Hi,
as you have configured as TagPrefix in the Picture Window Motor_RPM "B_102A_RPM", there must be a Tag named "B_102A_RPM_Actual_RPM". Is this correct?

It seems that your tags for Start and Stop are named:
- B_102A_Start
- B_102A_Stop

I would use for the "Actual RPM" the Tagname
- B_102A_Actual_RPM

If you have such tags, then the bargraph object should work.

The Trendcontrol doesn't support the automatic addition of the tagprefix. You have to do this with a little C-Script which is you call once when the Picture inside the Window is opened.
You'll have to change the name of the trenddontrol to your actual name, or change the object name to "TrendControl".

Code:
#include "apdefap.h"
void OnOpenPicture(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
{
  // Guessing your Trendcontrol has Object name "TrendControl"
  char *parentPicture;
  char *parentPictureWindow;
  char *tagPrefix;
  char Trend1_tag[255];

  parentPicture = GetParentPicture(lpszPictureName);
  parentPictureWindow = GetParentPictureWindow(lpszPictureName);
  tagPrefix = GetPropChar(parentPicture, parentPictureWindow, "TagPrefix");
  // Build the Tagname, including the TagPrefix (here the name ends with _Actual_RPM)
  sprintf(Trend1_tag, "%s_Actual_RPM", tagPrefix);
  // Select index before changing the name
  SetPropWord(lpszPictureName, "TrendControl", "TrendIndex", 0);
  // and set the TagName of the index selected before
  SetPropChar(lpszPictureName, "TrendControl", "TrendTagName", Trend1_tag);
}
 
Tanks Thomas_v2 for your effort
but please be patient with me
I will talk about bar or (input/output) field
I notice something
I made 2 picture main picture
and other picture contain 3 element ( trend window -- Bar -- Output field )
Then give three element the same tag (complete tag) B_102A_Actual_RPM
when I run this picture alone it run good
but when I run main picture and call the other picture like I refer (VB code)

trend only work and( bar/ Output Field) Not work and be like the file I attache
 
The bar does not work, because the tag which is used for the bar animation doesn't exist.

In the Picture Window object you have set the Tag Prefix "B_102A_RMP".
In the window you load into the picture windows, you are using in your bar animation the tag "_Actual_RPM".

This will need a tag tagprefix+tag-inside-picture-window = B_102A_RMP_Actual_RPM, which I think you don't have.

Change the Tag Prefix from "B_102A_RMP" to "B_102A" and try if it works.

picwint.jpg
 
It work
I don't know how can I thank you
Thank you very much
still one thing (trend)
when i write code you sent to me
I tray in many way
but i can't find this line
{
void OnOpenPicture(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
}
 
You open the picture where you have placed the trend control, I guess it's RPM.pdl.

Then you select the picture object (click somewhere in the background where no other object is). In the object properties page you select "Events", and add a C-script on event picture opened.
You can do the same with a VB script if you are more familiar with this language,

As a result, this script is called once the picture is opened.
 
It work
This problem face me from about three weeks ago
I really don't know how can I thank you
Thank You Thomas_v2 for your effort
 

Similar Topics

We migrated a project from WinCC V 7.0 ( Windows XP) to WinCC V 7.5 (Windows 10).Every things okey .When the language translation button is...
Replies
0
Views
422
I have wincc flex 2008 project made with wincc flexible 2088 sp1 project hmi device is simatic pc panel 19" I want to change hmi device to run the...
Replies
17
Views
5,302
Hello During Compiling of WinCC Flexible Project It gives me following Error Internal error(Detail: cannot get parent folder-object type:VAR)...
Replies
1
Views
1,693
Hi everyone here, I'm facing a minor problem related to the WinCC Scada system which controls the desalination unit in the plant where I'm...
Replies
2
Views
1,488
Dear colleagues Actually, I have a problem with the communication in WINCC. we are developing a filling station for the lab for the students. we...
Replies
5
Views
4,237
Back
Top Bottom