Rename Cabinet_Configuration to Cabinet_Monitoring
Remove the pneumatics variables from Cabinet_Configuration and move them to Pneumatic_Box program.Because of that the program now handles onle the cabinet monitoring. Rename the prgram to reflect that change deleted: solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Configuration.TcPOU new file: solution/tc_project_app/POUs/Application_Specific/Applications/Cabinet_Monitoring.TcPOU
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<POU Name="Cabinet_Configuration" Id="{f09ddf2c-38c8-0b17-348a-c2e3aa836c88}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[PROGRAM Cabinet_Configuration
|
||||
VAR
|
||||
//fbCabinetMonitoring: FB_ESSMonitoringMCU5001a; FB_ESSMonitoringMCU5001b; FB_ESSMonitoringMCU6001a; FB_ESSMonitoringMCU6001b; FB_ESSMonitoringMCU5002; FB_ESSMonitoringMCU5003;
|
||||
fScaledAirPressureGroup1: REAL;
|
||||
fScaledAirPressureGroup2: REAL;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[//Cabinet monitoring
|
||||
(*fbCabinetMonitoring(
|
||||
nEcMasterNetId:= , //AMS NetId of Device (EtherCAT) from I/Os
|
||||
aErrorID=> ,
|
||||
aErrorMsg=> ,
|
||||
nEcMasterFramesLost=> ,
|
||||
nCPULoad=> ,
|
||||
fCycleExecTime_ms=> ,
|
||||
nAlarmGrpBitNumber=> );
|
||||
*)
|
||||
|
||||
//Scale pressure sensor group 1 and 2
|
||||
fScaledAirPressureGroup1 := mScaledPressureValue(nRawValue:=GVL.nAirPressureSensorGroup1);
|
||||
fScaledAirPressureGroup2 := mScaledPressureValue(nRawValue:=GVL.nAirPressureSensorGroup2);
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
<Method Name="mScaledPressureValue" Id="{3a9ac7a5-453e-098d-2143-f7d60168bb86}">
|
||||
<Declaration><![CDATA[METHOD PUBLIC mScaledPressureValue : REAL
|
||||
VAR_INPUT
|
||||
nRawValue: INT; //Raw value from the Terminal
|
||||
END_VAR
|
||||
VAR
|
||||
rGradient: REAL; //Internal variable to calculate gradient of the slope
|
||||
rOffset: REAL; //Internal variable to calculate the offset value
|
||||
|
||||
fRawHigh: REAL := 30518.0; //Highest value for the Raw value
|
||||
fRawLow: REAL := 0.0; //Lowest value for the Raw value
|
||||
fScaledHigh: REAL := 10.0; //Highest value for the Scaled value 10 bar
|
||||
fScaledLow: REAL := 0.0; //Lowest value for the Scaled value 0 bar
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[rGradient:= (fScaledHigh - fScaledLow)/(fRawHigh - fRawLow);
|
||||
rOffset:= fScaledHigh - rGradient * fRawHigh;
|
||||
mScaledPressureValue:= rGradient * nRawValue + rOffset;
|
||||
|
||||
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<POU Name="Cabinet_Monitoring" Id="{f09ddf2c-38c8-0b17-348a-c2e3aa836c88}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[PROGRAM Cabinet_Monitoring
|
||||
VAR
|
||||
//fbCabinetMonitoring: FB_ESSMonitoringMCU5001a; FB_ESSMonitoringMCU5001b; FB_ESSMonitoringMCU6001a; FB_ESSMonitoringMCU6001b; FB_ESSMonitoringMCU5002; FB_ESSMonitoringMCU5003;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[//Cabinet monitoring
|
||||
(*fbCabinetMonitoring(
|
||||
nEcMasterNetId:= , //AMS NetId of Device (EtherCAT) from I/Os
|
||||
aErrorID=> ,
|
||||
aErrorMsg=> ,
|
||||
nEcMasterFramesLost=> ,
|
||||
nCPULoad=> ,
|
||||
fCycleExecTime_ms=> ,
|
||||
nAlarmGrpBitNumber=> );
|
||||
*)
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
Reference in New Issue
Block a user