buttoncolor in WinCC Flexible

userxyz

Member
Join Date
May 2002
Location
any
Posts
2,768
I have several valves on an MP277 panel.

Each valve has 2 buttons. IN and OUT.

Each button has a backgroundcolor. Green = active. So when the valve is controlled IN, the backgroundcolor is green of that object.

What I did now is the folowing:

- Green = active
- Orange = transition
- Red = in Alarm
- grey = not active


I did this with an integervalue from 0 to 3.

Are there oter methods, As u all know, I'm allways interested in your opinions
 
Okay

cjd1965 said:
Combo, I do it the same as you

This is the source code of my standard ALARM BLOCK. It's bin written pretty rude, so have to simplify it a bit.


Code:
[font=Arial][size=2]FUNCTION "BOOL_TO_INT" : VOID

TITLE =

VERSION : 0.1

 

VAR_INPUT

COMM_IN : BOOL ; //Commando In

COMM_UIT : BOOL ; //Commando Uit

FC_IN : BOOL ; //Feedback In

FC_UIT : BOOL ; //Feedback Uit

CLK_1s : BOOL ; 

END_VAR

VAR_OUTPUT

Color : INT ; 

ALR_IN_NO_FDBK : BOOL ; 

ALR_UIT_NO_FDBK : BOOL ; 

END_VAR

VAR_IN_OUT

CLKMEM_IN : BOOL ; 

CLKMEM_UIT : BOOL ; 

Time_IN : INT ; 

Time_UIT : INT ; 

END_VAR

VAR_TEMP

TempByte : BYTE ; 

END_VAR

BEGIN

NETWORK

TITLE =IN OK (1)

A #COMM_IN; 

A #FC_IN; 

JCN NOT1; 

L 1; // 1 = IN

T #TempByte; 

L 0; 

T #Time_IN; 

CLR ; 

= #ALR_IN_NO_FDBK; 

NOT1: NOP 0; 

NETWORK

TITLE =UIT OK (2)

A #COMM_UIT; 

A #FC_UIT; 

JCN NOT2; 

L 2; // 2 = UIT

T #TempByte; 

L 0; 

T #Time_UIT; 

CLR ; 

= #ALR_UIT_NO_FDBK; 

NOT2: NOP 0; 

NETWORK

TITLE =ALARM IN (3)

A #COMM_IN; 

AN #FC_IN; 

JCN NOT3; 

A #CLK_1s; 

FP #CLKMEM_IN; 

JCN NOT3; 

L 1; 

L #Time_IN; 

+I ; 

T #Time_IN; 

L 3; // 3s

>=I ; 

JCN NOT3; 

L 3; 

T #TempByte; 

SET ; 

= #ALR_IN_NO_FDBK; 

NOT3: NOP 0; 

NETWORK

TITLE =ALARM UIT (4)

A #COMM_UIT; 

AN #FC_UIT; 

JCN NOT4; 

A #CLK_1s; 

FP #CLKMEM_UIT; 

JCN NOT4; 

L 1; 

L #Time_UIT; 

+I ; 

T #Time_UIT; 

L 3; // 3s

>=I ; 

JCN NOT4; 

L 4; 

T #TempByte; 

SET ; 

= #ALR_UIT_NO_FDBK; 

NOT4: NOP 0; 

NETWORK

TITLE =NO COMMANDS => RESET CALCULATED TIMEVALUES

AN #COMM_IN; 

JCN NAL1; 

L 0; 

T #Time_IN; 

NAL1: AN #COMM_UIT; 

JCN NAL2; 

L 0; 

T #Time_UIT; 

NAL2: NOP 0; 

NETWORK

TITLE =CONVERT

L #TempByte; 

BTI ; 

T #Color; 

END_FUNCTION

 

[/size][/font]
 
I simply use 4 ladder logic rungs to move the relevant value to the colour display. Sometimes the alarms are masked or debounced so it is simpler for shop floor maintenance guys to follow. (Allows me to sleep and have most weekends off lol)
 
...

cjd1965 said:
I simply use 4 ladder logic rungs to move the relevant value to the colour display. Sometimes the alarms are masked or debounced so it is simpler for shop floor maintenance guys to follow. (Allows me to sleep and have most weekends off lol)

Yeah, but I used delays for the alarms, to give time to the transitions
 

Similar Topics

Hi, I tried this: HMIRuntime.Screens("Mainscreen.bottomwindow:bottomwindow").ScreenItems("btn_body").back.color = RGB(255,255,255)...
Replies
1
Views
3,624
Hi, I'm a beginner in WinCC and would like to change the color of a button when a certain picture is vieuwed. I made a navigationmenu.pdl, a...
Replies
6
Views
8,151
Does anyone happen to know how to install the graphic picture in HMI when I go into blower selection there are no graphics shown not only blower...
Replies
1
Views
65
Hi folks, I'm not as accustom with Siemens & WinCC, however I've been asked to increase the amount of data an existing application is logging...
Replies
2
Views
65
I have created a project in TIA Portal v16 Upd6 with S7-1200 (6ES7214-1AG40-0XB0) and WinCC Unified (PC station). The communication between the...
Replies
4
Views
145
Back
Top Bottom