373 lines
19 KiB
Markdown
373 lines
19 KiB
Markdown
```pascal
|
|
FUNCTION_BLOCK "MFMAnalogValues"
|
|
{ S7_Optimized_Access := 'FALSE' }
|
|
AUTHOR : 'Author'
|
|
FAMILY : TASK0
|
|
NAME : 'Name'
|
|
VERSION : 1.0
|
|
VAR
|
|
mCO2InjPressure : Real;
|
|
mCarboCO2DeltaPSim : Real;
|
|
mWaterFlowTmp : Real;
|
|
mSyrupFlowTmp : Real;
|
|
mCarboCO2FlowTmp : Real;
|
|
mWaterVFMError : Real;
|
|
mWaterDRand : Real;
|
|
mCO2WaterEffectDRand : Real;
|
|
mCO2WaterCoupling : Real;
|
|
mSyrupMFMError : Real;
|
|
mSyrupDRand : Real;
|
|
mCO2MFMError : Real;
|
|
mCO2DRand : Real;
|
|
mCO2DensSim : Real;
|
|
mWaterFlowDld : "Delay";
|
|
mSyrupFlowDld : "Delay";
|
|
mCarboCO2FlowDld : "Delay";
|
|
mCO2InjPressFlted : "LowPassFilter";
|
|
mProdFlowFlt : "LowPassFilter";
|
|
mProdFlowFlted : "LowPassFilter";
|
|
mH2OValveSlew : "SlewLimit";
|
|
mH2OFlowFlted : "LowPassFilter";
|
|
mSyrValveSlew : "SlewLimit";
|
|
mSyrFlowFlted : "LowPassFilter";
|
|
mCarboCO2ValveSlew : "SlewLimit";
|
|
mCarboCO2FlowFlted : "LowPassFilter";
|
|
END_VAR
|
|
|
|
VAR_TEMP
|
|
mAux0 : Real;
|
|
mAux1 : Real;
|
|
mTime_sec : Real;
|
|
END_VAR
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
IF NOT "HMI_Blender_Parameters".Processor_Options.Blender_OPT._Simulation THEN
|
|
IF "HMI_Blender_Parameters".Processor_Options.Blender_OPT._Conductimeter_Profibus THEN
|
|
"Profibus_Variables".gCTS301_Cond := "P_CTS301_Conductivity" ;
|
|
"Profibus_Variables".gCTS301_Cond_State := "P_CTS301_Conductiv_State" ;
|
|
"HMI_Instrument".CTS301.PV := 1000 * "Profibus_Variables".gCTS301_Cond;
|
|
|
|
"Profibus_Variables".gCTS301_Temp := "P_CTS301_Temperature";
|
|
"Profibus_Variables".gCTS301_Temp_State := "P_CTS301_Temperat_State" ;
|
|
"HMI_Instrument".TT_S5.PV := "P_CTS301_Temperature" ;
|
|
|
|
"Profibus_Variables".gCTS302_Cond := "P_CTS302_Conductivity" ;
|
|
"Profibus_Variables".gCTS302_Cond_State := "P_CTS302_Conductiv_State" ;
|
|
"HMI_Instrument".CTS302.PV := 1 * "Profibus_Variables".gCTS302_Cond;
|
|
|
|
"Profibus_Variables".gCTS302_Temp := "P_CTS302_Temperature" ;
|
|
"Profibus_Variables".gCTS302_Temp_State := "P_CTS302_Temperat_State" ;
|
|
"HMI_Instrument".TTS305_1.PV := "P_CTS302_Temperature" ;
|
|
END_IF ;
|
|
(* "Profibus_Variables".gVFM_ProductFlow := ; (* Product Flowrate Reading From FM Node17 *)
|
|
"Profibus_Variables".gVFM_ProductFlow_State := ; (* Product Flowrate Error Code *)
|
|
|
|
"Profibus_Variables".gVFM_ProductTotalizer := ; (* Product Totalizer Reading From FM Node17 *)
|
|
"Profibus_Variables".gVFM_ProductTot_State:= ; (* Product Totalizer Error Code *)
|
|
|
|
"Profibus_Variables".gProdPH_PHValue := ;
|
|
"Profibus_Variables".gProdPH_PHValue_State := ;
|
|
|
|
"Profibus_Variables".gProdPH_Temperature := ;
|
|
"Profibus_Variables".gProdPH_Temp_State := ;
|
|
|
|
"Profibus_Variables".gProdCond_Conductivity := ;
|
|
"Profibus_Variables".gProdCond_Cond_State := ;
|
|
"Blender_Variables".gProductConductivity := 1000 * "Profibus_Variables".gProdCond_Conductivity;
|
|
|
|
"Profibus_Variables".gProdCond_Temperature := ;
|
|
"Profibus_Variables".gProdCond_Temp_State := ; *)
|
|
|
|
IF NOT "HMI_Blender_Parameters".Processor_Options.Blender_OPT._FlowMeterType THEN
|
|
(* Endress Hauser *)
|
|
"Profibus_Variables".gFTN301_Flow := "P_FTN301_Flow" ; (* Water Flowrate Reading From VFM Node20 *)
|
|
"Profibus_Variables".gFTN301_Flow_State := "P_FTN301_Flow_State"; (* Water Flowrate Error Code *)
|
|
|
|
"Profibus_Variables".gFTN301_Tot := "P_FTN301_Totalizer" ; (* Water Totalizer Reading From VFM Node20 *)
|
|
"Profibus_Variables".gFTN301_Tot_State := "P_FTN301_Totaliz_State" ; (* Water Totalizer Error Code *)
|
|
|
|
IF ("HMI_Blender_Parameters".Processor_Options.Blender_OPT._Promass > 1) THEN
|
|
"Profibus_Variables".gFTP302_Flow := "P_FTP302_Flow"; (* Syrup Flowrate Reading From MFM Node21 *)
|
|
"Profibus_Variables".gFTP302_Flow_State := "P_FTP302_Flow_State"; (* Syrup Flowrate Error Code *)
|
|
|
|
"Profibus_Variables".gFTP302_Temp := "P_FTP302_Temp"; (* Syrup Temperature Reading From MFM Node21 *)
|
|
IF "Profibus_Variables".gFTP302_Temp > 200 THEN
|
|
"Profibus_Variables".gFTP302_Temp := "Profibus_Variables".gFTP302_Temp - "Blender_Constants".gZeroAbsolute;
|
|
END_IF;
|
|
"Profibus_Variables".gFTP302_Temp_State := "P_FTP302_Temp_State"; (* Syrup Temperature Error Code *)
|
|
|
|
"Profibus_Variables".gFTP302_Tot := "P_FTP302_Totalizer";
|
|
"Profibus_Variables".gFTP302_Tot_State := "P_FTP302_Totaliz_State";
|
|
|
|
"Profibus_Variables".gFTP302_Density := "P_FTP302_Density" ;
|
|
"Profibus_Variables".gFTP302_Density_State := "P_FTP302_Density_State";
|
|
|
|
IF "gWorkshopTest" THEN
|
|
"Profibus_Variables".gFTP302_Brix := "Blender_Constants".gTestSyrBrix;
|
|
ELSE
|
|
"Profibus_Variables".gFTP302_Brix := "P_FTP302_Brix";
|
|
END_IF;
|
|
"Profibus_Variables".gFTP302_Brix_State := "P_FTP302_Brix_State";
|
|
END_IF;
|
|
|
|
IF "HMI_Blender_Parameters".Processor_Options.Blender_OPT._CarboPresent THEN
|
|
"Profibus_Variables".gFTM303_Flow := "P_FTM303_Flow" ;
|
|
"Profibus_Variables".gFTM303_Flow_State := "P_FTM303_Flow_State";
|
|
|
|
"Profibus_Variables".gFTM303_Temp := "P_FTM303_Temperature" ;
|
|
IF "Profibus_Variables".gFTM303_Temp > 200 THEN
|
|
"Profibus_Variables".gFTM303_Temp := "Profibus_Variables".gFTM303_Temp - "Blender_Constants".gZeroAbsolute ;
|
|
END_IF;
|
|
"Profibus_Variables".gFTM303_Temp_State := "P_FTM303_Temperature_State" ;
|
|
|
|
"Profibus_Variables".gFTM303_Density := "P_FTM303_Density" ;
|
|
"Profibus_Variables".gFTM303_Density_State := "P_FTM303_Density_State" ;
|
|
|
|
"Profibus_Variables".gFTM303_Tot := "P_FTM303_Totalizer" ;
|
|
"Profibus_Variables".gFTM303_Tot_State := "P_FTM303_Totalizer_State" ;
|
|
END_IF ;
|
|
ELSE
|
|
(* MicroMotion *)
|
|
IF "HMI_Blender_Parameters".Processor_Options.Blender_OPT._WaterPromass THEN
|
|
"Profibus_Variables".gFTN301_Flow := "P_FTN301_Flow" ; (* Water Flowrate Reading From VFM Node20 *)
|
|
"Profibus_Variables".gFTN301_Tot := "P_FTN301_Totalizer" ; (* Water Totalizer Reading From VFM Node20 *)
|
|
ELSE
|
|
(* Promag 53 *)
|
|
"Profibus_Variables".gFTN301_Flow := "P_FTN301_Flow" ; (* Water Flowrate Reading From VFM Node20 *)
|
|
"Profibus_Variables".gFTN301_Flow_State := "P_FTN301_Flow_State"; (* Water Flowrate Error Code *)
|
|
|
|
"Profibus_Variables".gFTN301_Tot := "P_FTN301_Totalizer" ; (* Water Totalizer Reading From VFM Node20 *)
|
|
"Profibus_Variables".gFTN301_Tot_State := "P_FTN301_Totaliz_State" ; (* Water Totalizer Error Code *)
|
|
END_IF;
|
|
|
|
IF "HMI_Blender_Parameters".Processor_Options.Blender_OPT._Promass > 1 THEN
|
|
"Profibus_Variables".gFTP302_Flow := "P_FTP302_Flow" ; (* Syrup Flowrate Reading From MFM Node21 *)
|
|
"Profibus_Variables".gFTP302_Flow_State := "P_FTP302_Flow_State" ; (* Syrup Flowrate Error Code *)
|
|
|
|
"Profibus_Variables".gFTP302_Temp := "P_FTP302_Temp" ; (* Syrup Temperature Reading From MFM Node21 *)
|
|
IF "Profibus_Variables".gFTP302_Temp > 200 THEN
|
|
"Profibus_Variables".gFTP302_Temp := "Profibus_Variables".gFTP302_Temp - "Blender_Constants".gZeroAbsolute ;
|
|
END_IF;
|
|
|
|
"Profibus_Variables".gFTP302_Tot := "P_FTP302_Totalizer" ;
|
|
|
|
"Profibus_Variables".gFTP302_Density := "P_FTP302_Density" ;
|
|
|
|
IF "gWorkshopTest" AND NOT "HMI_Service".Workshop_Test.SyrupTestRequest THEN
|
|
"Profibus_Variables".gFTP302_Brix := "Blender_Constants".gTestSyrBrix ;
|
|
ELSE
|
|
"Profibus_Variables".gFTP302_Brix := "P_FTP302_Brix" ;
|
|
END_IF;
|
|
END_IF ;
|
|
|
|
IF "HMI_Blender_Parameters".Processor_Options.Blender_OPT._CarboPresent THEN
|
|
"Profibus_Variables".gFTM303_Flow := "P_FTM303_Flow" ;
|
|
"Profibus_Variables".gFTM303_Flow_State := "P_FTM303_Flow_State" ;
|
|
|
|
"Profibus_Variables".gFTM303_Temp := "P_FTM303_Temperature" ;
|
|
IF "Profibus_Variables".gFTM303_Temp > 200 THEN
|
|
"Profibus_Variables".gFTM303_Temp := "Profibus_Variables".gFTM303_Temp - "Blender_Constants".gZeroAbsolute ;
|
|
END_IF;
|
|
(* "Profibus_Variables".gFTM303_Temp_State := "MFM_CO2_Temper_State" ; *)
|
|
|
|
"Profibus_Variables".gFTM303_Density := "P_FTM303_Density" ;
|
|
|
|
"Profibus_Variables".gFTM303_Tot := "P_FTM303_Totalizer" ;
|
|
END_IF;
|
|
END_IF;
|
|
|
|
#mCO2InjPressure := "CO2InjPressure"(i_Temp := "Profibus_Variables".gFTM303_Temp,
|
|
i_Dens := "Profibus_Variables".gFTM303_Density);
|
|
ELSE // Simulation active
|
|
IF "gBlenderProdMode" THEN
|
|
//Calculates the flow across the water valve
|
|
(* classic code: #mH2OValveSlew(i_InValue := "HMI_PID".RMM301.Out,
|
|
i_SlewMax := 15.0,
|
|
i_Cycle := "Time_50ms",
|
|
out := "PID_Variables".Simulation.H2OValve_Slew_Out );*)
|
|
#mH2OValveSlew(i_InValue := "HMI_PID".RMM301.Out,
|
|
i_SlewMax := REAL#15.0,
|
|
i_Cycle := "Time_50ms",
|
|
out := "PID_Variables".Simulation.H2OValve_Slew_Out );
|
|
|
|
IF ("Procedure_Variables"."CarboWaterLine".Running OR "Procedure_Variables".TN301_StartUp.Running ) AND "HMI_Device".AVM322.Out THEN
|
|
"PID_Variables".Simulation.H2OValve_Slew_Out := 4 ;
|
|
END_IF;
|
|
#mCarboCO2DeltaPSim := "DeltaP"(i_Flow := "PID_Variables".Simulation.CarboCO2_Flow,
|
|
i_K := "Blender_Constants".gRMM303ValveCv,
|
|
i_Valve := "PID_Variables".Simulation.CarboCO2_Slew_Out);
|
|
|
|
(* classic code: #mWaterFlowTmp := "ValveFlow"(i_DeltaP := "PID_Variables".RMM301DeltaP - 0.02 * #mCarboCO2DeltaPSim,
|
|
i_ValveOp := "PID_Variables".Simulation.H2OValve_Slew_Out,
|
|
i_KFF := 0.055,
|
|
i_Dens := "Blender_Constants".gH2O_Density )+ #mWaterVFMError + #mCO2WaterCoupling ;*)
|
|
#mWaterFlowTmp := "ValveFlow"(i_DeltaP := "PID_Variables".RMM301DeltaP - REAL#0.02 * #mCarboCO2DeltaPSim,
|
|
i_ValveOp := "PID_Variables".Simulation.H2OValve_Slew_Out,
|
|
i_KFF := REAL#0.055,
|
|
i_Dens := "Blender_Constants".gH2O_Density )+ #mWaterVFMError + #mCO2WaterCoupling ;
|
|
|
|
#mH2OFlowFlted(i_Value := #mWaterFlowTmp,
|
|
i_Num := 10,
|
|
i_Enable := TRUE);
|
|
|
|
#mWaterFlowDld(i_Value := #mH2OFlowFlted.FilterOut,
|
|
i_Sample := 2);
|
|
|
|
"FW_DRand"(Channel := 100,
|
|
RandomNumber => #mCO2WaterEffectDRand);
|
|
|
|
IF ("Blender_Variables_Pers".gCarboStillProduct OR "HMI_Blender_Parameters".Processor_Options.Blender_OPT._DoubleDeair) AND "Blender_Variables".gWaterPipe_Vel > 0 AND "gBlenderStableFlow" THEN
|
|
(* classic code: #mCO2WaterCoupling := #mCO2WaterEffectDRand * (1 / SQR("Blender_Variables".gWaterPipe_Vel)* "Blender_Variables".gWaterPipe_Vel ) * #mWaterFlowDld.i_out * 0.02 ;*)
|
|
#mCO2WaterCoupling := #mCO2WaterEffectDRand * (1 / SQR("Blender_Variables".gWaterPipe_Vel)* "Blender_Variables".gWaterPipe_Vel ) * #mWaterFlowDld.i_out * REAL#0.02 ;
|
|
ELSE
|
|
(* classic code: #mCO2WaterCoupling := 0.0 ;*)
|
|
#mCO2WaterCoupling := REAL#0.0 ;
|
|
END_IF;
|
|
|
|
"FW_DRand"(Channel := 101,
|
|
RandomNumber => #mWaterDRand);
|
|
#mWaterVFMError := #mWaterDRand * "Blender_Variables".gWaterVFMCalcError ;
|
|
"PID_Variables".Simulation.Water_Flow := #mWaterFlowDld.i_out ;
|
|
|
|
#mSyrValveSlew(i_InValue := "HMI_PID".RMP302.Out,
|
|
i_SlewMax := 20,
|
|
i_Cycle := "Time_50ms",
|
|
out := "PID_Variables".Simulation.SyrupValve_Slew_Out);
|
|
|
|
(* classic code: #mSyrupFlowTmp := "ValveFlow"(i_DeltaP := "PID_Variables".RMP302DeltaP,
|
|
i_ValveOp := "PID_Variables".Simulation.SyrupValve_Slew_Out,
|
|
i_KFF := 0.35,
|
|
i_Dens := "HMI_Blender_Parameters".Actual_Recipe_Parameters._SyrupDensity)+ #mSyrupMFMError;*)
|
|
#mSyrupFlowTmp := "ValveFlow"(i_DeltaP := "PID_Variables".RMP302DeltaP,
|
|
i_ValveOp := "PID_Variables".Simulation.SyrupValve_Slew_Out,
|
|
i_KFF := REAL#0.35,
|
|
i_Dens := "HMI_Blender_Parameters".Actual_Recipe_Parameters._SyrupDensity)+ #mSyrupMFMError;
|
|
|
|
#mSyrFlowFlted(i_Value := #mSyrupFlowTmp,
|
|
i_Num := 10,
|
|
i_Enable := TRUE);
|
|
|
|
#mSyrupFlowDld(i_Value := #mSyrFlowFlted.FilterOut,
|
|
i_Sample := 5);
|
|
|
|
"FW_DRand"(Channel := 102,
|
|
RandomNumber => #mSyrupDRand);
|
|
#mSyrupMFMError := #mSyrupDRand * "Blender_Variables".gSyrupMFMCalcError ;
|
|
"PID_Variables".Simulation.Syrup_Flow := #mSyrupFlowDld.i_out ;
|
|
|
|
#mCarboCO2ValveSlew(i_InValue := "HMI_PID".RMM303.Out,
|
|
i_SlewMax := 20,
|
|
i_Cycle := "Time_50ms",
|
|
out := "PID_Variables".Simulation.CarboCO2_Slew_Out);
|
|
|
|
(* classic code: #mCarboCO2FlowTmp := "ValveFlow"(i_DeltaP := "PID_Variables".RMM303DeltaP,
|
|
i_ValveOp := "PID_Variables".Simulation.CarboCO2_Slew_Out,
|
|
i_KFF := 0.34,
|
|
i_Dens := "Blender_Constants".gCO2_Density / 1000)+ #mCO2MFMError;*)
|
|
#mCarboCO2FlowTmp := "ValveFlow"(i_DeltaP := "PID_Variables".RMM303DeltaP,
|
|
i_ValveOp := "PID_Variables".Simulation.CarboCO2_Slew_Out,
|
|
i_KFF := REAL#0.34,
|
|
i_Dens := "Blender_Constants".gCO2_Density / 1000)+ #mCO2MFMError;
|
|
|
|
#mCarboCO2FlowFlted(i_Value := #mCarboCO2FlowTmp,
|
|
i_Num := 10,
|
|
i_Enable := TRUE);
|
|
|
|
#mCarboCO2FlowDld(i_Value := #mCarboCO2FlowFlted.FilterOut,
|
|
i_Sample := 3);
|
|
|
|
"FW_DRand"(Channel := 2147483647,
|
|
RandomNumber => #mCO2DRand);
|
|
#mCO2MFMError := #mCO2DRand * "Blender_Variables".gCO2MFMCalcError ;
|
|
"PID_Variables".Simulation.CarboCO2_Flow := #mCarboCO2FlowDld.i_out ;
|
|
|
|
"Profibus_Variables".gFTN301_Flow := "PID_Variables".Simulation.Water_Flow ;
|
|
"Profibus_Variables".gFTP302_Flow := "PID_Variables".Simulation.Syrup_Flow ;
|
|
"Profibus_Variables".gFTM303_Flow := "PID_Variables".Simulation.CarboCO2_Flow ;
|
|
|
|
#mAux0 := DINT_TO_REAL(TIME_TO_DINT("gSystem_Time")/10 MOD 100);
|
|
#mAux1 := DINT_TO_REAL(TIME_TO_DINT("gSystem_Time")/1000 MOD 60);
|
|
(* classic code: #mTime_sec := #mAux1 + #mAux0 / 100.0;*)
|
|
#mTime_sec := #mAux1 + #mAux0 / REAL#100.0;
|
|
|
|
(* classic code: #mCO2DensSim := 0.028 + 0.0015 * SIN(2 * "Blender_Constants".gP_Greek * #mTime_sec * 5 / 60) ;*)
|
|
#mCO2DensSim := REAL#0.028 + REAL#0.0015 * SIN(2 * "Blender_Constants".gP_Greek * #mTime_sec * 5 / 60) ;
|
|
(* classic code: #mCO2InjPressure := "CO2InjPressure"(i_Temp := 20.0,
|
|
i_Dens := #mCO2DensSim);*)
|
|
#mCO2InjPressure := "CO2InjPressure"(i_Temp := REAL#20.0,
|
|
i_Dens := #mCO2DensSim);
|
|
|
|
"Profibus_Variables".gFTP302_Brix := "Blender_Constants".gTestSyrBrix;
|
|
"Profibus_Variables".gFTP302_Density := "SyrupDensity"(i_SyrupBrix := "Blender_Constants".gTestSyrBrix );
|
|
END_IF;
|
|
END_IF;
|
|
|
|
#mCO2InjPressFlted(i_Value := #mCO2InjPressure,
|
|
i_Num := 8,
|
|
i_Enable := TRUE);
|
|
(* classic code: "Blender_Variables".gCO2InjPressureCalc := LIMIT(MN:= 10,IN:= #mCO2InjPressFlted.FilterOut,MX:= 20) * 1.0 ;*)
|
|
"Blender_Variables".gCO2InjPressureCalc := LIMIT(MN:= 10,IN:= #mCO2InjPressFlted.FilterOut,MX:= 20) * REAL#1.0 ;
|
|
|
|
#mProdFlowFlted(i_Value := "Profibus_Variables".gVFM_ProductFlow,
|
|
i_Num := 8,
|
|
i_Enable := TRUE);
|
|
"Blender_Variables".gProd_Flow_Meas := #mProdFlowFlted.FilterOut ;
|
|
|
|
IF "gBlenderProdMode" THEN
|
|
#mH2OFlowFlted(i_Value := "Profibus_Variables".gFTN301_Flow,
|
|
i_Num := 6,
|
|
i_Enable := "gBlenderFlowFltEn");
|
|
"Blender_Variables".gH2O_Flow_Meas := #mH2OFlowFlted.FilterOut ;
|
|
|
|
#mSyrFlowFlted(i_Value := "Profibus_Variables".gFTP302_Flow,
|
|
i_Num := 6,
|
|
i_Enable := "gBlenderFlowFltEn");
|
|
"Blender_Variables".gSYR_Flow_Meas := #mSyrFlowFlted.FilterOut ;
|
|
|
|
#mCarboCO2FlowFlted(i_Value := "Profibus_Variables".gFTM303_Flow,
|
|
i_Num := 6,
|
|
i_Enable := "gBlenderFlowFltEn");
|
|
"MFMAnalogValues_Totalize"();
|
|
ELSE
|
|
#mH2OFlowFlted(i_Value := "Profibus_Variables".gFTN301_Flow,
|
|
i_Num := 10,
|
|
i_Enable := "gBlenderFlowFltEn");
|
|
"Blender_Variables".gH2O_Flow_Meas := #mH2OFlowFlted.FilterOut ;
|
|
|
|
#mSyrFlowFlted(i_Value := "Profibus_Variables".gFTP302_Flow,
|
|
i_Num := 0,
|
|
i_Enable := "gBlenderFlowFltEn");
|
|
"Blender_Variables".gSYR_Flow_Meas := #mSyrFlowFlted.FilterOut ;
|
|
|
|
#mCarboCO2FlowFlted(i_Value := "Profibus_Variables".gFTM303_Flow,
|
|
i_Num := 0,
|
|
i_Enable := "gBlenderFlowFltEn");
|
|
END_IF;
|
|
|
|
IF "Blender_Constants".gCO2_Density <> 0 THEN
|
|
"Blender_Variables".gCO2_Flow_Meas := #mCarboCO2FlowFlted.FilterOut / "Blender_Constants".gCO2_Density ;
|
|
END_IF;
|
|
|
|
IF "Blender_Constants".gCO2_Density <> 0 AND "gWorkshopTest" AND "HMI_Service".Workshop_Test.CO2TestRequest THEN
|
|
"Blender_Variables".gCO2_Flow_Meas := #mCarboCO2FlowFlted.FilterOut / "Blender_Constants".gAir_Density ;
|
|
END_IF;
|
|
|
|
IF "Blender_Variables".gActualSyrupDens > 0 THEN
|
|
"Blender_Variables".gSYR_Vol_Flow_Meas := "Blender_Variables".gSYR_Flow_Meas / "Blender_Variables".gActualSyrupDens ;
|
|
ELSE
|
|
"Blender_Variables".gSYR_Vol_Flow_Meas := "Blender_Variables".gSYR_Flow_Meas ;
|
|
END_IF;
|
|
#mProdFlowFlt(i_Value := "Blender_Variables".gH2O_Flow_Meas + "Blender_Variables".gSYR_Vol_Flow_Meas,
|
|
i_Num := 18,
|
|
i_Enable := "gBlenderFlowFltEn");
|
|
"Blender_Variables".gActual_Prod_Flow := #mProdFlowFlt.FilterOut ;
|
|
|
|
|
|
END_FUNCTION_BLOCK
|
|
|
|
|
|
```
|