<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Awlsim project file generated by awlsim-0.66.0-pre -->
<awlsim_project date_create="2018-02-19 20:48:29.703161"
                date_modify="2018-07-08 18:00:16.840889"
                format_version="1">
	<!-- CPU core configuration -->
	<cpu>
		<!-- CPU core feature specification -->
		<specs call_stack_size="256"
		       nr_accus="2"
		       nr_counters="256"
		       nr_flags="2048"
		       nr_inputs="128"
		       nr_localbytes="1024"
		       nr_outputs="128"
		       nr_timers="256"
		       parenthesis_stack_size="7" />

		<!-- CPU core configuration -->
		<config clock_memory_byte="-1"
		        cycle_time_limit_us="1000000"
		        ext_insns_enable="1"
		        mnemonics="2"
		        ob_startinfo_enable="0"
		        run_time_limit_us="-1" />
	</cpu>

	<!-- AWL/STL language configuration -->
	<language_awl>
		<!-- AWL/STL source code -->
		<source enabled="1"
		        name="Main source"
		        type="0"><![CDATA[
FUNCTION FC 1 : VOID
BEGIN
	// Set PWM0
	// The magic value is checked by the fake PiXtend-Spidev module
	L		W#16#1337
	T		PAW 42
	
	// Set PWM1
	// The magic value is checked by the fake PiXtend-Spidev module
	L		W#16#4224
	T		PAW 420
	
	
	// Check AI0
	// The fake PiXtend spidev module always reports 1 V
	L		PEW 42
	L		2754
	__ASSERT==	__ACCU 1,	__ACCU 2
	
	// Check AI1
	// The fake PiXtend spidev module always reports 2 V
	L		PEW 420
	L		5535
	__ASSERT==	__ACCU 1,	__ACCU 2
	
END_FUNCTION


ORGANIZATION_BLOCK OB 1
BEGIN
	CALL		FC 1
	
	// If we ran 5 test cycles then exit.                                                                              
	L		MW 100
	+		1
	T		MW 100
	L		5
	<I
	BEB
	CALL            SFC 46 // Exit test; Stop CPU.
END_ORGANIZATION_BLOCK


ORGANIZATION_BLOCK OB 100
BEGIN
	L		0
	T		MW 100
	CALL		FC 1
END_ORGANIZATION_BLOCK
]]></source>
	</language_awl>

	<!-- Symbol table configuration -->
	<symbols>
		<!-- symbol table source code -->
		<source enabled="1"
		        name="Main table"
		        type="3"><![CDATA[

]]></source>
	</symbols>

	<!-- Core server link configuration -->
	<core_link>
		<!-- Locally spawned core server -->
		<spawn_local enable="1"
		             interpreters="$DEFAULT"
		             port_range_begin="4183"
		             port_range_end="8278" />

		<!-- Remote server connection -->
		<connect host="localhost"
		         port="4151"
		         timeout_ms="3000" />

		<!-- Transport tunnel -->
		<tunnel local_port="-1"
		        type="0">
			<ssh executable="ssh"
			     port="22"
			     user="pi" />
		</tunnel>
	</core_link>

	<!-- Hardware modules configuration -->
	<hardware>
		<!-- Loaded hardware module -->
		<module name="pixtend">
			<params>
				<param name="analogIn0_10V"
				       value="True" />
				<param name="analogIn0_addr"
				       value="EW 42" />
				<param name="analogIn0_nos"
				       value="10" />
				<param name="analogIn1_10V"
				       value="True" />
				<param name="analogIn1_addr"
				       value="EW 420" />
				<param name="analogIn1_nos"
				       value="10" />
				<param name="analogIn2_addr" />
				<param name="analogIn2_nos"
				       value="10" />
				<param name="analogIn3_addr" />
				<param name="analogIn3_nos"
				       value="10" />
				<param name="analogIn_kHz"
				       value="125" />
				<param name="analogOut0_addr" />
				<param name="analogOut1_addr" />
				<param name="digitalIn0_addr" />
				<param name="digitalIn1_addr" />
				<param name="digitalIn2_addr" />
				<param name="digitalIn3_addr" />
				<param name="digitalIn4_addr" />
				<param name="digitalIn5_addr" />
				<param name="digitalIn6_addr" />
				<param name="digitalIn7_addr" />
				<param name="digitalOut0_addr" />
				<param name="digitalOut1_addr" />
				<param name="digitalOut2_addr" />
				<param name="digitalOut3_addr" />
				<param name="digitalOut4_addr" />
				<param name="digitalOut5_addr" />
				<param name="enabled"
				       value="True" />
				<param name="gpio0_addr" />
				<param name="gpio1_addr" />
				<param name="gpio2_addr" />
				<param name="gpio3_addr" />
				<param name="inputAddressBase"
				       value="0" />
				<param name="outputAddressBase"
				       value="0" />
				<param name="pollIntMs"
				       value="25" />
				<param name="pwm0_addr"
				       value="AW 42" />
				<param name="pwm1_addr"
				       value="AW 420" />
				<param name="pwm_baseFreqHz"
				       value="16000000" />
				<param name="pwm_period" />
				<param name="pwm_servoMode"
				       value="False" />
				<param name="relay0_addr" />
				<param name="relay1_addr" />
				<param name="relay2_addr" />
				<param name="relay3_addr" />
				<param name="rs485"
				       value="False" />
				<param name="testMode"
				       value="False" />
			</params>
		</module>
	</hardware>

	<!-- Graphical user interface configuration -->
	<gui>
		<editor autoindent="1"
		        paste_autoindent="1"
		        validation="1" />
	</gui>
</awlsim_project>
