Page 1 of 1

WinCC 7.0 expression

Posted: Thu Aug 30, 2012 1:54 pm
by krneki
I was wondering how could I write up expression for this cases:

1st case: object A changes color this way: when Q0.1 is on 1 AND Q.2 on 0, it's red. When Q0.2 is on 1 AND Q0.1 on 0, it,s green. In all other cases, it stays in current color.

2nd case: object B changes color from red to green as soon as Q0.3 gets on 1 and stays green until Q0.4 gets to 1, which sets it back to red. Just like SR flipflop.

Thank you for help in advance.

Re: WinCC 7.0 expression

Posted: Sun Sep 02, 2012 11:20 am
by PLC_ITA
Hi, there ar some way to do this.
I suggest to create a simple logic into a plc and set/reset bit in a data block ( db.dbx... ) use this bit in wcc to change color.
( this is the way that i prefer )

Otherwise you can create a script (VB or C ) directly in wcc in the color propreties ( right click .... script .... )

You can write a function in C or VB editor and recall in color properties ( dinamic ... )
( i use this way in case of multiple object )

bye