Camera View Window Move Command 활성화
This commit is contained in:
parent
25d96fcae4
commit
1bca7d8aef
@ -141,6 +141,7 @@ namespace ILSOS_CCW_H52A
|
||||
|
||||
public override void RegisterDevices(IDeviceRegistry registry)
|
||||
{
|
||||
registry.Register(CommonDeviceIds.Scanner, () => new ScannerCCWH52A(CommonDeviceIds.Scanner), new ScannerConfig());
|
||||
base.RegisterDevices(registry);
|
||||
|
||||
var isSimul = ApplicationExt.IsSimulation;
|
||||
@ -154,8 +155,6 @@ namespace ILSOS_CCW_H52A
|
||||
() => _plc, PLCMelsecNetConfig.GetDefaultConfig(),
|
||||
device => new UCPLCDevice() { DataContext = new UCPLCDeviceViewModel(AuroraEnv, _plc) });
|
||||
|
||||
registry.Register(CommonDeviceIds.Scanner, () => new ScannerCCWH52A(CommonDeviceIds.Scanner), new ScannerConfig());
|
||||
|
||||
var ioController = new IOController_CCW_H52A(AuroraEnv, CommonDeviceIds.IODevice);
|
||||
registry.Register(CommonDeviceIds.IODevice, () => ioController, new IOUnitConfig());
|
||||
|
||||
|
||||
@ -345,27 +345,22 @@ namespace WeldingCommon.Sequences
|
||||
_FindPatternCount = 0;
|
||||
return SEQ_DECISION_CHECK_OFFSET;
|
||||
}
|
||||
} else {
|
||||
if (_InitParam.Is1StepCalibration)
|
||||
{
|
||||
_Is1stepCount++;
|
||||
Log.I(string.Format($"Is1stepCount : {_Is1stepCount} "));
|
||||
return SEQ_FIND_PATTERN;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_NotFoundCount > 5)
|
||||
{
|
||||
Log.I(string.Format($"Pattern Not Found. NotFoundCount OverFlow. Next Sequnece : SetVisionPositionFailed."));
|
||||
}
|
||||
|
||||
if (_InitParam.Is1StepCalibration) {
|
||||
_Is1stepCount++;
|
||||
Log.I(string.Format($"Is1stepCount : {_Is1stepCount} "));
|
||||
return SEQ_FIND_PATTERN;
|
||||
}
|
||||
|
||||
if (_NotFoundCount > 5) {
|
||||
Log.I(string.Format($"Pattern Not Found. NotFoundCount OverFlow. Next Sequnece : SetVisionPositionFailed."));
|
||||
return SEQ_SET_VISION_POSITION_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
_NotFoundCount++;
|
||||
Log.I(string.Format($"NotFoundCount : {_NotFoundCount} "));
|
||||
return SEQ_FIND_PATTERN;
|
||||
}
|
||||
}
|
||||
else {
|
||||
_NotFoundCount++;
|
||||
Log.I(string.Format($"NotFoundCount : {_NotFoundCount} "));
|
||||
return SEQ_FIND_PATTERN;
|
||||
}
|
||||
}
|
||||
|
||||
@ -412,12 +407,15 @@ namespace WeldingCommon.Sequences
|
||||
{
|
||||
Log.I(string.Format($"Find Pattern Result Offset:[{_PatternOffsetX},{_PatternOffsetY}] Score:[{_Score}]"));
|
||||
|
||||
// Pattern Find OK
|
||||
if (Math.Max(Math.Abs(_PatternOffsetX), Math.Abs(_PatternOffsetY)) < _InitParam.CheckOffset) {
|
||||
Log.I(string.Format($"Check Offset Result True Criteria:[{_InitParam.CheckOffset}] Max Offset:[{Math.Max(Math.Abs(_PatternOffsetX), Math.Abs(_PatternOffsetY))}"));
|
||||
Log.FuncI(string.Format($"Check Offset Result True Criteria:[{_InitParam.CheckOffset}] Max Offset:[{Math.Max(Math.Abs(_PatternOffsetX), Math.Abs(_PatternOffsetY))}"));
|
||||
return SEQ_SET_VISION_POSITION;
|
||||
} else if (_FindPatternCount < 10) {
|
||||
}
|
||||
// Pattern Find nOK >> 설정 범위 넘어감
|
||||
else if (_FindPatternCount < 10) {
|
||||
_CheckOffsetCount++;
|
||||
Log.I(string.Format($"Check Offset Result True Criteria:[{_InitParam.CheckOffset}] Max Offset:[{Math.Max(Math.Abs(_PatternOffsetX), Math.Abs(_PatternOffsetY))}"));
|
||||
Log.FuncI(string.Format($"Find Pattern Count[{_FindPatternCount}]"));
|
||||
return SEQ_FIND_PATTERN;
|
||||
} else {
|
||||
Log.E(String.Format("ERROR_CHECK_OFFSET_COUNT_OVER"));
|
||||
|
||||
@ -52,12 +52,14 @@ namespace WeldingCommon.Settings
|
||||
var forRecipes = VisionRecipeManager.GetFovRecipes(forInfos);
|
||||
if (forRecipes == null)
|
||||
return;
|
||||
foreach (var forRecipe in forRecipes) {
|
||||
// PixelSize
|
||||
forRecipe.CalFovRecipe.PixelSize.X = SysParam.CameraPixelSize;
|
||||
forRecipe.CalFovRecipe.PixelSize.Y = SysParam.CameraPixelSize;
|
||||
}
|
||||
RecipeFileManager.SaveVisionRecipe();
|
||||
|
||||
#warning 여기서 이거 왜 새로 저장하는건지 확인 필요함
|
||||
//foreach (var forRecipe in forRecipes) {
|
||||
// // PixelSize
|
||||
// forRecipe.CalFovRecipe.PixelSize.X = SysParam.CameraPixelSize;
|
||||
// forRecipe.CalFovRecipe.PixelSize.Y = SysParam.CameraPixelSize;
|
||||
//}
|
||||
//RecipeFileManager.SaveVisionRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user