***************************************************************************** 1. Skrypt: StartBatch Expression: Me.JobExec.JobPos0.CurWoId Skladnia: ' ***** StartBatch Script ***** ' ' This script monitors whether a job has been started in this entity ' and then downloads the batch target and starts a new batch in the Filler ' Verify that there is a job currently running in the Filler IF(NOT System.String.IsNullOrEmpty(Me.JobExec.JobPos0.CurWoId)) THEN ' Download batch target to the Filler MyContainer.BatchTarget = Me.JobExec.JobPos0.QtyReqd; ' Counter Reset Me.JobExec.JobPos0.Prod.PackCnt.ResetRollingCounterCmd = true; ' Start the Filler MyContainer.RunCmd = true; ' After start, the Filler will start producing based on the target ENDIF; ***************************************************************************** 2. Skrypt: EndBatch Expression: MyContainer.RunningStatus Skladnia: ' ***** EndBatch Script ***** ' ' This script detects when the Filler stops ' and then end the job currently running in the Filler ' Verify that there is a job currently running in the Filler IF(NOT System.String.IsNullOrEmpty(Me.JobExec.JobPos0.CurWoId)) THEN ' End current job Me.JobExec.EndJobCmd = true; ENDIF; ***************************************************************************** 3. Skrypt: BatchRunning Expression: Me.RunningStatus Skladnia: Me.UnitsCount = Me.UnitsCount + 1; if(Me.UnitsCount >= Me.BatchTarget) then Me.StopCmd = True; Endif; ***************************************************************************** 4. Skrypt: BatchStart Expression: Me.RunCmd Skladnia: Me.UnitsCount = 0; Me.RunningStatus = True; Me.RunCmd = False; ***************************************************************************** 5. Skrypt: BatchStop Expression: Me.StopCmd Skladnia: Me.RunningStatus = False; Me.BatchTarget=0; Me.StopCmd = False; *****************************************************************************