lpcmanager

Adding setRTC block.

2016-11-15, dporopat
482c516d0e44
Adding setRTC block.
<?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="python_getRTC" pouType="functionBlock">
<interface>
<outputVars>
<variable name="DT_STR">
<type>
<string/>
</type>
</variable>
<variable name="VALID">
<type>
<UINT/>
</type>
</variable>
<variable name="YEAR">
<type>
<UINT/>
</type>
</variable>
<variable name="MONTH">
<type>
<UINT/>
</type>
</variable>
<variable name="DAY">
<type>
<UINT/>
</type>
</variable>
<variable name="DAYOFWEEK">
<type>
<UINT/>
</type>
</variable>
<variable name="HOUR">
<type>
<UINT/>
</type>
</variable>
<variable name="MINUTE">
<type>
<UINT/>
</type>
</variable>
<variable name="SECOND">
<type>
<UINT/>
</type>
</variable>
</outputVars>
<localVars>
<variable name="pooll0">
<type>
<derived name="python_poll"/>
</type>
</variable>
<variable name="ACK">
<type>
<BOOL/>
</type>
</variable>
<variable name="INPUT_VALUE_CODE">
<type>
<string/>
</type>
</variable>
<variable name="CODE">
<type>
<string/>
</type>
</variable>
<variable name="VALID_STR">
<type>
<string/>
</type>
</variable>
<variable name="YEAR_STR">
<type>
<string/>
</type>
</variable>
<variable name="MONTH_STR">
<type>
<string/>
</type>
</variable>
<variable name="DAY_STR">
<type>
<string/>
</type>
</variable>
<variable name="DAYOFWEEK_STR">
<type>
<string/>
</type>
</variable>
<variable name="HOUR_STR">
<type>
<string/>
</type>
</variable>
<variable name="MINUTE_STR">
<type>
<string/>
</type>
</variable>
<variable name="SECOND_STR">
<type>
<string/>
</type>
</variable>
</localVars>
</interface>
<body>
<ST>
<xhtml:p><![CDATA[INPUT_VALUE_CODE:=CONCAT('PLCObject.MWProvider.GetRTC()'); pooll0(TRIG:=TRUE, CODE:=INPUT_VALUE_CODE, ACK => ACK, RESULT => DT_STR); VALID_STR:=MID(IN:=DT_STR,L:=1,P:=23); VALID:=STRING_TO_UINT(IN:=VALID_STR); YEAR_STR:=MID(IN:=DT_STR,L:=4,P:=1); YEAR:=STRING_TO_UINT(IN:=YEAR_STR); MONTH_STR:=MID(IN:=DT_STR,L:=2,P:=6); MONTH:=STRING_TO_UINT(IN:=MONTH_STR); DAY_STR:=MID(IN:=DT_STR,L:=2,P:=9); DAY:=STRING_TO_UINT(IN:=DAY_STR); DAYOFWEEK_STR:=MID(IN:=DT_STR,L:=1,P:=21); DAYOFWEEK:=STRING_TO_UINT(IN:=DAYOFWEEK_STR); HOUR_STR:=MID(IN:=DT_STR,L:=2,P:=12); HOUR:=STRING_TO_UINT(IN:=HOUR_STR); MINUTE_STR:=MID(IN:=DT_STR,L:=2,P:=15); MINUTE:=STRING_TO_UINT(IN:=MINUTE_STR); SECOND_STR:=MID(IN:=DT_STR,L:=2,P:=18); SECOND:=STRING_TO_UINT(IN:=SECOND_STR);]]></xhtml:p>
</ST>
</body>
</pou>
<pou name="python_setRTC" pouType="functionBlock">
<interface>
<inputVars>
<variable name="TRIG">
<type>
<BOOL/>
</type>
</variable>
<variable name="YEAR">
<type>
<UINT/>
</type>
</variable>
<variable name="MONTH">
<type>
<UINT/>
</type>
</variable>
<variable name="DAY">
<type>
<UINT/>
</type>
</variable>
<variable name="HOUR">
<type>
<UINT/>
</type>
</variable>
<variable name="MINUTE">
<type>
<UINT/>
</type>
</variable>
</inputVars>
<outputVars>
<variable name="RESULT">
<type>
<string/>
</type>
</variable>
</outputVars>
<localVars>
<variable name="pooll0">
<type>
<derived name="python_poll"/>
</type>
</variable>
<variable name="ACK">
<type>
<BOOL/>
</type>
</variable>
<variable name="INPUT_ARGS">
<type>
<string/>
</type>
</variable>
<variable name="YEAR_STR">
<type>
<string/>
</type>
</variable>
<variable name="MONTH_STR">
<type>
<string/>
</type>
</variable>
<variable name="DAY_STR">
<type>
<string/>
</type>
</variable>
<variable name="HOUR_STR">
<type>
<string/>
</type>
</variable>
<variable name="MINUTE_STR">
<type>
<string/>
</type>
</variable>
<variable name="INPUT_VALUE_CODE">
<type>
<string/>
</type>
</variable>
<variable name="CODE">
<type>
<string/>
</type>
</variable>
</localVars>
</interface>
<body>
<ST>
<xhtml:p><![CDATA[YEAR_STR:=UINT_TO_STRING(YEAR); MONTH_STR:=UINT_TO_STRING(MONTH); DAY_STR:=UINT_TO_STRING(DAY); HOUR_STR:=UINT_TO_STRING(HOUR); MINUTE_STR:=UINT_TO_STRING(MINUTE); INPUT_ARGS:=CONCAT(YEAR_STR, ',', MONTH_STR, ',', DAY_STR, ',', HOUR_STR, ',', MINUTE_STR); INPUT_VALUE_CODE:=CONCAT('PLCObject.MWProvider.SetRTC(', INPUT_ARGS, ')'); pooll0(TRIG := TRIG, CODE := INPUT_VALUE_CODE, ACK => ACK, RESULT => RESULT);]]></xhtml:p>
</ST>
</body>
</pou>
</pous>
</types>
<instances>
<configurations/>
</instances>
</project>