|
|
@@ -1177,7 +1177,7 @@ namespace TeamAAS_VP.Core
|
|
|
Int16 _LastPickINC = 0;
|
|
|
Int16[] _LastMesCheck = new Int16[10];
|
|
|
DateTime[] _LastMesCheckTime = new DateTime[10];
|
|
|
-
|
|
|
+ Dictionary<int, double> currentPressure = new Dictionary<int, double>();//当前压力
|
|
|
/// <summary>
|
|
|
/// PLC命令触发时
|
|
|
/// </summary>
|
|
|
@@ -2371,10 +2371,16 @@ namespace TeamAAS_VP.Core
|
|
|
LogHelper.WriteLogMes($"【mes开始ADD】");
|
|
|
SendTaskMessage($"mes开始ADD", MessageLevel.Info);
|
|
|
string gap = ""; string press = ""; string presstime = ""; string assypress = "";
|
|
|
- gap = gapString;
|
|
|
- press = p2.PressureNum.ToString();
|
|
|
- presstime = p2.PressureTime.ToString();
|
|
|
- assypress = assemblyRecord.AssemblyPressure.ToString();
|
|
|
+ if (i==0)
|
|
|
+ {
|
|
|
+ gap = gapString;
|
|
|
+ assypress = currentPressure[0].ToString();
|
|
|
+ }
|
|
|
+ else if (i == 1)
|
|
|
+ {
|
|
|
+ press = currentPressure[1].ToString();
|
|
|
+ presstime = p2.PressureTime.ToString();
|
|
|
+ }
|
|
|
//gap-复检gap参数, press-保压站实际压力值, presstime-保压站保压时间, assypress-组装站实际压力值
|
|
|
(bool isSuccess, string response) = await _mesService.SubmitGetAsync(i,code, comp, gap, press, presstime, assypress, resultIndex == 1 ? true : false, _LastMesCheckTime[i], DateTime.UtcNow);
|
|
|
if (isSuccess)
|
|
|
@@ -2458,7 +2464,10 @@ namespace TeamAAS_VP.Core
|
|
|
//var currentPosition = robot.GetRobotPos();
|
|
|
////读取压力值
|
|
|
//float pressure = plc.ReadNode<float>(addressConfig.In_PressureValue.Address);
|
|
|
-
|
|
|
+ //读取压力值
|
|
|
+ float pressure = plc.ReadNode<float>(string.Format(addressConfig.In_PressureValue.Address, i));
|
|
|
+ currentPressure[i] = pressure;
|
|
|
+ SendTaskMessage($"[{i}]压力:{pressure}", MessageLevel.Info);
|
|
|
|
|
|
//await Task.Delay(60);
|
|
|
////获取电批结果
|