<root>
<document schema='101' license='1,NormanSchroeder1,0BN03P' title='' description='' target='ARM.AT91SAM7S.AT91SAM7S512_64' >
	<config data='' clkspd='47923200' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='0' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='6' />
			<data name='dataport' value='1' />
			<data name='databit' value='7' />
			<data name='ghostype' value='0' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
			<data name='anlpres' value='255' />
			<data name='digmask1' value='-1' />
			<data name='digmask2' value='-1' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='Touch_DC1' />
		<watch expr='Touch_DC2' />
		<watch expr='Touch_len' />
		<watch expr='Touch_DataByte_0' />
		<watch expr='Touch_DataByte_1' />
		<watch expr='Touch_DataByte_2' />
		<watch expr='Touch_OpenTouchMakro_Nr' />
		<watch expr='Touch_bcc' />
	</debug>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='0' iconpath='' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='SPI_Timer1' type='u32' description='' isconst='0' isinit='1' usrinit='1000' setinit='1000' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_2_MCP23S17_In_2' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_2_MCP23S17_Out_2' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_0_Task__UART0_HMI_Counter' type='u16' description='Zähl Variable zum Erfassen der Task Cyclen' isconst='0' isinit='1' usrinit='50' setinit='50' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_2_MCP23S17_In_1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_2_MCP23S17_Out_1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_2_MCP23S17_In_0' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_2_MCP23S17_Out_0' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='PWM_Cycle_Counter' type='u32' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_PWM_Frequency' type='u8' description='Aktueller skalierter PWM Wert' isconst='0' isinit='1' usrinit='250' setinit='250' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_9_Timer1' type='u16' description='Value for Timer' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_PWM0_ManualDriveEN' type='b1' description='Bit zur Auswahl von PWM0 während Handbetrieb über Encoderrad' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_3_Touch_OpenTouchMacroNr' type='u8' description='Nummer des Touch Makros der geöffnet werden soll. (0-255). Danach Marco &quot;OpenTouchMacro&quot; öffnen.' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='s16' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Bit_PortD_7' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_0_Task_SPI_Ethernet_Counter' type='u16' description='' isconst='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='value' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='20' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_1_Error_Code' type='u8' description='Variable mit aktuellem Error-Code. (Ursprung: Circular Buffer 2)' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_Encoder_Value' type='s16' description='Register mit aktuellem Wert von Encoder Handrad (nicht skaliert)' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_3_Touch_ButtonNrRequest' type='u8' description='Gibt Wert aus, welcher Touch Button mit Nummer &quot;X&quot; gedrückt wurde. (0x00=Kein Button gedrückt.) Variable muss nach dem Auslesen wieder auf 0x00 gesetzt werden. Zum Aktivieren in Macro &quot;RequestTouchPressed&quot; springen.' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_0_Cycle_Timer1' type='u16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_PWM2_ManualDriveEN' type='u8' description='Bit zur Auswahl von PWM2 während Handbetrieb über Encoderrad' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_3_Touch_Bit_SBUFpin' type='b1' description='Status des SBUF Pins von Touch Display' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_0_D7_ExtTimer_500ms_Trigger' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_0_TaskCycle_Timer1' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_PWM1_ManualDriveEN' type='u8' description='Bit zur Auswahl von PWM1 während Handbetrieb über Encoderrad' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='PortD_Data' type='u8' description='Port D Statusbyte.' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_0_Task_SPI_IO_Counter' type='u16' description='' isconst='0' isinit='1' usrinit='5' setinit='5' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_PWM_Speed1_Frequency' type='u8' description='Speed 1 = ca. 0,02 mm/sec.' isconst='0' isinit='1' usrinit='50' setinit='50' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_PWM2_Dir_Bit' type='b1' description='Bit zur Drehrichtungswahl von PWM2' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_0_D6_ExtTimer_31ms' type='b1' description='Signal of Timer 2 (62ms)' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_0_D6_ExtTimer_31ms_Trigger' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='VAL' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_PWM_Speed2_Frequency' type='u8' description='Speed 2 = ca. 0,1 mm/sec.' isconst='0' isinit='1' usrinit='100' setinit='100' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_PWM_Speed3_Frequency' type='u8' description='' isconst='0' isinit='1' usrinit='200' setinit='200' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_PWM0_Dir_Bit' type='b1' description='Bit zur Drehrichtungswahl von PWM0' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_PWM1_Dir_Bit' type='b1' description='Bit zur Drehrichtungswahl von PWM1' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_4_PWM_EN_Bit' type='b1' description='Bit zur Aktivierung von allen PWM Achsen (EN Eingang)' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_1_Error_Code_Bit' type='b1' description='Statusbit zum Signalisieren dass ein Error-Code im Speicher ist.' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='PWM_High_Low_active' type='b1' description='High active = 1  / Low active = 0' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='True' type='s16' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SPI_Timer2' type='u32' description='' isconst='0' isinit='1' usrinit='40000' setinit='40000' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_2_MCP23S17_In_3' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_2_MCP23S17_Out_3' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='_0_D7_ExtTimer_500ms' type='b1' description='Signal of Timer 1 (1s)' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Touch_10_Sub_RequestTouchPressed' description='Subroutine zum Abfragen ob ein Touch Button betätigt wurde. Über Variable ausgegeben wird die Nummer des Touch Buttons. (0x00 = Kein Touch Button betätigt.) 
Variable: _2_TouchMacro_ButtonNrRequest
' >
						<local name='TempData_0' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='TempData_1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='
********** Subroutine: Serial Request is a Touch Button pressed ? **********

Changeable Values: Values of 3 Error Codes

comes from:
Macro -&gt; _X10_Main_Program_Start

Programm function detail:
- Have Circular Buffer 1 (RXD Memory) Index received 5 bytes (ACK_DC1_len_Data_bcc)
- Compare received bytes (&quot;ACK_DC1_len_Data_ not bcc&quot;) and write &quot;Data&quot; Byte to Output Variable
- Reset Variables &amp; Circular Buffer 1 (RXD Memory)

Out Variables:
TouchMacro_ButtonNrRequest ==&gt; Number of the Touch macro wich was pressed (0x00h=No Button pressed)
' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='-------------------- Have Circular Buffer 1 (RXD Memory) Index received 5 bytes (&quot;ACK_DC1_len_Data_bcc&quot;) --------------------                   ' textarea='36,16,36,16' />
						<command class_type='call' title=' write Index of Circular Buffer 1 (RXD Memory)  in Variable' component='UART0_RXD_Memory' macro='GetNumberBytes' >
							<return exp='.TempData_0' />
						</command>
						<command class_type='decision' title='All Bytes Received ?' exp='.TempData_0 = 5' swap='0' >
							<flowline >
								<command class_type='comment' title='' comment='-------------------- Compare received bytes (&quot;ACK_DC1_len_Data_ not bcc&quot;) and write &quot;Data&quot; Byte to Output Variable --------------------   
' textarea='36,8,36,8' />
								<command class_type='comment' title='' comment='Read and Compare Touch &quot;ACK&quot; Byte' textarea='12,0,12,0' />
								<command class_type='call' title=' write 1. Byte of Circular Buffer 1 (RXD Memory)  in Variable' textarea='41,5,41,5' component='UART0_RXD_Memory' macro='GetByte' >
									<return exp='.TempData_1' />
								</command>
								<command class_type='decision' title='&quot;ACK&quot; ok ?' exp='.TempData_1 = 0x06' swap='0' >
									<flowline >
										<command class_type='comment' title='' comment='Read &amp; Compare Touch &quot;DC1&quot; Byte' textarea='36,18,36,18' />
										<command class_type='call' title=' write 2. Byte of Circular Buffer 1 (RXD Memory)  in Variable' component='UART0_RXD_Memory' macro='GetByte' >
											<return exp='.TempData_1' />
										</command>
										<command class_type='decision' title='&quot;DC1&quot; ok ?' exp='.TempData_1 = 0x11' swap='0' >
											<flowline >
												<command class_type='comment' title='' comment='Read &amp; Compare Touch &quot;len&quot; Byte' textarea='36,15,36,15' />
												<command class_type='call' title=' write 3. Byte of Circular Buffer 1  (RXD Memory)  in Variable' component='UART0_RXD_Memory' macro='GetByte' >
													<return exp='.TempData_1' />
												</command>
												<command class_type='decision' title='&quot;len&quot; ok ?' exp='.TempData_1 = 0x01' swap='0' >
													<flowline >
														<command class_type='comment' title='' comment='Read &quot;Data&quot; Byte &amp; write to Output Variable' textarea='12,0,12,0' />
														<command class_type='call' title=' write 4. Byte of Circular Buffer 1 (RXD Memory)  in Variable' component='UART0_RXD_Memory' macro='GetByte' >
															<return exp='_3_Touch_ButtonNrRequest' />
														</command>
													</flowline>
													<flowline >
														<command class_type='comment' title='' comment='Error Code &quot;len not OK&quot;' textarea='36,25,36,25' />
														<command class_type='calculation' title='Berechnung' >
															<exp exp='_1_Error_Code = 0x03' />
														</command>
														<command class_type='call' title='Aufruf Komponenten-Makro' component='Error_Code_Memory' macro='PutByte' >
															<argument exp='_1_Error_Code' />
														</command>
													</flowline>
												</command>
											</flowline>
											<flowline >
												<command class_type='comment' title='' comment='Error Code &quot;DC1 not OK&quot;' textarea='46,18,46,18' />
												<command class_type='calculation' title='Berechnung' >
													<exp exp='_1_Error_Code = 0x02' />
												</command>
												<command class_type='call' title='Aufruf Komponenten-Makro' component='Error_Code_Memory' macro='PutByte' >
													<argument exp='_1_Error_Code' />
												</command>
											</flowline>
										</command>
									</flowline>
									<flowline >
										<command class_type='comment' title='' comment='Error Code &quot;ACK not OK&quot;' textarea='36,25,36,25' />
										<command class_type='calculation' title='Berechnung' >
											<exp exp='_1_Error_Code = 0x01' />
										</command>
										<command class_type='call' title='Aufruf Komponenten-Makro' component='Error_Code_Memory' macro='PutByte' >
											<argument exp='_1_Error_Code' />
										</command>
									</flowline>
								</command>
								<command class_type='comment' title='' comment='-------------------- Reset Variables &amp; Circular Buffer 1 (RXD Memory) --------------------                                                             
' textarea='12,0,12,0' />
								<command class_type='call' title='Reset Circular Buffer 1  (RXD Memory) ' component='UART0_RXD_Memory' macro='FlushBuffer' />
							</flowline>
							<flowline >
								<command class_type='comment' title='' comment='    still not 5
Bytes received' textarea='41,10,41,10' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SYS_ComCycleSynchronisation' description='Synchronisierung der Kommunikation.' >
						<command class_type='comment' title='' comment='
********** Communication Task Cycle Synchronisation **********

Changeable Values:
Values of the Task Cycle. Also change Value &quot;Initialer Wert&quot; in Global Variable !!!!!
!!!!! ATTENTION when changing Values !!!!!

comes from:
Macro -&gt; Main

Programm function detail:
- 
- Task Cycle UART0 (INT Pin): HMI request is a Touch Button pressed
- 
- Task Cycle SPI Master 1: Actualisate SPI I/O Status
- Task Cycle SPI-Ethernet (INT Pin): Check for connection

In/Out Variables:
no' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='-------------------- Task Cycle UART1:  --------------------                                                              ' textarea='39,1,39,1' />
						<command class_type='decision' title='Entscheidung' disable='1' exp='0' swap='0' >
							<flowline />
							<flowline />
						</command>
						<command class_type='comment' title='' comment='-------------------- Task Cycle UART0 (INT Pin): HMI request is a Touch Button pressed --------------------                                                              ' textarea='12,0,12,0' />
						<command class_type='decision' title='UART0 - Task Cyclic Activation ?' exp='_0_Task__UART0_HMI_Counter = 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Task Cycle reload' >
									<exp exp='_0_Task__UART0_HMI_Counter = 500' />
								</command>
								<command class_type='call' title='Is a Touch Button pressed ?' macro='Touch_0_InitialiseReadTouch' />
							</flowline>
							<flowline >
								<command class_type='calculation' title='Task Cycle Counter -1' >
									<exp exp='_0_Task__UART0_HMI_Counter = _0_Task__UART0_HMI_Counter - 1' />
								</command>
							</flowline>
						</command>
						<command class_type='comment' title='' comment='-------------------- Task Cycle I2C Master:  --------------------                                                              ' textarea='12,0,12,0' />
						<command class_type='decision' title='Entscheidung' disable='1' exp='0' swap='0' >
							<flowline />
							<flowline />
						</command>
						<command class_type='comment' title='' comment='-------------------- Task Cycle SPI Master 1: Actualisate SPI I/O Status --------------------                                                              ' textarea='12,0,12,0' />
						<command class_type='decision' title='SPI Master 1 - Task Cyclic Activation ?' exp='_0_Task_SPI_IO_Counter = 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Task Cycle reload' >
									<exp exp='_0_Task_SPI_IO_Counter = 250' />
								</command>
								<command class_type='call' title='Actualisate I/O Status' macro='SYS_COM3_SPI_ActualisateIO' />
							</flowline>
							<flowline >
								<command class_type='calculation' title='Task Cycle Counter -1' textarea='36,0,1406,0' >
									<exp exp='_0_Task_SPI_IO_Counter = _0_Task_SPI_IO_Counter - 1' />
								</command>
							</flowline>
						</command>
						<command class_type='comment' title='' comment='-------------------- Task Cycle SPI-Ethernet (INT Pin): Check for connection --------------------                                                              ' textarea='12,0,12,0' />
						<command class_type='decision' title='SPI Ethernet - Task Cyclic Activation ?' exp='_0_Task_SPI_Ethernet_Counter = 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Task Cycle reload' >
									<exp exp='_0_Task_SPI_Ethernet_Counter = 50' />
								</command>
								<command class_type='call' title='Actualisate Ethernet Data Status' macro='_X13_Webserver_activity' />
							</flowline>
							<flowline >
								<command class_type='calculation' title='Task Cycle Counter -1' >
									<exp exp='_0_Task_SPI_Ethernet_Counter = _0_Task_SPI_Ethernet_Counter - 1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='COM1_UART1_RXINT_Test' description='' >
						<command class_type='comment' title='' comment='
----- RXINT0 Interrupt in Software = RXD0 / PA21 Pins !!! -----
----- Component RS232 Channel 1 = UART1 Interface !!! -----
.' textarea='12,0,12,0' />
						<command class_type='output' title='Pin WR EN MAX481' mode='1' port='1048578' mask='128' exp='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Touch_0_RXINT0_ReadTouchData' description='Hardware Interrupt &quot;RXD0&quot; Pin (serial RX Interrupt 0). Beschaltet mit &quot;TXD  Pin&quot; von Touch Display.  Empfängt serielle Daten des Touch Displays und schreibt diese in einen Circularen Speicher.
Variablen: Circular Buffer 1 (Component Macro)
' >
						<local name='Touch_RX_Byte' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='
********** RX Interrupt 0: Receives serial Data from Touch Display and **********
                                       writes to Circular Buffer 1 Memory Storage 


comes from:
Peripheral -&gt; Serial RX Interrupt 0

Programm function detail:
- Receive Byte and write to Circular Buffer 1 (RXD Memory)

Out Variables:
Circular Buffer 1 Memory Storage
' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='-------------------- - Receive Byte and write to Circular Buffer 1 (RXD Memory) --------------------                                                            
' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='
----- RXINT1 Interrupt in Software = RXD0 / PA5 Pins !!! -----
----- Component RS232 Channel 2 = UART0 Interface !!! -----
.' textarea='12,0,12,0' />
						<command class_type='call' title='write received Byte in Variable' component='UART0_HMI' macro='ReceiveChar' >
							<return exp='.Touch_RX_Byte' />
							<argument exp='0' />
						</command>
						<command class_type='call' title=' write Variable in next Byte of Circular Buffer 1 (RXD Memory)' component='UART0_RXD_Memory' macro='PutByte' >
							<argument exp='.Touch_RX_Byte' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='COM2_I2C_TXD_Test' description='' >
						<param name='DeviceAddress' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='InternalAddress' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='Data' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Start I²C Transaction' component='I2C_Master1_COM2' macro='Start' />
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1_COM2' macro='TransmitByte' >
							<argument exp='0xAA' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1_COM2' macro='TransmitByte' >
							<argument exp='0x55' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1_COM2' macro='TransmitByte' >
							<argument exp='0xAA' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='I2C_Master1_COM2' macro='Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Error_Code_Request' description='' >
						<local name='TempData_0' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='TempBit_0' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='
********** Subroutine: Request is an Error Code available **********

!!!!! Set Inputs and Outputs to I/O Port Expander !!!!!

Changeable Values: 
Bit of Error Status LED. Pin= Port A1
Switch for display Error Code Data. Pin= Port D6
Port for display Error Code Data. Pin= Port D0-D7 (8 Byte)
Time of Data shown on Port

comes from:
Macro -&gt; Main

Programm function detail:
1.) Is Index of Circular Buffer 2 (Error Memory) &gt; 0 ?
          1a.) Yes: Set Error Status LED
                          Is Button on Port D6 pressed ?
                                        1b.) Yes: Write 1. Error Code for &quot;Time X1&quot; on Port D

In/Out Variables:
Circular Buffer 2 Memory Storage' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='---------- 1.) Is Index of Circular Buffer 2 (Error Memory) &gt; 0 ? ----------' textarea='12,0,12,0' />
						<command class_type='call' title=' write Index of Circular Buffer 2 (Error Memory) in Variable' component='Error_Code_Memory' macro='GetNumberBytes' >
							<return exp='.TempData_0' />
						</command>
						<command class_type='decision' title='Bytes in Buffer ?' exp='.TempData_0 &gt; 0' swap='0' >
							<flowline >
								<command class_type='output' title='Set Error Status LED' mode='1' port='1048576' mask='2' exp='1' />
								<command class_type='comment' title='' comment='----------  1a.) Yes: Button on Port D6 pressed ? ----------' textarea='12,0,12,0' />
								<command class_type='input' title='Eingang' mode='1' port='1048579' mask='64' exp='.TempBit_0' />
								<command class_type='decision' title='Button Port D6 pressed ?' exp='.TempBit_0 = 1' swap='0' >
									<flowline >
										<command class_type='comment' title='' comment='1b.) Yes: Write 1. Error Code for &quot;Time X1&quot; on Port D' textarea='12,0,12,0' />
										<command class_type='call' title='Write 1. Byte of Circular Buffer 2 (Error Memory) in Variable' component='Error_Code_Memory' macro='GetByte' >
											<return exp='_1_Error_Code' />
										</command>
										<command class_type='output' title='Write Error Code to Port D' mode='0' port='1048579' mask='0' exp='_1_Error_Code' />
										<command class_type='delay' title='Time X1' exp='10' type='2' />
										<command class_type='output' title='Clear Port D' mode='0' port='1048579' mask='0' exp='0' />
									</flowline>
									<flowline />
								</command>
								<command class_type='calculation' title='Set Error Code Bit' >
									<exp exp='_1_Error_Code_Bit = 1' />
								</command>
							</flowline>
							<flowline >
								<command class_type='comment' title='' comment='no Error Code in Circular Buffer 2' textarea='12,0,12,0' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='_X10_Main_Program_Start' description='' >
						<command class_type='comment' title='' comment='
********** Main Programm Structure Distributor **********

Changeable Values:
no

!!!!! Testfunction integrated !!!!!

comes from:
Macro -&gt; Main

Programm function detail:
- Request is a Touch Button is pressed ?
- Manual Encoder PWM Control
- Set PWM Frequency
- !!!!! Testfunction !!!!!

In/Out Variables:
no
' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='-------------------- Request is a Touch Button pressed ? --------------------                                              ' textarea='171,135,171,135' />
						<command class_type='call' title='Data of Touch received ? --&gt; Get Data of Touch Display' macro='Touch_10_Sub_RequestTouchPressed' />
						<command class_type='decision' title='Is Variable with Touch Data &gt; 0' exp='_3_Touch_ButtonNrRequest &gt; 0' swap='0' >
							<flowline >
								<command class_type='call' title='Touch Command Compare' macro='Touch_50_Sub_TouchCommandCompare' />
							</flowline>
							<flowline />
						</command>
						<command class_type='comment' title='' comment='-------------------- Manual Encoder PWM Control --------------------                                                          ' textarea='176,140,176,140' />
						<command class_type='call' title='Manual Drive ?' macro='_X11_Encoder_ManualDrive' />
						<command class_type='comment' title='' comment='-------------------- Set PWM Frequency --------------------                                                                        ' textarea='182,145,182,145' />
						<command class_type='call' title='Set PWM Frequency ?' macro='_X12_PWM_Set_Frequency' />
						<command class_type='comment' title='' comment='-------------------- !!!!! TESTFUNCTION !!!!! --------------------                                                                   ' textarea='485,200,485,200' />
						<command class_type='comment' title='' comment='---------- External Timer ----------' textarea='12,0,12,0' />
						<command class_type='decision' title='Is Timer Trigger = 1 ?' exp='_0_D6_ExtTimer_31ms_Trigger = 1' swap='0' >
							<flowline >
								<command class_type='input' title='Write Port D6 in Timer Trigger - wait for 0 Signal' mode='1' port='1048579' mask='64' exp='_0_D6_ExtTimer_31ms_Trigger' />
							</flowline>
							<flowline >
								<command class_type='input' title='Write Port D6 in Timer Variable' mode='1' port='1048579' mask='64' exp='_0_D6_ExtTimer_31ms' />
								<command class_type='decision' title='Is Port D6 (Timer Signal) = 1' exp='_0_D6_ExtTimer_31ms = 1' swap='0' >
									<flowline >
										<command class_type='calculation' title='Set Timer Trigger' >
											<exp exp='_0_D6_ExtTimer_31ms_Trigger = 1' />
										</command>
										<command class_type='decision' title='Counter Timer 31ms = 0 ?' exp='_9_Timer1 = 0' swap='0' >
											<flowline >
												<command class_type='calculation' title='Reload Timer Counter' >
													<exp exp='_9_Timer1 = 3' />
													<exp exp='' />
												</command>
												<command class_type='comment' title='' comment='Programm Code in Timer End' textarea='12,0,12,0' />
												<command class_type='calculation' title='Berechnung' >
													<exp exp='_2_MCP23S17_Out_0 = _2_MCP23S17_Out_0 + 1 * 3.6' />
												</command>
											</flowline>
											<flowline >
												<command class_type='calculation' title='Counter Timer 31ms -1' >
													<exp exp='_9_Timer1 = _9_Timer1 - 1' />
												</command>
												<command class_type='comment' title='' comment='Programm Code in Running Timer' textarea='12,0,12,0' />
											</flowline>
										</command>
										<command class_type='calculation' title='Berechnung' >
											<exp exp='_2_MCP23S17_Out_1 = _2_MCP23S17_In_0' />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
						<command class_type='comment' title='' comment='---------- Input (IN0) Request ----------' textarea='181,185,181,185' />
						<command class_type='switch' title='Schalter' textarea='106,70,106,70' exp='_2_MCP23S17_In_0' >
							<case >
								<flowline />
							</case>
							<case exp='1' >
								<flowline >
									<command class_type='comment' title='' comment='Testfunktion' textarea='46,15,46,15' />
									<command class_type='call' title='Makro-Aufruf' disable='1' macro='COM1_UART1_TXD_Test' />
									<command class_type='call' title='Get I/O Status' disable='1' macro='COM2_I2C_TXD_Test' >
										<argument exp='0x55' />
										<argument exp='0x11' />
										<argument exp='0x32' />
									</command>
								</flowline>
							</case>
							<case exp='2' >
								<flowline >
									<command class_type='comment' title='' comment='---------- Open Touch Macro with Number &quot;Variable&quot; ----------' textarea='36,25,36,25' />
									<command class_type='calculation' title='Write Number of Touch Macro in Variable' disable='1' >
										<exp exp='_3_Touch_OpenTouchMacroNr = 0x3E' />
									</command>
									<command class_type='call' title='Call - Open Touch Macro' disable='1' macro='Touch_11_Sub_OpenTouchMacro' />
									<command class_type='delay' title='use Ext. Timer' disable='1' exp='150' type='1' />
								</flowline>
							</case>
							<case exp='4' >
								<flowline >
									<command class_type='comment' title='' comment='---------- 2.e) Yes: Reset all Variables ----------' textarea='36,10,36,10' />
									<command class_type='call' title='Reset Encoder Counter' textarea='36,10,36,10' component='QuadEncoder1' macro='ResetCounter' />
									<command class_type='calculation' title='Reset Encoder &amp; PWM Variable' textarea='36,10,36,10' >
										<exp exp='_4_Encoder_Value = 0' />
										<exp exp='_4_PWM_Frequency = 0' />
									</command>
									<command class_type='delay' title='use Ext. Timer' textarea='36,10,36,10' disable='1' exp='300' type='1' />
								</flowline>
							</case>
							<case exp='8' >
								<flowline />
							</case>
						</command>
						<command class_type='comment' title='' comment='-------------------- x.) Software Taster Entprellung --------------------                                                                           ' textarea='121,165,121,165' />
						<command class_type='loop' title='Schleife' disable='1' type='1' exp='PortD_Data = 0' >
							<flowline >
								<command class_type='input' title='Eingang' mode='0' port='1048579' mask='0' exp='PortD_Data' />
								<command class_type='delay' title='Warten' exp='100' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SYS_COM3_SPI_ActualisateIO' description='' >
						<local name='SPI_RX_Byte' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='TempData_0' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='
********** Read Cyclic Digital Input and Output Bytes of SPI I/O Port Expander **********

Changeable Values:
Number of MCP23S17 that are activated in the SPI Network. (Deactivate Macros for disable)

!!!!! TESTFUNCTION integrated !!!!!

comes from:
Macro -&gt; _X10_Main_Program_Start

Programm function detail:
- Read Input Bytes of MCP23S17 and write in Circular Buffer 5 (SPI RXD Memory)
- Write Output Bytes from global Variables

Input Variables:
TouchMacro_ButtonNrRequest ==&gt; Number of the Touch macro wich was pressed
' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='Device Opcode MCP23S17:
0 - 1- 0 - 0 - A2 - A1 - A0 - R/W
R/W=0 --&gt; Write
R/W=1 --&gt; Read' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='GPIO Register (Ad: A=0x12 - B=0x13).

Reset Value: 0000 0000 
Operation: Read/Write

Read from this Register reads Port.
Write to this Register write to OLAT Register

Bit 7 - Bit 0 = I/O 7 - I/O 0
= 1 --&gt; Logic High
= 0 --&gt; Logic Low


Write Value: 0000 0000' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='-------------------- Read Input Bytes of MCP23S17 and write in Circular Buffer 5 (SPI RXD Memory) --------------------                      ' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='MCP23S17_0 (Input Byte 0)' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_0 (Ad.0) - read Operation ' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x41' />
						</command>
						<command class_type='call' title='Send Adress: GPIO-B (Input)' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x13' />
						</command>
						<command class_type='comment' title='' comment='TESTFUNCTION write in gloabal Variable and not in local Variable (.SPI_RX_Byte) and then in SPI RXD Memory.' textarea='12,0,12,0' />
						<command class_type='call' title='write received Byte in Variable' component='SPI_Master1_COM3' macro='GetChar' >
							<return exp='_2_MCP23S17_In_0' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='call' title=' write RX Var in next Byte of Circular Buffer 5 (SPI RXD Memory)' component='SPI_RXD_Memory' macro='PutByte' >
							<argument exp='.SPI_RX_Byte' />
						</command>
						<command class_type='comment' title='' comment='MCP23S17_1 (Input Byte 1)' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_1 (Ad.1) - read Operation ' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x43' />
						</command>
						<command class_type='call' title='Send Adress: GPIO-B (Input)' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x13' />
						</command>
						<command class_type='comment' title='' comment='TESTFUNCTION write in gloabal Variable and not in local Variable (.SPI_RX_Byte) and then in SPI RXD Memory.' textarea='12,0,12,0' />
						<command class_type='call' title='write received Byte in Variable' component='SPI_Master1_COM3' macro='GetChar' >
							<return exp='_2_MCP23S17_In_1' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='call' title=' write RX Var in next Byte of Circular Buffer 5 (SPI RXD Memory)' component='SPI_RXD_Memory' macro='PutByte' >
							<argument exp='.SPI_RX_Byte' />
						</command>
						<command class_type='comment' title='' comment='MCP23S17_2 (Input Byte 2)' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_2 (Ad.2) - read Operation ' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x45' />
						</command>
						<command class_type='call' title='Send Adress: GPIO-B (Input)' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x13' />
						</command>
						<command class_type='call' title='write received Byte in Variable' disable='1' component='SPI_Master1_COM3' macro='GetChar' >
							<return exp='.SPI_RX_Byte' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='call' title=' write RX Var in next Byte of Circular Buffer 5 (SPI RXD Memory)' disable='1' component='SPI_RXD_Memory' macro='PutByte' >
							<argument exp='.SPI_RX_Byte' />
						</command>
						<command class_type='comment' title='' comment='MCP23S17_3 (Input Byte 3)' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_3 (Ad.3) - read Operation ' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x47' />
						</command>
						<command class_type='call' title='Send Adress: GPIO-B (Input)' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x13' />
						</command>
						<command class_type='call' title='write received Byte in Variable' disable='1' component='SPI_Master1_COM3' macro='GetChar' >
							<return exp='.SPI_RX_Byte' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='call' title=' write RX Var in next Byte of Circular Buffer 5 (SPI RXD Memory)' disable='1' component='SPI_RXD_Memory' macro='PutByte' >
							<argument exp='.SPI_RX_Byte' />
						</command>
						<command class_type='comment' title='' comment='-------------------- Write Output Bytes from global Variables --------------------                                                                                       ' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='MCP23S17_0 (Output Byte 0)' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_0 (Ad.0) - write Operation ' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x40' />
						</command>
						<command class_type='call' title='Send Adress: GPIO-A (Output)' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x12' />
						</command>
						<command class_type='call' title='Send Data GPIO-A = Data' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='_2_MCP23S17_Out_0' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='comment' title='' comment='MCP23S17_1 (Output Byte 1)' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_1 (Ad.1) - write Operation ' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x42' />
						</command>
						<command class_type='call' title='Send Adress: GPIO-A (Output)' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x12' />
						</command>
						<command class_type='call' title='Send Data GPIO-A = Data' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='_2_MCP23S17_Out_1' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='comment' title='' comment='MCP23S17_2 (Output Byte 2)' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_2 (Ad.2) - write Operation ' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x44' />
						</command>
						<command class_type='call' title='Send Adress: GPIO-A (Output)' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x12' />
						</command>
						<command class_type='call' title='Send Data GPIO-A = Data' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='_2_MCP23S17_Out_2' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='comment' title='' comment='MCP23S17_3 (Output Byte 3)' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_3 (Ad.3) - write Operation ' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x46' />
						</command>
						<command class_type='call' title='Send Adress: GPIO-A (Output)' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x12' />
						</command>
						<command class_type='call' title='Send Data GPIO-A = Data' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='_2_MCP23S17_Out_3' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='SYS_Initialise_Peripheral' description='Subroutine zum Initialisieren der Hardware Komponenten' >
						<command class_type='comment' title='' comment='
********** Subroutine: Initialise different Types of Ports and Interrupts **********


comes from:
Macro -&gt; Main

Programm function detail:
1.) Initialise Ports
2.) Initialise Circular Buffer 2 (Error Memory)
3.) Touch Display: Initialise UART0 &amp; Circular Buffer 1 (UART0 RXD Memory)
4.) COM#1: Initialise UART1 &amp; Circular Buffer 4 (UART1 RXD Memory)
5.) COM#2: Initialise I2C Master Interface &amp; Circular Buffer 3 (I2C RXD Memory)
6.) COM#3: Initialise SPI-Master Interface &amp; Circular Buffer 5 (SPI RXD Memory)
7.) COM#4: Initialise WIZ810MJ (WIZ W5100 - 10/100MBit) &amp; Circular Buffer 6 (TCP/IP RXD Memory)
8.) Reset 74HC154 - SPI Adress Decoder
                                  

In/Out Variables:
no' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='-------------------- 1.) Initialise Ports --------------------                                                                                                
' textarea='111,150,111,150' />
						<command class_type='comment' title='' comment='***** Don´t write 0 to Ports A,B,C !!!!! (Perihperals) *****' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='PortD used: parallel I/O Ports 0-7' textarea='66,7,66,7' />
						<command class_type='output' title='Clear Data Port D' textarea='36,0,511,300' disable='1' mode='0' port='1048579' mask='0' exp='0' />
						<command class_type='comment' title='' comment='-------------------- 2.) Initialise Circular Buffer 2 (Error Memory) --------------------                                                             
' textarea='106,140,106,140' />
						<command class_type='call' title='Reset Circular Buffer 2 (Error Memory)' component='Error_Code_Memory' macro='FlushBuffer' />
						<command class_type='comment' title='' comment='-------------------- 3.) Touch Display: Initialise UART0 &amp; Circular Buffer 1 (UART0 RXD Memory) --------------------       

Edip Touch Display Pin &quot;TXD&quot; &amp; &quot;SBUF&quot; = 5V Level
CPU Pin: PA20 connected to Display &quot;SBUF&quot; Pin' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='
----- RXINT1 Interrupt in Software = RXD0 / PA5 Pins !!! -----
----- Component RS232 Channel 2 = UART0 Interface !!! -----
.' textarea='12,0,12,0' />
						<command class_type='call' title='Initialise UART0' component='UART0_HMI' macro='Initialise' />
						<command class_type='interrupt' title='Activate UART0' enable='1' name='RXINT1' call='Touch_0_RXINT0_ReadTouchData' >
							<settings timer='0' prescale='-1' postscale='-1' rollover='-1' bitcount='-1' trigger='3' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
							</settings>
						</command>
						<command class_type='call' title='Reset Circular Buffer 1 (UART0 RXD Memory)' component='UART0_RXD_Memory' macro='FlushBuffer' />
						<command class_type='comment' title='' comment='-------------------- 4.) COM#1: Initialise UART1 &amp; Circular Buffer 4 (UART1 RXD Memory) --------------------               
' textarea='86,135,86,135' />
						<command class_type='comment' title='' comment='
----- RXINT0 Interrupt in Software = RXD1 / PA21 Pins !!! -----
----- Component RS232 Channel 1 = UART1 Interface !!! -----
.' textarea='12,0,12,0' />
						<command class_type='call' title='Initialise UART1' component='UART1_COM1' macro='Initialise' />
						<command class_type='comment' title='' comment='!!!!!!!!!! When jump in RXINT0 CPU crashes !!!!!!!!!!!!' textarea='12,0,12,0' />
						<command class_type='interrupt' title='Activate UART1' enable='1' name='RXINT0' call='COM1_UART1_RXINT_Test' >
							<settings timer='0' prescale='-1' postscale='-1' rollover='-1' bitcount='-1' trigger='3' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
							</settings>
						</command>
						<command class_type='call' title='Reset Circular Buffer 4 (UART1 RXD Memory)' component='UART1_RXD_Memory' macro='FlushBuffer' />
						<command class_type='comment' title='' comment='-------------------- 5.) COM#2: Initialise I2C Master Interface &amp; Circular Buffer 3 (I2C RXD Memory) --------------------   
' textarea='101,140,101,140' />
						<command class_type='call' title='Initialise I2C Master' textshow='0' disable='1' component='I2C_Master1_COM2' macro='Initialise' />
						<command class_type='call' title='Reset Circular Buffer 3 (I2C RXD Memory)' disable='1' component='I2C_RXD_Memory' macro='FlushBuffer' />
						<command class_type='comment' title='' comment='-------------------- 6.) COM#3: Initialise SPI-Master Interface &amp; Circular Buffer 5 (SPI RXD Memory) --------------------    
' textarea='106,145,106,145' />
						<command class_type='comment' title='' comment='SPI Component Properties:

Clock Polarity: Idle High
Clock Phase: Leading Edge
Sample Point: End' textarea='12,0,12,0' />
						<command class_type='call' title='Initialise SPI Master' component='SPI_Master1_COM3' macro='Initialise' />
						<command class_type='call' title='Reset Circular Buffer 5 (SPI RXD Memory)' component='SPI_RXD_Memory' macro='FlushBuffer' />
						<command class_type='comment' title='' comment='-------------------- 7.) COM#4: Initialise WIZ810MJ (WIZ W5100) &amp; Circular Buffer 6 (TCP/IP RXD Memory) --------------------
' textarea='96,160,96,160' />
						<command class_type='comment' title='' comment='Webserver or TCP/IP Industrial Ethernet Protocol

10/100 Base TX
IEEE 802.3/802.3u
IP V4
TCP,UDP,ARP,ICMP,IGMP,PPPoE' textarea='12,0,12,0' />
						<command class_type='call' title='Initialise Ethernet' component='Webserver_WIZ_W5100' macro='Initialise' />
						<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='Webserver_WIZ_W5100' macro='SetOutValue' >
							<argument exp='1' />
							<argument exp='&quot;Out Value 1&quot;' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='Webserver_WIZ_W5100' macro='SetOutValue' >
							<argument exp='2' />
							<argument exp='&quot;Out Value 2&quot;' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='Webserver_WIZ_W5100' macro='SetOutValue' >
							<argument exp='3' />
							<argument exp='&quot;Out Value 3&quot;' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='Webserver_WIZ_W5100' macro='SetOutValue' >
							<argument exp='12' />
							<argument exp='&quot;Out Value 12&quot;' />
						</command>
						<command class_type='comment' title='' comment='!!!!!! Failure when activate Macro !!!!!!!!!!!!' textarea='12,0,12,0' />
						<command class_type='call' title='Create Server Socket' component='Webserver_WIZ_W5100' macro='CreateServerSocket' >
							<return exp='VAL' />
							<argument exp='0' />
							<argument exp='0x13' />
							<argument exp='0x88' />
						</command>
						<command class_type='comment' title='' comment='Only use at TCP/IP Industrial Ethernet Protocol
' textarea='12,0,12,0' />
						<command class_type='call' title='Reset Circular Buffer 6 (TCP/IP RXD Memory)' disable='1' component='TCP_IP_RXD_Memory' macro='FlushBuffer' />
						<command class_type='comment' title='' comment='-------------------- 8.) Reset 74HC154 - SPI Adress Decoder --------------------                                                                        
' textarea='71,170,71,170' />
						<command class_type='output' title='Ausgang' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='output' title='Ausgang' mode='1' port='1048577' mask='2' exp='1' />
						<command class_type='output' title='Ausgang' mode='1' port='1048577' mask='4' exp='1' />
						<command class_type='output' title='Ausgang' mode='1' port='1048577' mask='8' exp='1' />
						<command class_type='calculation' title='Berechnung' disable='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='COM1_UART1_TXD_Test' description='' >
						<command class_type='call' title='Aufruf Komponenten-Makro' component='UART1_COM1' macro='SendChar' >
							<argument exp='0x55' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='UART1_COM1' macro='SendChar' >
							<argument exp='0xAA' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='UART1_COM1' macro='SendChar' >
							<argument exp='0x0F' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' component='UART1_COM1' macro='SendChar' >
							<argument exp='0xF0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='_X11_Encoder_ManualDrive' description='Turns PWM0 Enable Signal on/off. When PWM0 is Enable it reads the Encoder Counter and write it to Variable and jump to Macro for Value scalation. Further there is a Programoption for reset Encoder Counter over Button. ' >
						<local name='TempData_0' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Encoder_Value' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='PWM0_Cycle' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Bit_PortD_6' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Bit_PortD_5' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Bit_PortD_0' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='
********** Subroutine: Driving PWM manually over Encoder **********

Changeable Values:
Switch for Reset hand wheel Encoder Counter. Pin = Port D5

comes from:
Macro -&gt; _X1_Main_Program_Start

Programm function detail:
1.) Switch Port xx for Enable &quot;Manual Drive&quot; pressed ?
              1.a) Yes: Turn on/off &quot;Enable&quot; Pin of PWM Board
2.) Is PWM0 Enable Active?
              2.a) Yes: Has Encoder Counter Register changed since last time ?
                       No: Reset Variables
                              2.b) Yes: write Encoder Counter Value in Output Variable
                                            Jump to Macro for Value scalation
                              2.c) No: Encoder Counter register Overflow ?
                              2.d) Is Switch Port xx for Reset Encoder Counter pressed ?
                                        2.e) Yes: Reset all Variables

Input Variables:
_4_Encoder_Value: Actual Value of the Encoder Counter Register

Output Variables:
_3_PWM_Frequency' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='---------- 1.) Switch Port D6 for Enable Manual Drive pressed ? ----------' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='----- HMI Touch Button -----' textarea='12,0,12,0' />
						<command class_type='input' title='Eingang' disable='1' mode='1' port='1048579' mask='64' exp='.Bit_PortD_6' />
						<command class_type='decision' title='Is Switch Port D6 Enable' disable='1' exp='_0_Cycle_Timer1 = 0' swap='0' >
							<flowline >
								<command class_type='decision' title='Switch Port D6 pressed ?' exp='.Bit_PortD_6 = 1' swap='0' >
									<flowline >
										<command class_type='comment' title='' comment='---------- 1.a) Turn on/off &quot;Enable&quot; Pin for PWM0 Board ----------' textarea='12,0,12,0' />
										<command class_type='calculation' title='Decrement Bool Variable' >
											<exp exp='_4_PWM_EN_Bit = _4_PWM_EN_Bit - 1' />
										</command>
										<command class_type='output' title='Set/Clear PWM0 Enable Port' mode='1' port='1048579' mask='1' exp='_4_PWM_EN_Bit' />
										<command class_type='comment' title='' comment='Testfunktion Durchgangstimer' textarea='12,0,12,0' />
										<command class_type='calculation' title='Disable Port D6 fox &quot;X&quot; Cycles' >
											<exp exp='_0_Cycle_Timer1 = 25000' />
										</command>
										<command class_type='delay' title='wait' disable='1' exp='300' type='1' />
									</flowline>
									<flowline />
								</command>
							</flowline>
							<flowline >
								<command class_type='comment' title='' comment='Port D6 is for &quot;X&quot; Cycles disabled after pressing Button' textarea='12,0,12,0' />
								<command class_type='calculation' title='Port Disable Counter -1' >
									<exp exp='_0_Cycle_Timer1 = _0_Cycle_Timer1 - 1' />
								</command>
							</flowline>
						</command>
						<command class_type='comment' title='' comment='---------- 2.) Is PWM0 Enable Active? ----------' textarea='12,0,12,0' />
						<command class_type='decision' title='Is PWM0 Enable ?' exp='_4_PWM_EN_Bit = 1' swap='0' >
							<flowline >
								<command class_type='comment' title='' comment='----------  2.a) Yes: Has Encoder Counter Register changed since last time ? ----------' textarea='12,0,12,0' />
								<command class_type='call' title='Enable PWM0' component='PWM' macro='Enable' />
								<command class_type='call' title='Enable Encoder' component='QuadEncoder1' macro='Enable' />
								<command class_type='call' title='Check for changes &amp; write to Var.' component='QuadEncoder1' macro='CheckForChanges' >
									<return exp='.TempData_0' />
								</command>
								<command class_type='decision' title='Encoder wheel changed sinse last time' exp='.TempData_0 = 1' swap='0' >
									<flowline >
										<command class_type='comment' title='' comment='---------- 2.b) Yes: write Encoder Counter Value in Output Variable ----------' textarea='12,0,12,0' />
										<command class_type='call' title='Read Counter Value and write to Output Variable' component='QuadEncoder1' macro='ReadCounter' >
											<return exp='_4_Encoder_Value' />
										</command>
										<command class_type='comment' title='' comment='---------- Encoder Value Scalation ----------' textarea='12,0,12,0' />
										<command class_type='call' title='Open Macro Output Variable Scalation' macro='_X11a_Encoder_ValueScalation' />
									</flowline>
									<flowline >
										<command class_type='comment' title='' comment='---------- 2.c) No: Encoder Counter register Overflow ? ----------' textarea='12,0,12,0' />
										<command class_type='decision' title='Overflow in Encoder Counter Register ?' exp='.TempData_0 = 255' swap='0' >
											<flowline >
												<command class_type='call' title='Reset Counter' component='QuadEncoder1' macro='ResetCounter' />
											</flowline>
											<flowline />
										</command>
									</flowline>
								</command>
								<command class_type='comment' title='' comment='---------- 2.d) Is Switch Port xx for Reset Encoder Counter pressed ? ----------' textarea='12,0,12,0' />
								<command class_type='input' title='Eingang' disable='1' mode='1' port='1048579' mask='32' exp='.Bit_PortD_5' />
								<command class_type='comment' title='' comment='----- HMI Touch Button -----' textarea='12,0,12,0' />
								<command class_type='decision' title='Port D5 pressed ?' disable='1' exp='.Bit_PortD_5 = 1' swap='0' >
									<flowline >
										<command class_type='comment' title='' comment='---------- 2.e) Yes: Reset all Variables ----------' textarea='36,10,36,10' />
										<command class_type='call' title='Reset Encoder Counter' textarea='36,10,36,10' component='QuadEncoder1' macro='ResetCounter' />
										<command class_type='calculation' title='Reset Encoder &amp; PWM Variable' textarea='36,10,36,10' >
											<exp exp='_4_Encoder_Value = 0' />
											<exp exp='_4_PWM_Frequency = 0' />
										</command>
										<command class_type='delay' title='Warten' textarea='36,10,36,10' exp='300' type='1' />
									</flowline>
									<flowline />
								</command>
							</flowline>
							<flowline >
								<command class_type='comment' title='' comment='Reset all Encoder Variables' textarea='12,0,12,0' />
								<command class_type='call' title='Reset Encoder Counter' component='QuadEncoder1' macro='ResetCounter' />
								<command class_type='call' title='Disable Encoder' component='QuadEncoder1' macro='Disable' />
								<command class_type='calculation' title='Reset Input/Output Variables' >
									<exp exp='_4_Encoder_Value = 0' />
									<exp exp='_4_PWM_Frequency = 0' />
								</command>
								<command class_type='comment' title='' comment='!!!!!!!!!! Disable PWM !!!!!!!!!!' textarea='12,0,12,0' />
								<command class_type='call' title='Disable PWM' component='PWM' macro='Disable' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='_X13_Webserver_activity' description='' >
						<command class_type='comment' title='' comment='
********** Check Webserver activity **********

Changeable Values:
no

!!!!! Testfunction integrated !!!!!

comes from:
Macro -&gt; Main

Programm function detail:
- 

In/Out Variables:
no
' textarea='12,0,12,0' />
					</flowline>
				</macro>
				<macro >
					<flowline name='_X11a_Encoder_ValueScalation' description='Value Scalation for Encoder hand wheel in &quot;Manual Drive&quot; Mode.' >
						<command class_type='comment' title='' comment='
********** Scaltes the Encoder Counter Value for Handwheel use **********

!!!!! Testfunction integrated !!!!!

comes from:
Subroutine -&gt; _X2_Encoder_ManualDrive

Changeable Values:
Hand wheel Encoder Counts to Start and Stop Speed 1-x &amp; logarithmic drive (Values: X1R/X1L/X2R/X2L/XR/XL)
(X1R/X1L/X2R/X2L/XR/XL)

Programm function detail:
- Stop or Left/Right Direction (changeable Values)
- Speed 1 or Speed 2 Left/Right Direction (changeable Values)
- Speed 2 or Logarithmic Curve Left/Right Direction


Input/Output Variables:
_4_Encoder_Value: Value of the actual Encoder Counter Register

Output Variables:
_3_PWM_Frequency: Frequency Value for driving PWM0 Port' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='---------- Stop or Left/Right Direction (changeable Values) ----------                                                                               ' textarea='71,-20,71,-20' />
						<command class_type='comment' title='' comment='Value how many Encoder Pulses to Start Speed 1 in Right Direction

_0_______right_____X1R
    &lt;------ Stop Area ------&gt;' textarea='12,0,12,0' />
						<command class_type='decision' title='Stop or Right Direction ? (Value X1R)' exp='_4_Encoder_Value &gt; 20' swap='0' >
							<flowline >
								<command class_type='output' title='Set Direction Right' mode='1' port='1048579' mask='2' exp='0' />
								<command class_type='comment' title='' comment='---------- Speed 1 or Speed 2 Right Direction (changeable Values) ----------' textarea='71,-20,71,-20' />
								<command class_type='comment' title='' comment='Value how many Encoder Pulses for Speed 1 or Speed 2 in Right Direction

_0___right___X1R____Speed 1____X2R____Speed 2____XR
                             &lt;---Speed 1 Area---&gt;    &lt;---Speed 2 Area---&gt;' textarea='12,0,12,0' />
								<command class_type='decision' title='Right Direction: Speed 1 or Speed 2 ? (Value X2R)' exp='_4_Encoder_Value &gt; 30' swap='0' >
									<flowline >
										<command class_type='comment' title='' comment='---------- Speed 2 or Logarithmic Curve Right Direction (changeable Values) ----------' textarea='12,0,12,0' />
										<command class_type='decision' title='Right Direction: Speed 2 or Logarithmic Curve (Value XR)' exp='_4_Encoder_Value &gt; 40' swap='0' >
											<flowline >
												<command class_type='comment' title='' comment='Logarithmic Curve Right' textarea='12,0,12,0' />
												<command class_type='comment' title='' comment='!!!!!!!!!! Testfunction !!!!!!!!!!!' textarea='12,0,12,0' />
												<command class_type='output' title='Ausgang' disable='1' mode='1' port='1048576' mask='8' exp='1' />
												<command class_type='calculation' title='Write Speed 2 Var. to PWM Variable' textarea='36,0,1036,0' >
													<exp exp='_4_PWM_Frequency = _4_Encoder_Value' />
												</command>
												<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='PWM' macro='Disable' />
												<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='PWM' macro='ChangePeriod' >
													<argument exp='8' />
													<argument exp='256' />
												</command>
												<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='PWM' macro='Enable' />
											</flowline>
											<flowline >
												<command class_type='comment' title='' comment='2. Speed Right' textarea='12,0,12,0' />
												<command class_type='comment' title='' comment='!!!!!!!!!! Testfunction !!!!!!!!!!!' textarea='12,0,12,0' />
												<command class_type='output' title='Ausgang' disable='1' mode='1' port='1048576' mask='8' exp='0' />
												<command class_type='output' title='Ausgang' disable='1' mode='1' port='1048576' mask='4' exp='1' />
												<command class_type='calculation' title='Write Speed 2 Var. to PWM Variable' >
													<exp exp='_4_PWM_Frequency = 3' />
												</command>
												<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='PWM' macro='Disable' />
												<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='PWM' macro='ChangePeriod' >
													<argument exp='255' />
													<argument exp='256' />
												</command>
												<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='PWM' macro='Enable' />
											</flowline>
										</command>
										<command class_type='comment' title='' comment='2. Speed Right' textarea='12,0,12,0' />
									</flowline>
									<flowline >
										<command class_type='comment' title='' comment='1. Speed Right' textarea='12,0,12,0' />
										<command class_type='comment' title='' comment='!!!!!!!!!! Testfunction !!!!!!!!!!!' textarea='12,0,12,0' />
										<command class_type='output' title='Ausgang' disable='1' mode='1' port='1048576' mask='4' exp='0' />
										<command class_type='calculation' title='Write Speed 2 Var. to PWM Variable' >
											<exp exp='_4_PWM_Frequency = 2' />
										</command>
										<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='PWM' macro='ChangePeriod' >
											<argument exp='255' />
											<argument exp='512' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline >
								<command class_type='comment' title='' comment='Stop' textarea='12,0,12,0' />
								<command class_type='comment' title='' comment='Value how many Encoder Pulses to Start Speed 1 in Left Direction

X1L______left______0_
   &lt;------ Stop Area ------&gt;' textarea='12,0,12,0' />
								<command class_type='decision' title='Stop or Left Direction ? (Value X1L)' exp='_4_Encoder_Value &lt; -20' swap='0' >
									<flowline >
										<command class_type='output' title='Set Direction Left' mode='1' port='1048579' mask='2' exp='1' />
										<command class_type='comment' title='' comment='---------- Speed 1 or Speed 2 Left Direction (changeable Values) ----------    ' textarea='71,-20,71,-20' />
										<command class_type='comment' title='' comment='Value how many Encoder Pulses for Speed 1 or Speed 2 in Left Direction

_XL____Speed 2____X2L____Speed 1____X1L___left___0_
    &lt;---Speed 2 Area---&gt;  &lt;---Speed 1 Area---&gt;' textarea='12,0,12,0' />
										<command class_type='decision' title='Left Direction: Speed 1 or Speed 2 ? (Value X2L)' exp='_4_Encoder_Value &lt; -30' swap='0' >
											<flowline >
												<command class_type='comment' title='' comment='---------- Speed 2 or Logarithmic Curve Left Direction ----------' textarea='12,0,12,0' />
												<command class_type='decision' title='Left Direction: Speed 2 or Logarithmic Curve (Value XL)' exp='_4_Encoder_Value &lt; -40' swap='0' >
													<flowline >
														<command class_type='comment' title='' comment='Logarithmic Curve Left' textarea='12,0,512,0' />
														<command class_type='comment' title='' comment='!!!!!!!!!! Testfunction !!!!!!!!!!!' textarea='12,0,12,0' />
														<command class_type='output' title='Ausgang' disable='1' mode='1' port='1048576' mask='8' exp='1' />
													</flowline>
													<flowline >
														<command class_type='comment' title='' comment='2. Speed Left' textarea='12,0,12,0' />
														<command class_type='comment' title='' comment='!!!!!!!!!! Testfunction !!!!!!!!!!!' textarea='12,0,12,0' />
														<command class_type='output' title='Ausgang' disable='1' mode='1' port='1048576' mask='8' exp='0' />
														<command class_type='output' title='Ausgang' disable='1' mode='1' port='1048576' mask='4' exp='1' />
														<command class_type='calculation' title='Write Speed 2 Var. to PWM Variable' textarea='36,0,786,0' >
															<exp exp='_4_PWM_Frequency = _4_PWM_Speed2_Frequency' />
														</command>
													</flowline>
												</command>
											</flowline>
											<flowline >
												<command class_type='comment' title='' comment='1. Speed Left' textarea='12,0,12,0' />
												<command class_type='comment' title='' comment='!!!!!!!!!! Testfunction !!!!!!!!!!!' textarea='12,0,12,0' />
												<command class_type='output' title='Ausgang' disable='1' mode='1' port='1048576' mask='4' exp='0' />
												<command class_type='calculation' title='Write Speed 2 Var. to PWM Variable' textarea='36,-5,780,-5' >
													<exp exp='_4_PWM_Frequency = _4_PWM_Speed1_Frequency' />
												</command>
											</flowline>
										</command>
									</flowline>
									<flowline >
										<command class_type='comment' title='' comment='Stop' textarea='12,0,12,0' />
										<command class_type='comment' title='' comment='PWM0 Stop' textarea='12,0,12,0' />
										<command class_type='calculation' title='Reset PWM Variable' >
											<exp exp='_4_PWM_Frequency = 0' />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Touch_50_Sub_TouchCommandCompare' description='Subroutine zum Abfragen der HMI Steuerbefehle nach gedrücktem Touch Button.' >
						<command class_type='comment' title='' comment='
********** Subroutine: Compare received Touch Data with Control Commands **********

Changeable Values:
Serial Command Values

comes from:
Macro -&gt; _X10_Main_Program_Start

Programm function detail:
- Compare received Bytes
- Reset Input Variable

Input Variables:
TouchMacro_ButtonNrRequest ==&gt; Number of the Touch macro wich was pressed
' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='-------------------- Compare received Bytes --------------------                                            ' textarea='12,0,12,0' />
						<command class_type='switch' title='Command Compare 1-9' textarea='36,170,36,170' exp='_3_Touch_ButtonNrRequest' >
							<case >
								<flowline />
							</case>
							<case exp='1' >
								<flowline />
							</case>
							<case exp='2' >
								<flowline />
							</case>
							<case exp='3' >
								<flowline />
							</case>
							<case exp='4' >
								<flowline />
							</case>
							<case exp='5' >
								<flowline />
							</case>
							<case exp='6' >
								<flowline />
							</case>
							<case exp='7' >
								<flowline />
							</case>
							<case exp='8' >
								<flowline />
							</case>
							<case exp='9' >
								<flowline />
							</case>
						</command>
						<command class_type='switch' title='Command Compare 10-19' textarea='36,170,36,170' exp='_3_Touch_ButtonNrRequest' >
							<case >
								<flowline />
							</case>
							<case exp='10' >
								<flowline />
							</case>
							<case exp='11' >
								<flowline />
							</case>
							<case exp='12' >
								<flowline />
							</case>
							<case exp='13' >
								<flowline />
							</case>
							<case exp='14' >
								<flowline />
							</case>
							<case exp='15' >
								<flowline />
							</case>
							<case exp='16' >
								<flowline />
							</case>
							<case exp='17' >
								<flowline />
							</case>
							<case exp='18' >
								<flowline />
							</case>
							<case exp='19' >
								<flowline />
							</case>
						</command>
						<command class_type='switch' title='Command Compare 20-29' textarea='36,170,36,170' exp='_3_Touch_ButtonNrRequest' >
							<case >
								<flowline />
							</case>
							<case exp='20' >
								<flowline />
							</case>
							<case exp='21' >
								<flowline />
							</case>
							<case exp='22' >
								<flowline />
							</case>
							<case exp='23' >
								<flowline />
							</case>
							<case exp='24' >
								<flowline />
							</case>
							<case exp='25' >
								<flowline />
							</case>
							<case exp='26' >
								<flowline />
							</case>
							<case exp='27' >
								<flowline />
							</case>
							<case exp='28' >
								<flowline />
							</case>
							<case exp='29' >
								<flowline />
							</case>
						</command>
						<command class_type='switch' title='Command Compare 30-39' textarea='41,155,1041,155' exp='_3_Touch_ButtonNrRequest' >
							<case >
								<flowline />
							</case>
							<case exp='30' >
								<flowline >
									<command class_type='comment' title='' comment='Drive Axis Enable/Disable' textarea='12,0,12,0' />
									<command class_type='calculation' title='Decrement Bool Variable' textarea='36,0,511,0' >
										<exp exp='_4_PWM_EN_Bit = _4_PWM_EN_Bit - 1' />
									</command>
									<command class_type='output' title='Set/Clear PWM0 Enable Port' mode='1' port='1048579' mask='1' exp='_4_PWM_EN_Bit' />
								</flowline>
							</case>
							<case exp='31' >
								<flowline >
									<command class_type='comment' title='' comment='Reset Handwheel Counter' textarea='12,0,12,0' />
									<command class_type='call' title='Reset Encoder Counter' component='QuadEncoder1' macro='ResetCounter' />
									<command class_type='calculation' title='Reset Encoder &amp; PWM Variable' >
										<exp exp='_4_Encoder_Value = 0' />
										<exp exp='_4_PWM_Frequency = 0' />
									</command>
								</flowline>
							</case>
							<case exp='32' >
								<flowline >
									<command class_type='comment' title='' comment='PWM0 Drive Enable' textarea='12,0,12,0' />
									<command class_type='calculation' title='Decrement Bool Variable' textarea='36,0,461,0' >
										<exp exp='_4_PWM0_ManualDriveEN = _4_PWM0_ManualDriveEN - 1' />
										<exp exp='' />
									</command>
									<command class_type='calculation' title='Reset PWM1 &amp; PWM2' textarea='36,0,471,0' >
										<exp exp='_4_PWM1_ManualDriveEN = 0' />
										<exp exp='_4_PWM2_ManualDriveEN = 0' />
									</command>
								</flowline>
							</case>
							<case exp='33' >
								<flowline >
									<command class_type='comment' title='' comment='PWM1 Drive  Enable' textarea='12,0,12,0' />
									<command class_type='calculation' title='Decrement Bool Variable' textarea='36,0,486,0' >
										<exp exp='_4_PWM1_ManualDriveEN = _4_PWM1_ManualDriveEN - 1' />
										<exp exp='' />
									</command>
									<command class_type='calculation' title='Reset PWM0 &amp; PWM2' textarea='36,0,491,0' >
										<exp exp='_4_PWM0_ManualDriveEN = 0' />
										<exp exp='_4_PWM2_ManualDriveEN = 0' />
									</command>
								</flowline>
							</case>
							<case exp='34' >
								<flowline >
									<command class_type='comment' title='' comment='PWM2 Drive  Enable' textarea='12,0,12,0' />
									<command class_type='calculation' title='Decrement Bool Variable' textarea='36,0,506,198' >
										<exp exp='_4_PWM2_ManualDriveEN = _4_PWM2_ManualDriveEN - 1' />
										<exp exp='' />
									</command>
									<command class_type='calculation' title='Reset PWM0 &amp; PWM1' textarea='36,0,531,0' >
										<exp exp='_4_PWM0_ManualDriveEN = 0' />
										<exp exp='_4_PWM1_ManualDriveEN = 0' />
									</command>
								</flowline>
							</case>
							<case exp='35' >
								<flowline />
							</case>
							<case exp='36' >
								<flowline />
							</case>
							<case exp='37' >
								<flowline />
							</case>
							<case exp='38' >
								<flowline />
							</case>
							<case exp='39' >
								<flowline />
							</case>
						</command>
						<command class_type='switch' title='Command Compare 40-49' textarea='36,170,36,170' exp='_3_Touch_ButtonNrRequest' >
							<case >
								<flowline />
							</case>
							<case exp='40' >
								<flowline />
							</case>
							<case exp='41' >
								<flowline />
							</case>
							<case exp='42' >
								<flowline />
							</case>
							<case exp='43' >
								<flowline />
							</case>
							<case exp='44' >
								<flowline />
							</case>
							<case exp='45' >
								<flowline />
							</case>
							<case exp='46' >
								<flowline />
							</case>
							<case exp='47' >
								<flowline />
							</case>
							<case exp='48' >
								<flowline />
							</case>
							<case exp='49' >
								<flowline />
							</case>
						</command>
						<command class_type='switch' title='Command Compare 50-59' textarea='36,170,36,170' exp='_3_Touch_ButtonNrRequest' >
							<case >
								<flowline />
							</case>
							<case exp='50' >
								<flowline />
							</case>
							<case exp='51' >
								<flowline />
							</case>
							<case exp='52' >
								<flowline />
							</case>
							<case exp='53' >
								<flowline />
							</case>
							<case exp='54' >
								<flowline />
							</case>
							<case exp='55' >
								<flowline />
							</case>
							<case exp='56' >
								<flowline />
							</case>
							<case exp='57' >
								<flowline />
							</case>
							<case exp='58' >
								<flowline />
							</case>
							<case exp='59' >
								<flowline />
							</case>
						</command>
						<command class_type='comment' title='' comment='-------------------- Reset Input Variable --------------------                                            ' textarea='12,0,12,0' />
						<command class_type='calculation' title='Berechnung' >
							<exp exp='_3_Touch_ButtonNrRequest = 0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='COM2_I2C_RXD_Test' description='' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='DeviceAddress' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='InternalAddress' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Start I²C Transaction' component='I2C_Master1_COM2' macro='Start' />
						<command class_type='call' title='Device Address + Write bit' component='I2C_Master1_COM2' macro='TransmitByte' >
							<argument exp='0xAA' />
						</command>
						<command class_type='call' title='Device Address + Write bit' component='I2C_Master1_COM2' macro='TransmitByte' >
							<argument exp='0xAA' />
						</command>
						<command class_type='call' title='Device Address + Write bit' component='I2C_Master1_COM2' macro='TransmitByte' >
							<argument exp='0xAA' />
						</command>
						<command class_type='call' title='Restart I2C' component='I2C_Master1_COM2' macro='Restart' />
						<command class_type='call' title='Device Address + Read bit' component='I2C_Master1_COM2' macro='TransmitByte' >
							<argument exp='0x55' />
						</command>
						<command class_type='call' title='Receive Data' ccode='// Aufruf Komponenten-Makro
// Aufruf Komponenten-Makro: I2C_Master1::ReceiveByte(1)
FCD_005f1_I2C_Master1__ReceiveByte(1);
' component='I2C_Master1_COM2' macro='ReceiveByte' >
							<return exp='.Return' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Stop I²C Transaction' component='I2C_Master1_COM2' macro='Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Touch_0_InitialiseReadTouch' description='Initialisiert Touch Display zum seriellen senden der Daten welcher Touch Button betätigt wurde. Aufruf per Hardware CPU Pin. Beschaltet mit &quot;SBUF&quot; Pin von Touch Display. Einstellbarer Task Zyklus
Variablen: Keine ' >
						<local name='Touch_bcc_Calc' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0x00' />
						<command class_type='comment' title='' comment='
********** Initialise Display to Send Data of pressed Touch Buttons **********
                                             


comes from:
Macro -&gt; _X10_Main_Program_Start

Changeable Values:
Bit of Display &quot;SBUF&quot; Signal. Pin= Port A7

Program function detail:
- Task Cycle: Is a Touch Button pressed (SBUF Pin=0)
- Send serial command to display: &quot;Inhalt des Sendepuffers anfordern&quot;

In/Out Variables:
no' textarea='12,0,12,0' />
						<command class_type='input' title='write Status of Touch Display SBUF Pin in Variable' mode='1' port='1048576' mask='128' exp='_3_Touch_Bit_SBUFpin' />
						<command class_type='decision' title='SBUF Pin =0 ?' exp='_3_Touch_Bit_SBUFpin = 0' swap='0' >
							<flowline >
								<command class_type='comment' title='' comment='-------------------- Send serial command to display: &quot;Inhalt des Sendepuffers anfordern&quot; --------------------                 
' textarea='12,0,12,0' />
								<command class_type='comment' title='' comment='Transmit Data:

&quot;DC2&quot; = 0x12
&quot;1&quot;      = 0x01
&quot;S&quot;      = 0x53
&quot;bcc&quot;   = calculation' textarea='12,0,12,0' />
								<command class_type='calculation' title='Berechnung Prüfsumme aus allen Bytes' >
									<exp exp='.Touch_bcc_Calc = 0x00' />
									<exp exp='.Touch_bcc_Calc = 0x12 + 0x01 + 0x53' />
									<exp exp='' />
								</command>
								<command class_type='call' title='Testfunction' disable='1' component='UART0_HMI' macro='SendString' >
									<argument exp='&quot;cannot TX Array @Reg&quot;' />
								</command>
								<command class_type='call' title='TXD &quot;DC2&quot; to Touch Display' component='UART0_HMI' macro='SendChar' >
									<argument exp='0x12' />
								</command>
								<command class_type='call' title='TXD &quot;1&quot; to Touch Display' component='UART0_HMI' macro='SendChar' >
									<argument exp='0x01' />
								</command>
								<command class_type='call' title='TXD &quot;S&quot; to Touch Display' component='UART0_HMI' macro='SendChar' >
									<argument exp='0x53' />
								</command>
								<command class_type='call' title='TXD &quot;bcc&quot; to Touch Display' component='UART0_HMI' macro='SendChar' >
									<argument exp='.Touch_bcc_Calc' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Touch_11_Sub_OpenTouchMacro' description='Subroutine zum Öffnen eines Touch Macros. Über Variable eingegeben wird die Nummer des zu öffnenden Touch Macros. 
Variable: _2_TouchMacro_OpenTouchMacroNr' >
						<local name='Touch_bcc_Calc' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='TempData_0' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='TempData_1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='
********** Subroutine: Open Touch Macro with Number &quot;x&quot; **********


comes from:
Macro -&gt; Multiple Instances

Programm function detail:
- Send serial command to display &quot;Touch Makro mit Nummer &quot;n1&quot; öffnen&quot;
- clear Circular Buffer 1 Memory and Checkout Acknowledge 
- Reset Variables and clear Circular Buffer 1 Memory

In Variables:
TouchMacro_OpenTouchMacroNr ==&gt; Number of the Touch macro for open (0x00h)
' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='-------------------- Send serial command to display &quot;Touch Makro mit Nummer &quot;n1&quot; öffnen&quot; --------------------                   
' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='Transmit Data:

&quot;DC1&quot; = 0x11
&quot;len&quot;   = 0x04
&quot;ESC&quot; = 0x1B
&quot;M&quot;     = 0x4D
&quot;T&quot;      = 0x54
&quot;n1&quot;    = Global Var: TouchMacro_OpenTouchMacroNr
&quot;bcc&quot;   = calculation' textarea='12,0,12,0' />
						<command class_type='calculation' title='Berechnung Prüfsumme aus allen Bytes' >
							<exp exp='.Touch_bcc_Calc = 0x00' />
							<exp exp='.Touch_bcc_Calc = 0x11 + 0x04 + 0x1B + 0x4D + 0x54 + _3_Touch_OpenTouchMacroNr' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Aufruf Komponenten-Makro' disable='1' component='UART0_HMI' macro='SendString' >
							<argument exp='&quot;MTb3&quot;' />
						</command>
						<command class_type='call' title='TXD &quot;DC1&quot; to Touch Display' component='UART0_HMI' macro='SendChar' >
							<argument exp='0x11' />
						</command>
						<command class_type='call' title='TXD &quot;len&quot; to Touch Display' component='UART0_HMI' macro='SendChar' >
							<argument exp='0x04' />
						</command>
						<command class_type='call' title='TXD &quot;Esc&quot; to Touch Display' component='UART0_HMI' macro='SendChar' >
							<argument exp='0x1B' />
						</command>
						<command class_type='call' title='TXD &quot;M&quot; to Touch Display' component='UART0_HMI' macro='SendChar' >
							<argument exp='0x4D' />
						</command>
						<command class_type='call' title='TXD &quot;T&quot; to Touch Display' component='UART0_HMI' macro='SendChar' >
							<argument exp='0x54' />
						</command>
						<command class_type='call' title='TXD Var. &quot;TouchMacro_OpenTouchMacroNr&quot; to Touch Display' component='UART0_HMI' macro='SendChar' >
							<argument exp='_3_Touch_OpenTouchMacroNr' />
						</command>
						<command class_type='call' title='TXD &quot;bcc&quot; to Touch Display' component='UART0_HMI' macro='SendChar' >
							<argument exp='.Touch_bcc_Calc' />
						</command>
						<command class_type='comment' title='' comment='-------------------- clear Circular Buffer 1 Memory and Checkout Acknowledge  --------------------                                  
' textarea='12,0,12,0' />
						<command class_type='call' title='Reset Circular Buffer 1 (RXD Memory) ' component='UART0_RXD_Memory' macro='FlushBuffer' />
						<command class_type='comment' title='' comment='Wait Times for 1 received Byte:
min. 275µS --&gt; 115200 Baud --&gt; 47923200Mhz PLL Frequency --&gt; Xtal 18,432MHz' textarea='12,0,12,0' />
						<command class_type='delay' title='Wait for Byte &quot;ACK&quot;' exp='300' type='0' />
						<command class_type='call' title=' write Index Byte of Circular Buffer 1 (RXD Memory)  in Variable' component='UART0_RXD_Memory' macro='GetNumberBytes' >
							<return exp='.TempData_0' />
						</command>
						<command class_type='decision' title='Byte received - Index Circular Buffer 1 (RXD Memory) &gt;0 ?' exp='.TempData_0 &gt; 0' swap='0' >
							<flowline >
								<command class_type='call' title=' write 1. Byte of Circular Buffer 1 (RXD Memory) in Variable' component='UART0_RXD_Memory' macro='GetByte' >
									<return exp='.TempData_1' />
								</command>
								<command class_type='decision' title='&quot;ACK&quot; ok ?' exp='.TempData_1 = 0x06' swap='0' >
									<flowline />
									<flowline >
										<command class_type='comment' title='' comment='Error Code &quot;ACK not OK&quot;' textarea='36,25,36,25' />
										<command class_type='calculation' title='Berechnung' >
											<exp exp='_1_Error_Code = 0x05' />
										</command>
										<command class_type='call' title='Aufruf Komponenten-Makro' component='Error_Code_Memory' macro='PutByte' >
											<argument exp='_1_Error_Code' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline >
								<command class_type='comment' title='' comment='Error Code &quot;no Byte received&quot;' textarea='41,10,41,10' />
								<command class_type='calculation' title='Berechnung' >
									<exp exp='_1_Error_Code = 0x04' />
								</command>
								<command class_type='call' title='Aufruf Komponenten-Makro' component='Error_Code_Memory' macro='PutByte' >
									<argument exp='_1_Error_Code' />
								</command>
							</flowline>
						</command>
						<command class_type='comment' title='' comment='-------------------- Reset Variables and clear Circular Buffer 1 Memory --------------------                                  ' textarea='12,0,12,0' />
						<command class_type='calculation' title='Reset Variables' >
							<exp exp='_3_Touch_OpenTouchMacroNr = 0x00' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Reset Circular Buffer 1 (RXD Memory) ' component='UART0_RXD_Memory' macro='FlushBuffer' />
					</flowline>
				</macro>
				<macro >
					<flowline name='SYS_Initialise_MCP23S17_1' description='' >
						<command class_type='comment' title='' comment='
********** Subroutine: Initialise SPI I/O Expander MCP23S17 (16Bit Digital I/O) **********
--&gt; Compatible with Codesys Bus Coupler V1.0

Changeable Values:
Number of MCP23S17 that are activated in the SPI Network. (Deactivate Macros for disable)
Attention when changing Values in Main Initialise of all MCP. Codesys Bus Coupler V1.0 doesn´t run!!!!

Maximum of 8x MCP23S17 is possible with 1 &quot;CS&quot; Pin.

comes from:
Macro -&gt; Main

Programm function detail:
1.) Main Initialisation of all MCP23S17 (Digital I/O 16bit)
2.) Initialise MCP23S17_1 to Enter Adressed Mode
3.) Initialise MCP23S17_2 to Enter Adressed Mode
4.) Initialise MCP23S17_3 to Enter Adressed Mode
5.) Initialise MCP23S17_4 to Enter Adressed Mode


In/Out Variables:
no' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='Device Opcode MCP23S17:
0 - 1- 0 - 0 - A2 - A1 - A0 - R/W
R/W=0 --&gt; Write
R/W=1 --&gt; Read' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='-------------------- 1.) Main Initialisation of all MCP23S17 (Digital I/O 16bit) --------------------                                             ' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='IODIR (I/O Direction Register) write Data (Ad: A=0x00 - B=0x01).

Reset Value: 1111 1111 
Operation: Read/Write

Bit 7 - Bit 0 = I/O 7 - I/O 0
= 1 --&gt; Pin becomes Input
= 0 --&gt; Pin becomes Output

Write Value: 0000 0000' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17  - write Operation ' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x40' />
						</command>
						<command class_type='call' title='Send Adress: IODIR-A' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x00' />
						</command>
						<command class_type='call' title='Send Data IODIR-A =  8x Digital Output' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x00' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='delay' title='Warten' exp='10' type='0' />
						<command class_type='comment' title='' comment='IPOL (Inverted Polarity Register) write Data (Ad: A=0x02 - B=0x03).

Reset Value: 0000 0000 
Operation: Read/Write

Bit 7 - Bit 0 = I/O 7 - I/O 0
= 1 --&gt; Pin Level = Inverted GPIO Level
= 0 --&gt; Pin Level = GPIO Level' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17  - write Operation' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x40' />
						</command>
						<command class_type='call' title='Send Adress: IPOL-B (Input)' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x03' />
						</command>
						<command class_type='call' title='Send Data IPOL-B = Pin Level -&gt; Inverted GPIO Level' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0xFF' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='delay' title='Warten' exp='10' type='0' />
						<command class_type='comment' title='' comment='GPPU (GPIO Pull Up Register) write Data (Ad: A=0x0C - B=0x0D).

Reset Value: 0000 0000 
Operation: Read/Write

Bit 7 - Bit 0 = I/O 7 - I/O 0
= 1 --&gt; Pull-up enabled
= 0 --&gt; Pull-up disbled' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17  - write Operation' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x40' />
						</command>
						<command class_type='call' title='Send Adress: GPPU-B (Input)' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x0D' />
						</command>
						<command class_type='call' title='Send Data GPPU-B = Pull up Enabled' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0xFF' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='delay' title='Warten' exp='10' type='0' />
						<command class_type='comment' title='' comment='-------------------- 2.) Initialise MCP23S17_1 to Enter Adressed Mode --------------------                                                                        ' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='IOCON (I/O Control Register) write Data (Ad: A=0x0A - B=0x0B).

Reset Value: 0000 0000 
Operation: Read/Write

Bit 7: Bank = 1 --&gt; Bank1
                  = 0 --&gt; Bank 0
Bit 6: Mirror = 1 --&gt; INT Pins connected internal
                   = 0 --&gt; INT Pins not connected (INTA=Port A - INTB=PortB)
Bit 5: SEQOP = 1 --&gt; Byte Mode Enabled. Adress Pointer does not increment
                      = 0 --&gt; Sequential Mode Enabled. Adress Pointer increments
Bit 4: DISSLW = 1 --&gt; Slew Rate Disabled
                        = 0 --&gt; Slew Rate Enabled
Bit 3: HAEN = 1 --&gt; Enable Adress Pins
                    = 0 --&gt; Disable Adress Pins
Bit 2: ODR = 1 --&gt; Open-drain Function (overrides INTPOL Bit)
                  = 0 --&gt; Active driver Output (INTPOL Bit sets polarity)
Bit 1: INTPOL = 1 --&gt; INT Pins Active High
                       = 0 --&gt; INT Pins Active Low
Bit 0: Unimplemented = Read as Logic 0' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_1 (Ad.1) - write Operation ' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x40' />
						</command>
						<command class_type='call' title='Send Adress: IOCON-A (Output)' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x0A' />
						</command>
						<command class_type='call' title='Send Data ICON-A = Hardware Address Enable' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x08' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='delay' title='Warten' exp='10' type='0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_1 (Ad.1) - write Operation ' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x40' />
						</command>
						<command class_type='call' title='Send Adress: IOCON-B (Input)' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x0B' />
						</command>
						<command class_type='call' title='Send Data ICON-B = Hardware Address Enable' ccode='// Send Data ICON-B = HAEN=1 / xxxxx=x
// Aufruf Komponenten-Makro: SPI_Master1_COM3::SendChar(0x08)
FCD_06c41_SPI_Master1_COM3__SendChar(0x08);
' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x08' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='comment' title='' comment='-------------------- 3.) Initialise MCP23S17_2 to Enter Adressed Mode --------------------                                                                        ' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_2 (Ad.2) - write Operation ' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x42' />
						</command>
						<command class_type='call' title='Send Adress: IOCON-B (Input)' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x0A' />
						</command>
						<command class_type='call' title='Send Data ICON-B = Hardware Address Enable' ccode='// Send Data ICON-B = HAEN=1 / xxxxx=x
// Aufruf Komponenten-Makro: SPI_Master1_COM3::SendChar(0x08)
FCD_06c41_SPI_Master1_COM3__SendChar(0x08);
' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x08' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='delay' title='Warten' exp='10' type='0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_1 (Ad.2) - write Operation ' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x42' />
						</command>
						<command class_type='call' title='Send Adress: IOCON-B (Input)' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x0B' />
						</command>
						<command class_type='call' title='Send Data ICON-B = Hardware Address Enable' ccode='// Send Data ICON-B = HAEN=1 / xxxxx=x
// Aufruf Komponenten-Makro: SPI_Master1_COM3::SendChar(0x08)
FCD_06c41_SPI_Master1_COM3__SendChar(0x08);
' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x08' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='comment' title='' comment='-------------------- 4.) Initialise MCP23S17_3 to Enter Adressed Mode --------------------                                                                        ' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_31 (Ad.3) - write Operation ' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x44' />
						</command>
						<command class_type='call' title='Send Adress: IOCON-B (Input)' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x0A' />
						</command>
						<command class_type='call' title='Send Data ICON-B = Hardware Address Enable' disable='1' ccode='// Send Data ICON-B = HAEN=1 / xxxxx=x
// Aufruf Komponenten-Makro: SPI_Master1_COM3::SendChar(0x08)
FCD_06c41_SPI_Master1_COM3__SendChar(0x08);
' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x08' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='delay' title='Warten' disable='1' exp='10' type='0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_3 (Ad.3) - write Operation ' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x44' />
						</command>
						<command class_type='call' title='Send Adress: IOCON-B (Input)' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x0B' />
						</command>
						<command class_type='call' title='Send Data ICON-B = Hardware Address Enable' disable='1' ccode='// Send Data ICON-B = HAEN=1 / xxxxx=x
// Aufruf Komponenten-Makro: SPI_Master1_COM3::SendChar(0x08)
FCD_06c41_SPI_Master1_COM3__SendChar(0x08);
' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x08' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='comment' title='' comment='-------------------- 5.) Initialise MCP23S17_4 to Enter Adressed Mode --------------------                                                                        ' textarea='12,0,12,0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_4 (Ad.4) - write Operation ' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x46' />
						</command>
						<command class_type='call' title='Send Adress: IOCON-B (Input)' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x0A' />
						</command>
						<command class_type='call' title='Send Data ICON-B = Hardware Address Enable' disable='1' ccode='// Send Data ICON-B = HAEN=1 / xxxxx=x
// Aufruf Komponenten-Makro: SPI_Master1_COM3::SendChar(0x08)
FCD_06c41_SPI_Master1_COM3__SendChar(0x08);
' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x08' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='delay' title='Warten' disable='1' exp='10' type='0' />
						<command class_type='output' title='Select SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='0' />
						<command class_type='call' title='Send Device Opcode: MCP23S17_4 (Ad.4) - write Operation ' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x46' />
						</command>
						<command class_type='call' title='Send Adress: IOCON-B (Input)' disable='1' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x0B' />
						</command>
						<command class_type='call' title='Send Data ICON-B = Hardware Address Enable' disable='1' ccode='// Send Data ICON-B = HAEN=1 / xxxxx=x
// Aufruf Komponenten-Makro: SPI_Master1_COM3::SendChar(0x08)
FCD_06c41_SPI_Master1_COM3__SendChar(0x08);
' component='SPI_Master1_COM3' macro='SendChar' >
							<argument exp='0x08' />
						</command>
						<command class_type='output' title='Deselect SPI Address 1 (CS0)' disable='1' mode='1' port='1048577' mask='1' exp='1' />
						<command class_type='comment' title='' comment='!!!!!!!!!! From these Point are all Registers in the MCP23S17 SPI Network only in Adressing Mode available !!!!!!!!!!' textarea='12,0,12,0' disable='1' />
						<command class_type='delay' title='Warten' exp='100' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='_X12_PWM_Set_Frequency' description='Set PWM0 Frequency' >
						<command class_type='comment' title='' comment='
********** Subroutine: Set the PWM0 Frequency **********


comes from:
Macro -&gt; _X1_Main_Program_Start

Changeable Values:
Values for Encoder Start and Stop Areas
(X1R/X1L/X2R/X2L/XR/XL)

Programm function detail:
- When PWM0 is Enable, drive PWM0 Port with PWM Frequency


Input Variables:
Encoder_Value: Actual Value of the Encoder Counter Register' textarea='12,0,12,0' />
						<command class_type='decision' title='Is PWM0 Manual Drive Enable ?' exp='_4_PWM0_ManualDriveEN = 1' swap='0' >
							<flowline >
								<command class_type='decision' title='Is TaskCycle Timer 1 finished' exp='_0_TaskCycle_Timer1 = 0' swap='0' >
									<flowline >
										<command class_type='comment' title='' comment='---------- Set PWM Frequency ----------' textarea='12,0,12,0' />
										<command class_type='call' title='Aufruf Komponenten-Makro' component='PWM' macro='SetDutyCycle' >
											<argument exp='_4_PWM_Frequency' />
										</command>
										<command class_type='call' title='Drive PWM0 Port with Variable' disable='1' component='PWM' macro='SetDutyCycle10Bit' >
											<argument exp='_4_PWM_Frequency' />
										</command>
										<command class_type='delay' title='Warten' disable='1' exp='5' type='1' />
										<command class_type='comment' title='' comment='Maschine Cycle Timer' textarea='12,0,12,0' />
										<command class_type='calculation' title='Disable Task fox &quot;X&quot; Machine Cycles' >
											<exp exp='_0_TaskCycle_Timer1 = 1000' />
										</command>
									</flowline>
									<flowline >
										<command class_type='comment' title='' comment='Makro is for &quot;X&quot; Cycles disabled after setting PWM Frequency' textarea='12,0,12,0' />
										<command class_type='calculation' title='Port Disable Counter -1' >
											<exp exp='_0_TaskCycle_Timer1 = _0_TaskCycle_Timer1 - 1' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='Flowcode Universal Test Application' >
						<command class_type='comment' title='' comment='
Programm function OK:
1.) Serial COM (UARTR0) to EDIP Touch Display
2.) Software quadrature Encoder
3.) MCP23S17 - SPI Read/Write Digital I/O with Hardware Address

Programm function not OK:
1.) Hardware PWM cannot change in running Program Duty Cycle (Enable PWM check)
2.) When jump in RXINT1 CPU craches

Program function in test:
1.) WIZ W810MJ Webserver / TCP/IP Industrial Ethernet Protocol

Variables:
no Variables' textarea='12,0,12,0' />
						<command class_type='call' title='Initialise Internal CPU Peripheral' macro='SYS_Initialise_Peripheral' />
						<command class_type='call' title='Initialise MCP23S17 - SPI_Digital I/O' macro='SYS_Initialise_MCP23S17_1' />
						<command class_type='call' title='Initialise MCP3208 - ADC 8ch. 12bit' disable='1' macro='SYS_Initialise_MCP23S17_1' />
						<command class_type='call' title='Initialise MCP4922 - DAC 2ch. 12bit' disable='1' macro='SYS_Initialise_MCP23S17_1' />
						<command class_type='call' title='Initialise ENC 28J60 - Ethernet COM#4' disable='1' macro='SYS_Initialise_MCP23S17_1' />
						<command class_type='comment' title='' comment='-------------------- Main Cycle --------------------                                                                             
' textarea='12,0,12,0' />
						<command class_type='loop' title='Schleife' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Communication Task Synchronisation' macro='SYS_ComCycleSynchronisation' />
								<command class_type='call' title='Error Code Request' macro='Error_Code_Request' />
								<command class_type='decision' title='Is Error Code Bit Set ?' exp='_1_Error_Code_Bit = 1' swap='0' >
									<flowline >
										<command class_type='call' title='Makro-Aufruf' macro='_X10_Main_Program_Start' />
									</flowline>
									<flowline >
										<command class_type='call' title='Makro-Aufruf' macro='_X10_Main_Program_Start' />
									</flowline>
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='3' vmaj='1' codename='UART0_HMI' x='-88' y='48' z='22.055' xsz='60' ysz='26' zsz='1.51' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='002' />
					<value target='BAUD_LIST' data='009' />
					<value target='BAUD' data='9600' />
					<value target='DBITS' data='008' />
					<value target='RETURN' data='000' />
					<value target='ToutVal' data='255' />
					<value target='FLOWEN' data='000' />
					<value target='ECHO' data='000' />
					<value target='TX' data='$PORTA.6' />
					<value target='RX' data='$PORTA.5' />
					<value target='CTS' data='$PORTB.1' />
					<value target='RTS' data='$PORTB.2' />
					<value target='TXRemap' data='' />
					<value target='RXRemap' data='' />
					<value target='label' data='RS232' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='1' />
					<value target='ConsoleColumns' data='64' />
					<value target='DataSource' data='001' />
					<value target='com_port' data='003' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c34f9b8a-a915-4f75-ad0c-87f2ad670a8a' vmin='4' vmaj='1' codename='UART0_RXD_Memory' x='-48' y='48' z='0' xsz='20' ysz='20' zsz='20' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='BufferSize' data='32' />
					<value target='StorageType' data='000' />
					<value target='MemType' data='000' />
					<value target='RETURN' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='3531a68d-7686-44b7-a3a5-67afda8467dc' vmin='3' vmaj='1' codename='QuadEncoder1' x='88' y='-56' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='pin_a' data='$PORTC.0' />
					<value target='pin_b' data='$PORTC.1' />
					<value target='reprate' data='350' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='6' vmaj='1' codename='PWM' x='-88' y='-56' z='8.20287' xsz='1.06667' ysz='1.06667' zsz='1.06667' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='001' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTA.0' />
					<value target='RemapPin' data='' />
					<value target='timer' data='000' />
					<value target='period' data='255' />
					<value target='prescale' data='010' />
					<value target='period_calc' data='5470.085449' />
					<value target='frequency_calc' data='0.182812' />
					<value target='pwm_prescale' data='1024' />
					<value target='SimRep' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c34f9b8a-a915-4f75-ad0c-87f2ad670a8a' vmin='4' vmaj='1' codename='Error_Code_Memory' x='56' y='-16' z='0' xsz='20' ysz='20' zsz='20' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='BufferSize' data='16' />
					<value target='StorageType' data='000' />
					<value target='MemType' data='000' />
					<value target='RETURN' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='24219805-113d-4b12-b6bd-e1b0b0c33981' vmin='3' vmaj='1' codename='I2C_Master1_COM2' x='-88' y='16' z='0' xsz='60' ysz='26' zsz='1.51' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='000' />
					<value target='BAUD_LIST' data='000' />
					<value target='SRC' data='000' />
					<value target='SMB' data='000' />
					<value target='BAUD' data='1000' />
					<value target='SDA' data='$PORTA.3' />
					<value target='SCL' data='$PORTA.4' />
					<value target='label' data='I2C Master' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='6' vmaj='1' codename='PWM1' x='-24' y='-56' z='7.94753' xsz='1.06667' ysz='1.06667' zsz='1.06667' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='001' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTA.0' />
					<value target='RemapPin' data='' />
					<value target='timer' data='2' />
					<value target='period' data='255' />
					<value target='prescale' data='000' />
					<value target='period_calc' data='5.341880' />
					<value target='frequency_calc' data='187.199997' />
					<value target='pwm_prescale' data='1' />
					<value target='SimRep' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='6' vmaj='1' codename='PWM2' x='40' y='-56' z='9.96753' xsz='1.06667' ysz='1.06667' zsz='1.06667' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='001' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTA.0' />
					<value target='RemapPin' data='' />
					<value target='timer' data='2' />
					<value target='period' data='255' />
					<value target='prescale' data='000' />
					<value target='period_calc' data='5.341880' />
					<value target='frequency_calc' data='187.199997' />
					<value target='pwm_prescale' data='1' />
					<value target='SimRep' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c34f9b8a-a915-4f75-ad0c-87f2ad670a8a' vmin='4' vmaj='1' codename='I2C_RXD_Memory' x='-48' y='16' z='0' xsz='20' ysz='20' zsz='20' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='BufferSize' data='16' />
					<value target='StorageType' data='000' />
					<value target='MemType' data='000' />
					<value target='RETURN' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='3' vmaj='1' codename='UART1_COM1' x='8' y='48' z='0' xsz='60' ysz='26' zsz='1.51' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='001' />
					<value target='BAUD_LIST' data='009' />
					<value target='BAUD' data='9600' />
					<value target='DBITS' data='008' />
					<value target='RETURN' data='000' />
					<value target='ToutVal' data='255' />
					<value target='FLOWEN' data='000' />
					<value target='ECHO' data='000' />
					<value target='TX' data='$PORTC.6' />
					<value target='RX' data='$PORTC.5' />
					<value target='CTS' data='$PORTB.1' />
					<value target='RTS' data='$PORTB.2' />
					<value target='TXRemap' data='' />
					<value target='RXRemap' data='' />
					<value target='label' data='RS232' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='0' />
					<value target='ConsoleColumns' data='64' />
					<value target='DataSource' data='001' />
					<value target='com_port' data='003' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c34f9b8a-a915-4f75-ad0c-87f2ad670a8a' vmin='4' vmaj='1' codename='UART1_RXD_Memory' x='56' y='48' z='0' xsz='20' ysz='20' zsz='20' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='BufferSize' data='32' />
					<value target='StorageType' data='000' />
					<value target='MemType' data='000' />
					<value target='RETURN' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='96862c4d-debc-45fa-9433-74711a4b9a3b' vmin='3' vmaj='1' codename='SPI_Master1_COM3' x='8' y='16' z='0' xsz='60' ysz='26' zsz='1.51' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='001' />
					<value target='PR_SCALE' data='004' />
					<value target='CKP' data='001' />
					<value target='CKE' data='000' />
					<value target='SMP' data='001' />
					<value target='MOSI' data='$PORTB.5' />
					<value target='MISO' data='$PORTB.4' />
					<value target='CLK' data='$PORTB.6' />
					<value target='MosiRemap' data='' />
					<value target='MisoRemap' data='' />
					<value target='ClkRemap' data='' />
					<value target='label' data='SPI  Master' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='0' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c34f9b8a-a915-4f75-ad0c-87f2ad670a8a' vmin='4' vmaj='1' codename='SPI_RXD_Memory' x='56' y='16' z='0' xsz='20' ysz='20' zsz='20' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='BufferSize' data='16' />
					<value target='StorageType' data='000' />
					<value target='MemType' data='000' />
					<value target='RETURN' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c34f9b8a-a915-4f75-ad0c-87f2ad670a8a' vmin='4' vmaj='1' codename='TCP_IP_RXD_Memory' x='-48' y='-16' z='0' xsz='20' ysz='20' zsz='20' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='BufferSize' data='128' />
					<value target='StorageType' data='000' />
					<value target='MemType' data='000' />
					<value target='RETURN' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='9e68a715-edc2-4a98-be64-c0d02f700135' vmin='4' vmaj='1' codename='Webserver_WIZ_W5100' x='8' y='-16' z='1.16' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='label' data='Web Server' />
					<value target='max_channels' data='4' />
					<value target='html_source' data='000' />
					<value target='Directory' data='' />
					<value target='max_pages' data='4' />
					<value target='name1' data='index.htm' />
					<value target='html1' data='&lt;html&gt;
&lt;body&gt;
&lt;h1&gt;
test page index.htm
&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;' />
					<value target='name2' data='page2.htm' />
					<value target='html2' data='' />
					<value target='name3' data='page3.htm' />
					<value target='html3' data='' />
					<value target='name4' data='page4.htm' />
					<value target='html4' data='' />
					<value target='channel' data='001' />
					<value target='MOSI_pin' data='$PORTB.5' />
					<value target='MISO_pin' data='$PORTB.4' />
					<value target='CLK_pin' data='$PORTB.6' />
					<value target='CS_pin' data='$PORTB.7' />
					<value target='int_pin' data='$PORTD.5' />
					<value target='MosiRemap' data='' />
					<value target='MisoRemap' data='' />
					<value target='ClkRemap' data='' />
					<value target='gateway0' data='192' />
					<value target='gateway1' data='168' />
					<value target='gateway2' data='1' />
					<value target='gateway3' data='10' />
					<value target='subnet0' data='255' />
					<value target='subnet1' data='255' />
					<value target='subnet2' data='255' />
					<value target='subnet3' data='0' />
					<value target='ip0' data='192' />
					<value target='ip1' data='168' />
					<value target='ip2' data='1' />
					<value target='ip3' data='61' />
					<value target='mac0' data='0' />
					<value target='mac1' data='8' />
					<value target='mac2' data='221' />
					<value target='mac3' data='0' />
					<value target='mac4' data='0' />
					<value target='mac5' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='SYS_Initialise_Peripheral' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAfwQAAKgDAAA' zoom='50' scrollx='0' scrolly='1619' flags='0' />
		<view type='0' name='SYS_ComCycleSynchronisation' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAfwQAAKgDAAA' zoom='50' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAfwQAAKgDAAA' zoom='50' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='_X10_Main_Program_Start' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAfwQAAKgDAAA' zoom='50' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='_X13_Webserver_activity' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAfwQAAKgDAAA' zoom='50' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
