lpcmanager

Added timezone POUs

10 months ago, Dino Kosic
dd0ec0f4179c
Added timezone POUs
<?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">
<coordinateInfo>
<fbd>
<scaling x="0" y="0"/>
</fbd>
<ld>
<scaling x="0" y="0"/>
</ld>
<sfc>
<scaling x="0" y="0"/>
</sfc>
</coordinateInfo>
</contentHeader>
<types>
<dataTypes/>
<pous>
<pou name="Set_Brightness" pouType="functionBlock">
<interface>
<inputVars>
<variable name="TRIG">
<type>
<BOOL/>
</type>
</variable>
<variable name="PERCENT">
<type>
<UINT/>
</type>
</variable>
</inputVars>
<outputVars>
<variable name="ACK">
<type>
<BOOL/>
</type>
</variable>
</outputVars>
<localVars>
<variable name="eval">
<type>
<derived name="python_eval"/>
</type>
</variable>
</localVars>
</interface>
<body>
<ST>
<xhtml:p><![CDATA[(* Set dimmer value *)
eval(
TRIG := TRIG,
CODE := CONCAT(
'SetDimmerValue(',
UINT_TO_STRING(PERCENT),
')'
),
ACK => ACK
);]]></xhtml:p>
</ST>
</body>
<documentation>
<xhtml:p><![CDATA[Set backlight brightness to PERCENT on raising edge of TRIG.]]></xhtml:p>
</documentation>
</pou>
<pou name="Fade_Brightness" pouType="functionBlock">
<interface>
<inputVars>
<variable name="TRIG">
<type>
<BOOL/>
</type>
</variable>
<variable name="PERCENT">
<type>
<UINT/>
</type>
</variable>
<variable name="TIME_MS">
<type>
<UINT/>
</type>
</variable>
</inputVars>
<outputVars>
<variable name="ACK">
<type>
<BOOL/>
</type>
</variable>
</outputVars>
<localVars>
<variable name="eval">
<type>
<derived name="python_eval"/>
</type>
</variable>
</localVars>
</interface>
<body>
<ST>
<xhtml:p><![CDATA[(* Fade dimmer value *)
eval(
TRIG := TRIG,
CODE := CONCAT(
'SetDimmerValue(',
UINT_TO_STRING(PERCENT),
',',
UINT_TO_STRING(TIME_MS),
')'
),
ACK => ACK
);]]></xhtml:p>
</ST>
</body>
<documentation>
<xhtml:p><![CDATA[Start fading backlight brightness on raising edge of TRIG, from current value to PERCENT, in TIME_MS miliseconds.]]></xhtml:p>
</documentation>
</pou>
<pou name="Buzzer" pouType="functionBlock">
<interface>
<inputVars>
<variable name="INPUT_VALUE">
<type>
<BOOL/>
</type>
</variable>
</inputVars>
<localVars>
<variable name="eval">
<type>
<derived name="python_eval"/>
</type>
</variable>
<variable name="ACK">
<type>
<BOOL/>
</type>
</variable>
<variable name="TRIG">
<type>
<BOOL/>
</type>
</variable>
<variable name="APPLIED_VAL">
<type>
<BOOL/>
</type>
</variable>
<variable name="ORDERED_VAL">
<type>
<BOOL/>
</type>
</variable>
<variable name="CODE">
<type>
<string/>
</type>
</variable>
<variable name="rtrig">
<type>
<derived name="R_TRIG"/>
</type>
</variable>
<variable name="RACK">
<type>
<BOOL/>
</type>
</variable>
</localVars>
</interface>
<body>
<ST>
<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(RACK) & (APPLIED_VAL <> INPUT_VALUE) THEN
TRIG := TRUE;
ORDERED_VAL := INPUT_VALUE;
CODE:=CONCAT(
'SetBuzzerValue(',
INT_TO_STRING(BOOL_TO_INT(ORDERED_VAL)),
')'
);
END_IF;
eval(
TRIG := TRIG,
CODE := CODE,
ACK => ACK
);
rtrig(CLK := ACK, Q => RACK);
IF RACK THEN
TRIG := FALSE;
APPLIED_VAL := ORDERED_VAL;
END_IF;
]]></xhtml:p>
</ST>
</body>
<documentation>
<xhtml:p><![CDATA[Turns buzzer on or off, according to input value]]></xhtml:p>
</documentation>
</pou>
</pous>
</types>
<instances>
<configurations/>
</instances>
</project>