Tests: have to terminate language test with KILL, side effect of BEREMIZ_TEST_CYCLES
<?xml version='1.0' encoding='utf-8'?>
<project xmlns:ns1="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.plcopen.org/xml/tc6_0201">
<fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2023-03-11T14:33:27"/>
<contentHeader name="Unnamed" modificationDateTime="2023-03-27T09:12:21">
<coordinateInfo>
<fbd>
<scaling x="8" y="8"/>
</fbd>
<ld>
<scaling x="0" y="0"/>
</ld>
<sfc>
<scaling x="0" y="0"/>
</sfc>
</coordinateInfo>
</contentHeader>
<types>
<dataTypes/>
<pous>
<pou name="CONVERSION_TEST" pouType="functionBlock">
<interface>
<outputVars>
<variable name="RESULT">
<type>
<string/>
</type>
</variable>
</outputVars>
</interface>
<body>
<ST>
<xhtml:p><![CDATA[
(* Code generated by gen_vonversion.py,
fixed by hand for corner cases *)
(* 240 conversions from literals tested *)
(* Tested types
BOOL, SINT, USINT, BYTE, STRING, INT, UINT,
WORD, DINT, UDINT, DWORD, LINT, ULINT, LWORD,
REAL, LREAL *)
(* TODO: test TIME, TOD, DATE and DT *)
(* TODO: similar test with values that tiggers overflow *)
RESULT := 'BOOL_TO_SINT';
IF BOOL_TO_SINT(BOOL#TRUE) <> SINT#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_USINT';
IF BOOL_TO_USINT(BOOL#TRUE) <> USINT#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_BYTE';
IF BOOL_TO_BYTE(BOOL#TRUE) <> BYTE#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_STRING';
IF BOOL_TO_STRING(BOOL#TRUE) <> 'TRUE' THEN RETURN; END_IF;
RESULT := 'BOOL_TO_INT';
IF BOOL_TO_INT(BOOL#TRUE) <> INT#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_UINT';
IF BOOL_TO_UINT(BOOL#TRUE) <> UINT#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_WORD';
IF BOOL_TO_WORD(BOOL#TRUE) <> WORD#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_DINT';
IF BOOL_TO_DINT(BOOL#TRUE) <> DINT#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_UDINT';
IF BOOL_TO_UDINT(BOOL#TRUE) <> UDINT#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_DWORD';
IF BOOL_TO_DWORD(BOOL#TRUE) <> DWORD#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_LINT';
IF BOOL_TO_LINT(BOOL#TRUE) <> LINT#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_ULINT';
IF BOOL_TO_ULINT(BOOL#TRUE) <> ULINT#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_LWORD';
IF BOOL_TO_LWORD(BOOL#TRUE) <> LWORD#1 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_REAL';
IF BOOL_TO_REAL(BOOL#TRUE) <> REAL#1.0 THEN RETURN; END_IF;
RESULT := 'BOOL_TO_LREAL';
IF BOOL_TO_LREAL(BOOL#TRUE) <> LREAL#1.0 THEN RETURN; END_IF;
RESULT := 'SINT_TO_BOOL';
IF SINT_TO_BOOL(SINT#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'SINT_TO_USINT';
IF SINT_TO_USINT(SINT#42) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'SINT_TO_BYTE';
IF SINT_TO_BYTE(SINT#42) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'SINT_TO_STRING';
IF SINT_TO_STRING(SINT#42) <> '42' THEN RETURN; END_IF;
RESULT := 'SINT_TO_INT';
IF SINT_TO_INT(SINT#42) <> INT#42 THEN RETURN; END_IF;
RESULT := 'SINT_TO_UINT';
IF SINT_TO_UINT(SINT#42) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'SINT_TO_WORD';
IF SINT_TO_WORD(SINT#42) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'SINT_TO_DINT';
IF SINT_TO_DINT(SINT#42) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'SINT_TO_UDINT';
IF SINT_TO_UDINT(SINT#42) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'SINT_TO_DWORD';
IF SINT_TO_DWORD(SINT#42) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'SINT_TO_LINT';
IF SINT_TO_LINT(SINT#42) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'SINT_TO_ULINT';
IF SINT_TO_ULINT(SINT#42) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'SINT_TO_LWORD';
IF SINT_TO_LWORD(SINT#42) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'SINT_TO_REAL';
IF SINT_TO_REAL(SINT#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'SINT_TO_LREAL';
IF SINT_TO_LREAL(SINT#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'USINT_TO_BOOL';
IF USINT_TO_BOOL(USINT#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'USINT_TO_SINT';
IF USINT_TO_SINT(USINT#42) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'USINT_TO_BYTE';
IF USINT_TO_BYTE(USINT#42) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'USINT_TO_STRING';
IF USINT_TO_STRING(USINT#42) <> '42' THEN RETURN; END_IF;
RESULT := 'USINT_TO_INT';
IF USINT_TO_INT(USINT#42) <> INT#42 THEN RETURN; END_IF;
RESULT := 'USINT_TO_UINT';
IF USINT_TO_UINT(USINT#42) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'USINT_TO_WORD';
IF USINT_TO_WORD(USINT#42) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'USINT_TO_DINT';
IF USINT_TO_DINT(USINT#42) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'USINT_TO_UDINT';
IF USINT_TO_UDINT(USINT#42) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'USINT_TO_DWORD';
IF USINT_TO_DWORD(USINT#42) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'USINT_TO_LINT';
IF USINT_TO_LINT(USINT#42) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'USINT_TO_ULINT';
IF USINT_TO_ULINT(USINT#42) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'USINT_TO_LWORD';
IF USINT_TO_LWORD(USINT#42) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'USINT_TO_REAL';
IF USINT_TO_REAL(USINT#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'USINT_TO_LREAL';
IF USINT_TO_LREAL(USINT#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_BOOL';
IF BYTE_TO_BOOL(BYTE#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'BYTE_TO_SINT';
IF BYTE_TO_SINT(BYTE#42) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_USINT';
IF BYTE_TO_USINT(BYTE#42) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_STRING';
IF BYTE_TO_STRING(BYTE#42) <> '16#2a' THEN RETURN; END_IF;
RESULT := 'BYTE_TO_INT';
IF BYTE_TO_INT(BYTE#42) <> INT#42 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_UINT';
IF BYTE_TO_UINT(BYTE#42) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_WORD';
IF BYTE_TO_WORD(BYTE#42) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_DINT';
IF BYTE_TO_DINT(BYTE#42) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_UDINT';
IF BYTE_TO_UDINT(BYTE#42) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_DWORD';
IF BYTE_TO_DWORD(BYTE#42) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_LINT';
IF BYTE_TO_LINT(BYTE#42) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_ULINT';
IF BYTE_TO_ULINT(BYTE#42) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_LWORD';
IF BYTE_TO_LWORD(BYTE#42) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_REAL';
IF BYTE_TO_REAL(BYTE#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'BYTE_TO_LREAL';
IF BYTE_TO_LREAL(BYTE#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'STRING_TO_BOOL';
IF STRING_TO_BOOL('42') <> BOOL#FALSE THEN RETURN; END_IF;
RESULT := 'STRING_TO_SINT';
IF STRING_TO_SINT('42') <> SINT#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_USINT';
IF STRING_TO_USINT('42') <> USINT#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_BYTE';
IF STRING_TO_BYTE('42') <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_INT';
IF STRING_TO_INT('42') <> INT#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_UINT';
IF STRING_TO_UINT('42') <> UINT#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_WORD';
IF STRING_TO_WORD('42') <> WORD#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_DINT';
IF STRING_TO_DINT('42') <> DINT#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_UDINT';
IF STRING_TO_UDINT('42') <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_DWORD';
IF STRING_TO_DWORD('42') <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_LINT';
IF STRING_TO_LINT('42') <> LINT#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_ULINT';
IF STRING_TO_ULINT('42') <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_LWORD';
IF STRING_TO_LWORD('42') <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'STRING_TO_REAL';
IF STRING_TO_REAL('42') <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'STRING_TO_LREAL';
IF STRING_TO_LREAL('42') <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'INT_TO_BOOL';
IF INT_TO_BOOL(INT#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'INT_TO_SINT';
IF INT_TO_SINT(INT#42) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'INT_TO_USINT';
IF INT_TO_USINT(INT#42) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'INT_TO_BYTE';
IF INT_TO_BYTE(INT#42) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'INT_TO_STRING';
IF INT_TO_STRING(INT#42) <> '42' THEN RETURN; END_IF;
RESULT := 'INT_TO_UINT';
IF INT_TO_UINT(INT#42) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'INT_TO_WORD';
IF INT_TO_WORD(INT#42) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'INT_TO_DINT';
IF INT_TO_DINT(INT#42) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'INT_TO_UDINT';
IF INT_TO_UDINT(INT#42) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'INT_TO_DWORD';
IF INT_TO_DWORD(INT#42) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'INT_TO_LINT';
IF INT_TO_LINT(INT#42) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'INT_TO_ULINT';
IF INT_TO_ULINT(INT#42) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'INT_TO_LWORD';
IF INT_TO_LWORD(INT#42) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'INT_TO_REAL';
IF INT_TO_REAL(INT#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'INT_TO_LREAL';
IF INT_TO_LREAL(INT#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'UINT_TO_BOOL';
IF UINT_TO_BOOL(UINT#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'UINT_TO_SINT';
IF UINT_TO_SINT(UINT#42) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'UINT_TO_USINT';
IF UINT_TO_USINT(UINT#42) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'UINT_TO_BYTE';
IF UINT_TO_BYTE(UINT#42) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'UINT_TO_STRING';
IF UINT_TO_STRING(UINT#42) <> '42' THEN RETURN; END_IF;
RESULT := 'UINT_TO_INT';
IF UINT_TO_INT(UINT#42) <> INT#42 THEN RETURN; END_IF;
RESULT := 'UINT_TO_WORD';
IF UINT_TO_WORD(UINT#42) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'UINT_TO_DINT';
IF UINT_TO_DINT(UINT#42) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'UINT_TO_UDINT';
IF UINT_TO_UDINT(UINT#42) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'UINT_TO_DWORD';
IF UINT_TO_DWORD(UINT#42) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'UINT_TO_LINT';
IF UINT_TO_LINT(UINT#42) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'UINT_TO_ULINT';
IF UINT_TO_ULINT(UINT#42) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'UINT_TO_LWORD';
IF UINT_TO_LWORD(UINT#42) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'UINT_TO_REAL';
IF UINT_TO_REAL(UINT#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'UINT_TO_LREAL';
IF UINT_TO_LREAL(UINT#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'WORD_TO_BOOL';
IF WORD_TO_BOOL(WORD#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'WORD_TO_SINT';
IF WORD_TO_SINT(WORD#42) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'WORD_TO_USINT';
IF WORD_TO_USINT(WORD#42) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'WORD_TO_BYTE';
IF WORD_TO_BYTE(WORD#42) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'WORD_TO_STRING';
IF WORD_TO_STRING(WORD#42) <> '16#2a' THEN RETURN; END_IF;
RESULT := 'WORD_TO_INT';
IF WORD_TO_INT(WORD#42) <> INT#42 THEN RETURN; END_IF;
RESULT := 'WORD_TO_UINT';
IF WORD_TO_UINT(WORD#42) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'WORD_TO_DINT';
IF WORD_TO_DINT(WORD#42) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'WORD_TO_UDINT';
IF WORD_TO_UDINT(WORD#42) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'WORD_TO_DWORD';
IF WORD_TO_DWORD(WORD#42) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'WORD_TO_LINT';
IF WORD_TO_LINT(WORD#42) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'WORD_TO_ULINT';
IF WORD_TO_ULINT(WORD#42) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'WORD_TO_LWORD';
IF WORD_TO_LWORD(WORD#42) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'WORD_TO_REAL';
IF WORD_TO_REAL(WORD#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'WORD_TO_LREAL';
IF WORD_TO_LREAL(WORD#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'DINT_TO_BOOL';
IF DINT_TO_BOOL(DINT#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'DINT_TO_SINT';
IF DINT_TO_SINT(DINT#42) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'DINT_TO_USINT';
IF DINT_TO_USINT(DINT#42) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'DINT_TO_BYTE';
IF DINT_TO_BYTE(DINT#42) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'DINT_TO_STRING';
IF DINT_TO_STRING(DINT#42) <> '42' THEN RETURN; END_IF;
RESULT := 'DINT_TO_INT';
IF DINT_TO_INT(DINT#42) <> INT#42 THEN RETURN; END_IF;
RESULT := 'DINT_TO_UINT';
IF DINT_TO_UINT(DINT#42) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'DINT_TO_WORD';
IF DINT_TO_WORD(DINT#42) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'DINT_TO_UDINT';
IF DINT_TO_UDINT(DINT#42) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'DINT_TO_DWORD';
IF DINT_TO_DWORD(DINT#42) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'DINT_TO_LINT';
IF DINT_TO_LINT(DINT#42) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'DINT_TO_ULINT';
IF DINT_TO_ULINT(DINT#42) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'DINT_TO_LWORD';
IF DINT_TO_LWORD(DINT#42) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'DINT_TO_REAL';
IF DINT_TO_REAL(DINT#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'DINT_TO_LREAL';
IF DINT_TO_LREAL(DINT#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_BOOL';
IF UDINT_TO_BOOL(UDINT#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'UDINT_TO_SINT';
IF UDINT_TO_SINT(UDINT#42) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_USINT';
IF UDINT_TO_USINT(UDINT#42) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_BYTE';
IF UDINT_TO_BYTE(UDINT#42) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_STRING';
IF UDINT_TO_STRING(UDINT#42) <> '42' THEN RETURN; END_IF;
RESULT := 'UDINT_TO_INT';
IF UDINT_TO_INT(UDINT#42) <> INT#42 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_UINT';
IF UDINT_TO_UINT(UDINT#42) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_WORD';
IF UDINT_TO_WORD(UDINT#42) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_DINT';
IF UDINT_TO_DINT(UDINT#42) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_DWORD';
IF UDINT_TO_DWORD(UDINT#42) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_LINT';
IF UDINT_TO_LINT(UDINT#42) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_ULINT';
IF UDINT_TO_ULINT(UDINT#42) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_LWORD';
IF UDINT_TO_LWORD(UDINT#42) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_REAL';
IF UDINT_TO_REAL(UDINT#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'UDINT_TO_LREAL';
IF UDINT_TO_LREAL(UDINT#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_BOOL';
IF DWORD_TO_BOOL(DWORD#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'DWORD_TO_SINT';
IF DWORD_TO_SINT(DWORD#42) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_USINT';
IF DWORD_TO_USINT(DWORD#42) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_BYTE';
IF DWORD_TO_BYTE(DWORD#42) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_STRING';
IF DWORD_TO_STRING(DWORD#42) <> '16#2a' THEN RETURN; END_IF;
RESULT := 'DWORD_TO_INT';
IF DWORD_TO_INT(DWORD#42) <> INT#42 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_UINT';
IF DWORD_TO_UINT(DWORD#42) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_WORD';
IF DWORD_TO_WORD(DWORD#42) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_DINT';
IF DWORD_TO_DINT(DWORD#42) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_UDINT';
IF DWORD_TO_UDINT(DWORD#42) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_LINT';
IF DWORD_TO_LINT(DWORD#42) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_ULINT';
IF DWORD_TO_ULINT(DWORD#42) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_LWORD';
IF DWORD_TO_LWORD(DWORD#42) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_REAL';
IF DWORD_TO_REAL(DWORD#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'DWORD_TO_LREAL';
IF DWORD_TO_LREAL(DWORD#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'LINT_TO_BOOL';
IF LINT_TO_BOOL(LINT#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'LINT_TO_SINT';
IF LINT_TO_SINT(LINT#42) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'LINT_TO_USINT';
IF LINT_TO_USINT(LINT#42) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'LINT_TO_BYTE';
IF LINT_TO_BYTE(LINT#42) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'LINT_TO_STRING';
IF LINT_TO_STRING(LINT#42) <> '42' THEN RETURN; END_IF;
RESULT := 'LINT_TO_INT';
IF LINT_TO_INT(LINT#42) <> INT#42 THEN RETURN; END_IF;
RESULT := 'LINT_TO_UINT';
IF LINT_TO_UINT(LINT#42) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'LINT_TO_WORD';
IF LINT_TO_WORD(LINT#42) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'LINT_TO_DINT';
IF LINT_TO_DINT(LINT#42) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'LINT_TO_UDINT';
IF LINT_TO_UDINT(LINT#42) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'LINT_TO_DWORD';
IF LINT_TO_DWORD(LINT#42) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'LINT_TO_ULINT';
IF LINT_TO_ULINT(LINT#42) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'LINT_TO_LWORD';
IF LINT_TO_LWORD(LINT#42) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'LINT_TO_REAL';
IF LINT_TO_REAL(LINT#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'LINT_TO_LREAL';
IF LINT_TO_LREAL(LINT#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_BOOL';
IF ULINT_TO_BOOL(ULINT#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'ULINT_TO_SINT';
IF ULINT_TO_SINT(ULINT#42) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_USINT';
IF ULINT_TO_USINT(ULINT#42) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_BYTE';
IF ULINT_TO_BYTE(ULINT#42) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_STRING';
IF ULINT_TO_STRING(ULINT#42) <> '42' THEN RETURN; END_IF;
RESULT := 'ULINT_TO_INT';
IF ULINT_TO_INT(ULINT#42) <> INT#42 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_UINT';
IF ULINT_TO_UINT(ULINT#42) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_WORD';
IF ULINT_TO_WORD(ULINT#42) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_DINT';
IF ULINT_TO_DINT(ULINT#42) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_UDINT';
IF ULINT_TO_UDINT(ULINT#42) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_DWORD';
IF ULINT_TO_DWORD(ULINT#42) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_LINT';
IF ULINT_TO_LINT(ULINT#42) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_LWORD';
IF ULINT_TO_LWORD(ULINT#42) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_REAL';
IF ULINT_TO_REAL(ULINT#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'ULINT_TO_LREAL';
IF ULINT_TO_LREAL(ULINT#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_BOOL';
IF LWORD_TO_BOOL(LWORD#42) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'LWORD_TO_SINT';
IF LWORD_TO_SINT(LWORD#42) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_USINT';
IF LWORD_TO_USINT(LWORD#42) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_BYTE';
IF LWORD_TO_BYTE(LWORD#42) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_STRING';
IF LWORD_TO_STRING(LWORD#42) <> '16#2a' THEN RETURN; END_IF;
RESULT := 'LWORD_TO_INT';
IF LWORD_TO_INT(LWORD#42) <> INT#42 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_UINT';
IF LWORD_TO_UINT(LWORD#42) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_WORD';
IF LWORD_TO_WORD(LWORD#42) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_DINT';
IF LWORD_TO_DINT(LWORD#42) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_UDINT';
IF LWORD_TO_UDINT(LWORD#42) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_DWORD';
IF LWORD_TO_DWORD(LWORD#42) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_LINT';
IF LWORD_TO_LINT(LWORD#42) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_ULINT';
IF LWORD_TO_ULINT(LWORD#42) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_REAL';
IF LWORD_TO_REAL(LWORD#42) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'LWORD_TO_LREAL';
IF LWORD_TO_LREAL(LWORD#42) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'REAL_TO_BOOL';
IF REAL_TO_BOOL(REAL#42.0) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'REAL_TO_SINT';
IF REAL_TO_SINT(REAL#42.0) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_USINT';
IF REAL_TO_USINT(REAL#42.0) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_BYTE';
IF REAL_TO_BYTE(REAL#42.0) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_STRING';
IF REAL_TO_STRING(REAL#42.0) <> '42' THEN RETURN; END_IF;
RESULT := 'REAL_TO_INT';
IF REAL_TO_INT(REAL#42.0) <> INT#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_UINT';
IF REAL_TO_UINT(REAL#42.0) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_WORD';
IF REAL_TO_WORD(REAL#42.0) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_DINT';
IF REAL_TO_DINT(REAL#42.0) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_UDINT';
IF REAL_TO_UDINT(REAL#42.0) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_DWORD';
IF REAL_TO_DWORD(REAL#42.0) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_LINT';
IF REAL_TO_LINT(REAL#42.0) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_ULINT';
IF REAL_TO_ULINT(REAL#42.0) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_LWORD';
IF REAL_TO_LWORD(REAL#42.0) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'REAL_TO_LREAL';
IF REAL_TO_LREAL(REAL#42.0) <> LREAL#42.0 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_BOOL';
IF LREAL_TO_BOOL(LREAL#42.0) <> BOOL#TRUE THEN RETURN; END_IF;
RESULT := 'LREAL_TO_SINT';
IF LREAL_TO_SINT(LREAL#42.0) <> SINT#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_USINT';
IF LREAL_TO_USINT(LREAL#42.0) <> USINT#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_BYTE';
IF LREAL_TO_BYTE(LREAL#42.0) <> BYTE#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_STRING';
IF LREAL_TO_STRING(LREAL#42.0) <> '42' THEN RETURN; END_IF;
RESULT := 'LREAL_TO_INT';
IF LREAL_TO_INT(LREAL#42.0) <> INT#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_UINT';
IF LREAL_TO_UINT(LREAL#42.0) <> UINT#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_WORD';
IF LREAL_TO_WORD(LREAL#42.0) <> WORD#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_DINT';
IF LREAL_TO_DINT(LREAL#42.0) <> DINT#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_UDINT';
IF LREAL_TO_UDINT(LREAL#42.0) <> UDINT#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_DWORD';
IF LREAL_TO_DWORD(LREAL#42.0) <> DWORD#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_LINT';
IF LREAL_TO_LINT(LREAL#42.0) <> LINT#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_ULINT';
IF LREAL_TO_ULINT(LREAL#42.0) <> ULINT#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_LWORD';
IF LREAL_TO_LWORD(LREAL#42.0) <> LWORD#42 THEN RETURN; END_IF;
RESULT := 'LREAL_TO_REAL';
IF LREAL_TO_REAL(LREAL#42.0) <> REAL#42.0 THEN RETURN; END_IF;
RESULT := 'OK';
]]></xhtml:p>
</ST>
</body>
</pou>
<pou name="main_test" pouType="program">
<interface>
<localVars>
<variable name="RUN">
<type>
<BOOL/>
</type>
<initialValue>
<simpleValue value="TRUE"/>
</initialValue>
</variable>
<variable name="RESULT">
<type>
<string/>
</type>
</variable>
<variable name="CONVERSION_TEST0">
<type>
<derived name="CONVERSION_TEST"/>
</type>
</variable>
<variable name="R_TRIG0">
<type>
<derived name="R_TRIG"/>
</type>
</variable>
<variable name="LOGGER0">
<type>
<derived name="LOGGER"/>
</type>
</variable>
<variable name="TEMPO_TEST0">
<type>
<derived name="TEMPO_TEST"/>
</type>
</variable>
<variable name="LOGGER1">
<type>
<derived name="LOGGER"/>
</type>
</variable>
<variable name="SR0">
<type>
<derived name="SR"/>
</type>
</variable>
<variable name="SR1">
<type>
<derived name="SR"/>
</type>
</variable>
<variable name="LOGGER2">
<type>
<derived name="LOGGER"/>
</type>
</variable>
</localVars>
</interface>
<body>
<FBD>
<block localId="4" typeName="CONVERSION_TEST" instanceName="CONVERSION_TEST0" executionOrderId="0" height="72" width="136">
<position x="320" y="280"/>
<inputVariables>
<variable formalParameter="EN">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="5" formalParameter="Q">
<position x="320" y="312"/>
<position x="264" y="312"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="ENO">
<connectionPointOut>
<relPosition x="136" y="32"/>
</connectionPointOut>
</variable>
<variable formalParameter="RESULT">
<connectionPointOut>
<relPosition x="136" y="56"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<block localId="5" typeName="R_TRIG" instanceName="R_TRIG0" executionOrderId="0" height="48" width="64">
<position x="200" y="280"/>
<inputVariables>
<variable formalParameter="CLK">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="6">
<position x="200" y="312"/>
<position x="168" y="312"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="Q">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<inVariable localId="6" executionOrderId="0" height="32" width="48" negated="false">
<position x="120" y="296"/>
<connectionPointOut>
<relPosition x="48" y="16"/>
</connectionPointOut>
<expression>TRUE</expression>
</inVariable>
<block localId="8" typeName="LOGGER" instanceName="LOGGER0" executionOrderId="0" height="112" width="64">
<position x="848" y="304"/>
<inputVariables>
<variable formalParameter="TRIG">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="4" formalParameter="ENO">
<position x="848" y="336"/>
<position x="760" y="336"/>
<position x="760" y="312"/>
<position x="456" y="312"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="MSG">
<connectionPointIn>
<relPosition x="0" y="64"/>
<connection refLocalId="11" formalParameter="OUT">
<position x="848" y="368"/>
<position x="736" y="368"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="LEVEL">
<connectionPointIn>
<relPosition x="0" y="96"/>
<connection refLocalId="10">
<position x="848" y="400"/>
<position x="816" y="400"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables/>
</block>
<inVariable localId="9" executionOrderId="0" height="32" width="128" negated="false">
<position x="512" y="352"/>
<connectionPointOut>
<relPosition x="128" y="16"/>
</connectionPointOut>
<expression>'CONVERSION: '</expression>
</inVariable>
<inVariable localId="10" executionOrderId="0" height="32" width="56" negated="false">
<position x="760" y="384"/>
<connectionPointOut>
<relPosition x="56" y="16"/>
</connectionPointOut>
<expression>DEBUG</expression>
</inVariable>
<block localId="11" typeName="CONCAT" executionOrderId="0" height="64" width="64">
<position x="672" y="336"/>
<inputVariables>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="9">
<position x="672" y="368"/>
<position x="640" y="368"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="56"/>
<connection refLocalId="4" formalParameter="RESULT">
<position x="672" y="392"/>
<position x="480" y="392"/>
<position x="480" y="336"/>
<position x="456" y="336"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<comment localId="12" height="40" width="248">
<position x="88" y="216"/>
<content>
<xhtml:p><![CDATA[Execute only on first cycle]]></xhtml:p>
</content>
</comment>
<comment localId="1" height="40" width="248">
<position x="576" y="216"/>
<content>
<xhtml:p><![CDATA[Log when just executed]]></xhtml:p>
</content>
</comment>
<block localId="13" typeName="TEMPO_TEST" instanceName="TEMPO_TEST0" executionOrderId="0" height="64" width="96">
<position x="336" y="600"/>
<inputVariables>
<variable formalParameter="RUN">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="16">
<position x="336" y="632"/>
<position x="248" y="632"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="VALID">
<connectionPointOut>
<relPosition x="96" y="32"/>
</connectionPointOut>
</variable>
<variable formalParameter="RESULT">
<connectionPointOut>
<relPosition x="96" y="56"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<block localId="2" typeName="LOGGER" instanceName="LOGGER1" executionOrderId="0" height="112" width="64">
<position x="824" y="624"/>
<inputVariables>
<variable formalParameter="TRIG">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="13" formalParameter="VALID">
<position x="824" y="656"/>
<position x="736" y="656"/>
<position x="736" y="632"/>
<position x="432" y="632"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="MSG">
<connectionPointIn>
<relPosition x="0" y="64"/>
<connection refLocalId="14" formalParameter="OUT">
<position x="824" y="688"/>
<position x="712" y="688"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="LEVEL">
<connectionPointIn>
<relPosition x="0" y="96"/>
<connection refLocalId="7">
<position x="824" y="720"/>
<position x="792" y="720"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables/>
</block>
<inVariable localId="3" executionOrderId="0" height="32" width="128" negated="false">
<position x="488" y="672"/>
<connectionPointOut>
<relPosition x="128" y="16"/>
</connectionPointOut>
<expression>'TEMPO: '</expression>
</inVariable>
<inVariable localId="7" executionOrderId="0" height="32" width="56" negated="false">
<position x="736" y="704"/>
<connectionPointOut>
<relPosition x="56" y="16"/>
</connectionPointOut>
<expression>DEBUG</expression>
</inVariable>
<block localId="14" typeName="CONCAT" executionOrderId="0" height="64" width="64">
<position x="648" y="656"/>
<inputVariables>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="3">
<position x="648" y="688"/>
<position x="616" y="688"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="56"/>
<connection refLocalId="13" formalParameter="RESULT">
<position x="648" y="712"/>
<position x="464" y="712"/>
<position x="464" y="656"/>
<position x="432" y="656"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<comment localId="15" height="40" width="248">
<position x="536" y="536"/>
<content>
<xhtml:p><![CDATA[Log when valid]]></xhtml:p>
</content>
</comment>
<inVariable localId="16" executionOrderId="0" height="32" width="48" negated="false">
<position x="200" y="616"/>
<connectionPointOut>
<relPosition x="48" y="16"/>
</connectionPointOut>
<expression>TRUE</expression>
</inVariable>
<block localId="17" typeName="AND" executionOrderId="0" height="64" width="64">
<position x="1016" y="568"/>
<inputVariables>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="13" formalParameter="VALID">
<position x="1016" y="600"/>
<position x="736" y="600"/>
<position x="736" y="632"/>
<position x="432" y="632"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="56"/>
<connection refLocalId="18" formalParameter="OUT">
<position x="1016" y="624"/>
<position x="990" y="624"/>
<position x="990" y="752"/>
<position x="976" y="752"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<block localId="18" typeName="EQ" executionOrderId="0" height="64" width="64">
<position x="912" y="720"/>
<inputVariables>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="13" formalParameter="RESULT">
<position x="912" y="752"/>
<position x="464" y="752"/>
<position x="464" y="656"/>
<position x="432" y="656"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="56"/>
<connection refLocalId="19">
<position x="912" y="776"/>
<position x="864" y="776"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<inVariable localId="19" executionOrderId="0" height="32" width="48" negated="false">
<position x="816" y="760"/>
<connectionPointOut>
<relPosition x="48" y="16"/>
</connectionPointOut>
<expression>'OK'</expression>
</inVariable>
<block localId="20" typeName="SR" instanceName="SR0" executionOrderId="0" height="64" width="48">
<position x="1120" y="568"/>
<inputVariables>
<variable formalParameter="S1">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="17" formalParameter="OUT">
<position x="1120" y="600"/>
<position x="1080" y="600"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="R">
<connectionPointIn>
<relPosition x="0" y="56"/>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="Q1">
<connectionPointOut>
<relPosition x="48" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<block localId="21" typeName="AND" executionOrderId="0" height="64" width="64">
<position x="1296" y="496"/>
<inputVariables>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="23" formalParameter="Q1">
<position x="1296" y="528"/>
<position x="1256" y="528"/>
<position x="1256" y="272"/>
<position x="1192" y="272"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="56"/>
<connection refLocalId="20" formalParameter="Q1">
<position x="1296" y="552"/>
<position x="1232" y="552"/>
<position x="1232" y="600"/>
<position x="1168" y="600"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<block localId="22" typeName="AND" executionOrderId="0" height="64" width="64">
<position x="1040" y="240"/>
<inputVariables>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="4" formalParameter="ENO">
<position x="1040" y="272"/>
<position x="760" y="272"/>
<position x="760" y="312"/>
<position x="456" y="312"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="56"/>
<connection refLocalId="24" formalParameter="OUT">
<position x="1040" y="296"/>
<position x="1014" y="296"/>
<position x="1014" y="424"/>
<position x="1000" y="424"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<block localId="23" typeName="SR" instanceName="SR1" executionOrderId="0" height="64" width="48">
<position x="1144" y="240"/>
<inputVariables>
<variable formalParameter="S1">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="22" formalParameter="OUT">
<position x="1144" y="272"/>
<position x="1104" y="272"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="R">
<connectionPointIn>
<relPosition x="0" y="56"/>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="Q1">
<connectionPointOut>
<relPosition x="48" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<block localId="24" typeName="EQ" executionOrderId="0" height="64" width="64">
<position x="936" y="392"/>
<inputVariables>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="4" formalParameter="RESULT">
<position x="936" y="424"/>
<position x="480" y="424"/>
<position x="480" y="336"/>
<position x="456" y="336"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="56"/>
<connection refLocalId="25">
<position x="936" y="448"/>
<position x="888" y="448"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<inVariable localId="25" executionOrderId="0" height="32" width="48" negated="false">
<position x="840" y="432"/>
<connectionPointOut>
<relPosition x="48" y="16"/>
</connectionPointOut>
<expression>'OK'</expression>
</inVariable>
<inVariable localId="26" executionOrderId="0" height="32" width="56" negated="false">
<position x="1464" y="576"/>
<connectionPointOut>
<relPosition x="56" y="16"/>
</connectionPointOut>
<expression>DEBUG</expression>
</inVariable>
<block localId="27" typeName="LOGGER" instanceName="LOGGER2" executionOrderId="0" height="112" width="64">
<position x="1552" y="496"/>
<inputVariables>
<variable formalParameter="TRIG">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="21" formalParameter="OUT">
<position x="1552" y="528"/>
<position x="1360" y="528"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="MSG">
<connectionPointIn>
<relPosition x="0" y="64"/>
<connection refLocalId="28">
<position x="1552" y="560"/>
<position x="1512" y="560"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="LEVEL">
<connectionPointIn>
<relPosition x="0" y="96"/>
<connection refLocalId="26">
<position x="1552" y="592"/>
<position x="1520" y="592"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables/>
</block>
<inVariable localId="28" executionOrderId="0" height="32" width="128" negated="false">
<position x="1384" y="544"/>
<connectionPointOut>
<relPosition x="128" y="16"/>
</connectionPointOut>
<expression>'ALL TESTS OK'</expression>
</inVariable>
<comment localId="29" height="144" width="504">
<position x="80" y="32"/>
<content>
<xhtml:p><![CDATA[This tests some IEC-61131 languages and standard library.
BEREMIZ_TEST_CYCLES CFLAG is used here.
- pre-defined PLC cycles all run with no pause
- time is emulated]]></xhtml:p>
</content>
</comment>
</FBD>
</body>
</pou>
<pou name="TEMPO_TEST" pouType="functionBlock">
<interface>
<inputVars>
<variable name="RUN">
<type>
<BOOL/>
</type>
</variable>
</inputVars>
<outputVars>
<variable name="VALID">
<type>
<BOOL/>
</type>
</variable>
<variable name="RESULT">
<type>
<string/>
</type>
</variable>
</outputVars>
<localVars>
<variable name="TON0">
<type>
<derived name="TON"/>
</type>
</variable>
<variable name="R_TRIG0">
<type>
<derived name="R_TRIG"/>
</type>
</variable>
<variable name="R_TRIG1">
<type>
<derived name="R_TRIG"/>
</type>
</variable>
<variable name="RTC1">
<type>
<derived name="RTC"/>
</type>
</variable>
<variable name="START_TIME">
<type>
<DT/>
</type>
</variable>
<variable name="MEASURED_DURATION">
<type>
<TIME/>
</type>
</variable>
</localVars>
</interface>
<body>
<FBD>
<block localId="2" typeName="TON" instanceName="TON0" executionOrderId="0" height="64" width="48">
<position x="296" y="440"/>
<inputVariables>
<variable formalParameter="IN">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="9">
<position x="296" y="472"/>
<position x="256" y="472"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="PT">
<connectionPointIn>
<relPosition x="0" y="56"/>
<connection refLocalId="17">
<position x="296" y="496"/>
<position x="208" y="496"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="Q">
<connectionPointOut>
<relPosition x="48" y="32"/>
</connectionPointOut>
</variable>
<variable formalParameter="ET">
<connectionPointOut>
<relPosition x="48" y="56"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<block localId="3" typeName="R_TRIG" instanceName="R_TRIG0" executionOrderId="0" height="48" width="64">
<position x="152" y="288"/>
<inputVariables>
<variable formalParameter="CLK">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="8">
<position x="152" y="320"/>
<position x="120" y="320"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="Q">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<block localId="4" typeName="R_TRIG" instanceName="R_TRIG1" executionOrderId="0" height="48" width="64">
<position x="384" y="440"/>
<inputVariables>
<variable formalParameter="CLK">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="2" formalParameter="Q">
<position x="384" y="472"/>
<position x="344" y="472"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="Q">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<block localId="5" typeName="RTC" instanceName="RTC1" executionOrderId="0" height="64" width="64">
<position x="80" y="184"/>
<inputVariables>
<variable formalParameter="IN">
<connectionPointIn>
<relPosition x="0" y="32"/>
</connectionPointIn>
</variable>
<variable formalParameter="PDT">
<connectionPointIn>
<relPosition x="0" y="56"/>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="Q">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
<variable formalParameter="CDT">
<connectionPointOut>
<relPosition x="64" y="56"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<connector name="now" localId="7" height="32" width="72">
<position x="176" y="224"/>
<connectionPointIn>
<relPosition x="0" y="16"/>
<connection refLocalId="5" formalParameter="CDT">
<position x="176" y="240"/>
<position x="144" y="240"/>
</connection>
</connectionPointIn>
</connector>
<continuation name="now" localId="1" height="32" width="72">
<position x="496" y="488"/>
<connectionPointOut>
<relPosition x="72" y="16"/>
</connectionPointOut>
</continuation>
<inVariable localId="8" executionOrderId="0" height="32" width="40" negated="false">
<position x="80" y="304"/>
<connectionPointOut>
<relPosition x="40" y="16"/>
</connectionPointOut>
<expression>RUN</expression>
</inVariable>
<inVariable localId="9" executionOrderId="0" height="32" width="40" negated="false">
<position x="216" y="456"/>
<connectionPointOut>
<relPosition x="40" y="16"/>
</connectionPointOut>
<expression>RUN</expression>
</inVariable>
<inVariable localId="10" executionOrderId="0" height="32" width="80" negated="false">
<position x="344" y="184"/>
<connectionPointOut>
<relPosition x="80" y="16"/>
</connectionPointOut>
<expression>TIME#10s</expression>
</inVariable>
<continuation name="now" localId="11" height="32" width="72">
<position x="232" y="328"/>
<connectionPointOut>
<relPosition x="72" y="16"/>
</connectionPointOut>
</continuation>
<block localId="12" typeName="MOVE" executionOrderId="0" height="64" width="56">
<position x="360" y="288"/>
<inputVariables>
<variable formalParameter="EN">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="3" formalParameter="Q">
<position x="360" y="320"/>
<position x="216" y="320"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN">
<connectionPointIn>
<relPosition x="0" y="56"/>
<connection refLocalId="11">
<position x="360" y="344"/>
<position x="304" y="344"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="ENO">
<connectionPointOut>
<relPosition x="56" y="32"/>
</connectionPointOut>
</variable>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="56" y="56"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<outVariable localId="14" executionOrderId="0" height="32" width="96" negated="false">
<position x="464" y="328"/>
<connectionPointIn>
<relPosition x="0" y="16"/>
<connection refLocalId="12" formalParameter="OUT">
<position x="464" y="344"/>
<position x="416" y="344"/>
</connection>
</connectionPointIn>
<expression>START_TIME</expression>
</outVariable>
<block localId="15" typeName="SUB" executionOrderId="0" height="112" width="64">
<position x="616" y="440"/>
<inputVariables>
<variable formalParameter="EN">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="4" formalParameter="Q">
<position x="616" y="472"/>
<position x="448" y="472"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="64"/>
<connection refLocalId="1">
<position x="616" y="504"/>
<position x="568" y="504"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="96"/>
<connection refLocalId="6">
<position x="616" y="536"/>
<position x="568" y="536"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="ENO">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="64" y="64"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<inVariable localId="6" executionOrderId="0" height="32" width="96" negated="false">
<position x="472" y="520"/>
<connectionPointOut>
<relPosition x="96" y="16"/>
</connectionPointOut>
<expression>START_TIME</expression>
</inVariable>
<comment localId="21" height="120" width="552">
<position x="96" y="32"/>
<content>
<xhtml:p><![CDATA[Test that TON and TOFF work as expected]]></xhtml:p>
</content>
</comment>
<outVariable localId="22" executionOrderId="0" height="32" width="56" negated="false">
<position x="1384" y="456"/>
<connectionPointIn>
<relPosition x="0" y="16"/>
<connection refLocalId="26" formalParameter="ENO">
<position x="1384" y="472"/>
<position x="1328" y="472"/>
</connection>
</connectionPointIn>
<expression>VALID</expression>
</outVariable>
<block localId="13" typeName="SUB" executionOrderId="0" height="112" width="64">
<position x="856" y="440"/>
<inputVariables>
<variable formalParameter="EN">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="15" formalParameter="ENO">
<position x="856" y="472"/>
<position x="680" y="472"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="64"/>
<connection refLocalId="15" formalParameter="OUT">
<position x="856" y="504"/>
<position x="680" y="504"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="96"/>
<connection refLocalId="18">
<position x="856" y="536"/>
<position x="816" y="536"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="ENO">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="64" y="64"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<connector name="duration" localId="23" height="32" width="104">
<position x="496" y="184"/>
<connectionPointIn>
<relPosition x="0" y="16"/>
<connection refLocalId="10">
<position x="496" y="200"/>
<position x="424" y="200"/>
</connection>
</connectionPointIn>
</connector>
<continuation name="duration" localId="17" height="32" width="104">
<position x="104" y="480"/>
<connectionPointOut>
<relPosition x="104" y="16"/>
</connectionPointOut>
</continuation>
<continuation name="duration" localId="18" height="32" width="104">
<position x="712" y="520"/>
<connectionPointOut>
<relPosition x="104" y="16"/>
</connectionPointOut>
</continuation>
<block localId="24" typeName="LT" executionOrderId="0" height="104" width="64">
<position x="1048" y="440"/>
<inputVariables>
<variable formalParameter="EN">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="13" formalParameter="ENO">
<position x="1048" y="472"/>
<position x="920" y="472"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="64"/>
<connection refLocalId="13" formalParameter="OUT">
<position x="1048" y="504"/>
<position x="920" y="504"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="88"/>
<connection refLocalId="19">
<position x="1048" y="528"/>
<position x="1016" y="528"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="ENO">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="64" y="64"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<inVariable localId="19" executionOrderId="0" height="32" width="80" negated="false">
<position x="936" y="512"/>
<connectionPointOut>
<relPosition x="80" y="16"/>
</connectionPointOut>
<expression>TIME#1s</expression>
</inVariable>
<block localId="26" typeName="SEL" executionOrderId="0" height="144" width="64">
<position x="1264" y="440"/>
<inputVariables>
<variable formalParameter="EN">
<connectionPointIn>
<relPosition x="0" y="32"/>
<connection refLocalId="24" formalParameter="ENO">
<position x="1264" y="472"/>
<position x="1112" y="472"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="G">
<connectionPointIn>
<relPosition x="0" y="64"/>
<connection refLocalId="24" formalParameter="OUT">
<position x="1264" y="504"/>
<position x="1112" y="504"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN0">
<connectionPointIn>
<relPosition x="0" y="96"/>
<connection refLocalId="28">
<position x="1264" y="536"/>
<position x="1208" y="536"/>
</connection>
</connectionPointIn>
</variable>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="128"/>
<connection refLocalId="27">
<position x="1264" y="568"/>
<position x="1208" y="568"/>
</connection>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="ENO">
<connectionPointOut>
<relPosition x="64" y="32"/>
</connectionPointOut>
</variable>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="64" y="64"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<inVariable localId="27" executionOrderId="0" height="32" width="56" negated="false">
<position x="1152" y="552"/>
<connectionPointOut>
<relPosition x="56" y="16"/>
</connectionPointOut>
<expression>'OK'</expression>
</inVariable>
<inVariable localId="28" executionOrderId="0" height="32" width="56" negated="false">
<position x="1152" y="520"/>
<connectionPointOut>
<relPosition x="56" y="16"/>
</connectionPointOut>
<expression>'BAD'</expression>
</inVariable>
<outVariable localId="29" executionOrderId="0" height="32" width="64" negated="false">
<position x="1384" y="488"/>
<connectionPointIn>
<relPosition x="0" y="16"/>
<connection refLocalId="26" formalParameter="OUT">
<position x="1384" y="504"/>
<position x="1328" y="504"/>
</connection>
</connectionPointIn>
<expression>RESULT</expression>
</outVariable>
</FBD>
</body>
</pou>
</pous>
</types>
<instances>
<configurations>
<configuration name="config">
<resource name="resource1">
<task name="task0" priority="0" interval="T#20ms">
<pouInstance name="instance0" typeName="main_test"/>
</task>
</resource>
</configuration>
</configurations>
</instances>
</project>