ECHO ON
ECHO "Start Log File: %LogbookConnection%" > %LogbookConnection%
ECHO "Batch Status = RUN" >> %LogbookConnection%
*-------------------------------------------------------------------------------------------
*Warte bis %MarkerPLCStatus% FALSE ist
ECHO "WAIT ON PLC = RUN" >> %LogbookConnection%
CLS
@MESSAGE "Bitte den NC-Betrieb mit NC-Stop"
@MESSAGE "oder mit Einzelsatz unterbrechen!"
@MESSAGE " "
@MESSAGE "Nach erfolgreicher Uebertragung kann der"
@MESSAGE "NC-Betrieb wieder aufgenommen werden."
@WAIT UNTIL %MarkerPLCStatus% = 0
ECHO " %MarkerPLCStatus% <> 0 WAIT" >> %LogbookConnection%
Message @Close
ECHO " %MarkerPLCStatus% = 0 NEXT" >> %LogbookConnection%
*-------------------------------------------------------------------------------------------
*Warte bis %MarkerTTEditStatus% FALSE ist
CLS
@MESSAGE "Bitte die Werkzeugtabelle verlassen,"
@MESSAGE "oder auf 'EDITIEREN AUS' umschalten!"
@WAIT UNTIL %MarkerTTEditStatus% = 0
ECHO " %MarkerTTEditStatus% <> 0 WAIT" >> %LogbookConnection%
Message @close
ECHO " %MarkerTTEditStatus% = 0 NEXT" >> %LogbookConnection%
ECHO "WAIT ON PLC = READY" >> %LogbookConnection%
*-------------------------------------------------------------------------------------------
*Kopiert, wenn %BUTNCCreate% TRUE ist, %TNCTTFile% unter dem Name %BUFileSyntax%, nach %BUTNCPath%
ECHO "COPY %TNCTTFile% %BUTNCPath%%BUFileSyntax% = RUN" >> %LogbookConnection%
ENVGET BUTNCCreate
ON OUTPUT 1 "FALSE" GOTO WithoutBUTNC
COPY %TNCTTFile% %BUTNCPath%%BUFileSyntax%
ECHO "COPY %TNCTTFile% %BUTNCPath%%BUFileSyntax% = READY" >> %LogbookConnection%
ECHO "%DelFileExtensionTNC%%BUTNCPath%%BUFileSyntax%" >> %LogbookChronology%
ON ALWAYS GOTO BUTNCCreateOk
*-------------------------------------------------------------------------------------------
:WithoutBUTNC
ECHO "COPY %TNCTTFile% %BUTNCPath%%BUFileSyntax% = COPY CANCEL" >> %LogbookConnection%
:BUTNCCreateOk
*-------------------------------------------------------------------------------------------
*Kopiert, wenn %BUTNCCreate% TRUE ist, %TNCTTFile% unter dem Name %BUFileSyntax%, nach %BUPCPath%
ECHO "GET %TNCTTFile% %BUPCPath%%BUFileSyntax% = RUN" >> %LogbookConnection%
ENVGET BUPCCreate
ON OUTPUT 1 "FALSE" GOTO WithoutBUPC
GET %TNCTTFile% %BUPCPath%%BUFileSyntax%
ECHO "GET %TNCTTFile% %BUPCPath%%BUFileSyntax% = READY" >> %LogbookConnection%
ECHO "%DelFileExtensionPC%%BUPCPath%%BUFileSyntax%" >> %LogbookChronology%
ON ALWAYS GOTO BUPCCreateOk
*-------------------------------------------------------------------------------------------
:WithoutBUPC
ECHO "GET %TNCTTFile% %BUPCPath%%BUFileSyntax% = COPY CANCEL" >> %LogbookConnection%
:BUPCCreateOk
*-------------------------------------------------------------------------------------------
*Synchronisiert %TNCTTFile% mit %TTListFileName%
ECHO "PUT %TTListFileName% %TNCTTFile% = RUN" >> %LogbookConnection%
PUT %TTListFileName% %TNCTTFile% /m
ECHO "PUT %TTListFileName% %TNCTTFile% = READY" >> %LogbookConnection%
*-------------------------------------------------------------------------------------------
*Lösche die Dateien, welche in %BatchDelFile% aufgeführt sind
ECHO "#INCLUDE %BatchDelFile% = RUN" >> %LogbookConnection%
#INCLUDE %BatchDelFile%
ECHO "#INCLUDE %BatchDelFile% = READY" >> %LogbookConnection%
*-------------------------------------------------------------------------------------------
ECHO "Batch Status = READY" >> %LogbookConnection%
ECHO "End Log File: %LogbookConnection%, %Date% %Time%" >> %LogbookConnection%
*-------------------------------------------------------------------------------------------
EXIT