Push Changes from Techcrafters Repo
This commit is contained in:
@@ -413,6 +413,13 @@ public sealed partial class ReceipePageVM : ObservableValidator, IDisposable
|
||||
SendDataToPLC();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public void LoadFromPlc()
|
||||
{
|
||||
//ReadDataFromPLC();
|
||||
}
|
||||
|
||||
|
||||
[RelayCommand]
|
||||
public void ReadReceipeFile()
|
||||
{
|
||||
@@ -710,21 +717,21 @@ public sealed partial class ReceipePageVM : ObservableValidator, IDisposable
|
||||
|
||||
|
||||
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", CameraProgramsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", ChucksVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", GripperVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", PermissibleBeamParamDeviationsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", DiameterVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", ThicknessVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine", TimeIntervallBeamCheckVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.iCameraprograms", CameraProgramsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.iChucks", ChucksVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.iGripper", GripperVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.rBeamDeviation", PermissibleBeamParamDeviationsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.rDiameter", DiameterVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.rThickness", ThicknessVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.rTimeIntervalBeamCheck", TimeIntervallBeamCheckVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rRestingTime", RestingTimeHotplateVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rTemp", TargetTemperatureHotplateVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rRestingTime", RestingTimeCoolplateVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rTemp", TargetTemperatureCoolplateVm.Value);
|
||||
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.uiNumRobotPos", NumberRobotPositionsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.rRadialPosLowerWaterJet", RadialPosLowerWaterJetVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stRecipeEtcher.rChuckRPM", ChuckRpmVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.uiNumRobotPos", NumberRobotPositionsVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.rRadialPosLowerWaterJet", RadialPosLowerWaterJetVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.rChuckRPM", ChuckRpmVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestVoltage", HvtestVoltageVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rMaxTestCurrent", HvmaxTestCurrentVm.Value);
|
||||
_adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rRampTime", HvrampTimeVm.Value);
|
||||
@@ -739,6 +746,123 @@ public sealed partial class ReceipePageVM : ObservableValidator, IDisposable
|
||||
|
||||
}
|
||||
|
||||
|
||||
//private void ReadDataFromPLC()
|
||||
//{
|
||||
// var val = _adsManager.ReadValue("GVL_Scheduler.MAX_RECIPE_NODES");
|
||||
// maxFlowNodes = (val == null) ? 10 : (int)val; ;
|
||||
// val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||
// maxEtcherRobotPositions = (val == null) ? 10 : (int)val;
|
||||
// val = _adsManager.ReadValue("GVL_ETCHER.MAX_ROBOT_POS");
|
||||
// maxTrayPositions = (val == null) ? 20 : (int)val;
|
||||
|
||||
// for (var i = 0; i < maxTrayPositions && i < TrayPositions.Count; i++)
|
||||
// {
|
||||
// TrayPositions[i].PosX = GetFloat(_adsManager.ReadValue("GVL_SCADA.stMachine.stTray.arPosX[" + i + "]"));
|
||||
// TrayPositions[i].PosY = GetFloat(_adsManager.ReadValue("GVL_SCADA.stMachine.stTray.arPosY[" + i + "]"));
|
||||
// }
|
||||
|
||||
// var trayPosCountToPlc = TrayPositions.Count < maxTrayPositions ? TrayPositions.Count : maxTrayPositions;
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stTray.iPosCnt", trayPosCountToPlc);
|
||||
|
||||
// for (var i = 0; i < maxEtcherRobotPositions && i < EtcherRobotSteps.Count; i++)
|
||||
// {
|
||||
// EtcherRobotSteps[i].PosX= GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosX"));
|
||||
// EtcherRobotSteps[i].PosY= GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosY"));
|
||||
// EtcherRobotSteps[i].PosZ= GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosZ"));
|
||||
// EtcherRobotSteps[i].AngleAlpha= GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rAngleAlpha"));
|
||||
// EtcherRobotSteps[i].MoveSpeed= GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rMoveSpeed"));
|
||||
// EtcherRobotSteps[i].Delay = GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rDelay"));
|
||||
// EtcherRobotSteps[i].Medium = GetUShort(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].uiMedium"));
|
||||
// EtcherRobotSteps[i].WaterFromBelow= GetShort(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromBelow"));
|
||||
// EtcherRobotSteps[i].WaterFromAbove = GetShort(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromAbove"));
|
||||
|
||||
|
||||
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosX"));
|
||||
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosY"));
|
||||
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rPosZ"));
|
||||
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rAngleAlpha"));
|
||||
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rMoveSpeed"));
|
||||
// GetFloat(_adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].rDelay"));
|
||||
// _adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].uiMedium"));
|
||||
// _adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromBelow"));
|
||||
// _adsManager.ReadValue("GVL_SCADA.stRecipeEtcher.stRobotStepData[" + i + "].xWaterFromAbove"));
|
||||
// }
|
||||
|
||||
|
||||
// for (var i = 0; (i < maxFlowNodes && i < FlowReceipeEntries.Count); i++)
|
||||
// {
|
||||
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].Priority);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].Station.eStation);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].MaxRetries);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeSuccess);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeRetry);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.astNodes[" + i + "].uiPriority", FlowReceipeEntries[i].NextNodeFail);
|
||||
|
||||
// }
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterFlowRecipe.uiNodeCnt", FlowNodeCountVm.Value);
|
||||
|
||||
|
||||
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine", CameraProgramsVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine", ChucksVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine", GripperVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine", PermissibleBeamParamDeviationsVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine", DiameterVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine", ThicknessVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine", TimeIntervallBeamCheckVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rRestingTime", RestingTimeHotplateVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHotplate.rTemp", TargetTemperatureHotplateVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rRestingTime", RestingTimeCoolplateVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeCoolplate.rTemp", TargetTemperatureCoolplateVm.Value);
|
||||
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.uiNumRobotPos", NumberRobotPositionsVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.rRadialPosLowerWaterJet", RadialPosLowerWaterJetVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeEtcher.rChuckRPM", ChuckRpmVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestVoltage", HvtestVoltageVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rMaxTestCurrent", HvmaxTestCurrentVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rRampTime", HvrampTimeVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestFrequency", HvtestFrequencyVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.uiPolarity", HvpolarityVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestPresN2", HvtestPressureN2Vm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rN2PrePurgeTime", Hvn2PrePurgeTimeVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.uiNumRetries", HvnumRetriesVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestTemp", HvtestTemperatureVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestOkVoltage", HvTestOkVoltageVm.Value);
|
||||
// _adsManager.WriteValue("GVL_SCADA.stMachine.stMasterRecipeHVTest.rTestOkCurrent", HvTestOkCurrentVm.Value);
|
||||
//}
|
||||
|
||||
//private short GetShort(object? value)
|
||||
//{
|
||||
// if (value != null)
|
||||
// return (short)value;
|
||||
|
||||
// return -1;
|
||||
//}
|
||||
|
||||
//private UInt16 GetUShort(object? value)
|
||||
//{
|
||||
// if (value != null)
|
||||
// return (UInt16)value;
|
||||
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
private bool GetBool(object? value)
|
||||
{
|
||||
if (value != null)
|
||||
return (bool)value;
|
||||
|
||||
return false;
|
||||
}
|
||||
private float GetFloat(object? value)
|
||||
{
|
||||
if (value != null)
|
||||
return (float)value;
|
||||
|
||||
return -1;
|
||||
}
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user