August 12

WinCC SCADA C-action Scripting Course: Tutorial #69

scada scripting course

In this lecture, we learn about scripting process to control colors of rectangle in WinCC window. Sometimes we need to use scripting during runtime (WinCC RT) and we need to know how to make it!

One of subscribers asked for help:

"Can you please make one video for changing object colour with 3 different conditions using C script.
If Tag A is 1it should be greenWith Tag B is 1 it should be redWith Tag C is 1 yellow and flashing"

Check the script below:

// syntax: #define TagNameInAction "DMTagName"
// next TagID : 2
#define TAG_1 "TagA"
#define TAG_2 "TagB"
#define TAG_3 "TagC"

// syntax: #define PicNameInAction "PictureName"
// next PicID : 1

if (GetTagBit(TAG_1) & GetTagBit(TAG_2) & GetTagBit(TAG_3)) // TagA = 1 AND TagB = 1 AND TagC = 1??
return 64255;
else if (GetTagBit(TAG_1) & GetTagBit(TAG_2)) // TagA = 1 AND TagB = 1??
return 255;
else if (GetTagBit(TAG_1))// TagA = 1?
return 65280;
return 0;

About the author 


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Online courses

In the courses, I lead you through WinCC SCADA from point A to point Z with the shortest and effective path possible. During your studies you have full contact with me. I will answer every question! 🙂 The methods developed thanks to the online training of over 3,000 people allow you to transfer knowledge in the most effective way. See you in the course!