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