13
90
13 - Overviews
You will need to write a script if there is a digital output with a feedback connection to a digital
input and you want an alarm to be triggered when the output and input have dierent values. Con-
trollers with feedback generate code that is similar to the code for pump feedback.
The script could look like this:
ROUTINE FeedBack
ALIAS
DO1 = CHANNEL[37]; %Digital out 5
DO1F = CHANNEL[21]; %Digital in 5
DO1FStatus = CHANNEL[52]; %Channel 52
BEGIN
IF (NOT (DO1 XOR DO1F)) = 1 THEN
IF DO1 = 0 THEN
DO1FStatus <- 2;
ELSE
DO1FStatus <- 1;
ENDIF;
ELSE
DO1FStatus <- 0;
ENDIF;
END;
If you want the label to be green for normal operation (both 1), white when switched o (both 0)
and red when there is an alarm (one is 1 and the other is 0), add the channel DO1FStatus to the im-
age and create a feedback connection to itself. You also need to create an alarm, connect it to this
channel and set it to trigger when the channel value is 0.
Important: Adding a feedback connection to a channel in an image does not generate an alarm or
create an event in the device – it is only for display.
13�4 Deleting a label
Click on a label. Set the object and the feedback signal to "none" and click Save. To delete all the
measuring points, simply click Reset at the bottom of the page.