Commit 39cbccd1 刘韬

优化超声波高度检测

1 个父辈 0399105c
......@@ -85,6 +85,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ResourceCulture.cs" />
<Compile Include="useControl\AxisTipControl.cs">
<SubType>Form</SubType>
</Compile>
......@@ -149,7 +150,6 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ResourceCulture.cs" />
<Compile Include="useControl\AxisMoveControl.cs">
<SubType>UserControl</SubType>
</Compile>
......
......@@ -241,7 +241,7 @@ namespace OnlineStore.ACSingleStore
public static double ConvertAI(double aiValue, double defaultValue)
{
double xishu = (double)StoreManager.Config.AI_ConvertPosition;
double result = Math.Round((aiValue - defaultValue) / xishu, 2);
double result = Math.Round(Math.Abs(aiValue - defaultValue) / xishu, 2);
return result;
}
private void btnOpenDoor_Click(object sender, EventArgs e)
......
......@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 413b0ee4261e11a49b88fd1c49b2cd7507d75209")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 0399105cb374afe8fabf1f8f43f3d8f5ff67b31e")]
[assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......
......@@ -32,7 +32,7 @@
this.groupAxis = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lblAlarmcode = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label54 = new System.Windows.Forms.Label();
this.lblhomeSts = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.lblAxEncAcc = new System.Windows.Forms.Label();
......@@ -119,17 +119,22 @@
this.groupAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupAxis.Location = new System.Drawing.Point(4, 3);
this.groupAxis.Name = "groupAxis";
this.groupAxis.Size = new System.Drawing.Size(692, 395);
this.groupAxis.Size = new System.Drawing.Size(692, 419);
this.groupAxis.TabIndex = 218;
this.groupAxis.TabStop = false;
this.groupAxis.Text = "伺服运动";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label54);
this.groupBox2.Controls.Add(this.label50);
this.groupBox2.Controls.Add(this.label53);
this.groupBox2.Controls.Add(this.label56);
this.groupBox2.Controls.Add(this.label55);
this.groupBox2.Controls.Add(this.label52);
this.groupBox2.Controls.Add(this.lblAlarmcode);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.lblhomeSts);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.lblhomeSts);
this.groupBox2.Controls.Add(this.lblAxEncAcc);
this.groupBox2.Controls.Add(this.lblINP);
this.groupBox2.Controls.Add(this.lblBUSY);
......@@ -140,21 +145,16 @@
this.groupBox2.Controls.Add(this.lblEMG);
this.groupBox2.Controls.Add(this.lblWARN);
this.groupBox2.Controls.Add(this.lblALM);
this.groupBox2.Controls.Add(this.label53);
this.groupBox2.Controls.Add(this.label56);
this.groupBox2.Controls.Add(this.label55);
this.groupBox2.Controls.Add(this.label52);
this.groupBox2.Controls.Add(this.lblAxEncVel);
this.groupBox2.Controls.Add(this.lblAxPrfVel);
this.groupBox2.Controls.Add(this.lblAxEncPos);
this.groupBox2.Controls.Add(this.lblAxPrfPos);
this.groupBox2.Controls.Add(this.lblAxisPrfMode);
this.groupBox2.Controls.Add(this.label50);
this.groupBox2.Location = new System.Drawing.Point(7, 270);
this.groupBox2.Margin = new System.Windows.Forms.Padding(2);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(2);
this.groupBox2.Size = new System.Drawing.Size(540, 118);
this.groupBox2.Size = new System.Drawing.Size(540, 144);
this.groupBox2.TabIndex = 303;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "轴状态监控";
......@@ -170,20 +170,20 @@
this.lblAlarmcode.Text = "错误码:160";
this.lblAlarmcode.Visible = false;
//
// label4
// label54
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(267, 90);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(59, 17);
this.label4.TabIndex = 18;
this.label4.Text = "回原状态:";
this.label54.AutoSize = true;
this.label54.Location = new System.Drawing.Point(267, 104);
this.label54.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label54.Name = "label54";
this.label54.Size = new System.Drawing.Size(59, 17);
this.label54.TabIndex = 18;
this.label54.Text = "回原状态:";
//
// lblhomeSts
//
this.lblhomeSts.AutoSize = true;
this.lblhomeSts.Location = new System.Drawing.Point(332, 90);
this.lblhomeSts.Location = new System.Drawing.Point(275, 121);
this.lblhomeSts.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblhomeSts.Name = "lblhomeSts";
this.lblhomeSts.Size = new System.Drawing.Size(17, 17);
......@@ -193,7 +193,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(433, 90);
this.label2.Location = new System.Drawing.Point(433, 104);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(71, 17);
......@@ -204,7 +204,7 @@
// lblAxEncAcc
//
this.lblAxEncAcc.AutoSize = true;
this.lblAxEncAcc.Location = new System.Drawing.Point(510, 90);
this.lblAxEncAcc.Location = new System.Drawing.Point(442, 121);
this.lblAxEncAcc.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxEncAcc.Name = "lblAxEncAcc";
this.lblAxEncAcc.Size = new System.Drawing.Size(17, 17);
......@@ -305,7 +305,7 @@
// label53
//
this.label53.AutoSize = true;
this.label53.Location = new System.Drawing.Point(134, 90);
this.label53.Location = new System.Drawing.Point(134, 104);
this.label53.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label53.Name = "label53";
this.label53.Size = new System.Drawing.Size(59, 17);
......@@ -315,7 +315,7 @@
// label56
//
this.label56.AutoSize = true;
this.label56.Location = new System.Drawing.Point(10, 90);
this.label56.Location = new System.Drawing.Point(10, 104);
this.label56.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label56.Name = "label56";
this.label56.Size = new System.Drawing.Size(59, 17);
......@@ -345,7 +345,7 @@
// lblAxEncVel
//
this.lblAxEncVel.AutoSize = true;
this.lblAxEncVel.Location = new System.Drawing.Point(73, 90);
this.lblAxEncVel.Location = new System.Drawing.Point(16, 121);
this.lblAxEncVel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxEncVel.Name = "lblAxEncVel";
this.lblAxEncVel.Size = new System.Drawing.Size(17, 17);
......@@ -355,7 +355,7 @@
// lblAxPrfVel
//
this.lblAxPrfVel.AutoSize = true;
this.lblAxPrfVel.Location = new System.Drawing.Point(199, 90);
this.lblAxPrfVel.Location = new System.Drawing.Point(142, 121);
this.lblAxPrfVel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxPrfVel.Name = "lblAxPrfVel";
this.lblAxPrfVel.Size = new System.Drawing.Size(17, 17);
......@@ -365,7 +365,7 @@
// lblAxEncPos
//
this.lblAxEncPos.AutoSize = true;
this.lblAxEncPos.Location = new System.Drawing.Point(73, 65);
this.lblAxEncPos.Location = new System.Drawing.Point(16, 82);
this.lblAxEncPos.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxEncPos.Name = "lblAxEncPos";
this.lblAxEncPos.Size = new System.Drawing.Size(17, 17);
......@@ -375,7 +375,7 @@
// lblAxPrfPos
//
this.lblAxPrfPos.AutoSize = true;
this.lblAxPrfPos.Location = new System.Drawing.Point(199, 65);
this.lblAxPrfPos.Location = new System.Drawing.Point(142, 82);
this.lblAxPrfPos.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxPrfPos.Name = "lblAxPrfPos";
this.lblAxPrfPos.Size = new System.Drawing.Size(17, 17);
......@@ -385,11 +385,12 @@
// lblAxisPrfMode
//
this.lblAxisPrfMode.AutoSize = true;
this.lblAxisPrfMode.Location = new System.Drawing.Point(332, 65);
this.lblAxisPrfMode.Location = new System.Drawing.Point(275, 82);
this.lblAxisPrfMode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxisPrfMode.Name = "lblAxisPrfMode";
this.lblAxisPrfMode.Size = new System.Drawing.Size(17, 17);
this.lblAxisPrfMode.TabIndex = 1;
this.lblAxisPrfMode.Tag = "not";
this.lblAxisPrfMode.Text = "...";
//
// label50
......@@ -746,7 +747,7 @@
//
// label_speed
//
this.label_speed.Location = new System.Drawing.Point(3, 217);
this.label_speed.Location = new System.Drawing.Point(-1, 218);
this.label_speed.Name = "label_speed";
this.label_speed.Size = new System.Drawing.Size(100, 17);
this.label_speed.TabIndex = 329;
......@@ -954,7 +955,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.groupAxis);
this.Name = "AxisMoveControl";
this.Size = new System.Drawing.Size(699, 402);
this.Size = new System.Drawing.Size(699, 426);
this.groupAxis.ResumeLayout(false);
this.groupAxis.PerformLayout();
this.groupBox2.ResumeLayout(false);
......@@ -1015,7 +1016,7 @@
private System.Windows.Forms.ComboBox comjSpeed;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label54;
private System.Windows.Forms.Label lblhomeSts;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label lblAxEncAcc;
......
......@@ -233,7 +233,7 @@ namespace OnlineStore.ACSingleStore.useControl
//store.PositionNumList.Reverse();
string[] posstr = store.PositionNumList[store.PositionNumList.Count-1].Split('_');
int colcount = int.Parse(Regex.Replace(posstr[1], @"[^\d]*", "")) + 1;
int colcount = int.Parse(Regex.Replace(posstr[1], @"[^\d]*", "")[0].ToString()) + 1;
for (int i = 0; i < colcount; i++)
{
dataGridView1.Columns.Add("Col" + i + "_A", "Col" + i + "_A");
......@@ -257,10 +257,12 @@ namespace OnlineStore.ACSingleStore.useControl
if (posname.StartsWith("fix"))
continue;
string[] _posstr = posname.Split('_');
int col = int.Parse(Regex.Replace(_posstr[1], @"[^\d]*", ""));
int col = int.Parse(Regex.Replace(_posstr[1], @"[^\d]*", "")[0].ToString());
string ab = "A";
if (_posstr[2].Length>1)
ab= _posstr[2][1].ToString();
else if (_posstr[1].Length > 1)
ab = _posstr[1][1].ToString();
if (ab != "A" && ab != "B")
{
if (ab == "1")
......
......@@ -10,7 +10,7 @@ using System.Threading.Tasks;
public class DauxiKS107Controller
{
private static int baudRate =9600;//波特率
private static int baudRate = 9600;//波特率
private static Parity parity = Parity.None;//校验位
private static int dataBits = 8;//数据位
private static StopBits stopBits = StopBits.One; //停止位
......
......@@ -36,9 +36,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.Camera.VisionLib, Version=1.3.7927.28975, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Asa.Camera.VisionLib, Version=1.3.8398.28384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ACSingleStore\bin\Debug\Asa.Camera.VisionLib.dll</HintPath>
<HintPath>..\..\..\Camera\CameraVisionLibSetting\bin\Debug\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
......
......@@ -52,7 +52,7 @@ namespace OnlineStore.DeviceLibrary
private System.Timers.Timer IoCheckTimer = new System.Timers.Timer();
private int OutStoreWaitSeconds = ConfigAppSettings.GetIntValue(Setting_Init.OutStoreWaitSeconds);
public static DauxiKS107Controller Ultrasonic1 = new DauxiKS107Controller(300);
public static DauxiKS107Controller Ultrasonic1 = null;
public AC_SA_BoxBean(AC_SA_Config config)
{
......@@ -115,11 +115,14 @@ namespace OnlineStore.DeviceLibrary
return;
}
LogUtil.info(StoreName + "Ultrasonic1_Port:"+ Config.Ultrasonic1_Port);
if (!string.IsNullOrWhiteSpace(Config.Ultrasonic1_Port) && !Ultrasonic1.OpenPort(Config.Ultrasonic1_Port, out string errmsg)){
if (!string.IsNullOrWhiteSpace(Config.Ultrasonic1_Port)){
Ultrasonic1 = new DauxiKS107Controller(300);
if (!Ultrasonic1.OpenPort(Config.Ultrasonic1_Port, out string errmsg)) {
SetWarnMsg(ResourceControl.CustAlarm, errmsg);
LogUtil.error(StoreName + errmsg);
return;
}
}
......@@ -567,7 +570,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack_04);
LogUtil.info(LOGGER, StoreName + " 舱门口无盘, 执行往舱门口放盘");
}
else
else if (StoreMove.IsTimeOut(out _, 3))
{
SetWarnMsg("舱门口有盘无法完成回原,请取走");
//StoreMove.NextMoveStep(StoreMoveStep.BOX_H_MiddleAxisToP1);
......@@ -589,7 +592,7 @@ namespace OnlineStore.DeviceLibrary
var InOutAxis_DoorPosition_P2 = CSVPositionReader<ACStorePosition>.allPositionMap.First().Value.InOutAxis_DoorPosition_P2;
ACAxisMove(Config.InOut_Axis, InOutAxis_DoorPosition_P2, Config.InOutAxis_P2_Speed);
}
else
else if (StoreMove.IsTimeOut(out _, 5))
{
SetWarnMsg("舱门口有盘无法完成回原,请取走");
//StoreMove.NextMoveStep(StoreMoveStep.BOX_H_MiddleAxisToP1);
......@@ -1789,6 +1792,11 @@ namespace OnlineStore.DeviceLibrary
{
if (CodeManager.IsServerAccess())
return 0;
if (Ultrasonic1!=null) {
return CalHeight(ConvertAI(StoreManager.Store.GetADIO(1), Config.AIDI1_DefaultPosition));
}
if (Config.Default_TrayWidth.Equals(Width_7))
{
return GetSmallHeight();
......@@ -1918,7 +1926,7 @@ namespace OnlineStore.DeviceLibrary
public static double ConvertAI(double aiValue, double defaultValue)
{
double xishu = (double)StoreManager.Config.AI_ConvertPosition;
double result = Math.Round((aiValue - defaultValue) / xishu, 2);
double result = Math.Round(Math.Abs(aiValue - defaultValue) / xishu, 2);
return result;
}
#endregion
......
using OnlineStore.LoadCSVLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
......@@ -13,31 +14,76 @@ namespace OnlineStore.DeviceLibrary
switch (index)
{
case 1:
if (Ultrasonic1.IsRunning)
if (Ultrasonic1!= null)
return Ultrasonic1.Distance;
else
if (StoreManager.Config.AIDI1_Addr>=0)
return IOManager.GetADIOValue(StoreManager.Config.AIDI1_Addr);
break;
case 2:
if (StoreManager.Config.AIDI2_Addr >= 0)
return IOManager.GetADIOValue(StoreManager.Config.AIDI2_Addr);
break;
case 3:
if (StoreManager.Config.AIDI3_Addr >= 0)
return IOManager.GetADIOValue(StoreManager.Config.AIDI3_Addr);
break;
case 4:
if (StoreManager.Config.AIDI4_Addr >= 0)
return IOManager.GetADIOValue(StoreManager.Config.AIDI4_Addr);
break;
default:
return -1;
}
return -1;
}
DebounceFilter TrayCheck_DoorFilter = new DebounceFilter(10);
IO_VALUE TrayCheck_Door
{
get
{
if (Ultrasonic1.IsRunning)
return Ultrasonic1.Distance > 5 ? IO_VALUE.HIGH : IO_VALUE.LOW;
if (Ultrasonic1 != null)
{
var xx = Math.Abs(Ultrasonic1.Distance - Config.AIDI1_DefaultPosition);
var vv = xx >= 5 ? IO_VALUE.HIGH : IO_VALUE.LOW;
var Filter = TrayCheck_DoorFilter.Filter(vv);
LogUtil.info("Ultrasonic1.Distance:" + Ultrasonic1.Distance + "," + xx + "," + vv + ",Filter=" + Filter);
return Filter;
}
else
return IOManager.IOValue(IO_Type.TrayCheck_Door);
}
}
}
public class DebounceFilter
{
private IO_VALUE _lastValue;
private int _counter;
private readonly int _threshold;
public DebounceFilter(int threshold)
{
_threshold = threshold;
}
public IO_VALUE Filter(IO_VALUE value)
{
if (value == _lastValue)
{
_counter = 0;
return value;
}
_counter++;
if (_counter >= _threshold)
{
_lastValue = value;
_counter = 0;
return value;
}
return _lastValue;
}
}
}
......@@ -404,21 +404,20 @@ namespace OnlineStore.DeviceLibrary
{
NeedCheckSafetyLight = 0;
HIKCamera.Current.CameraGrabOne(HIKCamera.Current.GetFixtureStateFilename(StoreMove.MoveParam, StoreMove.MoveType, FixtureState.DoorIn));
if (TrayCheck_Door.Equals(IO_VALUE.LOW))
{
InStoreLog("入库:SI_06 未检测到料盘,任务取消 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_14_CheckTray);
ACAxisMove(Config.InOut_Axis, StoreMove.MoveParam.MoveP.InOut_P1, Config.InOutAxis_P1_Speed);
HttpHelper.cancelPutInTask(Name, StoreMove.MoveParam.WareNumber);
}
else
if (TrayCheck_Door.Equals(IO_VALUE.HIGH))
{
InStoreLog("入库:SI_06 拿物品,压紧轴至P2(压紧点)) 升降轴至P7(进料口取料缓冲点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_06_DoorWarToDevice);
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P7, Config.UpDownAxis_P7_Speed);
}
else if (StoreMove.IsTimeOut(out _, 5))
{
InStoreLog("入库:SI_06 未检测到料盘,任务取消 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_14_CheckTray);
ACAxisMove(Config.InOut_Axis, StoreMove.MoveParam.MoveP.InOut_P1, Config.InOutAxis_P1_Speed);
HttpHelper.cancelPutInTask(Name, StoreMove.MoveParam.WareNumber);
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_06_DoorWarToDevice)
......@@ -838,7 +837,7 @@ namespace OnlineStore.DeviceLibrary
storeStatus = StoreStatus.OutStorEnd;
SendLineStatus();
}
else
else if (StoreMove.IsTimeOut(out _,5))
{
lastPosIdStatus = StoreStatus.OutStoreError;
......@@ -934,7 +933,7 @@ namespace OnlineStore.DeviceLibrary
private void SO_091_WaitNoTray()
{
if (IOManager.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
TrayCheck_Door.Equals(IO_VALUE.LOW))
{
StoreMove.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray);
OutStoreLog("出库:SO_091 打开仓门,等待门口无料盘 ");
......@@ -943,7 +942,7 @@ namespace OnlineStore.DeviceLibrary
OpenDoor();
}
else if (StoreMove.IsTimeOut(out double timeout)) {
if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.HIGH))
if (TrayCheck_Door.Equals(IO_VALUE.HIGH))
{
SetWarnMsg(ResourceControl.MoveTimeOut, StoreMove.MoveStep + "", IO_Type.TrayCheck_Door.ToString() + "=LOW", timeout.ToString("f1")+"s"); //1085
LogUtil.error(LOGGER, WarnObj.WarnMsg, 100);
......@@ -1040,7 +1039,8 @@ namespace OnlineStore.DeviceLibrary
/// PosId, InOut,isSuccess
/// </summary>
public event Action<string,StoreMoveType,bool> InOutEndProcessEvent;
private string AutoOut { get => ResourceControl.GetString("自动出库:"); }
private string AutoIn { get => ResourceControl.GetString("自动入库:"); }
public bool Alternate = true;
private void InOutEndProcess(StoreMoveType storeMoveType,string current_posid)
{
......@@ -1088,13 +1088,13 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.info(LOGGER, StoreName + $"自动进入下一个出库:{autoPositionIndex} posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中");
Reset(false);
autoMsg = "自动出库:" + posid;
autoMsg = AutoOut + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "", posid));
}
else
{
LogUtil.info(LOGGER, StoreName + $"自动进入下一个出库:{autoPositionIndex} posid=" + posid);
autoMsg = "自动出库:" + posid;
autoMsg = AutoOut + posid;
StartOutStoreMove(new InOutStoreParam("", posid));
}
}
......@@ -1124,13 +1124,13 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.info(LOGGER, StoreName + $"自动进入下一个入库:{autoPositionIndex} posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把入库信息存入排队列表中");
Reset(false);
autoMsg = "自动入库:" + posid;
autoMsg = AutoIn + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "AAAA", posid));
}
else
{
LogUtil.info(LOGGER, StoreName + $"自动进入下一个入库:{autoPositionIndex} posid=" + posid);
autoMsg = "自动入库:" + posid;
autoMsg = AutoIn + posid;
StartInStoreMove(new InOutStoreParam("AAAA", posid));
}
}
......
......@@ -11,6 +11,8 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
namespace OnlineStore
{
......@@ -53,6 +55,8 @@ namespace OnlineStore
LogUtil.error(Name + "加载监控相机配置文件失败:"+ e.ToString());
return;
}
PictureBox p1 = new PictureBox();
camera.PreviewImage(DeviceName, p1.Handle);
camera.Open(DeviceName);
Bitmap bmp = camera.GetImage(DeviceName);
if (bmp == null)
......@@ -125,6 +129,7 @@ namespace OnlineStore
{
LogUtil.error(Name + e.ToString());
}
LogUtil.info(Name + " 保存完毕:" + filename);
}
public string GetFixtureStateFilename(InOutStoreParam inOutParam,StoreMoveType storeMoveType, FixtureState fixtureState)
{
......
......@@ -558,7 +558,8 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("MiddleAxis_Reverse_Offset")]
public int MiddleAxis_Reverse_Offset { get; set; }
/// <summary>
/// PRO 超声波测距1端口 Ultrasonic1_Port
/// PRO
/// 测距1端口 Ultrasonic1_Port
/// </summary>
[ConfigProAttribute("Ultrasonic1_Port")]
public string Ultrasonic1_Port { get; set; }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!