-WeldingData.WeldingJigNo를 JigNo로 rename, WorkJigNo 필드추가 -관련 참조 일괄 수정(JigInfo, EDC, SeqAutoRunACW/CCW) -ActualProcessData : APD파라미터를 ActualProcessParameter로 분리하고 단일 열 -> 객체별 16개열(_1~_16)구조로 변경 -SaveCellAPD()호출 위치를 report!=null 블록 내부로 이동(CellId/LotId 설정 후 저장되도록 순서 보장) -UCMainAutoRun에 HeadNo 항목추가(Rows7->8) -ScannerCCWH52A시뮬모드 E2.ABORTED 리턴 주석 처리
67 lines
2.0 KiB
C#
67 lines
2.0 KiB
C#
using Aurora;
|
|
using Aurora.Api;
|
|
using AuroraLaserScanner;
|
|
using Hermes;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using WeldingCommon;
|
|
using static ILSOS_CCW_H52A.Device.PLCControllerCCWH52A;
|
|
|
|
namespace ILSOS_CCW_H52A.Device
|
|
{
|
|
public class ScannerCCWH52A : Scanner
|
|
{
|
|
// -----------------------------
|
|
// Simulation state
|
|
// -----------------------------
|
|
private PLCControllerCCWH52A _plc;
|
|
|
|
public ScannerCCWH52A(string deviceId) : base(deviceId)
|
|
{
|
|
}
|
|
|
|
protected override int DoActivate(IDeviceConfig config)
|
|
{
|
|
var ret = base.DoActivate(config);
|
|
if (ret == E1.OK && IsSimul) {
|
|
if (_plc == null) {
|
|
_plc = Application.Current.AuroraEnv().DeviceManager[CommonDeviceIds.PLCDevice] as PLCControllerCCWH52A;
|
|
//return E2.ABORTED;
|
|
}
|
|
|
|
// 값의 동기화가 필요해서 추가 함
|
|
if (!_plc.IsConnected && !_plc.IsSimul)
|
|
return E2.ABORTED;
|
|
|
|
var core = _scannerObj as ScannerSimul;
|
|
core.PLCReadBit = _plc.ReadBit;
|
|
core.PLCReadWord = _plc.ReadWord;
|
|
core.PLCReadDWord = _plc.ReadDWord;
|
|
core.PLCGetAbsDeg = _plc.GetSimAbsDeg;
|
|
//_plc.ResetSimulator();
|
|
core.ResetSim();
|
|
core.TrySyncAbsAngleToPlcNow();
|
|
|
|
SetMonitoringService((_scannerObj as ScannerSimul).EquipmentSimulator, 1);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
protected override int DoDeactivate()
|
|
{
|
|
var ret = base.DoDeactivate();
|
|
if (ret == E1.OK && IsSimul){
|
|
var core = _scannerObj as ScannerSimul;
|
|
StopMonitoringService();
|
|
}
|
|
|
|
return ret;
|
|
}
|
|
}
|
|
}
|