(0)| 8/10/2007 4:17 PM | |
|
Posts: 1 Rating:
|
Hello everyone I have 18 objects in my project and all of them shuold change colour depending on the values of 3 bits on PLC side (DBX), defined as tag1, tag2 and tag3 in PC (in WinCC flex). Every object has it's own DB block in PLC, and for example, if the 3 bits of object 1 change in PLC, the colour of object 1 shuold change. The routine looks like this : it's grey colour if tag1 = 0 and tag2 = 0 it's green colour if tag1 = 1 or tag2 = 1 it's red colour flashing if tag3 = 1 I made the script (attached),I don't know if it is ok, that when a few bits are changed, the internal tag Eqpmnt_Colour is set up with an integer value, then this internal tag is connected to an object and depending on a value in this tag the object is changing colour. My problem is how to make it for all 18 object, do I have to make 18 scripts? Can I solve this with indirect adressing, and how? Is it possible to make a read out from PLC in script, and how?(because I don't know what 3 bits from what object are changed and when ) How to set up a script?as a function or a subruotine? How should I set up tags?what tag should react on change, to trigger up script?only one, or every tag that change it value in PLC (3)? Looking forward to your answer Thank you, in advance Best regards Ivan AttachmentScript.zip (242 Downloads) |
Follow us on