in wincc scada get and set tag values function is used to read and modify tag value. get and set function of c script assign for a tag to read and write value. when this function execute it read tag value and process according to program. in this article we see how a get a tag value and set a tag value work on c script.
now open your wincc explorer and than open tag management and add tags input_set and Status_motor. input_set is 16 bit signed. status_motor tags are binary type using to start and stop.
now open graphics designer and add a start button and a circle. add a input/output field to read and write tag value and a static text field to write staus of value. when a get set tag button is pressed. in input output field select tag input_set. static text field text changed as per our c script.
first script set a Boolean value to tag status of motor. when mouse is pressed. to add this c script select button event mouse click property. A c script editor open enter following c script. this script set 'TRUE'(1) value to staus_motor tag. if the status motor tag is set to 1 than color of circle is change to green. second button set false value to status_motor tag and change background color to red.
now this script help to get value. in this script we store a value of input output field to value1 for comparison. this script get value of input output field and store to value1 and set circle color and set static text. add this script to input output field keyboard released event property.