|
@@ -212,7 +212,7 @@ namespace TeamAAS_VP.ViewModels.Product
|
|
|
set { SetProperty(ref _ProcedureModels, value); }
|
|
set { SetProperty(ref _ProcedureModels, value); }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private int _MoveSpeed=100;
|
|
|
|
|
|
|
+ private int _MoveSpeed = 100;
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// 移动速度
|
|
/// 移动速度
|
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -376,7 +376,7 @@ namespace TeamAAS_VP.ViewModels.Product
|
|
|
{
|
|
{
|
|
|
DateTime startTime = DateTime.Now;
|
|
DateTime startTime = DateTime.Now;
|
|
|
//为机器人设置移动速度
|
|
//为机器人设置移动速度
|
|
|
- await Robot.CalibParameAsync(new PickInfo(), MoveSpeed,0,false,0,0);
|
|
|
|
|
|
|
+ await Robot.CalibParameAsync(new PickInfo(), MoveSpeed, 0, false, 0, 0);
|
|
|
|
|
|
|
|
//移动机器人至A点
|
|
//移动机器人至A点
|
|
|
bool isSuccess1 = await Robot.CalibMotionAsync(PointA, null);
|
|
bool isSuccess1 = await Robot.CalibMotionAsync(PointA, null);
|
|
@@ -487,7 +487,7 @@ namespace TeamAAS_VP.ViewModels.Product
|
|
|
{
|
|
{
|
|
|
FailCount++;
|
|
FailCount++;
|
|
|
}
|
|
}
|
|
|
- TestResults.Add(new DynamicTestResult(CurrentProgress,isSuccess,PointB,CycleTime,pixelX,pixelY,angleU,transformX,transformY));
|
|
|
|
|
|
|
+ TestResults.Add(new DynamicTestResult(CurrentProgress, isSuccess, PointB, CycleTime, pixelX, pixelY, angleU, transformX, transformY));
|
|
|
OnTestResultAdded();
|
|
OnTestResultAdded();
|
|
|
|
|
|
|
|
CurrentProgress++;
|
|
CurrentProgress++;
|
|
@@ -654,6 +654,15 @@ namespace TeamAAS_VP.ViewModels.Product
|
|
|
metaTable.AddCell(cellVal);
|
|
metaTable.AddCell(cellVal);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // include device info (line, station, fixture id) but exclude MES flags/urls
|
|
|
|
|
+ var device = _configService?.GetDeviceInfo();
|
|
|
|
|
+ if (device != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ AddMeta("线别", device.Line ?? string.Empty);
|
|
|
|
|
+ AddMeta("站别", device.Station ?? string.Empty);
|
|
|
|
|
+ AddMeta("机台号", device.FixtureId ?? string.Empty);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
AddMeta("导出时间", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
|
AddMeta("导出时间", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
|
|
AddMeta("测试次数(目标)", RepeatCount.ToString(System.Globalization.CultureInfo.InvariantCulture));
|
|
AddMeta("测试次数(目标)", RepeatCount.ToString(System.Globalization.CultureInfo.InvariantCulture));
|
|
|
AddMeta("当前进度", $"{CurrentProgress} / {RepeatCount}");
|
|
AddMeta("当前进度", $"{CurrentProgress} / {RepeatCount}");
|
|
@@ -820,7 +829,7 @@ namespace TeamAAS_VP.ViewModels.Product
|
|
|
string path = dlg.FileName;
|
|
string path = dlg.FileName;
|
|
|
var sb = new System.Text.StringBuilder();
|
|
var sb = new System.Text.StringBuilder();
|
|
|
|
|
|
|
|
- // CSV 字段转义
|
|
|
|
|
|
|
+ // 辅助:CSV 字段转义
|
|
|
Func<string, string> EscapeCsv = (s) =>
|
|
Func<string, string> EscapeCsv = (s) =>
|
|
|
{
|
|
{
|
|
|
if (s == null) return "";
|
|
if (s == null) return "";
|
|
@@ -828,6 +837,16 @@ namespace TeamAAS_VP.ViewModels.Product
|
|
|
string esc = s.Replace("\"", "\"\"");
|
|
string esc = s.Replace("\"", "\"\"");
|
|
|
return mustQuote ? $"\"{esc}\"" : esc;
|
|
return mustQuote ? $"\"{esc}\"" : esc;
|
|
|
};
|
|
};
|
|
|
|
|
+ // include device info at top of CSV
|
|
|
|
|
+ var device = _configService?.GetDeviceInfo() ?? _configService?.GetDeviceInfo();
|
|
|
|
|
+ if (device != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ sb.AppendLine("设备信息");
|
|
|
|
|
+ sb.AppendLine($"线别,{EscapeCsv(device.Line)}");
|
|
|
|
|
+ sb.AppendLine($"站别,{EscapeCsv(device.Station)}");
|
|
|
|
|
+ sb.AppendLine($"机台号,{EscapeCsv(device.FixtureId)}");
|
|
|
|
|
+ sb.AppendLine();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 写入表头
|
|
// 写入表头
|
|
|
var headers = new[]
|
|
var headers = new[]
|
|
@@ -1107,7 +1126,7 @@ namespace TeamAAS_VP.ViewModels.Product
|
|
|
//SendTaskMessage(Lang.拍照OK, MessageLevel.Debug);
|
|
//SendTaskMessage(Lang.拍照OK, MessageLevel.Debug);
|
|
|
|
|
|
|
|
// 3. 获取视觉输出结果
|
|
// 3. 获取视觉输出结果
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
string points = (string)(outputCollection["Point"].Value);
|
|
string points = (string)(outputCollection["Point"].Value);
|
|
|
string[] strpoints = points.Split(';');
|
|
string[] strpoints = points.Split(';');
|
|
|
//先将pos按照逗号进行分隔,拿到数组
|
|
//先将pos按照逗号进行分隔,拿到数组
|
|
@@ -1467,7 +1486,7 @@ namespace TeamAAS_VP.ViewModels.Product
|
|
|
var configDir = System.IO.Path.GetDirectoryName(configPath);
|
|
var configDir = System.IO.Path.GetDirectoryName(configPath);
|
|
|
if (!Directory.Exists(configDir))
|
|
if (!Directory.Exists(configDir))
|
|
|
{
|
|
{
|
|
|
- Directory.CreateDirectory(configDir);
|
|
|
|
|
|
|
+ Directory.CreateDirectory(configDir);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
string json = JsonConvert.SerializeObject(ConfigModel, Formatting.Indented);
|
|
string json = JsonConvert.SerializeObject(ConfigModel, Formatting.Indented);
|