- Added robot schift params for aligning etcher 1 position - Added HMI Interface to robot fb - Added machine LED's at main cabinet - Aligner now works in auto mode - Added HMI interface to etcher station - Added cReleaseAlarms to HeatCoolPlates - Added HMI interface to HVTester - STarted tray feeder response parsing - Fixed some packml base state machine bugs
51 lines
1.4 KiB
XML
51 lines
1.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<TcPlcObject Version="1.1.0.1">
|
|
<POU Name="FB_StringRingbufferOwn" Id="{b0c904f8-c254-4be5-aa41-60a384fcb4a2}" SpecialFunc="None">
|
|
<Declaration><![CDATA[FUNCTION_BLOCK FB_StringRingbufferOwn
|
|
VAR_INPUT
|
|
END_VAR
|
|
VAR_OUTPUT
|
|
xHasData : BOOL;
|
|
xFull : BOOL;
|
|
END_VAR
|
|
VAR
|
|
_asBuffer : ARRAY[0..BUFFER_SIZE-1] OF STRING(255);
|
|
_uiWriteIdx : UINT := 0;
|
|
_uiReadIdx : UINT := 0;
|
|
_uiCount : UINT := 0;
|
|
END_VAR
|
|
VAR CONSTANT
|
|
BUFFER_SIZE : UINT := 10;
|
|
END_VAR
|
|
]]></Declaration>
|
|
<Implementation>
|
|
<ST><![CDATA[// Write outputs
|
|
xHasData := (_uiCount > 0);
|
|
xFull := (_uiCount >= BUFFER_SIZE);]]></ST>
|
|
</Implementation>
|
|
<Method Name="M_ReadData" Id="{2d123e62-f6df-4eb9-a215-009779534bc5}">
|
|
<Declaration><![CDATA[METHOD M_ReadData : STRING(255)
|
|
VAR_INPUT
|
|
END_VAR
|
|
]]></Declaration>
|
|
<Implementation>
|
|
<ST><![CDATA[]]></ST>
|
|
</Implementation>
|
|
</Method>
|
|
<Method Name="M_WriteData" Id="{dc0dd3d7-badb-4886-8590-850ff7625fa1}">
|
|
<Declaration><![CDATA[METHOD M_WriteData
|
|
VAR_INPUT
|
|
sData : STRING(255);
|
|
END_VAR
|
|
]]></Declaration>
|
|
<Implementation>
|
|
<ST><![CDATA[// Check if buffer is full
|
|
IF _uiCount < BUFFER_SIZE THEN
|
|
_asBuffer[_uiWriteIdx] := sData;
|
|
_uiWriteIdx := (_uiWriteIdx + 1) MOD BUFFER_SIZE;
|
|
_uiCount := _uiCount + 1;
|
|
END_IF]]></ST>
|
|
</Implementation>
|
|
</Method>
|
|
</POU>
|
|
</TcPlcObject> |