MOTF 파라미터 보이게 수정
This commit is contained in:
parent
d2a023d8c4
commit
92bce1b2b8
@ -289,6 +289,11 @@ namespace ILSOS_PrismaticScanner.Views
|
||||
|
||||
_SeqAutoRun.Stop();
|
||||
|
||||
#region 260417 확인 - 확인완료
|
||||
// 26.04.17 NDY - Stop 시 장비 상태 복귀
|
||||
Status.SetStatus(eEqpStatus.Manual);
|
||||
#endregion
|
||||
|
||||
//Recipe를 기존에 선택된 Recipe로 Rollback 해 줌
|
||||
RecipeHelper.RollbackRecipe();
|
||||
//AutoRun 정지 시 CorrectionFile을 Vision으로 변경
|
||||
|
||||
@ -241,6 +241,12 @@ namespace WeldingCommon.Devices.ACS
|
||||
|
||||
bool IScannerACS.CheckMOTFComp()
|
||||
{
|
||||
|
||||
#region 260418 확인 - 확인 완료
|
||||
// 26.04.17 NDY - 시퀀스 완료 후 장비 상태 복귀
|
||||
Status.SetStatus(eEqpStatus.Manual);
|
||||
#endregion
|
||||
|
||||
if (IsSimul) return true;
|
||||
return ReadVariableInt(iMOTFComplete) > 0;
|
||||
}
|
||||
|
||||
@ -234,6 +234,45 @@ namespace WeldingCommon.Sequences
|
||||
// MOTF 지원 중
|
||||
private SequenceActionResult MarkingOnTheFlyOn(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
#region 260416 복원 -지운 내용 복원함.
|
||||
if (_Scanner.Config.UseMarkingOnTheFly)
|
||||
{
|
||||
if (_Scanner.Config.OnTheFlyCoordinate == eOntheFlyCoordinate.XY)
|
||||
{
|
||||
// 1. Linear Track OTF 활성화 및 엔코더 초기화
|
||||
_Scanner.SetFlyX(_Scanner.Config.MarkingOnTheFlyEncoderResolutionX);
|
||||
|
||||
// 2. 엔코더 특정 위치갈 때까지 대기
|
||||
_Scanner.WaitForEncoderX(_Scanner.Config.MarkingStartEncoderPositionX);
|
||||
|
||||
_FlyOffsetX = _Scanner.Config.MarkingOntheFlyOffsetX;
|
||||
_FlyOffsetY = _Scanner.Config.MarkingOntheFlyOffsetY;
|
||||
|
||||
}
|
||||
else if (_Scanner.Config.OnTheFlyCoordinate == eOntheFlyCoordinate.Rotate)
|
||||
{
|
||||
Log.I(string.Format("MOTF 사용, Rotate 보상"));
|
||||
// 1. 엔코더 값이 들어오면 바로 X(Rotary) Encoder 리셋
|
||||
_Scanner.SetFlyRotate(_Scanner.Config.MarkingOnTheFlyEncoderResolutionRotate);
|
||||
|
||||
// 2. 일괄 회전.(OTW 세팅시, Encoder가 0부터 시작하므로)
|
||||
foreach (IDrawObject obj in _InitParam.SelectedDrawObjectList)
|
||||
{
|
||||
obj.Rotate(ROTATION_DEGREE, new UnitPoint(_Scanner.Config.MarkingOnTheFlyRotateCenterX, _Scanner.Config.MarkingOnTheFlyRotateCenterY)); // +15도 회전
|
||||
}
|
||||
|
||||
// 3. 원하는 용접 시작 각도 올 때까지 기다리기.
|
||||
double weldingAngle = _Scanner.Config.MarkingRangeMinRotate + ROTATION_DEGREE;
|
||||
_Scanner.WaitForEncoderRotateX(weldingAngle); // -5도부터 용접시작하고 싶으면 10도 넣으면 됨
|
||||
|
||||
// _FlyOffsetX, _FlyOffsetY 값 설정 불필요, 0-0 이면 됨.
|
||||
}
|
||||
|
||||
// 엔코더 기록(용접 시작)
|
||||
_Scanner.StoreEncoder(0);
|
||||
_Scanner.SaveAndRestartTimer(); // 이전 용접의 T/T을 가져가고 싶으면 여기서 Reset 하기 전에 GetTime으로 읽어가야 함
|
||||
}
|
||||
#endregion
|
||||
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
@ -1485,25 +1524,31 @@ namespace WeldingCommon.Sequences
|
||||
|
||||
private SequenceActionResult MarkingOnTheFlyOff(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
//if (_Scanner.Config.UseMarkingOnTheFly) {
|
||||
// if (_Scanner.Config.OnTheFlyCoordinate == eOntheFlyCoordinate.XY) {
|
||||
// // Linear OTW의 경우, 각 Draw Tool에서 좌표 오프셋을 해 주고 있음
|
||||
#region 260416 주석 처리한 내용 복원함 . - 레시피 가공 자체가 안 됨
|
||||
if (_Scanner.Config.UseMarkingOnTheFly)
|
||||
{
|
||||
if (_Scanner.Config.OnTheFlyCoordinate == eOntheFlyCoordinate.XY)
|
||||
{
|
||||
// Linear OTW의 경우, 각 Draw Tool에서 좌표 오프셋을 해 주고 있음
|
||||
|
||||
// } else if (_Scanner.Config.OnTheFlyCoordinate == eOntheFlyCoordinate.Rotate) {
|
||||
// // 여기서 원래 레시피로 돌려주기
|
||||
// foreach (IDrawObject obj in _InitParam.SelectedDrawObjectList) {
|
||||
// obj.Rotate(ROTATION_DEGREE * -1, new UnitPoint(_Scanner.Config.MarkingOnTheFlyRotateCenterX, _Scanner.Config.MarkingOnTheFlyRotateCenterY)); // -15도 회전
|
||||
// }
|
||||
// }
|
||||
}
|
||||
else if (_Scanner.Config.OnTheFlyCoordinate == eOntheFlyCoordinate.Rotate)
|
||||
{
|
||||
// 여기서 원래 레시피로 돌려주기
|
||||
foreach (IDrawObject obj in _InitParam.SelectedDrawObjectList)
|
||||
{
|
||||
obj.Rotate(ROTATION_DEGREE * -1, new UnitPoint(_Scanner.Config.MarkingOnTheFlyRotateCenterX, _Scanner.Config.MarkingOnTheFlyRotateCenterY)); // -15도 회전
|
||||
}
|
||||
}
|
||||
|
||||
// // 추후, Parking Position 을 용접 시작 위치로 자동으로 계산되어 들어가게 개선 필요
|
||||
// _Scanner.Fly_Return(_Scanner.Config.MarkingOntheFlyParkingPositionX, _Scanner.Config.MarkingOntheFlyParkingPositionY);
|
||||
|
||||
// // 엔코더 기록(용접 완료)
|
||||
// _Scanner.StoreEncoder(1);
|
||||
// _Scanner.SaveAndRestartTimer();
|
||||
//}
|
||||
// 추후, Parking Position 을 용접 시작 위치로 자동으로 계산되어 들어가게 개선 필요
|
||||
_Scanner.Fly_Return(_Scanner.Config.MarkingOntheFlyParkingPositionX, _Scanner.Config.MarkingOntheFlyParkingPositionY);
|
||||
|
||||
// 엔코더 기록(용접 완료)
|
||||
_Scanner.StoreEncoder(1);
|
||||
_Scanner.SaveAndRestartTimer();
|
||||
}
|
||||
#endregion
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
|
||||
|
||||
@ -57,7 +57,11 @@
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<local:UCScannerMotion Grid.Row="0" Margin="5 0 0 0" DataContext="{Binding ScannerMotionViewModel}"></local:UCScannerMotion>
|
||||
<local:UCScannerLaserControl Grid.Row="1" Margin="5 5 0 0" DataContext="{Binding ScannerLaserControlViewModel}"></local:UCScannerLaserControl>
|
||||
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<local:UCScannerLaserControl Margin="5 5 0 0" DataContext="{Binding ScannerLaserControlViewModel}"></local:UCScannerLaserControl>
|
||||
</ScrollViewer>
|
||||
<!--local:UCScannerLaserControl Grid.Row="1" Margin="5 5 0 0" DataContext="{Binding ScannerLaserControlViewModel}"></local:UCScannerLaserControl>-->
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
@ -28,13 +28,13 @@
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Grid.Row="0" Header="Manual Laser Power Control" Margin="0 3 3 0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"></ColumnDefinition>
|
||||
@ -44,7 +44,7 @@
|
||||
<Grid Margin="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<UniformGrid Grid.Row="0" Rows="4">
|
||||
<usercontrols:UCKeyValue KeyText="Power #1" Value="{Binding LaserPower1Percent}" DecimalPlaces="0" Unit="%" KeyHorizontalAlignment="Right" KeyTextWidth="0.5*" />
|
||||
@ -63,14 +63,14 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Header="Timer Set" Style="{StaticResource StGroupBox4th}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" BorderBrush="Gray" BorderThickness="0.5">
|
||||
<mah:ToggleSwitch Grid.Row="0" HorizontalAlignment="Center" FontSize="12" FontWeight="Bold"
|
||||
@ -122,7 +122,7 @@
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"></ColumnDefinition>
|
||||
@ -132,7 +132,7 @@
|
||||
<Grid Margin="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<UniformGrid Grid.Row="0" Rows="4">
|
||||
<usercontrols:UCKeyValue KeyText="Power #1" Value="{Binding LaserPower1Watt}" DecimalPlaces="0" Unit="W" KeyHorizontalAlignment="Right" KeyTextWidth="0.5*" />
|
||||
@ -151,14 +151,14 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Header="Timer Set" Style="{StaticResource StGroupBox4th}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" BorderBrush="Gray" BorderThickness="0.5">
|
||||
<mah:ToggleSwitch Grid.Row="0" HorizontalAlignment="Center" FontSize="12" FontWeight="Bold"
|
||||
@ -207,19 +207,19 @@
|
||||
|
||||
|
||||
|
||||
<GroupBox Grid.Row="2" Header="Marking On The Fly" Margin="0 3 3 0" Visibility="{Binding IsUseMarkingOnTheFly, Converter={StaticResource convTrueVisible}}">
|
||||
<GroupBox Grid.Row="2" Header="Marking On The Fly" Margin="0 3 3 0" IsEnabled="{Binding IsUseMarkingOnTheFly}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Header="Encoder Value" Grid.Row="0" Margin="0 5 0 0" Style="{StaticResource StGroupBox4th}">
|
||||
<Grid Margin="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"></ColumnDefinition>
|
||||
@ -240,7 +240,7 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" Grid.Column="0" MinHeight="30">
|
||||
<TextBlock Margin="10 0" FontSize="12" Foreground="#FFBBBBBB" FontWeight="Bold" Text="X Dir FieldOut" VerticalAlignment="Center" HorizontalAlignment="Right"/>
|
||||
@ -267,7 +267,7 @@
|
||||
<Grid Margin="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="1*"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"></ColumnDefinition>
|
||||
|
||||
@ -156,17 +156,24 @@ namespace WeldingCommon.Views
|
||||
private void VisibleChanged(object obj)
|
||||
{
|
||||
bool visible = (bool)obj;
|
||||
if (visible) {
|
||||
if (visible)
|
||||
{
|
||||
//Init_XYLimitPos();
|
||||
|
||||
// 26.04.16 NDY - 탭 활성화 시마다 ScannerConfig에서 최신값 반영
|
||||
IsUseMarkingOnTheFly = _ScannerConfig?.UseMarkingOnTheFly ?? false;
|
||||
_MonitorTimer.Start();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
_MonitorTimer.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnMonitoring(object sender, EventArgs e)
|
||||
{
|
||||
if (_Scanner.IsActivated == false) {
|
||||
if (_Scanner.IsActivated == false)
|
||||
{
|
||||
Log.D(string.Format("[OnMonitoring] Check Scanner device Connect. ScannerLaserControl view OnMonitoring Stop"));
|
||||
MessageUtil.ShowWarningToast(string.Format("Check Scanner device Connect."));
|
||||
|
||||
@ -174,9 +181,12 @@ namespace WeldingCommon.Views
|
||||
}
|
||||
|
||||
double encoderX, encoderY;
|
||||
if (_ScannerConfig.OnTheFlyCoordinate == eOntheFlyCoordinate.XY) {
|
||||
if (_ScannerConfig.OnTheFlyCoordinate == eOntheFlyCoordinate.XY)
|
||||
{
|
||||
_Scanner.GetEncoder(out encoderX, out encoderY, false);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
_Scanner.GetEncoder(out encoderX, out encoderY, true);
|
||||
}
|
||||
|
||||
@ -200,16 +210,22 @@ namespace WeldingCommon.Views
|
||||
markingInfo = _Scanner.GetMarkingInfo();
|
||||
|
||||
// x 범위 초과
|
||||
if ((markingInfo & 0x0001) == 0x0001 || (markingInfo & 0x0002) == 0x0002) {
|
||||
if ((markingInfo & 0x0001) == 0x0001 || (markingInfo & 0x0002) == 0x0002)
|
||||
{
|
||||
IsFieldOutX = true;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
IsFieldOutX = false;
|
||||
}
|
||||
|
||||
// y 범위 초과
|
||||
if ((markingInfo & 0x0004) == 0x0004 || (markingInfo & 0x0008) == 0x0008) {
|
||||
if ((markingInfo & 0x0004) == 0x0004 || (markingInfo & 0x0008) == 0x0008)
|
||||
{
|
||||
IsFieldOutY = true;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
IsFieldOutY = false;
|
||||
}
|
||||
|
||||
@ -219,19 +235,26 @@ namespace WeldingCommon.Views
|
||||
|
||||
uint IsList1Busy = readStatus & 16;
|
||||
uint IsList2Busy = readStatus & 32;
|
||||
if (IsList1Busy == 16) {
|
||||
if (IsList1Busy == 16)
|
||||
{
|
||||
busyStatus = "List1";
|
||||
if (_BeforeBusyList != 1) {
|
||||
if (_BeforeBusyList != 1)
|
||||
{
|
||||
_ListIterationCount++;
|
||||
}
|
||||
_BeforeBusyList = 1;
|
||||
} else if (IsList2Busy == 32) {
|
||||
}
|
||||
else if (IsList2Busy == 32)
|
||||
{
|
||||
busyStatus = "List2";
|
||||
if (_BeforeBusyList != 2) {
|
||||
if (_BeforeBusyList != 2)
|
||||
{
|
||||
_ListIterationCount++;
|
||||
}
|
||||
_BeforeBusyList = 2;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
busyStatus = "N/A";
|
||||
}
|
||||
|
||||
@ -241,8 +264,10 @@ namespace WeldingCommon.Views
|
||||
|
||||
private void PerformCmdLaserShotOnPercent(object obj)
|
||||
{
|
||||
if (IsUseLaserAutoOffChecked) {
|
||||
if (_Scanner.GetBusyStatus()) {
|
||||
if (IsUseLaserAutoOffChecked)
|
||||
{
|
||||
if (_Scanner.GetBusyStatus())
|
||||
{
|
||||
MessageUtil.ShowWarningToast(string.Format("Laser, Scanner is busy."));
|
||||
return;
|
||||
}
|
||||
@ -251,12 +276,14 @@ namespace WeldingCommon.Views
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (_SeqTeachingRun.RunState == SequenceRunState.Running) {
|
||||
if (_SeqTeachingRun.RunState == SequenceRunState.Running)
|
||||
{
|
||||
MessageUtil.ShowWarningToast(string.Format("이미 시퀀스가 Start 상태입니다.", "Laser On"), Log);
|
||||
return;
|
||||
}
|
||||
var currentModelInfo = EquipmentSpecificModelUtil.GetCurrentRecipeEquipmentSpecificModel();
|
||||
if (currentModelInfo.equipmentSpecificModel == null) {
|
||||
if (currentModelInfo.equipmentSpecificModel == null)
|
||||
{
|
||||
MessageUtil.ShowWarningToast(string.Format("선택된 model 이 없습니다.", "Laser On"));
|
||||
return;
|
||||
}
|
||||
@ -264,70 +291,8 @@ namespace WeldingCommon.Views
|
||||
var intervalTimeBlowOn = 0;
|
||||
var intervalTimeBlowOff = 0;
|
||||
|
||||
if (currentModelInfo.equipmentSpecificModel.UseBlow) {
|
||||
intervalTimeBlowOn = currentModelInfo.equipmentSpecificModel.IntervalTimeBlowOn;
|
||||
intervalTimeBlowOff = currentModelInfo.equipmentSpecificModel.IntervalTimeBlowOff;
|
||||
}
|
||||
|
||||
// Object를 만들어
|
||||
var param = new SeqTeachingRun_InitParam() {
|
||||
IsUseExternalObjects = true,
|
||||
ExternalObjects = CreateDotForLaserOn(),
|
||||
|
||||
//UseStream = _EquipmentInfo.UseStream,
|
||||
UseStream = currentModelInfo.equipmentSpecificModel.UseStream,
|
||||
|
||||
UseBlow = currentModelInfo.equipmentSpecificModel.UseBlow,
|
||||
IntervalTimeBlowOn = intervalTimeBlowOn,
|
||||
IntervalTimeBlowOff = intervalTimeBlowOff,
|
||||
|
||||
NeedSetLaserTiming = true,
|
||||
};
|
||||
|
||||
_SeqTeachingRun.Start(param, OnCompleteMarkGrid);
|
||||
} else {
|
||||
LaserPowerCalParam powerCalParam = Status.AuroraEnv.SettingEntry[CommonSettingIds.LaserPowerCalParam] as LaserPowerCalParam;
|
||||
float powerVolt1 = 0, powerVolt2 = 0;
|
||||
|
||||
powerCalParam.Initialize(powerCalParam.PowerCalibrationCenterBeamCSVFile, powerCalParam.PowerCalibrationRingBeamCSVFile);
|
||||
powerVolt1 = (float)powerCalParam.CalibratePercentToMeasuredVoltage(LaserPower1Percent, (uint)LaserPowerCalParam.beamMode.Center) * 10;
|
||||
powerVolt2 = (float)powerCalParam.CalibratePercentToMeasuredVoltage(LaserPower2Percent, (uint)LaserPowerCalParam.beamMode.Ring) * 10;
|
||||
Thread.Sleep(50);
|
||||
_Scanner.WriteDA((uint)eAnalogPortOut.DA1, powerVolt1, eFunctionType.COMMAND);
|
||||
_Scanner.WriteDA((uint)eAnalogPortOut.DA2, powerVolt2, eFunctionType.COMMAND);
|
||||
_Scanner.SetLaserPulseCtrl(LaserPeriod * 1000, LaserPulseWidth);
|
||||
//_Scanner.SetLaserTiming(LaserPeriod * 1000, LaserPulseWidth, LaserPulseWidth);
|
||||
//_Scanner.SetStandby(LaserPeriod * 1000, LaserPulseWidth);
|
||||
_Scanner.LaserSignalOn();
|
||||
}
|
||||
}
|
||||
private void PerformCmdLaserShotOnWatt(object obj)
|
||||
{
|
||||
|
||||
if (IsUseLaserAutoOffChecked) {
|
||||
if (_Scanner.GetBusyStatus()) {
|
||||
MessageUtil.ShowWarningToast(string.Format("Laser, Scanner is busy."));
|
||||
return;
|
||||
}
|
||||
//if (!_Laser.GetLaserReady()) {
|
||||
// MessageUtil.ShowWarningToast(string.Format("Laser, Check Laser Ready status."));
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (_SeqTeachingRun.RunState == SequenceRunState.Running) {
|
||||
MessageUtil.ShowWarningToast(string.Format("이미 시퀀스가 Start 상태입니다.", "Laser On"), Log);
|
||||
return;
|
||||
}
|
||||
var currentModelInfo = EquipmentSpecificModelUtil.GetCurrentRecipeEquipmentSpecificModel();
|
||||
if (currentModelInfo.equipmentSpecificModel == null) {
|
||||
MessageUtil.ShowWarningToast(string.Format("선택된 model 이 없습니다.", "Laser On"));
|
||||
return;
|
||||
}
|
||||
|
||||
var intervalTimeBlowOn = 0;
|
||||
var intervalTimeBlowOff = 0;
|
||||
|
||||
if (currentModelInfo.equipmentSpecificModel.UseBlow) {
|
||||
if (currentModelInfo.equipmentSpecificModel.UseBlow)
|
||||
{
|
||||
intervalTimeBlowOn = currentModelInfo.equipmentSpecificModel.IntervalTimeBlowOn;
|
||||
intervalTimeBlowOff = currentModelInfo.equipmentSpecificModel.IntervalTimeBlowOff;
|
||||
}
|
||||
@ -349,7 +314,80 @@ namespace WeldingCommon.Views
|
||||
};
|
||||
|
||||
_SeqTeachingRun.Start(param, OnCompleteMarkGrid);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
LaserPowerCalParam powerCalParam = Status.AuroraEnv.SettingEntry[CommonSettingIds.LaserPowerCalParam] as LaserPowerCalParam;
|
||||
float powerVolt1 = 0, powerVolt2 = 0;
|
||||
|
||||
powerCalParam.Initialize(powerCalParam.PowerCalibrationCenterBeamCSVFile, powerCalParam.PowerCalibrationRingBeamCSVFile);
|
||||
powerVolt1 = (float)powerCalParam.CalibratePercentToMeasuredVoltage(LaserPower1Percent, (uint)LaserPowerCalParam.beamMode.Center) * 10;
|
||||
powerVolt2 = (float)powerCalParam.CalibratePercentToMeasuredVoltage(LaserPower2Percent, (uint)LaserPowerCalParam.beamMode.Ring) * 10;
|
||||
Thread.Sleep(50);
|
||||
_Scanner.WriteDA((uint)eAnalogPortOut.DA1, powerVolt1, eFunctionType.COMMAND);
|
||||
_Scanner.WriteDA((uint)eAnalogPortOut.DA2, powerVolt2, eFunctionType.COMMAND);
|
||||
_Scanner.SetLaserPulseCtrl(LaserPeriod * 1000, LaserPulseWidth);
|
||||
//_Scanner.SetLaserTiming(LaserPeriod * 1000, LaserPulseWidth, LaserPulseWidth);
|
||||
//_Scanner.SetStandby(LaserPeriod * 1000, LaserPulseWidth);
|
||||
_Scanner.LaserSignalOn();
|
||||
}
|
||||
}
|
||||
private void PerformCmdLaserShotOnWatt(object obj)
|
||||
{
|
||||
|
||||
if (IsUseLaserAutoOffChecked)
|
||||
{
|
||||
if (_Scanner.GetBusyStatus())
|
||||
{
|
||||
MessageUtil.ShowWarningToast(string.Format("Laser, Scanner is busy."));
|
||||
return;
|
||||
}
|
||||
//if (!_Laser.GetLaserReady()) {
|
||||
// MessageUtil.ShowWarningToast(string.Format("Laser, Check Laser Ready status."));
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (_SeqTeachingRun.RunState == SequenceRunState.Running)
|
||||
{
|
||||
MessageUtil.ShowWarningToast(string.Format("이미 시퀀스가 Start 상태입니다.", "Laser On"), Log);
|
||||
return;
|
||||
}
|
||||
var currentModelInfo = EquipmentSpecificModelUtil.GetCurrentRecipeEquipmentSpecificModel();
|
||||
if (currentModelInfo.equipmentSpecificModel == null)
|
||||
{
|
||||
MessageUtil.ShowWarningToast(string.Format("선택된 model 이 없습니다.", "Laser On"));
|
||||
return;
|
||||
}
|
||||
|
||||
var intervalTimeBlowOn = 0;
|
||||
var intervalTimeBlowOff = 0;
|
||||
|
||||
if (currentModelInfo.equipmentSpecificModel.UseBlow)
|
||||
{
|
||||
intervalTimeBlowOn = currentModelInfo.equipmentSpecificModel.IntervalTimeBlowOn;
|
||||
intervalTimeBlowOff = currentModelInfo.equipmentSpecificModel.IntervalTimeBlowOff;
|
||||
}
|
||||
|
||||
// Object를 만들어
|
||||
var param = new SeqTeachingRun_InitParam()
|
||||
{
|
||||
IsUseExternalObjects = true,
|
||||
ExternalObjects = CreateDotForLaserOn(),
|
||||
|
||||
//UseStream = _EquipmentInfo.UseStream,
|
||||
UseStream = currentModelInfo.equipmentSpecificModel.UseStream,
|
||||
|
||||
UseBlow = currentModelInfo.equipmentSpecificModel.UseBlow,
|
||||
IntervalTimeBlowOn = intervalTimeBlowOn,
|
||||
IntervalTimeBlowOff = intervalTimeBlowOff,
|
||||
|
||||
NeedSetLaserTiming = true,
|
||||
};
|
||||
|
||||
_SeqTeachingRun.Start(param, OnCompleteMarkGrid);
|
||||
}
|
||||
else
|
||||
{
|
||||
LaserPowerCalParam powerCalParam = Status.AuroraEnv.SettingEntry[CommonSettingIds.LaserPowerCalParam] as LaserPowerCalParam;
|
||||
float powerVolt1 = 0, powerVolt2 = 0;
|
||||
|
||||
@ -367,8 +405,10 @@ namespace WeldingCommon.Views
|
||||
}
|
||||
private void OnCompleteMarkGrid(SequenceActionResult res)
|
||||
{
|
||||
if (res != null) {
|
||||
if (res.Param is SeqTeachingRun_OutParam result && result.Success == true) {
|
||||
if (res != null)
|
||||
{
|
||||
if (res.Param is SeqTeachingRun_OutParam result && result.Success == true)
|
||||
{
|
||||
MessageUtil.ShowSuccessToast(string.Format("Success SeqMarkGrid"));
|
||||
return;
|
||||
}
|
||||
@ -379,9 +419,12 @@ namespace WeldingCommon.Views
|
||||
|
||||
private void PerformCmdLaserShotOff(object obj)
|
||||
{
|
||||
if (IsUseLaserAutoOffChecked) {
|
||||
if (IsUseLaserAutoOffChecked)
|
||||
{
|
||||
_Scanner.StopExecution();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
_Scanner.LaserSignalOff();
|
||||
}
|
||||
|
||||
@ -390,7 +433,8 @@ namespace WeldingCommon.Views
|
||||
|
||||
private void PerformCmdResetEncoderValue(object obj)
|
||||
{
|
||||
try {
|
||||
try
|
||||
{
|
||||
_Scanner.InitFly2D();
|
||||
|
||||
// CBW OTW 테스트를 위해 아래는 일단 주석처리
|
||||
@ -398,7 +442,9 @@ namespace WeldingCommon.Views
|
||||
|
||||
// list 반복 숫자 초기화
|
||||
_ListIterationCount = 0;
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageUtil.ShowErrorToast(string.Format($"{ex.Message}"));
|
||||
}
|
||||
}
|
||||
@ -433,10 +479,13 @@ namespace WeldingCommon.Views
|
||||
|
||||
private void PerformCmdSimulateEncoder(object obj)
|
||||
{
|
||||
if (_ToggleSimulateEncoder) {
|
||||
if (_ToggleSimulateEncoder)
|
||||
{
|
||||
_Scanner.SimulateEncoder(0);
|
||||
_ToggleSimulateEncoder = false;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
_ToggleSimulateEncoder = true;
|
||||
_Scanner.SimulateEncoder(1);
|
||||
}
|
||||
@ -444,10 +493,13 @@ namespace WeldingCommon.Views
|
||||
|
||||
private void PerformCmdSimulateEncoderXY(object obj)
|
||||
{
|
||||
if (_ToggleSimulateEncoder) {
|
||||
if (_ToggleSimulateEncoder)
|
||||
{
|
||||
_Scanner.SimulateEncoder(0);
|
||||
_ToggleSimulateEncoder = false;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
_ToggleSimulateEncoder = true;
|
||||
_Scanner.SimulateEncoder(3);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user