<?xml version='1.0' encoding='utf-8'?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201">
<fileHeader companyName="Beremiz" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:53:26"/>
<contentHeader name="Beremiz non-standard POUs library" modificationDateTime="2014-03-17T08:07:24">
<pou name="Set_Brightness" pouType="functionBlock">
<variable name="PERCENT">
<derived name="python_eval"/>
<xhtml:p><![CDATA[(* Set dimmer value *)
<xhtml:p><![CDATA[Set backlight brightness to PERCENT on raising edge of TRIG.]]></xhtml:p>
<pou name="Fade_Brightness" pouType="functionBlock">
<variable name="PERCENT">
<variable name="TIME_MS">
<derived name="python_eval"/>
<xhtml:p><![CDATA[(* Fade dimmer value *)
<xhtml:p><![CDATA[Start fading backlight brightness on raising edge of TRIG, from current value to PERCENT, in TIME_MS miliseconds.]]></xhtml:p>
<pou name="Buzzer" pouType="functionBlock">
<variable name="INPUT_VALUE">
<derived name="python_eval"/>
<variable name="APPLIED_VAL">
<variable name="ORDERED_VAL">
<xhtml:p><![CDATA[(* Turn buzzer on or off *)
(* test if not already waiting for ack, and there is change to apply *)
IF NOT(TRIG & NOT(ACK)) & (APPLIED_VAL <> INPUT_VALUE) THEN
ORDERED_VAL := INPUT_VALUE;
INT_TO_STRING(BOOL_TO_INT(INPUT_VALUE)),
rtrig(CLK := ACK, Q => RACK);
APPLIED_VAL := ORDERED_VAL;
<xhtml:p><![CDATA[Turns buzzer on or off, according to input value]]></xhtml:p>