Is it possible to create control at runtime with WinCC Flexible 2008

rikcando

Member
Join Date
Apr 2012
Location
Ontario
Posts
128
I am working with WinnCC Flexible 2008 on an MP377.

The application require the operator to do a few differnet configurations before running the equipment. I am making a dynamic disply that represents the operators selection. The operator increases the number of parts available and I want to dynamically create the graphic view object to place on the screen with a script. This is something that I do often for PC applications, but this is my first time attempting it on an HMI.

I have the graphic on the screen and I can move it around but I need to duplicate it. I am hoping to be able to create a control array to work with.

Is anything like this possible, or do I need to add all of the graphics during development and control their visibility during runtime?

The reason is that I am looing at a 10x13 grid, and two different stacks of 6 so this would be a bit more work assigning names and working with 142 static names.
 
I don't quite follow you, but have you had a look at the graphic lists? A variable (or more) is assigned to a list of selectable graphic symbols.

Kalle

I will have a loo to see if it helps.

As the operator increases the numbers, the display will show more parts (graphic representation). In other programming languages and environments I would simply create a new instance of the original graphic (a copy), make it visible and set the left and top values, all during runtime. I would not have to create seperate graphic for each instance during development.

It would be the same as using a class to create multiple instances of the same object, which is the basis of the whole application already. I just want to do this during runtime.
 
Ok, I can do this according to the documentation.
Code:
[FONT=Courier New][SIZE=3]Dim X[/SIZE][/FONT]
[SIZE=3][FONT=Courier New]Set X = [COLOR=#ffffff]New[/COLOR] [I]classname[/I][/FONT][/SIZE]

But what is the class name for a graphic view item?
 
I don't think you can create graphic objects at runtime. I wish you could and if you find a way I would like to know. The solution i have is not very good but it works. I create a script that creates an HMTL page that shows the graphics I want to show. I am using this to display stacking patterns for robots. I create several different images and display them with the size and pattern I need based on variables the user enters.
 
Thank you Charles. I did not find a simple way to get this done, nor did I have the time to research and debug something more complicated.

I looked it over again and realized it is 13 row by 2 columns of 5 parts each. I created a graphic representing the 5 part arrangement. I then placed it on the screen 26 times. Each one is given a name of (liner horizontal row# column#) LH11, LH12, LH21, .... LH131, LH132.

The operator increases the row and column using two internal tags (bytes).

My script has a Do..Loop which increments 1 to 13 (iRow) and 1 to 2 (iCol). Once iRow >13 the loop is exited. Within the loop I create a name from a temporary string variable (sTmp) which is basically sTmp="LH" & iRow & iCol, resulting in my graphic names. I then check iRow and iCol against the internal tags to see if this graphic number is greater than the desired parts to display.
(program on other computer but the end result looks something like...

HmiRuntime.Screens("PalletLayout").ScreenItem(sTmp).Visible=(iRow<RowTag) OR (iRow=RowTag AND iCol<=ColTag)

I applied the same for the layer dividers but only needed six of those.

Side note: The screen saver I created this weekend was much more work than this. I could use a link to a thread regarding that if you know of one.
 
Last edited:

Similar Topics

Hey guys, I'm working on creating a PID loop that will modulate a valve on a water filter, and the idea is to close the valve until the flow...
Replies
7
Views
1,766
Hello All, I need the ability to remotely reboot a Red Lion CR3000 HMI. Due to some graphics issues when the database is updated the HMI must be...
Replies
4
Views
221
Hello The plant is running and there is no shutdown nowadays therefore I can add 1734- AENTR and its card while PLC is in Run? I do not wanna...
Replies
8
Views
352
Folks, I have a client with an old ABB Advant / MOD300 system (v14.4). Around y2k I installed the ABB Industrial IT MOD300 OPC Server 1.1/2...
Replies
1
Views
185
Hi all so i have a robot project im working on were i need to set the layers. using the hmi screen i would like to use the numeric data display to...
Replies
11
Views
829
Back
Top Bottom