Obsidean_VM/04-SIDEL/00 - MASTER/Source/source/ProdReportManager.md

25 KiB

// Block Type: FC
// Block Number: 601
// Original Network Languages: LAD, STL

FUNCTION "ProdReportManager" : Void
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1

VAR_TEMP
  DUTY_TIME : Real;
  FAULT : Int;
  DBDim : Word;
  Loop_Count : Int;
END_VAR

  #_1 : Bool; // Auto-generated temporary
BEGIN

  // Network 1: EMPTY SEG. (Original Language: STL)

  // --- BEGIN STL Network 1 ---
   
     	NOP_0
   
  // --- END STL Network 1 ---

  // Network 2: REPORT END (Original Language: STL)

  // --- BEGIN STL Network 2 ---
   
     	AN	"PRDRepStarted"
     	JC	M250
     
     	L	2
     	A	"gBlenderCIPMode"
     	JC	M201
     
     	A	"System_RunOut_Variables".ProdPipe_RunOut.Done
     	Rise	"FP_PRDRepEndSupport"
     	JCN	M250
     	L	0
     	L	"PRDRepComment"
     	NE_I
     	JC	M201
     	L	1
     M201:   		T	"ProdReportDB".General.Comment
     	SET
     	R	"ProdReportDB".General.ReportProdStart
     	S	"ProdReportDB".General.ReportProdEnd
     	L	0
     	T	"MB604"
     	BEU
     M250:   		NOP_0
   
  // --- END STL Network 2 ---

  // Network 3: REPORT INITIALIZATION (Original Language: STL)

  // --- BEGIN STL Network 3 ---
   
     	A	"HMI_Blender_Parameters".Processor_Options.Blender_OPT._Report
     	A	"Procedure_Variables".Blender_Run.Latch
     	AN	"gBlenderRinseMode"
     	AN	"PRDRepStarted"
     	A	"gBlenderProdMode"
     	Rise	"FP_PRDRepStartSupport"
     	JCN	M350
     
     	AUF DI	"ProdReportDB"
     	L_DILG
     	T	"DBDim"
     	LAR1	P#0.0
     	L	"DBDim"
     	L	2
     	DIV_I
     M300:   		T	"Loop_Count"
     	L	0
     	T	DIW[AR1,P#0.0]
     	ADDAR1	P#2.0
     	L	"Loop_Count"
     	LOOP	M300
     
     	SET
     	S	"ProdReportDB".General.ReportProdStart
     	R	"ProdReportDB".General.ReportProdEnd
     	S	"PRDRepStarted"
     	L	"HMI_Variables_Cmd".Recipe.Active_Recipe_Running
     	T	"ProdReportDB".General.ActiveRecipeRunning
     	L	0
     	T	"PRDRepComment"
     M350:   		NOP_0
   
  // --- END STL Network 3 ---

  // Network 4: REPORT CHECK START (Original Language: STL)

  // --- BEGIN STL Network 4 ---
   
     	A	"HMI_Blender_Parameters".Processor_Options.Blender_OPT._Report
     	AN	"PRDRepStarted"
     	BEC
     	AUF DI	"ProdReportDB"
   
  // --- END STL Network 4 ---

  // Network 5: REPORT ACTUAL RECIPE UPDATE (Original Language: STL)

  // --- BEGIN STL Network 5 ---
   
     	CALL	_Call_?
   
  // --- END STL Network 5 ---

  // Network 6: REPORT PRODUCTION TOTAL TIME (Original Language: LAD)

  IF "CLK_1.0S" THEN
    "ProdReportDB"."General"."TotalTime" := DINT#1 + "ProdReportDB"."General"."TotalTime";
  END_IF;

  // Network 7: REPORT PRODUCTION PREPARATION TIME (Original Language: LAD)

  IF ("CLK_1.0S" AND "Procedure_Variables"."TN301_StartUp"."Latch") OR ("CLK_1.0S" AND "Procedure_Variables"."CarboWaterLine"."Latch") THEN
    "ProdReportDB"."General"."PreparationTime" := DINT#1 + "ProdReportDB"."General"."PreparationTime";
  END_IF;

  // Network 8: REPORT PRODUCTION PRODUCTION TIME (Original Language: STL)

  // --- BEGIN STL Network 8 ---
   
     	A	CLK_1.0S
     	A	"Procedure_Variables".Blender_Run.Latch
     	A	"Procedure_Variables".First_Production.Done
     	AN_BRACK
     	O	"Procedure_Variables".Syr_RunOut.Latch
     	O	"Procedure_Variables".TM301_RunOut.Latch
     	O	"System_RunOut_Variables".System_RunOut.Latch
     	O	"System_RunOut_Variables".ProdPipe_RunOut.Latch
     	BRACKET
     	JNB	_006
     	L	DINT#1
     	L	"ProdReportDB".General.ProductionTime
     	ADD_D
     	T	"ProdReportDB".General.ProductionTime
     _006:   		NOP_0
   
  // --- END STL Network 8 ---

  // Network 9: REPORT PRODUCTION RUN OUT TIME (Original Language: LAD)

  IF ("CLK_1.0S" AND "Procedure_Variables"."Blender_Run"."Latch" AND "Procedure_Variables"."Syr_RunOut"."Latch") OR ("CLK_1.0S" AND "Procedure_Variables"."Blender_Run"."Latch" AND "Procedure_Variables"."TM301_RunOut"."Latch") THEN
    "ProdReportDB"."General"."RunOutTime" := DINT#1 + "ProdReportDB"."General"."RunOutTime";
  END_IF;

  // Network 10: REPORT PRODUCTION WAITING TIME (Original Language: STL)

  // --- BEGIN STL Network 10 ---
   
     	A_BRACK
     	AN	"Procedure_Variables".First_Production.Done
     	A_BRACK
     	O_BRACK
     	A	"Procedure_Variables".TN301_StartUp.Latch
     	A	"Procedure_Variables".TN301_StartUp.Wait
     	AN	"Procedure_Variables".TN301_StartUp.Done
     	BRACKET
     	O_BRACK
     	A	"Procedure_Variables".CarboWaterLine.Latch
     	A	"Procedure_Variables".CarboWaterLine.Wait
     	AN	"Procedure_Variables".CarboWaterLine.Done
     	BRACKET
     	O_BRACK
     	A	"Procedure_Variables".FTP302Line_Preparation.Latch
     	A	"Procedure_Variables".FTP302Line_Preparation.Wait
     	AN	"Procedure_Variables".FTP302Line_Preparation.Done
     	O_BRACK
     	A	"Procedure_Variables".FTP302_StartUp.Latch
     	A	"Procedure_Variables".FTP302_StartUp.Wait
     	AN	"Procedure_Variables".FTP302_StartUp.Done
     	BRACKET
     	BRACKET
     	O_BRACK
     	A	"Procedure_Variables".BlendFill_StartUp.Latch
     	A	"Procedure_Variables".BlendFill_StartUp.Wait
     	AN	"Procedure_Variables".BlendFill_StartUp.Done
     	BRACKET
     	O_BRACK
     	A	"Procedure_Variables".First_Production.Latch
     	A	"Procedure_Variables".First_Production.Wait
     	BRACKET
     	BRACKET
     
     	O_BRACK
     	A	"Procedure_Variables".First_Production.Done
     	A	"Procedure_Variables".Blender_Run.Latch
     	A	"Procedure_Variables".Blender_Run.Wait
     	AN_BRACK
     	O	"Procedure_Variables".Syr_RunOut.Latch
     	O	"Procedure_Variables".TM301_RunOut.Latch
     	O	"System_RunOut_Variables".System_RunOut.Latch
     	O	"System_RunOut_Variables".ProdPipe_RunOut.Latch
     	BRACKET
     	BRACKET
     
     	O_BRACK
     	A	"Procedure_Variables".First_Production.Done
     	A_BRACK
     	O_BRACK
     	A	"Procedure_Variables".Syr_RunOut.Latch
     	A	"Procedure_Variables".Syr_RunOut.Wait
     	BRACKET
     	O_BRACK
     	A	"Procedure_Variables".TM301_RunOut.Latch
     	A	"Procedure_Variables".TM301_RunOut.Wait
     	BRACKET
     	O_BRACK
     	A	"System_RunOut_Variables".System_RunOut.Latch
     	A	"System_RunOut_Variables".System_RunOut.Wait
     	BRACKET
     	O_BRACK
     	A	"System_RunOut_Variables".ProdPipe_RunOut.Latch
     	A	"System_RunOut_Variables".ProdPipe_RunOut.Wait
     	BRACKET
     	BRACKET
     	BRACKET
     	BRACKET
     	A	CLK_1.0S
     	JCN	_008
     	L	DINT#1
     	L	"ProdReportDB".General.WaitingTime
     	ADD_D
     	T	"ProdReportDB".General.WaitingTime
     _008:   		NOP_0
   
  // --- END STL Network 10 ---

  // Network 11: REPORT PRODUCTION FAULT TIME (Original Language: STL)

  // --- BEGIN STL Network 11 ---
   
     	SET
     	R	"PRDRepFaultPresentAux"
     
     	A	"Procedure_Variables".Blender_Run.Latch
     	R	"PRDRepFaultPresent"
     
     	AUF	"HMI_Alarms"
     	L	P#0.0
     	LAR1_ACCU1
     _011:   		L	DBB[AR1,P#0.0]
     	L	WORD#2#0000_0000_0000_0000
     	NE_I
     	S	"PRDRepFaultPresentAux"
     	ADDAR1	P#1.0
     	TAR1_ACCU1
     	L	P#8.0
     	LT_D
     	JC	_011
     
     	L	P#16.0
     	LAR1_ACCU1
     _012:   		L	DBB[AR1,P#0.0]
     	L	WORD#2#0000_0000_0000_0000
     	NE_I
     	S	"PRDRepFaultPresentAux"
     	ADDAR1	P#1.0
     	TAR1_ACCU1
     	L	P#20.0
     	LT_D
     	JC	_012
     
     	A	"gBlenderProdMode"
     	A	"gBlenderAlarm"
     	A_BRACK
     	O	"PRDRepFaultPresentAux"
     	O	"gDeviceFault"
     	O	"gInstrumentFault"
     	O	"HMI_Device".PPN301.Alarm
     	O	"HMI_Device".PPP302.Alarm
     	O	"HMI_Device".PPM303.Alarm
     	O	"HMI_Device".PPN304.Alarm
     	O	"HMI_Device".PPN305.Alarm
     	O	"HMI_Device".PPM306.Alarm
     	BRACKET
     	S	"PRDRepFaultPresent"
     
     	AN	CLK_1.0S
     	ON	"PRDRepFaultPresent"
     	JC	_009
     	L	"ProdReportDB".General.MixerFaultTime
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".General.MixerFaultTime
     _009:   		NOP_0
     
     	NOP_0
   
  // --- END STL Network 11 ---

  // Network 12: REPORT PRODUCTION EXTERNAL FAULT TIME (Original Language: STL)

  // --- BEGIN STL Network 12 ---
   
     	SET
     	R	"PRDRepExtFaultPresentAux"
     
     	A	"Procedure_Variables".Blender_Run.Latch
     	R	"PRDRepExtFaultPresent"
     
     	AUF	"HMI_Alarms"
     	L	P#8.0
     	LAR1_ACCU1
     _013:   		L	DBB[AR1,P#0.0]
     	L	WORD#2#0000_0000_0000_0000
     	NE_I
     	S	"PRDRepExtFaultPresentAux"
     	ADDAR1	P#1.0
     	TAR1_ACCU1
     	L	P#16.0
     	LT_D
     	JC	_013
     
     	A	"gBlenderProdMode"
     	A	"gBlenderAlarm"
     	A_BRACK
     	O	"PRDRepExtFaultPresentAux"
     	O	"HMI_Device".SyrupRoom_SyrupPump.Alarm
     	O	"HMI_Device".SyrupRoom_WaterPump.Alarm
     	BRACKET
     	S	"PRDRepExtFaultPresent"
     
     	AN	CLK_1.0S
     	ON	"PRDRepExtFaultPresent"
     	JC	_010
     	L	"ProdReportDB".General.ExternalFaultTime
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".General.ExternalFaultTime
     _010:   		NOP_0
   
  // --- END STL Network 12 ---

  // Network 13: PRODUCTION PREPARATION SEQUENCE MANAGER (Original Language: STL)

  // --- BEGIN STL Network 13 ---
   
     	AN	CLK_1.0S
     	ON_BRACK
     	A	"gBlenderProdMode"
     	AN	"gBlenderRinseMode"
     	AN	"Procedure_Variables".First_Production.Done
     	BRACKET
     	JC	MS13
     
     	A	"Procedure_Variables".TN301_StartUp.Latch
     	JCN	M130
     	AN	"Procedure_Variables".TN301_StartUp.Wait
     	AN	"PRDRepFaultPresent"
     	AN	"PRDRepExtFaultPresent"
     	JCN	M131
     	L	"ProdReportDB".StartUp.Deaireator[0]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.Deaireator[0]
     	JU	M130
     M131:   		A	"PRDRepFaultPresent"
     	JCN	M132
     	L	"ProdReportDB".StartUp.Deaireator[1]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.Deaireator[1]
     M132:   		A	"PRDRepExtFaultPresent"
     	JCN	M133
     	L	"ProdReportDB".StartUp.Deaireator[2]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.Deaireator[2]
     M133:   		A	"Procedure_Variables".TN301_StartUp.Wait
     	JCN	M130
     	L	"ProdReportDB".StartUp.Deaireator[3]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.Deaireator[3]
     M130:   		NOP_0
     
     	A	"Procedure_Variables".FTP302Line_Preparation.Latch
     	O	"Procedure_Variables".FTP302_StartUp.Latch
     	JCN	M134
     	AN_BRACK
     	O	"Procedure_Variables".FTP302Line_Preparation.Wait
     	O	"Procedure_Variables".FTP302_StartUp.Wait
     	BRACKET
     	AN	"PRDRepFaultPresent"
     	AN	"PRDRepExtFaultPresent"
     	JCN	M135
     	L	"ProdReportDB".StartUp.Syrup[0]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.Syrup[0]
     	JU	M134
     M135:   		A	"PRDRepFaultPresent"
     	JCN	M136
     	L	"ProdReportDB".StartUp.Syrup[1]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.Syrup[1]
     M136:   		A	"PRDRepExtFaultPresent"
     	JCN	M137
     	L	"ProdReportDB".StartUp.Syrup[2]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.Syrup[2]
     M137:   		A	"Procedure_Variables".FTP302Line_Preparation.Wait
     	O	"Procedure_Variables".FTP302_StartUp.Wait
     	JCN	M134
     	L	"ProdReportDB".StartUp.Syrup[3]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.Syrup[3]
     M134:   		NOP_0
     
     	A	"Procedure_Variables".CarboWaterLine.Latch
     	JCN	M138
     	AN	"Procedure_Variables".CarboWaterLine.Wait
     	AN	"PRDRepFaultPresent"
     	AN	"PRDRepExtFaultPresent"
     	JCN	M139
     	L	"ProdReportDB".StartUp.CarboWaterLine[0]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.CarboWaterLine[0]
     	JU	M138
     M139:   		A	"PRDRepFaultPresent"
     	JCN	M13A
     	L	"ProdReportDB".StartUp.CarboWaterLine[1]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.CarboWaterLine[1]
     M13A:   		A	"PRDRepExtFaultPresent"
     	JCN	M13B
     	L	"ProdReportDB".StartUp.CarboWaterLine[2]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.CarboWaterLine[2]
     M13B:   		A	"Procedure_Variables".CarboWaterLine.Wait
     	JCN	M138
     	L	"ProdReportDB".StartUp.CarboWaterLine[3]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.CarboWaterLine[3]
     M138:   		NOP_0
     
     	A	"Procedure_Variables".BlendFill_StartUp.Latch
     	JCN	M13C
     	AN	"Procedure_Variables".BlendFill_StartUp.Wait
     	AN	"PRDRepFaultPresent"
     	AN	"PRDRepExtFaultPresent"
     	JCN	M13D
     	L	"ProdReportDB".StartUp.BlendFill[0]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.BlendFill[0]
     	JU	M13C
     M13D:   		A	"PRDRepFaultPresent"
     	JCN	M13E
     	L	"ProdReportDB".StartUp.BlendFill[1]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.BlendFill[1]
     M13E:   		A	"PRDRepExtFaultPresent"
     	JCN	M13F
     	L	"ProdReportDB".StartUp.BlendFill[2]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.BlendFill[2]
     M13F:   		A	"Procedure_Variables".BlendFill_StartUp.Wait
     	JCN	M13C
     	L	"ProdReportDB".StartUp.BlendFill[3]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.BlendFill[3]
     M13C:   		NOP_0
     
     	A	"Procedure_Variables".First_Production.Latch
     	JCN	M13G
     	AN	"Procedure_Variables".First_Production.Wait
     	AN	"PRDRepFaultPresent"
     	AN	"PRDRepExtFaultPresent"
     	JCN	M13H
     	L	"ProdReportDB".StartUp.FirstProd[0]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.FirstProd[0]
     	JU	M13G
     M13H:   		A	"PRDRepFaultPresent"
     	JCN	M13I
     	L	"ProdReportDB".StartUp.FirstProd[1]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.FirstProd[1]
     M13I:   		A	"PRDRepExtFaultPresent"
     	JCN	M13J
     	L	"ProdReportDB".StartUp.FirstProd[2]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.FirstProd[2]
     M13J:   		A	"Procedure_Variables".First_Production.Wait
     	JCN	M13G
     	L	"ProdReportDB".StartUp.FirstProd[3]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".StartUp.FirstProd[3]
     M13G:   		NOP_0
     
     MS13:   		NOP_0
   
  // --- END STL Network 13 ---

  // Network 14: PRODUCTION PRODUCTION SEQUENCE MANAGER (Original Language: STL)

  // --- BEGIN STL Network 14 ---
   
     	AN	CLK_1.0S
     	ON_BRACK
     	A	"gBlenderProdMode"
     	AN	"gBlenderRinseMode"
     	A	"Procedure_Variables".First_Production.Done
     	AN	"Procedure_Variables".Syr_RunOut.Latch
     	BRACKET
     	JC	MS14
     
     	AN	"Procedure_Variables".Blender_Run.Wait
     	AN	"PRDRepFaultPresent"
     	AN	"PRDRepExtFaultPresent"
     	JCN	M140
     
     	L	"ProdReportDB".Production.Times[0]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".Production.Times[0]
     	JU	M143
     
     M140:   		A	"PRDRepFaultPresent"
     	JCN	M141
     	L	"ProdReportDB".Production.Times[1]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".Production.Times[1]
     
     M141:   		A	"PRDRepExtFaultPresent"
     	JCN	M142
     	L	"ProdReportDB".Production.Times[2]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".Production.Times[2]
     
     M142:   		A	"Procedure_Variables".Blender_Run.Wait
     	JCN	M143
     	L	"ProdReportDB".Production.Times[3]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".Production.Times[3]
     
     M143:   		NOP_0
     
     	A	"Blender_Variables_Pers".gWaterRecipe
     	JC	M144
     	L	"ProdReportDB".Recipe._SyrupBrix
     	L	100.0
     	MUL_R
     	TRUNC
     	T	"ProdReportDB".Production.BrixSyrupSP
     M144:   		NOP_0
     
     	A	"Blender_Variables_Pers".gWaterRecipe
     	JC	M145
     	L	"ProdReportDB".Recipe._SyrupDensity
     	L	10000.0
     	MUL_R
     	TRUNC
     	T	"ProdReportDB".Production.DensitySyrupSP
     M145:   		NOP_0
     
     	L	"ProdReportDB".Recipe._ProductionRate
     	TRUNC
     	T	"ProdReportDB".Production.ProductionRateSP
     
     	A	"gBlenderBlending"
     	A	"Blender_Variables_Pers".gCarboStillProduct
     	A	"gBlenderStableFlow"
     	JCN	M146
     	L	"Blender_Variables".gSP_CO2
     	TRUNC
     	T	"ProdReportDB".Production.CO2RateSP
     M146:   		NOP_0
     
     	A	"Procedure_Variables".Blender_Run.Running
     	JCN	M147
     	L	"Blender_Variables".gSP_H2O
     	TRUNC
     	T	"ProdReportDB".Production.H2ORateSP
     M147:   		NOP_0
     
     	A	"Procedure_Variables".Blender_Run.Running
     	A	"gBlenderStableFlow"
     	AN	"Blender_Variables_Pers".gWaterRecipe
     	JCN	M148
     	L	"Blender_Variables".gSP_SYR
     	TRUNC
     	T	"ProdReportDB".Production.SyrupRateSP
     M148:   		NOP_0
     
     	A	"ProdReportDB".Recipe._EnProdTemp
     	JCN	M149
     	L	"ProdReportDB".Recipe._SP_ProdTemp
     	L	10.0
     	MUL_R
     	TRUNC
     	T	"ProdReportDB".Production.TemperatureChillerSP
     	JU	M14A
     M149:   		L	0
     	T	"ProdReportDB".Production.TemperatureChillerSP
     M14A:   		NOP_0
     
     	L	"ProdReportDB".Recipe._Ratio
     	L	10.0
     	MUL_R
     	TRUNC
     	T	"ProdReportDB".Production.ProductRatioSP
     
     	A	"Blender_Variables_Pers".gCarboStillProduct
     	JCN	M14B
     	L	"ProdReportDB".Recipe._CO2Vols
     	L	100.0
     	MUL_R
     	TRUNC
     	T	"ProdReportDB".Production.CO2VolSP
     M14B:   		NOP_0
     
     	A	"HMI_Blender_Parameters".Processor_Options.Blender_OPT._BlendFillSystem
     	JCN	M14C
     	L	"ProdReportDB".Recipe._FillingValveHead_SP
     	TRUNC
     	T	"ProdReportDB".Production.FillerValveHeadSP
     M14C:   		NOP_0
     
     	L	"ProdReportDB".AnalogAVSupport.DutyTime
     	L	1.0
     	ADD_R
     	T	"ProdReportDB".AnalogAVSupport.DutyTime
     	T	"DUTY_TIME"
     
     	AN	"Blender_Variables_Pers".gWaterRecipe
     	A	"HMI_Device".PPP302.Out
     	JCN	M14D
     	L	"ProdReportDB".AnalogAVSupport.BrixSyrup
     	L	"HMI_Instrument".FTP302_Brix.PVFiltered
     	ADD_R
     	T	"ProdReportDB".AnalogAVSupport.BrixSyrup
     	L	"DUTY_TIME"
     	DIV_R
     	L	100.0
     	MUL_R
     	TRUNC
     	T	"ProdReportDB".Production.BrixSyrupAV
     M14D:   		NOP_0
     
     	AN	"Blender_Variables_Pers".gWaterRecipe
     	A	"HMI_Device".PPP302.Out
     	JCN	M14E
     	L	"ProdReportDB".AnalogAVSupport.DensitySyrup
     	L	"HMI_Instrument".FTP302_Density.PVFiltered
     	ADD_R
     	T	"ProdReportDB".AnalogAVSupport.DensitySyrup
     	L	"DUTY_TIME"
     	DIV_R
     	L	10000.0
     	MUL_R
     	TRUNC
     	T	"ProdReportDB".Production.DensitySyrupAV
     M14E:   		NOP_0
     
     	A	"Blender_Variables_Pers".gCarboStillProduct
     	A	"gBlenderBlending"
     	JCN	M14F
     	L	"ProdReportDB".AnalogAVSupport.CO2Rate
     	L	"HMI_Instrument".FTM303.PVFiltered
     	ADD_R
     	T	"ProdReportDB".AnalogAVSupport.CO2Rate
     	L	"DUTY_TIME"
     	DIV_R
     	TRUNC
     	T	"ProdReportDB".Production.CO2RateAV
     M14F:   		NOP_0
     
     	A	"gBlenderBlending"
     	JCN	M14G
     	L	"ProdReportDB".AnalogAVSupport.H2ORate
     	L	"HMI_Instrument".FTN301.PVFiltered
     	ADD_R
     	T	"ProdReportDB".AnalogAVSupport.H2ORate
     	L	"DUTY_TIME"
     	DIV_R
     	TRUNC
     	T	"ProdReportDB".Production.H2ORateAV
     M14G:   		NOP_0
     
     	AN	"Blender_Variables_Pers".gWaterRecipe
     	A	"HMI_Device".PPP302.Out
     	JCN	M14H
     	L	"ProdReportDB".AnalogAVSupport.SyrupRate
     	L	"HMI_Instrument".FTP302.PVFiltered
     	ADD_R
     	T	"ProdReportDB".AnalogAVSupport.SyrupRate
     	L	"DUTY_TIME"
     	DIV_R
     	TRUNC
     	T	"ProdReportDB".Production.SyrupRateAV
     M14H:   		NOP_0
     
     	A	"ProdReportDB".Recipe._EnProdTemp
     	A	"gBlenderBlending"
     	JCN	M14I
     	L	"ProdReportDB".AnalogAVSupport.TemperatureChiller
     	A	"HMI_Instrument".TTM306_H2O.Config
     	JCN	M14J
     	L	"HMI_Instrument".TTM306_H2O.PVFiltered
     	JU	M14K
     M14J:   		L	"HMI_Instrument".TTM306_PRD.PVFiltered
     M14K:   		ADD_R
     	T	"ProdReportDB".AnalogAVSupport.TemperatureChiller
     	L	"DUTY_TIME"
     	DIV_R
     	L	10.0
     	MUL_R
     	TRUNC
     	T	"ProdReportDB".Production.TemperatureChillerAV
     M14I:   		NOP_0
     
     	A	"HMI_Instrument".TTN321.Config
     	JCN	M14L
     	L	"ProdReportDB".AnalogAVSupport.TemperatureDeair
     	L	"HMI_Instrument".TTN321.PVFiltered
     	ADD_R
     	T	"ProdReportDB".AnalogAVSupport.TemperatureDeair
     	L	"DUTY_TIME"
     	DIV_R
     	L	10.0
     	MUL_R
     	TRUNC
     	T	"ProdReportDB".Production.TemperatureDeairAV
     M14L:   		NOP_0
     
     	AN	"Blender_Variables_Pers".gWaterRecipe
     	A	"HMI_Device".PPP302.Out
     	JCN	M14M
     	L	"ProdReportDB".AnalogAVSupport.TemperatureSyrup
     	L	"HMI_Instrument".FTP302_Temperature.PVFiltered
     	ADD_R
     	T	"ProdReportDB".AnalogAVSupport.TemperatureSyrup
     	L	"DUTY_TIME"
     	DIV_R
     	L	10.0
     	MUL_R
     	TRUNC
     	T	"ProdReportDB".Production.TemperatureSyrupAV
     M14M:   		NOP_0
     
     	A	"HMI_Blender_Parameters".Processor_Options.Blender_OPT._BlendFillSystem
     	A	"HMI_Device".PPM303.Out
     	JCN	M14N
     	L	"ProdReportDB".AnalogAVSupport.FillerValveHead
     	L	"HMI_PID".PPM303.Pv
     	ADD_R
     	T	"ProdReportDB".AnalogAVSupport.FillerValveHead
     	L	"DUTY_TIME"
     	DIV_R
     	TRUNC
     	T	"ProdReportDB".Production.FillerValveHeadAV
     M14N:   		NOP_0
     
     MS14:   		NOP_0
   
  // --- END STL Network 14 ---

  // Network 15: PRODUCTION RUN OUT SEQUENCE MANAGER (Original Language: STL)

  // --- BEGIN STL Network 15 ---
   
     	AN	CLK_1.0S
     	ON_BRACK
     	A	"gBlenderProdMode"
     	AN	"gBlenderRinseMode"
     	A	"Procedure_Variables".First_Production.Done
     	A_BRACK
     	O	"Procedure_Variables".Syr_RunOut.Latch
     	O	"Procedure_Variables".TM301_RunOut.Latch
     	O	"System_RunOut_Variables".System_RunOut.Latch
     	O	"System_RunOut_Variables".ProdPipe_RunOut.Latch
     	BRACKET
     	BRACKET
     	JC	MS15
     
     	A	"Procedure_Variables".Syr_RunOut.Latch
     	JCN	M150
     	AN	"Procedure_Variables".Syr_RunOut.Wait
     	AN	"PRDRepFaultPresent"
     	AN	"PRDRepExtFaultPresent"
     	JCN	M151
     	L	"ProdReportDB".RunOut.Syrup[0]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.Syrup[0]
     	JU	M150
     M151:   		A	"PRDRepFaultPresent"
     	JCN	M152
     	L	"ProdReportDB".RunOut.Syrup[1]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.Syrup[1]
     M152:   		A	"PRDRepExtFaultPresent"
     	JCN	M153
     	L	"ProdReportDB".RunOut.Syrup[2]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.Syrup[2]
     M153:   		A	"Procedure_Variables".Syr_RunOut.Wait
     	JCN	M150
     	L	"ProdReportDB".RunOut.Syrup[3]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.Syrup[3]
     M150:   		NOP_0
     
     	A	"Procedure_Variables".TM301_RunOut.Latch
     	AN	"System_RunOut_Variables".ChillerPushDone
     	JCN	M154
     	AN	"Procedure_Variables".TM301_RunOut.Wait
     	AN	"PRDRepFaultPresent"
     	AN	"PRDRepExtFaultPresent"
     	JCN	M155
     	L	"ProdReportDB".RunOut.ChillerPush[0]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ChillerPush[0]
     	JU	M154
     M155:   		A	"PRDRepFaultPresent"
     	JCN	M156
     	L	"ProdReportDB".RunOut.ChillerPush[1]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ChillerPush[1]
     M156:   		A	"PRDRepExtFaultPresent"
     	JCN	M157
     	L	"ProdReportDB".RunOut.ChillerPush[2]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ChillerPush[2]
     M157:   		A	"Procedure_Variables".TM301_RunOut.Wait
     	JCN	M154
     	L	"ProdReportDB".RunOut.ChillerPush[3]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ChillerPush[3]
     M154:   		NOP_0
     
     	A	"Procedure_Variables".TM301_RunOut.Latch
     	JCN	M158
     	AN	"Procedure_Variables".TM301_RunOut.Wait
     	AN	"PRDRepFaultPresent"
     	AN	"PRDRepExtFaultPresent"
     	JCN	M159
     	L	"ProdReportDB".RunOut.ProdTank[0]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ProdTank[0]
     	JU	M158
     M159:   		A	"PRDRepFaultPresent"
     	JCN	M15A
     	L	"ProdReportDB".RunOut.ProdTank[1]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ProdTank[1]
     M15A:   		A	"PRDRepExtFaultPresent"
     	JCN	M15B
     	L	"ProdReportDB".RunOut.ProdTank[2]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ProdTank[2]
     M15B:   		A	"Procedure_Variables".TM301_RunOut.Wait
     	JCN	M158
     	L	"ProdReportDB".RunOut.ProdTank[3]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ProdTank[3]
     M158:   		NOP_0
     
     	A	"System_RunOut_Variables".ProdPipe_RunOut.Latch
     	JCN	M15C
     	AN	"System_RunOut_Variables".ProdPipe_RunOut.Wait
     	AN	"PRDRepFaultPresent"
     	AN	"PRDRepExtFaultPresent"
     	JCN	M15D
     	L	"ProdReportDB".RunOut.ProdPipe[0]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ProdPipe[0]
     	JU	M15C
     M15D:   		A	"PRDRepFaultPresent"
     	JCN	M15E
     	L	"ProdReportDB".RunOut.ProdPipe[1]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ProdPipe[1]
     M15E:   		A	"PRDRepExtFaultPresent"
     	JCN	M15F
     	L	"ProdReportDB".RunOut.ProdPipe[2]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ProdPipe[2]
     M15F:   		A	"System_RunOut_Variables".ProdPipe_RunOut.Wait
     	JCN	M15C
     	L	"ProdReportDB".RunOut.ProdPipe[3]
     	L	DINT#1
     	ADD_D
     	T	"ProdReportDB".RunOut.ProdPipe[3]
     M15C:   		NOP_0
     
     MS15:   		NOP_0
   
  // --- END STL Network 15 ---

  // Network 16: PRODUCTION TOTALIZER MANAGER (Original Language: STL)

  // --- BEGIN STL Network 16 ---
   
     	L	"HMI_Variables_Status".Analog_Values.WaterTotalizer
     	T	"ProdReportDB".Totalizer.H2O
     
     	A	"Blender_Variables_Pers".gCarboStillProduct
     	A	"gBlenderBlending"
     	JCN	M160
     	L	"HMI_Variables_Status".Analog_Values.CO2Totalizer
     	T	"ProdReportDB".Totalizer.CO2
     M160:   		NOP_0
     
     	AN	"Blender_Variables_Pers".gWaterRecipe
     	A	"HMI_Device".PPP302.Out
     	JCN	M161
     	L	"HMI_Variables_Status".Analog_Values.SyrupTotalizerLt
     	T	"ProdReportDB".Totalizer.Syrup
     M161:   		NOP_0
     
     	L	"HMI_Variables_Status".Analog_Values.ProductTotalizer
     	T	"ProdReportDB".Totalizer.Product
   
  // --- END STL Network 16 ---

  // Network 17: COMMENT (Original Language: STL)

  // --- BEGIN STL Network 17 ---
   
     	L	"PRDRepComment"
     	T	"ProdReportDB".General.Comment
   
  // --- END STL Network 17 ---

END_FUNCTION