Added hot and cold plates
- Started spinner chuck io's
This commit is contained in:
@@ -1,38 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<POU Name="FB_TrayFeeder" Id="{e2e3e993-37de-42b1-80e1-7dba99a66e94}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION_BLOCK FINAL FB_TrayFeeder EXTENDS FB_Isa88_SM
|
||||
<Declaration><![CDATA[FUNCTION_BLOCK FINAL FB_TrayFeeder EXTENDS FB_PackMLGeneric
|
||||
VAR_INPUT
|
||||
xConfirmAlarms : BOOL;
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
END_VAR
|
||||
VAR
|
||||
_fbTcpConnection : FB_ClientServerConnection;
|
||||
_sIpAddr : STRING;
|
||||
_udiPort : UDINT;
|
||||
|
||||
_fbProtocolHandler : FB_TFProtocol;
|
||||
|
||||
_xTest : BOOL;
|
||||
_xSendResult : BOOL;
|
||||
_sCmd : STRING := 'STAT-FEED:';
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[// Call client server connection fb
|
||||
_fbTcpConnection(
|
||||
sSrvNetID:= '',
|
||||
nMode:= ,
|
||||
sRemoteHost:= _sIpAddr,
|
||||
nRemotePort:= ,
|
||||
bEnable:= ,
|
||||
tReconnect:= ,
|
||||
bBusy=> ,
|
||||
bError=> ,
|
||||
nErrId=> ,
|
||||
hSocket=> ,
|
||||
eState=> );
|
||||
<ST><![CDATA[// IPs
|
||||
// 192.168.1.10
|
||||
// 192.168.1.11
|
||||
_fbProtocolHandler(
|
||||
sIpAddr:= _sIpAddr,
|
||||
udiPort:= _udiPort,
|
||||
xConfirmAlarms:= xConfirmAlarms,
|
||||
xConnected=> ,
|
||||
xNewResponseReady=> ,
|
||||
xBusy=> ,
|
||||
xError=> );
|
||||
|
||||
IF _xTest THEN
|
||||
_xTest := FALSE;
|
||||
|
||||
_xSendResult := _fbProtocolHandler.M_SendCmd(sCmd := _sCmd);
|
||||
END_IF
|
||||
|
||||
// Call isa88 base state machine
|
||||
SUPER^();
|
||||
|
||||
// IPs
|
||||
// 192.168.1.10
|
||||
// 192.168.1.11]]></ST>
|
||||
SUPER^();]]></ST>
|
||||
</Implementation>
|
||||
<Method Name="FB_init" Id="{6c7048d9-3836-4289-b5f3-f8878267494f}">
|
||||
<Declaration><![CDATA[//FB_Init ist immer implizit verfügbar und wird primär für die Initialisierung verwendet.
|
||||
@@ -48,8 +54,17 @@ sIPAddr : STRING;
|
||||
udiPort : UDINT;
|
||||
END_VAR]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[_sIpAddr := sIPAddr;
|
||||
_udiPort := udiPort;]]></ST>
|
||||
<ST><![CDATA[// Save connection settings
|
||||
_sIpAddr := sIPAddr;
|
||||
_udiPort := udiPort;
|
||||
|
||||
// Config state machine
|
||||
_stSMConfig.xStoppingDisabled := TRUE;
|
||||
|
||||
_stSMConfig.xCompletingDisabled := TRUE;
|
||||
_stSMConfig.xCompletedDisabled := TRUE;
|
||||
|
||||
_stSMConfig.xAbortingDisabled := TRUE;]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
</POU>
|
||||
|
||||
Reference in New Issue
Block a user