Commit 91e80306 刘韬

自动匹配算法

1 个父辈 a442e639
......@@ -57,8 +57,11 @@ namespace OnlineStore.Common
public static MyConfig<int> Temp_NG_BOX_MAXCOUNT = 50;
public static MyConfig<int> Temp_Last_Reel_Width = 0;
public static MyConfig<int> Temp_Last_Reel_Height = 0;
public static MyConfig<int> Temp_Last_InMove_Reel_Width = 0;
public static MyConfig<int> Temp_Last_InMove_Reel_Height = 0;
public static MyConfig<string> Temp_OutMoveParam = "";
public static MyConfig<int> Runtime_StartMovePosition = 0;
/// <summary>
/// 摄像机名称
/// </summary>
......
......@@ -10,80 +10,129 @@ namespace OnlineStore.Common
{
public class Pn_Algo_Match
{
static Dictionary<string, string> algopnList;
static Dictionary<string, AlgoData> algopnList_v2;
const string algopnFile = "Config\\algopn.txt";
const string algopnFile_v2 = "Config\\algopn_V2.txt";
static Pn_Algo_Match()
{
algopnList = new Dictionary<string, string>();
algopnList_v2 = new Dictionary<string, AlgoData>();
LoadFile();
}
public static void LoadFile()
{
if (!File.Exists(algopnFile))
if (File.Exists(algopnFile) && !File.Exists(algopnFile_v2))
{
UpgradeV1toV2();
}
if (!File.Exists(algopnFile_v2))
{
SaveFile();
return;
}
var ls = File.ReadAllText(algopnFile);
algopnList = JsonConvert.DeserializeObject<Dictionary<string, string>>(ls);
if (algopnList == null)
algopnList = new Dictionary<string, string>();
var ls = File.ReadAllText(algopnFile_v2);
algopnList_v2 = JsonConvert.DeserializeObject<Dictionary<string, AlgoData>>(ls);
if (algopnList_v2 == null)
algopnList_v2 = new Dictionary<string, AlgoData>();
}
static void SaveFile()
{
Directory.CreateDirectory(Path.GetDirectoryName(algopnFile));
File.WriteAllText(algopnFile + ".ready", JsonConvert.SerializeObject(algopnList));
Directory.CreateDirectory(Path.GetDirectoryName(algopnFile_v2));
File.WriteAllText(algopnFile_v2 + ".ready", JsonConvert.SerializeObject(algopnList_v2));
try
{
File.Delete(algopnFile + ".bck");
File.Move(algopnFile, algopnFile + ".bck");
File.Move(algopnFile + ".ready", algopnFile);
File.Delete(algopnFile_v2 + ".bck");
File.Move(algopnFile_v2, algopnFile_v2 + ".bck");
File.Move(algopnFile_v2 + ".ready", algopnFile_v2);
}
catch { }
}
public static void Set(string pn, string value, double? finetuning = null)
static void UpgradeV1toV2()
{
var ls = File.ReadAllText(algopnFile);
var algopnList = JsonConvert.DeserializeObject<Dictionary<string, string>>(ls);
if (algopnList == null)
{
SaveFile();
return;
}
foreach (var k in algopnList.Keys.ToArray())
{
AlgoData algoData = new AlgoData();
algoData.PN = k;
var d = algopnList[k].Split(',');
algoData.Algo = d[0];
if (d[0] == "IP_Template_PARTS" && d.Length > 1)
{
algoData.TemplateFile = d[1];
if (d.Length > 3)
algoData.fine = double.Parse(d[3]);
}
else if (d.Length > 2)
algoData.fine = double.Parse(d[2]);
if (!algopnList_v2.ContainsKey(k))
algopnList_v2.Add(k, algoData);
}
SaveFile();
}
public static void Set(string pn, string value, int? processlevel = null, double? finetuning = null)
{
if (string.IsNullOrEmpty(pn))
return;
if (string.IsNullOrEmpty(value))
return;
LogUtil.info($"set pnalgo pn:{pn}, algo:{value}, finetuning:{finetuning}");
value = "auto";
AlgoData algodata;
if (algopnList_v2.ContainsKey(pn))
algodata = algopnList_v2[pn];
else
{
algodata = new AlgoData();
algodata.PN = pn;
}
algodata.Algo = value;
if (processlevel.HasValue)
algodata.processlevel = processlevel.Value;
if (finetuning.HasValue)
algodata.fine = finetuning.Value;
if (finetuning != null)
value = value + "," + finetuning.ToString();
LogUtil.info($"set pnalgo pn:{pn}, algo:{value}, processlevel:{processlevel}, finetuning:{finetuning}");
if (algopnList.ContainsKey(pn))
algopnList[pn] = value;
if (algopnList_v2.ContainsKey(pn))
algopnList_v2[pn] = algodata;
else
algopnList.Add(pn, value);
algopnList_v2.Add(pn, algodata);
SaveFile();
}
public static string MatchPN(string pn, out bool hasMatch, out double? finetuning)
public static bool MatchPN(string pn, out AlgoData AlgoData)
{
hasMatch = false;
finetuning = null;
if (algopnList.ContainsKey(pn))
if (algopnList_v2.ContainsKey(pn))
{
hasMatch = true;
var value = algopnList[pn];
if (value.IndexOf(",") > 0)
{
var vs = value.Split(',');
if (vs.Length == 3 && double.TryParse(vs[2], out double result))
{
value = vs[0] + "," + vs[1];
finetuning = result;
}
}
return value;
AlgoData = algopnList_v2[pn];
return true;
}
else
return "auto";
{
AlgoData = new AlgoData() { Algo = "auto" };
return false;
}
}
}
[Serializable]
public class AlgoData
{
public string PN { get; set; }
public string Algo { get; set; }
public string TemplateFile { get; set; }
public double fine { get; set; }
public double processlevel { get; set; }
public override string ToString()
{
return $"PN:{PN},{Algo},{TemplateFile},{processlevel},{fine}";
}
}
}
......@@ -92,6 +92,9 @@ namespace DeviceLibrary
LogUtil.info("ServoOff【" + AxisName + "】");
AxisManager.ServoOff(Config.DeviceName, Config.GetAxisValue());
}
public bool HasHomeSignal() {
return AxisManager.GetHomeEndStatus(Config.DeviceName, (short)Config.GetAxisValue()) == 3;
}
public void HomeMove(MoveInfo MoveInfo,bool force=true)
{
if (!force && AxisManager.GetHomeEndStatus(Config.DeviceName, (short)Config.GetAxisValue()) == 3)
......@@ -99,6 +102,13 @@ namespace DeviceLibrary
LogUtil.info(AxisName + " 有原点信号,无需回原");
return;
}
if (ForceSafeCheck && !IsSafe(0, out string msg))
{
Msg.add(msg, MsgLevel.alarm);
RobotManage.UserPause(msg);
return;
}
Config.TargetPosition = 0;
LogUtil.info(AxisName + "speed[" + Config.HomeHighSpeed + "]开始原点返回");
if (MoveInfo!=null)
......@@ -296,6 +306,10 @@ namespace DeviceLibrary
public bool IsBusy {
get => AxisManager.GetBusyStatus(Config.DeviceName, Config.GetAxisValue()) == 1;
}
public bool IsHomeMoveEnd
{
get => AxisManager.IsHomeMoveEnd(Config.DeviceName, Config.GetAxisValue());
}
public bool IsServeoOn
{
get => AxisManager.IsServeoOn(Config.DeviceName, Config.GetAxisValue());
......
......@@ -249,7 +249,7 @@ namespace DeviceLibrary
r += "##" + c.CodeStr;
});
LogUtil.info("Camera 01");
if (codeList.Count > 0 && cc.Find(c => c.CodeStr.StartsWith("S20")) != null)
if (codeList.Count > 0 && cc.Find(c => Regex.IsMatch(c.CodeStr, @"^S[2-3]0")) != null)
{
hasRightCode = true;
}
......
......@@ -54,7 +54,7 @@ CREATE TABLE ""ReelInfo"" (
""LBLState"" TEXT,
""OMSG"" TEXT,
""2D_Barcode"" TEXT,
""DateTime"" date
""DateTime"" date,
PRIMARY KEY (""ID"")
);
";
......
......@@ -151,20 +151,20 @@ namespace DeviceLibrary
labelParam.codeInfos.ForEach((c) => {
if (c.CodeType == "2/5 Interleaved" || c.CodeType == "2/5 Industrial")
return;
if (c.CodeType != "Code 128" && c.CodeType != "Code 39" && c.CodeType != "Data Matrix ECC 200")
if (c.CodeType != "Code 128" && c.CodeType != "Code 39" && c.CodeType != "Data Matrix ECC 200" && c.CodeType != "QR Code")
return;
Point op = new Point(c.X, c.Y);
var a = (int)getAngle(org, op);
a = a < 0 ? 360 + a : a;
LogUtil.info($"{c.CodeType},{c.CodeStr},angles:{a}");
angles.Add(a);
if (c.CodeStr.Contains(labelParam.ReeID) && c.CodeType == "Data Matrix ECC 200")
if (c.CodeStr.Contains(labelParam.ReeID) && (c.CodeType == "Data Matrix ECC 200" || c.CodeType == "QR Code"))
{
rightcode = c;
}
});
if (rightcode == null){
rightcode = labelParam.codeInfos[0];
rightcode = labelParam.codeInfos.Find(x=>x.CodeStr.Contains(labelParam.ReeID));
LogUtil.info($"没有发现准确的码, 随机贴标");
}
......@@ -396,81 +396,6 @@ namespace DeviceLibrary
pnreglist = File.ReadAllLines("config\\pn.list").ToList().FindAll((s) => { return !string.IsNullOrWhiteSpace(s); }).ToArray();
qtyreglist = File.ReadAllLines("config\\qty.list").ToList().FindAll((s) => { return !string.IsNullOrWhiteSpace(s); }).ToArray();
}
public static bool codeProcess(ReelParam labelParam,out string debugmsg) {
if (pnreglist == null)
LoadMatchList();
debugmsg = "";
List<CodeInfo> newcodeInfos = new List<CodeInfo>();
labelParam.PN = "";
foreach (var ci in labelParam.codeInfos.ToArray())
{
//string[] pnreglist = new string[] {
// @"^P([1-9]\d+)$",
// @"^(\d+)$%Code 128",
// @"^([1-9]\d{7,9})$"
//};
foreach (var qtyreg in pnreglist)
{
var partrules = qtyreg.Split('%');
if (partrules.Length == 2) {
if (ci.CodeType != partrules[1])
break;
}
var m = Regex.Match(ci.CodeStr, partrules[0]);
if (m.Success)
{
newcodeInfos.Add(ci);
//labelParam.codeInfos.Remove(ci);
labelParam.PN = m.Groups[1].Value;
debugmsg += $"匹配到PN:{labelParam.PN}\r\n命中规则:{qtyreg}\r\n";
break;
}
}
if (!string.IsNullOrEmpty(labelParam.PN))
break;
}
labelParam.QTY = 0;
foreach (var ci in labelParam.codeInfos.ToArray())
{
//string[] qtyreglist = new string[] {
// @"Q(\d{3,5})[^\d]",
// @"^Q(\d{3,5})$",
// @"^\w+\.\d([1-9]+0+)[1-9]+\d*$",
// @"^.+?;.+?;.+?;(\d{3,5}?);.+?;.+?$",
// @"^QUANTITY:(\d*)",
// @"^(\d{6})\s",
// @"\(\w*\s+(\d+)[a-zA-Z]",
//};
foreach (var qtyreg in qtyreglist)
{
var m = Regex.Match(ci.CodeStr, qtyreg);
if (m.Success)
{
newcodeInfos.Add(ci);
//labelParam.codeInfos.Remove(ci);
labelParam.QTY = int.Parse(m.Groups[1].Value);
debugmsg += $"匹配到QTY:{labelParam.QTY}\r\n命中规则:{qtyreg}\r\n";
break;
}
}
if (labelParam.QTY > 0)
break;
}
if (string.IsNullOrEmpty(labelParam.PN) || labelParam.QTY == 0)
return false;
////labelParam.codeInfos = newcodeInfos;
//labelParam.FC = "985022";
//labelParam.RI = "AL"+DateTime.Now.ToString("yyMMddHHmmssf");
//labelParam.Batch = DateTime.Now.ToString("MMdd");
//labelParam.WareCode = labelParam.RI;
LogUtil.info($"匹配成功:{labelParam.PN},{labelParam.QTY},{labelParam.ReeID}");
return true;
}
public T DeepClone<T>(T _object)
{
T dstobject;
......
......@@ -108,7 +108,7 @@ namespace DeviceLibrary
}
public string ToDetailStr()
{
return $"{DateTime.Now:HH:mm:ss},{ReeID},{PN},{PlateW}inch,{CurrentStringNum},{NgMsg},{QTY},{WareCode}";
return $"{DateTime.Now:HH:mm:ss},{ReeID},{PN},{PlateW}x{PlateH},{CurrentStringNum},{NgMsg},{QTY},{WareCode}";
}
public string ToSortStr()
{
......@@ -141,6 +141,7 @@ namespace DeviceLibrary
sw.Dispose();
}
databaseProc.Current.InsertOrUpdateRI(UID, PN, ReeID, IsNg, NgMsg, QTY, LabelState, Algo, WareCode, xrayfile, resultfile);
}
/*
public void logresult(string xrayfile="",string resultfile="")
......
......@@ -38,6 +38,100 @@ namespace DeviceLibrary
RobotManage.UserPause("Reset_BTN", false);
}
}
void HomeReset_BTN()
{
if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH))
{
Msg.add(crc.GetString("Res0009", "按下复位按钮."), MsgLevel.info, ErrInfo.ResetBtn);
}
else
{
Msg.add(crc.GetString("Res0010", "急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info, ErrInfo.SuddenStop);
}
LogUtil.info("长按下复位按钮,系统不在运行,开始启动");
if (RobotManage.isRunning)
{
LogUtil.info("长按下复位按钮,系统正在运行,开始停止");
ButtenEvent?.Invoke(null, ErrInfo.SuddenStop);
while (RobotManage.isRunning) {
Thread.Sleep(100);
}
}
if (RobotManage.mainMachine.Loading_Batch_Axis.HasHomeSignal()
&& (RobotManage.mainMachine.Loading_Batch_Axis.IsInPosition(RobotManage.mainMachine.Config.Loading_Batch_Axis_P1)
|| RobotManage.mainMachine.Loading_Batch_Axis.IsInPosition(0))
)
{
LogUtil.info("入口批量轴在待机点或原点可以开始回原");
}
else if (RobotManage.mainMachine.LoadingCarOnPosition == MainMachine.CarPosition.OnPosition && RobotManage.mainMachine.IOValue(IO_Type.Loading_Car_Location_Up).Equals(IO_VALUE.HIGH) && RobotManage.mainMachine.Loading_Batch_Axis.HasHomeSignal())
{
LogUtil.info("入料车没有离开");
}
else
{
Msg.add("入料车没有取出,无法回原", MsgLevel.warning);
return;
}
if (RobotManage.mainMachine.Unloading_Batch_Axis.HasHomeSignal()
&& (RobotManage.mainMachine.Unloading_Batch_Axis.IsInPosition(RobotManage.mainMachine.Config.Unloading_Batch_Axis_P1)
|| RobotManage.mainMachine.Unloading_Batch_Axis.IsInPosition(0))
)
{
LogUtil.info("出口批量轴在待机点或原点可以开始回原");
}
else if (RobotManage.mainMachine.UnloadingCarOnPosition == MainMachine.CarPosition.OnPosition && RobotManage.mainMachine.IOValue(IO_Type.Unloading_Car_Location_Up).Equals(IO_VALUE.HIGH) && RobotManage.mainMachine.Unloading_Batch_Axis.HasHomeSignal())
{
LogUtil.info("出料车没有离开");
}
else
{
Msg.add("出料车没有取出,无法回原", MsgLevel.warning);
return;
}
Thread.Sleep(1000);
LogUtil.info("长按下复位按钮,开始清除报警");
AxisBean.List.ForEach((x) => { AxisManager.AlarmClear(x.Config.DeviceName, x.Config.GetAxisValue()); });
Thread.Sleep(100);
LogUtil.info("长按下复位按钮,打开伺服");
AxisBean.List.ForEach((x) => { x.Open(true,out _); });
Thread.Sleep(100);
LogUtil.info("长按下复位按钮,开始回原");
Loading_UpDown_Axis.HomeMove(null, true);
Unloading_UpDown_Axis.HomeMove(null, true);
while (!Loading_UpDown_Axis.IsHomeMoveEnd || !Unloading_UpDown_Axis.IsHomeMoveEnd) {
Thread.Sleep(500);
}
Loading_InOut_Axis.HomeMove(null, true);
Unloading_InOut_Axis.HomeMove(null, true);
while (!Loading_InOut_Axis.IsHomeMoveEnd || !Unloading_InOut_Axis.IsHomeMoveEnd)
{
Thread.Sleep(500);
}
Label_Z_Axis.HomeMove(ResetMoveInfo, forceHome);
while (!Label_Z_Axis.IsHomeMoveEnd)
{
Thread.Sleep(500);
}
Label_R_Axis.HomeMove(ResetMoveInfo, forceHome);
while (!Label_R_Axis.IsHomeMoveEnd)
{
Thread.Sleep(500);
}
Label_X_Axis.HomeMove(ResetMoveInfo, forceHome);
Label_Y_Axis.HomeMove(ResetMoveInfo, forceHome);
while (!Label_X_Axis.IsHomeMoveEnd || !Label_Y_Axis.IsHomeMoveEnd)
{
Thread.Sleep(500);
}
Thread.Sleep(500);
AxisBean.List.ForEach((x) => { x.HomeMove(null,true); });
}
void Run_BTN() {
if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH))
{
......
......@@ -32,6 +32,40 @@ namespace DeviceLibrary
public Robot_Config Config { get; set; }
public bool UserPause { get; set; } = false;
public enum CarPosition {
OnPosition,
BadPosition,
NoCar
}
public CarPosition LoadingCarOnPosition
{
get
{
if (IOValue(IO_Type.Loading_Car_Check2).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.Loading_Car_Check).Equals(IO_VALUE.LOW) && IOValue(IO_Type.Loading_Car1315_Check).Equals(IO_VALUE.LOW))
return CarPosition.BadPosition;
else if (IOValue(IO_Type.Loading_Car_Check2).Equals(IO_VALUE.HIGH)
&& (IOValue(IO_Type.Loading_Car_Check).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.Loading_Car1315_Check).Equals(IO_VALUE.HIGH)))
return CarPosition.OnPosition;
else
return CarPosition.NoCar;
}
}
public CarPosition UnloadingCarOnPosition
{
get
{
if (IOValue(IO_Type.Unloading_Car_Check2).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.Unloading_Car_Check).Equals(IO_VALUE.LOW) && IOValue(IO_Type.Unloading_Car1315_Check).Equals(IO_VALUE.LOW))
return CarPosition.BadPosition;
else if (IOValue(IO_Type.Unloading_Car_Check2).Equals(IO_VALUE.HIGH)
&& (IOValue(IO_Type.Unloading_Car_Check).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.Unloading_Car1315_Check).Equals(IO_VALUE.HIGH)))
return CarPosition.OnPosition;
else
return CarPosition.NoCar;
}
}
public MoveInfo ResetMoveInfo;
/// <summary>
......@@ -47,11 +81,11 @@ namespace DeviceLibrary
public delegate void ProcessMsg(List<Msg> msg);
public event ProcessMsg ProcessMsgEvent;
public event EventHandler<ErrInfo> ButtenEvent;
internal AxisBean Loading_Batch_Axis;
public AxisBean Loading_Batch_Axis;
internal AxisBean Loading_Middle_Axis;
internal AxisBean Loading_UpDown_Axis;
internal AxisBean Loading_InOut_Axis;
internal AxisBean Unloading_Batch_Axis;
public AxisBean Unloading_Batch_Axis;
internal AxisBean Unloading_Middle_Axis;
internal AxisBean Unloading_UpDown_Axis;
internal AxisBean Unloading_InOut_Axis;
......@@ -106,11 +140,15 @@ namespace DeviceLibrary
#region 初始化伺服轴
Loading_Batch_Axis = new AxisBean(Config.Loading_Batch_Axis, Name);
Loading_Batch_Axis.interference += Loading_Batch_Axis_interference;
Loading_Batch_Axis.ForceSafeCheck = true;
Loading_Middle_Axis = new AxisBean(Config.Loading_Middle_Axis, Name);
Loading_Middle_Axis.interference += Loading_Middle_Axis_interference;
Loading_UpDown_Axis = new AxisBean(Config.Loading_UpDown_Axis, Name);
Loading_InOut_Axis = new AxisBean(Config.Loading_InOut_Axis, Name);
Unloading_Batch_Axis = new AxisBean(Config.Unloading_Batch_Axis, Name);
Unloading_Batch_Axis.ForceSafeCheck=true;
Unloading_Batch_Axis.interference += Unloading_Batch_Axis_interference;
Unloading_Middle_Axis = new AxisBean(Config.Unloading_Middle_Axis, Name);
Unloading_Middle_Axis.interference += Unloading_Middle_Axis_interference;
Unloading_UpDown_Axis = new AxisBean(Config.Unloading_UpDown_Axis, Name);
......@@ -133,22 +171,23 @@ namespace DeviceLibrary
IOManager.IOMove(IO_Type.Unloading_Device_Led, IO_VALUE.HIGH);
}
void HomeReset_BTN()
private (bool, string) Unloading_Batch_Axis_interference(int arg1, int arg2)
{
if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH))
{
Msg.add(crc.GetString("Res0009", "按下复位按钮."), MsgLevel.info, ErrInfo.ResetBtn);
}
else
if (UnloadingCarOnPosition== CarPosition.BadPosition)
{
Msg.add(crc.GetString("Res0010", "急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info, ErrInfo.SuddenStop);
return (true, "出料车没有推倒位,提升轴不允许运动");
}
if (RobotManage.isRunning)
return (false, "");
}
private (bool, string) Loading_Batch_Axis_interference(int arg1, int arg2)
{
if (LoadingCarOnPosition == CarPosition.BadPosition)
{
LogUtil.info("长按下复位按钮,系统正在运行,开始复位");
BeginHomeReset();
return (true, "入料车没有推倒位,提升轴不允许运动");
}
ProcessMsgEvent?.Invoke(Msg.get());
return (false, "");
}
private (bool, string) Unloading_Middle_Axis_interference(int from, int to)
......@@ -299,9 +338,21 @@ namespace DeviceLibrary
case MoveStep.H01_HomeReset:
ServerCM.storeStatus = StoreStatus.ResetMove;
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
if (IOValue(IO_Type.Loading_Car_Check2).Equals(IO_VALUE.LOW)
&& IOValue(IO_Type.Loading_Car_Check).Equals(IO_VALUE.LOW) && IOValue(IO_Type.Loading_Car1315_Check).Equals(IO_VALUE.LOW))
{
CylinderMove(ResetMoveInfo, IO_Type.Loading_Car_Location_Down, IO_Type.Loading_Car_Location_Up, IO_VALUE.LOW);
}
if (IOValue(IO_Type.Unloading_Car_Check2).Equals(IO_VALUE.LOW)
&& IOValue(IO_Type.Unloading_Car_Check).Equals(IO_VALUE.LOW) && IOValue(IO_Type.Unloading_Car1315_Check).Equals(IO_VALUE.LOW))
{
CylinderMove(ResetMoveInfo, IO_Type.Unloading_Car_Location_Down, IO_Type.Unloading_Car_Location_Up, IO_VALUE.LOW);
}
ResetMoveInfo.NextMoveStep(MoveStep.H02_HomeReset_01);
PrintJob = null;
break;
case MoveStep.H02_HomeReset_01:
ResetMoveInfo.NextMoveStep(MoveStep.H02_HomeReset_02);
......@@ -317,15 +368,21 @@ namespace DeviceLibrary
Unloading_UpDown_Axis.HomeMove(ResetMoveInfo, forceHome);
break;
case MoveStep.H02_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H03_HomeReset);
ResetMoveInfo.log("2侧进出轴回原,贴标XYR轴回原");
ResetMoveInfo.NextMoveStep(MoveStep.H02_HomeReset_1);
ResetMoveInfo.log("2侧进出轴回原");
Loading_InOut_Axis.HomeMove(ResetMoveInfo, forceHome);
Unloading_InOut_Axis.HomeMove(ResetMoveInfo, forceHome);
break;
case MoveStep.H02_HomeReset_1:
ResetMoveInfo.NextMoveStep(MoveStep.H02_HomeReset_2);
ResetMoveInfo.log("贴标X轴回原");
Label_X_Axis.HomeMove(ResetMoveInfo, forceHome);
Label_Y_Axis.HomeMove(ResetMoveInfo, forceHome);
Label_R_Axis.HomeMove(ResetMoveInfo, forceHome);
break;
case MoveStep.H02_HomeReset_2:
ResetMoveInfo.NextMoveStep(MoveStep.H03_HomeReset);
ResetMoveInfo.log("贴标Y轴回原");
Label_Y_Axis.HomeMove(ResetMoveInfo, forceHome);
break;
case MoveStep.H03_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H04_HomeReset);
......@@ -372,13 +429,25 @@ namespace DeviceLibrary
PrintMoveInfo.NewMove(MoveStep.Wait);
CylinderMove(ResetMoveInfo, IO_Type.Counting_EnterDoor_Close, IO_Type.Counting_EnterDoor_Open, IO_VALUE.LOW);
CylinderMove(ResetMoveInfo, IO_Type.Counting_ExitDoor_Close, IO_Type.Counting_ExitDoor_Open, IO_VALUE.LOW);
if (IOValue(IO_Type.Counting_Reel_Check).Equals(IO_VALUE.HIGH))
if (IOValue(IO_Type.Counting_Reel_Check).Equals(IO_VALUE.HIGH))
{
CountMoveInfo.NewMove(MoveStep.Count_01);
//CountMoveInfo.MoveParam.IsNg = true;
//CountMoveInfo.MoveParam.NgMsg = "回原时发现无信息料";
CountMoveInfo.log("点料区有料直接开始点料");
}
}
if (IOValue(IO_Type.Loading_VacuumDegree_Check).Equals(IO_VALUE.HIGH))
{
InMoveInfo.NextMoveStep(MoveStep.In_05);
CountMoveInfo.log("取料吸盘上有料直接开始送入点料机");
InMoveInfo.MoveParam.PlateH = Setting_Init.Temp_Last_InMove_Reel_Height;
InMoveInfo.MoveParam.PlateW = Setting_Init.Temp_Last_InMove_Reel_Width;
InMoveInfo.log($"获取到尺寸{InMoveInfo.MoveParam.PlateW}x{InMoveInfo.MoveParam.PlateH}");
}
break;
case MoveStep.HEND_HomeReset:
ResetMoveInfo.log("回原完成");
......@@ -427,8 +496,23 @@ namespace DeviceLibrary
ok = false;
DeviceSuddenStop();
}
Msg.add(crc.GetString(L.right_safedoor_not_close, "下料区门禁没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning);
}
if (LoadingCarOnPosition == CarPosition.BadPosition)
{
ok = false;
DeviceSuddenStop();
Msg.add("入料车没有推倒位,暂停运行", MsgLevel.alarm);
}
if (UnloadingCarOnPosition == CarPosition.BadPosition)
{
ok = false;
DeviceSuddenStop();
Msg.add("出料车没有推倒位,暂停运行", MsgLevel.alarm);
}
if (!lastSafeCheckStatus && ok)
{
SafetyDevice.ResumeAll();
......@@ -532,13 +616,9 @@ namespace DeviceLibrary
+ crc.GetString(L.motion_alarm, "运动报警"), MsgLevel.alarm, ErrInfo.SuddenStop);
ButtenEvent?.Invoke(null, ErrInfo.SuddenStop);
}
var errcode = HuichuanLibrary.HCBoardManager.GetAxErrCode(configMoveAxis.GetAxisValue());
var errcodebyte = BitConverter.GetBytes(errcode).ToList();
errcodebyte.Reverse();
HuichuanLibrary.HCBoardManager.GetSdo((ushort)configMoveAxis.GetAxisValue(), 0x203f, 0, out byte[] data, out uint datalen);
var errdatabyte = data.ToList();
errdatabyte.Reverse();
LogUtil.error(configMoveAxis.GetAxisValue() + "," + configMoveAxis.Explain + " errcode " + BitConverter.ToString(errcodebyte.ToArray())+","+ BitConverter.ToString(errdatabyte.ToArray()));
LogUtil.error(configMoveAxis.GetAxisValue() + "," + string.Join(",", HuichuanLibrary.HCBoardManager.GetAxisErrorDetail(configMoveAxis.GetAxisValue())));
ok = false;
......
......@@ -22,6 +22,7 @@ namespace DeviceLibrary
public string xrayImagePath;
Task GetResultTask = null;
Dictionary<string, int> CountList = new Dictionary<string, int>();
int xrayimageretry = 0;
void CountingMoveProcess()
{
if (CheckWait(CountMoveInfo))
......@@ -132,13 +133,14 @@ namespace DeviceLibrary
CountMoveInfo.MoveParam.IsNg = false;
CountMoveInfo.MoveParam.codeInfos = x;
CountMoveInfo.MoveParam.bitmapfilename = s;
xrayimageretry = 0;
var cc = x.Select((a) => a.CodeType+":"+a.CodeStr);
LastCode = String.Join("##", cc);
CountMoveInfo.log("已完成扫码 Code:" + LastCode);
//Common.codeProcess(CountMoveInfo.MoveParam, out string mmm);
CountMoveInfo.MoveParam.WareCode = CountMoveInfo.MoveParam.codeInfos.Where(c=>c.CodeStr.StartsWith("S20") && c.CodeType== "Data Matrix ECC 200").FirstOrDefault()?.CodeStr;
CountMoveInfo.MoveParam.WareCode = CountMoveInfo.MoveParam.codeInfos.Where(c=> Regex.IsMatch(c.CodeStr, @"^S[2-3]0") && ( c.CodeType== "Data Matrix ECC 200"|| c.CodeType == "QR Code")).FirstOrDefault()?.CodeStr;
if (string.IsNullOrWhiteSpace(CountMoveInfo.MoveParam.WareCode))
CountMoveInfo.MoveParam.WareCode = CountMoveInfo.MoveParam.codeInfos.Where(c=>c.CodeStr.StartsWith("S20")).FirstOrDefault().CodeStr;
CountMoveInfo.MoveParam.WareCode = CountMoveInfo.MoveParam.codeInfos.Where(c=> Regex.IsMatch(c.CodeStr, @"^S[2-3]0")).FirstOrDefault().CodeStr;
CountMoveInfo.MoveParam.ReeID = CountMoveInfo.MoveParam.WareCode;
CountMoveInfo.MoveParam.PN = CountMoveInfo.MoveParam.codeInfos.Where(c=>c.CodeStr.StartsWith("AT")).FirstOrDefault()?.CodeStr;
if (string.IsNullOrWhiteSpace(CountMoveInfo.MoveParam.PN)) {
......@@ -231,8 +233,14 @@ namespace DeviceLibrary
CountMoveInfo.log("准备送出");
}
else if (CountMoveInfo.IsTimeOut(10)) {
Msg.add("获取料盘X光图像超时", MsgLevel.alarm);
RobotManage.UserPause("获取料盘X光图像超时");
CountMoveInfo.NextMoveStep(MoveStep.Count_05);
xrayimageretry++;
CountMoveInfo.log("获取料盘X光图像超时:"+ xrayimageretry);
if (xrayimageretry > 3)
{
Msg.add("获取料盘X光图像超时", MsgLevel.alarm);
RobotManage.UserPause("获取料盘X光图像超时");
}
}
break;
case MoveStep.Count_ReadyOut:
......@@ -408,46 +416,66 @@ namespace DeviceLibrary
var pps = CountMoveInfo.MoveParam.PN;
if (string.IsNullOrEmpty(pps))
pps = "";
var type = Pn_Algo_Match.MatchPN(pps, out _, out double? finetuning);
CountMoveInfo.log($"匹配到算法.{pps}={type}, finetuning={finetuning}");
CountMoveInfo.MoveParam.Algo = type;
if (finetuning != null)
Pn_Algo_Match.MatchPN(pps, out AlgoData algoData);
CountMoveInfo.log($"匹配到算法.{pps}={algoData}");
if (algoData.Algo == "auto" && string.IsNullOrEmpty(pps))
{
XrayImage.setFineTuning = finetuning.Value;
try
{
var pid = ONNXAlgoMatch.MatchPID(xrayImagePath, ShrinkOffset, out float matchDeg);
CountMoveInfo.log($"自动匹配算法.{pid}={matchDeg}");
if (matchDeg >= 0.6f)
{
if (pid != "PID001")
if (Pn_Algo_Match.MatchPN(pid, out AlgoData t))
{
algoData = t;
CountMoveInfo.log($"自动匹配算法成功.{algoData}");
}
else
CountMoveInfo.log($"没有匹配过自动算法");
}
}
catch(Exception ex) {
CountMoveInfo.log($"MatchPID error:{ex}");
}
}
else
{
CountMoveInfo.MoveParam.Algo = algoData.Algo;
if (algoData.fine>0)
XrayImage.setFineTuning = algoData.fine;
else
XrayImage.setFineTuning = ConfigHelper.Config.Get("setFineTuningDefault", 0.7);
}
if (type.StartsWith("IP_Template_PARTS"))
if (algoData.processlevel > 0)
XrayImage.setProcessLevel(algoData.processlevel);
else
XrayImage.setProcessLevel(2);
if (algoData.Algo.StartsWith("IP_Template_PARTS"))
{
if (!File.Exists(type.Substring(17 + 1)))
if (!File.Exists(algoData.TemplateFile))
{
CountMoveInfo.log($"模版文件丢失.{type.Substring(17 + 1)}");
type = "auto";
CountMoveInfo.log($"模版文件丢失.{algoData.TemplateFile}");
}
}
Bitmap dst = null;
if (type == "auto")
if (algoData.Algo == "auto")
{
result = XrayImage.GetLocalCount(xrayImagePath, ShrinkOffset, out countStr, out dst);
CountMoveInfo.log("GetCountResult " + type + ", ShrinkOffset=" + ShrinkOffset + ", 调用 GetLocalCount 【" + xrayImagePath + "】,返回【" + result + "】,结果【" + (countStr != null ? string.Join(",", countStr) : "null") + "】");
CountMoveInfo.log("GetCountResult " + algoData.Algo + ", ShrinkOffset=" + ShrinkOffset + ", 调用 GetLocalCount 【" + xrayImagePath + "】,返回【" + result + "】,结果【" + (countStr != null ? string.Join(",", countStr) : "null") + "】");
}
else if (type.StartsWith("IP_Template_PARTS"))
else if (algoData.Algo.StartsWith("IP_Template_PARTS"))
{
string template = "";
if (type.Length > 18)
{
template = type.Substring(17 + 1);
}
string template = algoData.TemplateFile;
result = XrayImage.GetLocalCountTemplate(xrayImagePath, ShrinkOffset, template, out countStr, out dst);
CountMoveInfo.log("GetCountResult " + template + ", ShrinkOffset="+ ShrinkOffset + ", 调用 GetLocalCountTemplate 【" + xrayImagePath + "】,返回【" + result + "】,结果【" + (countStr != null ? string.Join(",", countStr) : "null") + "】");
}
else
{
result = XrayImage.GetLocalCountIrregular(xrayImagePath, ShrinkOffset, type.ToString(), out countStr, out dst);
CountMoveInfo.log("GetCountResult " + type + ", ShrinkOffset=" + ShrinkOffset + " 调用 GetLocalCountIrregular 【" + xrayImagePath + "】,返回【" + result + "】,结果【" + (countStr != null ? string.Join(",", countStr) : "null") + "】");
result = XrayImage.GetLocalCountIrregular(xrayImagePath, ShrinkOffset, algoData.Algo.ToString(), out countStr, out dst);
CountMoveInfo.log("GetCountResult " + algoData.Algo + ", ShrinkOffset=" + ShrinkOffset + " 调用 GetLocalCountIrregular 【" + xrayImagePath + "】,返回【" + result + "】,结果【" + (countStr != null ? string.Join(",", countStr) : "null") + "】");
}
if (dst != null)
{
......@@ -485,6 +513,7 @@ namespace DeviceLibrary
File.Delete(resfile);
Directory.Move(Path.Combine(root, resfilename), resfile);
CountMoveInfo.MoveParam.logresult(xrayImagePath, resfile);
CountMoveInfo.log($"写入点料记录:UID:{CountMoveInfo.MoveParam.UID},{CountMoveInfo.MoveParam.ToStr()}");
}
else
{
......
......@@ -103,6 +103,8 @@ namespace DeviceLibrary
InCurrentStringNum = GetTopStringNum(INGetReelCheckIOList());
if (Loading_Batch_Axis.IsInPosition(Config.Loading_Batch_Axis_P2) && InCurrentStringNum==0)
{
StartMovePosition = Setting_Init.Runtime_StartMovePosition;
SetReelHeight(GetHeight(InCarMoveInfo));
InCarMoveInfo.log($"料车料盘检测为空");
InCarMoveInfo.NextMoveStep(MoveStep.InCarOut_01);
return;
......@@ -135,7 +137,8 @@ namespace DeviceLibrary
}
//if (!innewreel)
// SetReelHeight(GetHeight(InCarMoveInfo));
StartMovePosition = Setting_Init.Runtime_StartMovePosition;
SetReelHeight(GetHeight(InCarMoveInfo));
//innewreel = false;
break;
case MoveStep.InCarReadyGet:
......@@ -146,7 +149,7 @@ namespace DeviceLibrary
InCarMoveInfo.NextMoveStep(MoveStep.InCarReelGet_01);
break;
case MoveStep.InCarReelGet_01:
InCarMoveInfo.NextMoveStep(MoveStep.InCarReelGet_02);
InCarMoveInfo.NextMoveStep(MoveStep.InCarReelGet_02);
BatchAxisToP2(InCarMoveInfo, Loading_Batch_Axis, INGetReelCheckIOList(InCurrentStringNum), IO_VALUE.HIGH, Config.Loading_Batch_Axis_P2, Config.Loading_Batch_Axis_P2_speed);
InCarMoveInfo.log($"批量轴[{InCurrentStringNum}串]上升检测信号:{INGetReelCheckIOList(InCurrentStringNum)[0]}");
break;
......
......@@ -21,8 +21,14 @@ namespace DeviceLibrary
// InMoveInfo.log($"不再等待测高的步骤们无法设置盘高:{height}");
// return; }
//InMoveInfo.NextMoveStep(MoveStep.In_GetHeight);
InMoveInfo.MoveParam.PlateH = height;
InMoveInfo.log($"设置盘高:{height}");
if (InMoveInfo.MoveParam.PlateH == 0)
{
InMoveInfo.MoveParam.PlateH = height;
InMoveInfo.log($"设置盘高:{height}");
}
else {
InMoveInfo.log($"设置盘高失败:{height}");
}
}
InCarReelPostion InFromPos;
......@@ -36,12 +42,18 @@ namespace DeviceLibrary
{
case MoveStep.Wait:
if (InCarMoveInfo.MoveStep== MoveStep.InCarReadyGet) {
Setting_Init.Runtime_StartMovePosition = Loading_Batch_Axis.GetAclPosition();
InMoveInfo.NewMove(MoveStep.In_01);
InMoveInfo.MoveParam = InCarMoveInfo.MoveParam.clone();
InMoveInfo.MoveParam.UID= databaseProc.Current.GetID();
InMoveInfo.log("当前UID:" + InMoveInfo.MoveParam.UID);
var frompos = "Loading_T" + InCurrentStringNum;
InFromPos = RobotManage.InCarReelPostion[frompos];
InToPos= RobotManage.InCarReelPostion["Loading_Counting_T" + InCurrentStringNum];
InMoveInfo.log($"料盘已经准备好:{frompos}");
InMoveInfo.MoveParam.PlateH = 0;
Setting_Init.Temp_Last_InMove_Reel_Height = 0;
Setting_Init.Temp_Last_InMove_Reel_Width = 0;
}
break;
case MoveStep.In_01:
......@@ -71,21 +83,21 @@ namespace DeviceLibrary
Loading_UpDown_Axis.AbsMove(InMoveInfo, InFromPos.UpDown_P2, Config.Loading_UpDown_Axis_P1_speed);
InMoveInfo.log($"升降轴到达p2点");
break;
case MoveStep.In_06:
case MoveStep.In_06:
if (IOValue(IO_Type.Loading_VacuumDegree_Check).Equals(IO_VALUE.HIGH))
{
InMoveInfo.NextMoveStep(MoveStep.In_07);
InMoveInfo.MoveParam.PlateH = 0;
Loading_InOut_Axis.AbsMove(InMoveInfo, Config.Unloading_InOut_Axis_P1, Config.Loading_InOut_Axis_P1_speed);
InMoveInfo.log($"进出轴到达p1点");
ReelGetted(true);
InMoveInfo.log($"成功取到料盘");
}
else
else if (InMoveInfo.IsTimeOut(6))
{
InMoveInfo.NextMoveStep(MoveStep.Wait);
ReelGetted(false);
//ReelGetted(false);
InMoveInfo.log($"未取到料盘");
}
break;
......@@ -102,6 +114,9 @@ namespace DeviceLibrary
InMoveInfo.MoveParam.PlateW = 7;
else
InMoveInfo.MoveParam.PlateW = 13;
Setting_Init.Temp_Last_InMove_Reel_Height = InMoveInfo.MoveParam.PlateH;
Setting_Init.Temp_Last_InMove_Reel_Width = InMoveInfo.MoveParam.PlateW;
InMoveInfo.log($"获取到尺寸{InMoveInfo.MoveParam.PlateW}x{InMoveInfo.MoveParam.PlateH}");
}
else {
......@@ -147,6 +162,9 @@ namespace DeviceLibrary
var pos = InToPos.UpDown_P3 - (InMoveInfo.MoveParam.PlateH-8)*Config.Loading_UpDown_Axis_MMtoPOS;
Loading_UpDown_Axis.AbsMove(InMoveInfo, pos, Config.Loading_UpDown_Axis_P1_speed);
InMoveInfo.log($"升降轴到达放料p3点,pos:{pos},PlateH:{InMoveInfo.MoveParam.PlateH}");
Setting_Init.Temp_Last_Reel_Height = InMoveInfo.MoveParam.PlateH;
Setting_Init.Temp_Last_Reel_Width = InMoveInfo.MoveParam.PlateW;
}
else {
Msg.add("点料区有料盘无法继续",MsgLevel.alarm);
......@@ -171,13 +189,16 @@ namespace DeviceLibrary
break;
case MoveStep.In_19:
InMoveInfo.NextMoveStep(MoveStep.In_20);
CylinderMove(null, IO_Type.Counting_EnterDoor_Close, IO_Type.Counting_EnterDoor_Open, IO_VALUE.LOW);
InMoveInfo.log($"关闭点料机入口大门");
Loading_Middle_Axis.AbsMove(InMoveInfo, Config.Loading_Middle_Axis_P1, Config.Loading_Middle_Axis_P1_speed);
Loading_UpDown_Axis.AbsMove(InMoveInfo, Config.Loading_UpDown_Axis_P1, Config.Loading_UpDown_Axis_P1_speed);
InMoveInfo.log($"旋转轴,升降轴到达p1点");
break;
case MoveStep.In_20:
InMoveInfo.NextMoveStep(MoveStep.In_21);
CylinderMove(null, IO_Type.Counting_EnterDoor_Close, IO_Type.Counting_EnterDoor_Open, IO_VALUE.LOW);
InMoveInfo.log($"关闭点料机入口大门");
break;
case MoveStep.In_21:
CountMoveInfo.MoveParam = InMoveInfo.MoveParam.clone();
CountMoveInfo.NextMoveStep(MoveStep.Count_01);
InMoveInfo.log("点料机开始点料");
......
......@@ -132,6 +132,10 @@ namespace DeviceLibrary
Label_p3.Y = (int)(Label_p3.Y * Config.PixelToPos_Y_Ratio) + Axis_Center_Point.Y;
LabelMoveInfo.log($"计算贴标像素点位为{p},轴点位为{Label_p3},角度{labelAngle},R轴{labelAxisPos},盘宽{LabelMoveInfo.MoveParam.PlateW}");
Label_p3.X =Label_p3.X < 0 ? 0: Label_p3.X;
Label_p3.Y = Label_p3.Y < 0 ? 0: Label_p3.Y;
LabelMoveInfo.NextMoveStep(MoveStep.Lbl_11);
Label_X_Axis.AbsMove(LabelMoveInfo, Label_p3.X, Config.Label_X_P1_speed);
Label_Y_Axis.AbsMove(LabelMoveInfo, Label_p3.Y, Config.Label_Y_P1_speed);
......
using CodeLibrary;
using Newtonsoft.Json;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
......@@ -25,13 +26,28 @@ namespace DeviceLibrary
switch (OutMoveInfo.MoveStep)
{
case MoveStep.Wait:
if (CountMoveInfo.MoveStep== MoveStep.Count_ReadyOut) {
if (IOValue(IO_Type.Unloading_VacuumDegree_Check).Equals(IO_VALUE.HIGH)) {
OutMoveInfo.MoveParam = JsonConvert.DeserializeObject<ReelParam>(Setting_Init.Temp_OutMoveParam);
OutMoveInfo.log($"吸盘上有料盘" + OutMoveInfo.MoveParam.ToDetailStr());
if (OutMoveInfo.MoveParam.QTY == 0)
{
OutMoveInfo.MoveParam.IsNg = true;
OutMoveInfo.MoveParam.NgMsg = "重置时无点料结果";
}
OutMoveInfo.NextMoveStep(MoveStep.Out_09);
}
else if (CountMoveInfo.MoveStep == MoveStep.Count_ReadyOut)
{
OutMoveInfo.NewMove(MoveStep.Out_01);
OutMoveInfo.MoveParam = CountMoveInfo.MoveParam.clone();
Setting_Init.Temp_OutMoveParam = JsonConvert.SerializeObject(OutMoveInfo.MoveParam);
OutFromPos = RobotManage.OutCarReelPostion["Unloading_Counting"];
OutMoveInfo.log($"点料区料盘已经准备好:"+OutMoveInfo.MoveParam.ToDetailStr());
var cc = OutMoveInfo.MoveParam.codeInfos.Select((a) => a.CodeType + ":" + a.CodeStr);
OutMoveInfo.log(String.Join("##", cc));
OutMoveInfo.log($"点料区料盘已经准备好:" + OutMoveInfo.MoveParam.ToDetailStr());
if (OutMoveInfo.MoveParam.codeInfos != null)
{
var cc = OutMoveInfo.MoveParam.codeInfos.Select((a) => a.CodeType + ":" + a.CodeStr);
OutMoveInfo.log(String.Join("##", cc));
}
}
break;
case MoveStep.Out_01:
......@@ -82,7 +98,7 @@ namespace DeviceLibrary
Unloading_InOut_Axis.AbsMove(OutMoveInfo, Config.Unloading_InOut_Axis_P1, Config.Unloading_InOut_Axis_P1_speed);
OutMoveInfo.log($"进出轴到达p1点");
}
else
else if (OutMoveInfo.IsTimeOut(6))
{
takeretry++;
if (OutMoveInfo.MoveParam.PlateH>32)
......@@ -90,7 +106,7 @@ namespace DeviceLibrary
else
OutMoveInfo.MoveParam.PlateH -= 2;
OutMoveInfo.log($"未取到料盘");
if (takeretry < 9 && OutMoveInfo.MoveParam.PlateH>=8)
if (takeretry < 9 && OutMoveInfo.MoveParam.PlateH>=6)
{
OutMoveInfo.NextMoveStep(MoveStep.Out_05);
OutMoveInfo.log($"重试取盘:"+ OutMoveInfo.MoveParam.PlateH);
......@@ -104,6 +120,12 @@ namespace DeviceLibrary
break;
case MoveStep.Out_09:
OutMoveInfo.NextMoveStep(MoveStep.Out_10);
Unloading_Middle_Axis.AbsMove(OutMoveInfo, Config.Unloading_Middle_Axis_P1, Config.Unloading_Middle_Axis_P1_speed);
Unloading_UpDown_Axis.AbsMove(OutMoveInfo, Config.Unloading_UpDown_Axis_P1, Config.Unloading_UpDown_Axis_P1_speed);
OutMoveInfo.log($"旋转轴, 升降轴到p1");
break;
case MoveStep.Out_10:
OutMoveInfo.NextMoveStep(MoveStep.Out_11);
CylinderMove(null, IO_Type.Counting_ExitDoor_Close, IO_Type.Counting_ExitDoor_Open, IO_VALUE.LOW);
OutMoveInfo.log($"关闭点料机入口大门");
if (OutMoveInfo.MoveParam.IsNg)
......@@ -112,7 +134,7 @@ namespace DeviceLibrary
if (CountMoveInfo.MoveStep == MoveStep.Count_ReadyOut)
CountMoveInfo.NextMoveStep(MoveStep.Count_Outted);
break;
case MoveStep.Out_10:
case MoveStep.Out_11:
if (string.IsNullOrEmpty(OutMoveInfo.MoveParam.ReeID)) {
OutMoveInfo.log($"没有获得Reelid");
OutMoveInfo.MoveParam.IsNg = true;
......@@ -122,7 +144,7 @@ namespace DeviceLibrary
}
if (CountList.ContainsKey(OutMoveInfo.MoveParam.ReeID))
{
OutMoveInfo.NextMoveStep(MoveStep.Out_11);
OutMoveInfo.NextMoveStep(MoveStep.Out_12);
OutMoveInfo.MoveParam.QTY = CountList[OutMoveInfo.MoveParam.ReeID];
OutMoveInfo.log($"获得点料结果:{OutMoveInfo.MoveParam.QTY}");
lock (CountList)
......@@ -145,7 +167,7 @@ namespace DeviceLibrary
OutMoveInfo.NextMoveStep(MoveStep.Out_20);
}
break;
case MoveStep.Out_11:
case MoveStep.Out_12:
if (false && LabelBusy)
{
OutMoveInfo.log("等待贴标工作完毕");
......
......@@ -28,6 +28,7 @@ namespace DeviceLibrary
Task<(bool, string)> PrintTask = null;
bool IsLabelPrinted = false;
string printerrormsg = "";
void PrinterProcess()
{
if (CheckWait(PrintMoveInfo))
......@@ -55,17 +56,23 @@ namespace DeviceLibrary
if (result)
{
PrintMoveInfo.NextMoveStep(MoveStep.Print_04);
PrintMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
PrintMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
PrintMoveInfo.log("打印成功,等待标签被取走");
printerrormsg = "";
}
else
{
Msg.add("打印机反馈:" + msg, MsgLevel.alarm);
RobotManage.UserPause("打印机反馈:" + msg);
printerrormsg = msg;
PrintMoveInfo.NextMoveStep(MoveStep.Print_01);
PrintMoveInfo.log("打印失败,再次打印");
PrintMoveInfo.log("打印失败,再次打印:" + msg);
}
}
else if (!string.IsNullOrEmpty(printerrormsg))
{
Msg.add("打印失败,再次打印.印机反馈:" + printerrormsg, MsgLevel.alarm);
}
else if (PrintMoveInfo.IsTimeOut(30)) {
Msg.add("打印标签超时请检查打印机状态", MsgLevel.alarm);
}
......
......@@ -16,6 +16,8 @@ namespace DeviceLibrary
H02_HomeReset_01,
H02_HomeReset_02,
H02_HomeReset,
H02_HomeReset_1,
H02_HomeReset_2,
H03_HomeReset,
H04_HomeReset,
H05_HomeReset,
......@@ -77,6 +79,7 @@ namespace DeviceLibrary
In_18,
In_19,
In_20,
In_21,
Count_01,
......
......@@ -83,7 +83,7 @@ namespace DeviceLibrary
IsLoadOk = false;
msg += "找不到料串位置文件" + "\n";
}
xrayImage = new XrayImage("XrayImage", XrayImage.DeviceType.HAOBO);
xrayImage = new XrayImage("XrayImage", XrayImage.DeviceType.HAOBO_V2);
string labellingPostionFile = "config\\LabellingPostion.csv";
if (File.Exists(labellingPostionFile))
{
......@@ -137,7 +137,6 @@ namespace DeviceLibrary
}
else
{
LogUtil.info("标签打印机打开成功");
}
......
......@@ -169,6 +169,7 @@
this.lblAlarmcode.Tag = "not";
this.lblAlarmcode.Text = "ErrCode:160";
this.lblAlarmcode.Visible = false;
this.lblAlarmcode.Click += new System.EventHandler(this.lblAlarmcode_Click);
//
// label4
//
......
......@@ -446,6 +446,11 @@ namespace DeviceLibrary
lbl.BackColor = this.BackColor;
}
}
private void lblAlarmcode_Click(object sender, EventArgs e)
{
MessageBox.Show(string.Join(",", HuichuanLibrary.HCBoardManager.GetAxisErrorDetail(currentAxis.Config.GetAxisValue())));
}
}
}
......@@ -87,6 +87,7 @@ DI,0,上料区提升工位料盘检测3,Loading_Batch_ReelCheck_T3,23,HC,X23,,,,,,,,,,
DI,0,上料区提升工位料盘检测4,Loading_Batch_ReelCheck_T4,24,HC,X24,,,,,,,,,,
DI,0,上料区提升工位料盘检测5,Loading_Batch_ReelCheck_T5,25,HC,X25,,,,,,,,,,
DI,0,上料区吸盘压力检测,Loading_VacuumDegree_Check,26,HC,X26,,,,,,,,,,
DI,0,上料区推车检测2,Loading_Car_Check2,27,HC,X27,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,下料区推车锁紧按钮,Unloading_CarLock_Btn,32,HC,X32,,,,,,,,,,
DI,0,下料区推车检测,Unloading_Car_Check,33,HC,X33,,,,,,,,,,
......@@ -100,7 +101,7 @@ DI,0,下料区提升工位料盘检测4,Unloading_Batch_ReelCheck_T4,40,HC,X40,,,,,,,,,,
DI,0,下料区提升工位料盘检测5,Unloading_Batch_ReelCheck_T5,41,HC,X41,,,,,,,,,,
DI,0,下料区吸盘压力检测,Unloading_VacuumDegree_Check,42,HC,X42,,,,,,,,,,
DI,0,NG箱检测,NGBOX_Check,43,HC,X43,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,下料区推车检测2,Unloading_Car_Check2,44,HC,X44,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,点料区待机状态(指示灯),Run_Led,0,HC,Y00,,,,,,,,,,
DO,0,点料区运行状态(指示灯),Standby_Led,1,HC,Y01,,,,,,,,,,
......
......@@ -227,6 +227,16 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
public static string Unloading_Device_Led = "Unloading_Device_Led";
/// <summary>
/// DI,0,上料区推车检测2,Loading_Car_Check2,27,HC,X27,,,,,,,,,,
/// </summary>
public static string Loading_Car_Check2 = "Loading_Car_Check2";
/// <summary>
/// DI,0,下料区推车检测2,Unloading_Car_Check2,44,HC,X44,,,,,,,,,,
/// </summary>
public static string Unloading_Car_Check2 = "Unloading_Car_Check2";
}
public enum IO_VALUE
{
......
......@@ -156,7 +156,7 @@ namespace TheMachine
// 简体中文ToolStripMenuItem
//
this.简体中文ToolStripMenuItem.Name = "简体中文ToolStripMenuItem";
this.简体中文ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.简体中文ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.简体中文ToolStripMenuItem.Tag = "not";
this.简体中文ToolStripMenuItem.Text = "简体中文";
this.简体中文ToolStripMenuItem.Click += new System.EventHandler(this.简体中文ToolStripMenuItem_Click);
......@@ -164,7 +164,7 @@ namespace TheMachine
// englishToolStripMenuItem
//
this.englishToolStripMenuItem.Name = "englishToolStripMenuItem";
this.englishToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.englishToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.englishToolStripMenuItem.Tag = "not";
this.englishToolStripMenuItem.Text = "English";
this.englishToolStripMenuItem.Click += new System.EventHandler(this.englishToolStripMenuItem_Click);
......
......@@ -426,6 +426,49 @@ namespace TheMachine
MainMachine_ProcessMsgEvent(Msg.get());
return;
}
LogUtil.info($"LoadingCarOnPosition:{RobotManage.mainMachine.LoadingCarOnPosition}, Loading_Car_Location_Up:{RobotManage.mainMachine.IOValue(IO_Type.Loading_Car_Location_Up)}, HasHomeSignal:{RobotManage.mainMachine.Loading_Batch_Axis.HasHomeSignal()}");
if (RobotManage.mainMachine.LoadingCarOnPosition == MainMachine.CarPosition.NoCar)
{
LogUtil.info("没有入料车");
}
else if (RobotManage.mainMachine.LoadingCarOnPosition == MainMachine.CarPosition.OnPosition && RobotManage.mainMachine.IOValue(IO_Type.Loading_Car_Location_Up).Equals(IO_VALUE.HIGH))
{
LogUtil.info("入料车没有离开");
}
else if (RobotManage.mainMachine.Loading_Batch_Axis.HasHomeSignal()
&& (RobotManage.mainMachine.Loading_Batch_Axis.IsInPosition(RobotManage.mainMachine.Config.Loading_Batch_Axis_P1)
|| RobotManage.mainMachine.Loading_Batch_Axis.IsInPosition(0))
)
{
LogUtil.info("入口批量轴在待机点或原点可以开始回原");
}
else
{
Msg.add("入料车没有取出,无法启动", MsgLevel.warning);
MainMachine_ProcessMsgEvent(Msg.get());
return;
}
if (RobotManage.mainMachine.UnloadingCarOnPosition == MainMachine.CarPosition.NoCar)
{
LogUtil.info("没有出料车");
}
else if (RobotManage.mainMachine.UnloadingCarOnPosition == MainMachine.CarPosition.OnPosition && RobotManage.mainMachine.IOValue(IO_Type.Unloading_Car_Location_Up).Equals(IO_VALUE.HIGH) )
{
LogUtil.info("出料车没有离开");
}
else if (RobotManage.mainMachine.Unloading_Batch_Axis.HasHomeSignal()
&& (RobotManage.mainMachine.Unloading_Batch_Axis.IsInPosition(RobotManage.mainMachine.Config.Unloading_Batch_Axis_P1)
|| RobotManage.mainMachine.Unloading_Batch_Axis.IsInPosition(0))
)
{
LogUtil.info("出口批量轴在待机点或原点可以开始回原");
}
else
{
Msg.add("出料车没有取出,无法启动", MsgLevel.warning);
MainMachine_ProcessMsgEvent(Msg.get());
return;
}
RobotManage.Start();
userpause = false;
if (RobotManage.isRunning)
......
......@@ -137,7 +137,7 @@ namespace TheMachine
RobotManage.mainMachine.IOMove(IO_Type.Xray_Lock, IO_VALUE.HIGH);
Task.Delay(1000).Wait();
RobotManage.XRay.Start();
Task.Delay(2000).Wait();
Task.Delay(3000).Wait();
var b = RobotManage.xrayImage.GenerateTemplate(2);
b.Wait();
if (b.Result)
......
......@@ -31,15 +31,19 @@
this.components = new System.ComponentModel.Container();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.listBox_x = new System.Windows.Forms.ListBox();
this.txtLOffset = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txtHOffset = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.btnOpenFolder = new System.Windows.Forms.Button();
this.txt_xpos = new System.Windows.Forms.TextBox();
this.txtSpeed = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.txtFileName = new System.Windows.Forms.TextBox();
this.ioStatusControl1 = new UserFromControl.IOStatusControl();
this.btn_addx = new System.Windows.Forms.Button();
this.btnAbsMove = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
......@@ -58,6 +62,7 @@
this.btnClear = new System.Windows.Forms.Button();
this.logBox = new System.Windows.Forms.RichTextBox();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.btn_xposdel = new System.Windows.Forms.Button();
this.groupBox6.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
......@@ -84,15 +89,20 @@
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.listBox_x);
this.groupBox2.Controls.Add(this.txtLOffset);
this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.txtHOffset);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.btnOpenFolder);
this.groupBox2.Controls.Add(this.txt_xpos);
this.groupBox2.Controls.Add(this.txtSpeed);
this.groupBox2.Controls.Add(this.label8);
this.groupBox2.Controls.Add(this.txtFileName);
this.groupBox2.Controls.Add(this.ioStatusControl1);
this.groupBox2.Controls.Add(this.btn_xposdel);
this.groupBox2.Controls.Add(this.btn_addx);
this.groupBox2.Controls.Add(this.btnAbsMove);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.label7);
......@@ -100,17 +110,35 @@
this.groupBox2.Controls.Add(this.txtActualPosition);
this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.btnSdStop);
this.groupBox2.Location = new System.Drawing.Point(9, 170);
this.groupBox2.Location = new System.Drawing.Point(9, 155);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(458, 470);
this.groupBox2.Size = new System.Drawing.Size(458, 546);
this.groupBox2.TabIndex = 283;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "位置信息";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(17, 148);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 17);
this.label1.TabIndex = 286;
this.label1.Text = "行走机构位置";
//
// listBox_x
//
this.listBox_x.FormattingEnabled = true;
this.listBox_x.ItemHeight = 17;
this.listBox_x.Location = new System.Drawing.Point(16, 168);
this.listBox_x.Name = "listBox_x";
this.listBox_x.Size = new System.Drawing.Size(194, 174);
this.listBox_x.TabIndex = 285;
//
// txtLOffset
//
this.txtLOffset.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtLOffset.Location = new System.Drawing.Point(184, 110);
this.txtLOffset.Location = new System.Drawing.Point(184, 95);
this.txtLOffset.MaxLength = 30;
this.txtLOffset.Name = "txtLOffset";
this.txtLOffset.Size = new System.Drawing.Size(121, 26);
......@@ -121,7 +149,7 @@
// label5
//
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.Location = new System.Drawing.Point(6, 113);
this.label5.Location = new System.Drawing.Point(6, 98);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(173, 20);
this.label5.TabIndex = 284;
......@@ -131,7 +159,7 @@
// txtHOffset
//
this.txtHOffset.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtHOffset.Location = new System.Drawing.Point(184, 78);
this.txtHOffset.Location = new System.Drawing.Point(184, 63);
this.txtHOffset.MaxLength = 30;
this.txtHOffset.Name = "txtHOffset";
this.txtHOffset.Size = new System.Drawing.Size(121, 26);
......@@ -142,7 +170,7 @@
// label4
//
this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(6, 81);
this.label4.Location = new System.Drawing.Point(6, 66);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(173, 20);
this.label4.TabIndex = 282;
......@@ -160,10 +188,21 @@
this.btnOpenFolder.UseVisualStyleBackColor = true;
this.btnOpenFolder.Click += new System.EventHandler(this.btnOpenFolder_Click);
//
// txt_xpos
//
this.txt_xpos.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_xpos.Location = new System.Drawing.Point(242, 168);
this.txt_xpos.MaxLength = 30;
this.txt_xpos.Name = "txt_xpos";
this.txt_xpos.Size = new System.Drawing.Size(121, 26);
this.txt_xpos.TabIndex = 83;
this.txt_xpos.Tag = "not";
this.txt_xpos.Text = "20";
//
// txtSpeed
//
this.txtSpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtSpeed.Location = new System.Drawing.Point(184, 227);
this.txtSpeed.Location = new System.Drawing.Point(184, 359);
this.txtSpeed.MaxLength = 30;
this.txtSpeed.Name = "txtSpeed";
this.txtSpeed.Size = new System.Drawing.Size(121, 26);
......@@ -174,7 +213,7 @@
// label8
//
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(6, 230);
this.label8.Location = new System.Drawing.Point(6, 362);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(173, 20);
this.label8.TabIndex = 84;
......@@ -197,16 +236,27 @@
this.ioStatusControl1.IOName = "检测信号";
this.ioStatusControl1.IOValue = 0;
this.ioStatusControl1.isCanClick = false;
this.ioStatusControl1.Location = new System.Drawing.Point(38, 401);
this.ioStatusControl1.Location = new System.Drawing.Point(11, 478);
this.ioStatusControl1.Margin = new System.Windows.Forms.Padding(4);
this.ioStatusControl1.Name = "ioStatusControl1";
this.ioStatusControl1.Size = new System.Drawing.Size(267, 61);
this.ioStatusControl1.TabIndex = 279;
//
// btn_addx
//
this.btn_addx.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn_addx.Location = new System.Drawing.Point(242, 200);
this.btn_addx.Name = "btn_addx";
this.btn_addx.Size = new System.Drawing.Size(132, 36);
this.btn_addx.TabIndex = 88;
this.btn_addx.Text = "添加";
this.btn_addx.UseVisualStyleBackColor = true;
this.btn_addx.Click += new System.EventHandler(this.btn_addx_Click);
//
// btnAbsMove
//
this.btnAbsMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAbsMove.Location = new System.Drawing.Point(312, 222);
this.btnAbsMove.Location = new System.Drawing.Point(312, 354);
this.btnAbsMove.Name = "btnAbsMove";
this.btnAbsMove.Size = new System.Drawing.Size(132, 36);
this.btnAbsMove.TabIndex = 88;
......@@ -227,7 +277,7 @@
// label7
//
this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(6, 332);
this.label7.Location = new System.Drawing.Point(6, 442);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(173, 20);
this.label7.TabIndex = 271;
......@@ -237,7 +287,7 @@
// txtPosition
//
this.txtPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPosition.Location = new System.Drawing.Point(184, 265);
this.txtPosition.Location = new System.Drawing.Point(184, 397);
this.txtPosition.MaxLength = 30;
this.txtPosition.Name = "txtPosition";
this.txtPosition.Size = new System.Drawing.Size(121, 26);
......@@ -249,7 +299,7 @@
//
this.txtActualPosition.Enabled = false;
this.txtActualPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtActualPosition.Location = new System.Drawing.Point(184, 329);
this.txtActualPosition.Location = new System.Drawing.Point(184, 439);
this.txtActualPosition.MaxLength = 30;
this.txtActualPosition.Name = "txtActualPosition";
this.txtActualPosition.Size = new System.Drawing.Size(121, 26);
......@@ -259,7 +309,7 @@
// label13
//
this.label13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label13.Location = new System.Drawing.Point(6, 268);
this.label13.Location = new System.Drawing.Point(6, 400);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(173, 20);
this.label13.TabIndex = 90;
......@@ -269,7 +319,7 @@
// btnSdStop
//
this.btnSdStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSdStop.Location = new System.Drawing.Point(312, 260);
this.btnSdStop.Location = new System.Drawing.Point(312, 392);
this.btnSdStop.Name = "btnSdStop";
this.btnSdStop.Size = new System.Drawing.Size(132, 36);
this.btnSdStop.TabIndex = 257;
......@@ -287,7 +337,7 @@
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Location = new System.Drawing.Point(9, 13);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(458, 151);
this.groupBox1.Size = new System.Drawing.Size(458, 136);
this.groupBox1.TabIndex = 282;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "设备信息";
......@@ -295,7 +345,7 @@
// label_servosts
//
this.label_servosts.AutoSize = true;
this.label_servosts.Location = new System.Drawing.Point(8, 82);
this.label_servosts.Location = new System.Drawing.Point(8, 72);
this.label_servosts.Name = "label_servosts";
this.label_servosts.Size = new System.Drawing.Size(89, 17);
this.label_servosts.TabIndex = 276;
......@@ -338,7 +388,7 @@
//
this.txtIOIndex.Enabled = false;
this.txtIOIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtIOIndex.Location = new System.Drawing.Point(141, 119);
this.txtIOIndex.Location = new System.Drawing.Point(141, 97);
this.txtIOIndex.MaxLength = 30;
this.txtIOIndex.Name = "txtIOIndex";
this.txtIOIndex.Size = new System.Drawing.Size(164, 26);
......@@ -349,7 +399,7 @@
// label2
//
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(13, 122);
this.label2.Location = new System.Drawing.Point(13, 100);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(122, 20);
this.label2.TabIndex = 274;
......@@ -395,6 +445,17 @@
//
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// btn_xposdel
//
this.btn_xposdel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn_xposdel.Location = new System.Drawing.Point(242, 242);
this.btn_xposdel.Name = "btn_xposdel";
this.btn_xposdel.Size = new System.Drawing.Size(132, 36);
this.btn_xposdel.TabIndex = 88;
this.btn_xposdel.Text = "删除";
this.btn_xposdel.UseVisualStyleBackColor = true;
this.btn_xposdel.Click += new System.EventHandler(this.btn_xposdel_Click);
//
// FrmPositionTool
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -448,6 +509,11 @@
private System.Windows.Forms.TextBox txtHOffset;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label_servosts;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListBox listBox_x;
private System.Windows.Forms.TextBox txt_xpos;
private System.Windows.Forms.Button btn_addx;
private System.Windows.Forms.Button btn_xposdel;
}
}
......@@ -330,6 +330,27 @@ namespace OnlineStore.ACSingleStore
this.Close();
}
private void btn_addx_Click(object sender, EventArgs e)
{
if (int.TryParse(txt_xpos.Text, out int pos))
{
listBox_x.Items.Add(pos);
var l = listBox_x.Items.Cast<int>().ToList();
l.Sort();
listBox_x.Items.Clear();
l.ForEach(x => listBox_x.Items.Add(x));
}
else
MessageBox.Show("请填写数字");
}
private void btn_xposdel_Click(object sender, EventArgs e)
{
if (listBox_x.SelectedIndex < 0)
return;
listBox_x.Items.RemoveAt(listBox_x.SelectedIndex);
}
}
}

using DeviceLibrary;
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.ACSingleStore
{
public partial class FrmTool : Form
{
private BoxAutoPoint autoP;
private string LogName="自动对点位";
private string DefaultfilePath = "";
private bool IsStart = false;
private BoxBean Box = null;
//private PToolInfo workInfo = new PToolInfo();
public FrmTool(BoxBean box, string ioIp, int ioIndex, string name)
{
InitializeComponent();
this.Box = box;
autoP = new BoxAutoPoint(box);
DefaultfilePath = Application.StartupPath + @"\" + box.Name + @"position\";
if (!Directory.Exists(DefaultfilePath))
{
Directory.CreateDirectory(DefaultfilePath);
LogUtil.info(LogName + "创建位置保存文件夹:" + DefaultfilePath);
}
lblFileP.Text = DefaultfilePath;
this.Text =name + "_自动对点位 ";
LogName = this.Text;
txtUpdownStart.Text = 0.ToString();
FrmTool.CheckForIllegalCrossThreadCalls = false;
}
private int P3Offset = 0;
private int P4Offset = 0;
private int P5Offset = 0;
private int P6Offset = 0;
private void Form1_Load(object sender, EventArgs e)
{
ConfigHelper.Config.PropertyBind<uint>("PositionTool_HOffset", txtHOffset, "Text", "TextChanged");
ConfigHelper.Config.PropertyBind<uint>("PositionTool_LOffset", txtLOffset, "Text", "TextChanged");
ConfigHelper.Config.PropertyBind<uint>("PositionTool_Target", txtPosition, "Text", "TextChanged");
ConfigHelper.Config.PropertyBind<uint>("PositionTool_Speed", txtSpeed, "Text", "TextChanged");
P3Offset = ConfigAppSettings.GetIntValue(Setting_Init.Tool_P3_Offset);
P4Offset = ConfigAppSettings.GetIntValue(Setting_Init.Tool_P4_Offset);
P5Offset = ConfigAppSettings.GetIntValue(Setting_Init.Tool_P5_Offset);
P6Offset = ConfigAppSettings.GetIntValue(Setting_Init.Tool_P6_Offset);
int tSpeed = ConfigAppSettings.GetIntValue(Setting_Init.Tool_TargetSpeed);
int tPosition = ConfigAppSettings.GetIntValue(Setting_Init.Tool_TargetPosition);
if (P3Offset.Equals(0)) P3Offset = 60;
if (P4Offset.Equals(0)) P4Offset = -60;
if (P5Offset.Equals(0)) P5Offset = -60;
if (P6Offset.Equals(0)) P6Offset = 60;
if (tSpeed.Equals(0)) tSpeed = 20;
if (tPosition.Equals(0)) tPosition = 60;
txtP3Offset.Text = P3Offset.ToString();
txtP4Offset.Text = P4Offset.ToString();
txtP5Offset.Text = P5Offset.ToString();
txtP6Offset.Text = P6Offset.ToString();
txtSpeed.Text = tSpeed.ToString();
txtTargetPosition.Text = tPosition.ToString();
SaveConfig(tSpeed, tPosition);
axisJogControl1.SetBoxBean(Box);
int p = AxisManager.GetActualtPosition(Box.Config.InOut_Axis.DeviceName, Box.Config.InOut_Axis.GetAxisValue());
if (p > 0)
{
txtInout.Text = p.ToString();
}
p = AxisManager.GetActualtPosition(Box.Config.Middle_Axis.DeviceName, Box.Config.Middle_Axis.GetAxisValue());
if (p > 0)
{
DataGridViewRow view = new DataGridViewRow();
view.CreateCells(dataGridView1);
view.Cells[0].Value = p;
dataGridView1.Rows.Add(view);
}
timer1.Start();
ioSingle.IOName = ResourceCulture.GetString("激光检测信号");
}
private void SaveConfig(int speed, int position)
{
//保存配置
ConfigAppSettings.SaveValue(Setting_Init.Tool_P3_Offset, P3Offset);
ConfigAppSettings.SaveValue(Setting_Init.Tool_P4_Offset, P4Offset);
ConfigAppSettings.SaveValue(Setting_Init.Tool_P5_Offset, P5Offset);
ConfigAppSettings.SaveValue(Setting_Init.Tool_P6_Offset, P6Offset);
ConfigAppSettings.SaveValue(Setting_Init.Tool_TargetSpeed, speed);
ConfigAppSettings.SaveValue(Setting_Init.Tool_TargetPosition, position);
}
private void workMoveStatus(bool isStart)
{
group1.Enabled = !isStart;
group2.Enabled = !isStart;
group3.Enabled = !isStart;
group4.Enabled = !isStart;
group5.Enabled = true;
//group6.Enabled = !isStart ;
group6.Enabled = true;
btnStart.Enabled = !isStart;
btnStop.Enabled = isStart;
axisJogControl1.Enabled = !isStart;
txtSpeed.Enabled = !isStart;
btnExit.Enabled = !isStart;
}
private void btnSdStop_Click(object sender, EventArgs e)
{
LogUtil.info(LogName + "点击:停止运动");
autoP.StopMove();
}
private bool isInProcesss = false;
private void timer1_Tick(object sender, EventArgs e)
{
try
{
ioSingle.IOValue = (int)Box.IOValue(IO_Type.CheckPos);
ioSingle.ShowData();
if (autoP.IsStop())
{
if (group1.Enabled.Equals(false))
{
workMoveStatus(false);
}
if (!IsStart)
{
lblMoveInfo.Text = "请按步骤确认位置信息,然后点击“开始校对位置”按钮启动位置校准";
}
else
{
lblMoveInfo.Text = "点位校准已结束,请打开文件夹查看位置文件";
}
lblErrorMsg.Text = "";
}
else
{
if (group1.Enabled.Equals(true))
{
workMoveStatus(true);
}
lblMoveInfo.Text = autoP.CurrStr();
lblErrorMsg.Text = autoP.WarnMsg;
}
}
catch (Exception ex)
{
}
}
private void FrmPositionTool_FormClosing(object sender, FormClosingEventArgs e)
{
if (!autoP.IsStop())
{
MessageBox.Show("请先停止位置校准,再退出界面","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);
e.Cancel = true;
return;
}
timer1.Stop();
LogUtil.logBox = null;
}
private void btnOpenFolder_Click(object sender, EventArgs e)
{
if (IsStart)
{
System.Diagnostics.Process.Start("Explorer.exe", autoP.paramInfo.FileTargetPath);
}
else
{
System.Diagnostics.Process.Start("Explorer.exe", DefaultfilePath);
}
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnInoutP_Click(object sender, EventArgs e)
{
int p = AxisManager.GetActualtPosition(Box.Config.InOut_Axis.DeviceName, Box.Config.InOut_Axis.GetAxisValue());
txtInout.Text = p.ToString();
}
private void btnUpdownP_Click(object sender, EventArgs e)
{
int p = AxisManager.GetActualtPosition(Box.Config.UpDown_Axis.DeviceName, Box.Config.UpDown_Axis.GetAxisValue());
txtTargetPosition.Text = p.ToString();
}
private void btnAddMiddleP_Click(object sender, EventArgs e)
{
int p = AxisManager.GetActualtPosition(Box.Config.Middle_Axis.DeviceName, Box.Config.Middle_Axis.GetAxisValue());
DataGridViewRow view = new DataGridViewRow();
view.CreateCells(dataGridView1);
view.Cells[0].Value = dataGridView1.Rows.Count + 1;
view.Cells[1].Value = p;
dataGridView1.Rows.Add(view);
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex != -1 && e.ColumnIndex >= 0)
{
string name = this.dataGridView1.Columns[e.ColumnIndex].Name;
int rowIndex = e.RowIndex;
if (name.Equals(this.Column_Del.Name))
{
DialogResult dialogResult = MessageBox.Show("确认要删除该行数据吗?", "提示?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dialogResult.Equals(DialogResult.OK))
{
this.dataGridView1.Rows.RemoveAt(rowIndex);
for (int index = 0; index < dataGridView1.Rows.Count; index++)
{
dataGridView1.Rows[index].Cells[0].Value = (index + 1);
}
}
}
}
}
private void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
{
if (e.RowIndex > -1 && e.ColumnIndex > -1)
{
DataGridView grid = (DataGridView)sender;
grid.Rows[e.RowIndex].ErrorText = "";
//这里最好用列名,而不是列索引号做判断
if (grid.Columns[e.ColumnIndex].Name == Column_position.Name)
{
Int32 newInteger = 0;
if (!int.TryParse(e.FormattedValue.ToString(), out newInteger))
{
e.Cancel = true;
grid.Rows[e.RowIndex].ErrorText = "位置只能输入整数,请输入正确的位置 !";
MessageBox.Show("位置只能输入整数,请输入正确的位置 !");
return;
}
}
}
}
#region 校准位置功能
private void btnAbsMove_Click(object sender, EventArgs e)
{
int inoutP = FormUtil.GetIntValue(txtInout);
if (inoutP <= 0)
{
MessageBox.Show("请输入正确的进出轴前进位置","提示");
txtInout.Focus();
return;
}
int SPostion = FormUtil.GetIntValue(txtUpdownStart);
if (SPostion < 0)
{
MessageBox.Show("请输入正确的升降轴开始位置", "提示");
txtUpdownStart.Focus();
return;
}
txtUpdownStart.Text = SPostion.ToString();
int TPostion = FormUtil.GetIntValue(txtTargetPosition);
if (TPostion <= 0)
{
MessageBox.Show("请输入正确的升降轴最高位置", "提示");
txtTargetPosition.Focus();
return;
}
int speed = FormUtil.GetIntValue(txtSpeed);
if (speed <= (0))
{
MessageBox.Show(ResourceCulture.GetString("请输入正确的速度"), "提示");
txtSpeed.Focus();
return;
}
P3Offset = FormUtil.GetIntValue(txtP3Offset);
P4Offset = FormUtil.GetIntValue(txtP4Offset);
P5Offset = FormUtil.GetIntValue(txtP5Offset);
P6Offset = FormUtil.GetIntValue(txtP6Offset);
SaveConfig(speed, TPostion);
autoP.paramInfo = new PToolInfo();
autoP.paramInfo.InoutTargetPosition = inoutP;
autoP.paramInfo.UpdownStartPosition = SPostion;
autoP.paramInfo.UpdownTargetPosition = TPostion;
autoP.paramInfo.UpdownSpeed = speed;
autoP.paramInfo.MiddlePositionList = new List<int>();
autoP.paramInfo.PositionList = new List<int>();
autoP.paramInfo.P3Offset = P3Offset;
autoP.paramInfo.P4Offset = P4Offset;
autoP.paramInfo.P5Offset = P5Offset;
autoP.paramInfo.P6Offset = P6Offset;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
string p = row.Cells[Column_position.Index].Value.ToString();
try
{
int mP = Convert.ToInt32(p);
autoP.paramInfo.MiddlePositionList.Add(mP);
}
catch (Exception ex)
{
LogUtil.error("旋转轴位置列表【" + p + "】不是整数,直接跳过");
}
}
if (autoP.paramInfo.MiddlePositionList.Count <= 0)
{
MessageBox.Show("请至少输入一个旋转轴位置","提示");
dataGridView1.Focus();
return;
}
autoP.paramInfo.LastValue = IO_VALUE.LOW;
string date = DateTime.Now.ToString("yyyyMMddHHmm");
string filePath = DefaultfilePath + date + @"\";
if (Directory.Exists(filePath))
{
DialogResult result = MessageBox.Show("文件夹【" + filePath + "】已存在,将覆盖文件夹内容,是否确定继续?",
"确认提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (!result.Equals(DialogResult.OK))
{
return;
}
}
else
{
Directory.CreateDirectory(filePath);
}
autoP.paramInfo.FileTargetPath = filePath;
string msg = autoP.paramInfo.ParamStr();
DialogResult result1 = MessageBox.Show(msg, "请确认对点位参数", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (result1.Equals(DialogResult.OK))
{
autoP.StopMove();
LogUtil.info(LogName + "开始校对位置:" + msg + " 启动定时器 ");
autoP.Start();
lblFileP.Text = filePath;
IsStart = true;
}
}
#endregion
private void btnMHome_Click(object sender, EventArgs e)
{
LogUtil.info(LogName + "点击:旋转轴回原点");
ConfigMoveAxis axis = Box.Config.Middle_Axis;
AxisManager.HomeMove(axis.DeviceName, axis.GetAxisValue(),axis.HomeHighSpeed,axis.HomeLowSpeed,axis.HomeAddSpeed);
}
private void btnMStop_Click(object sender, EventArgs e)
{
LogUtil.info(LogName + "点击:旋转轴停止");
ConfigMoveAxis axis = Box.Config.Middle_Axis;
AxisManager.SuddenStop(axis.DeviceName, axis.GetAxisValue());
}
private void FrmTool_FormClosed(object sender, FormClosedEventArgs e)
{
}
}
public class ResourceCulture
{
internal static string GetString(string str)
{
return str;
}
}
}
namespace OnlineStore.ACSingleStore
{
partial class FrmTool
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.panelAll = new System.Windows.Forms.Panel();
this.lblErrorMsg = new System.Windows.Forms.Label();
this.lblMoveInfo = new System.Windows.Forms.Label();
this.group6 = new System.Windows.Forms.GroupBox();
this.lblFileP = new System.Windows.Forms.Label();
this.btnOpenFolder = new System.Windows.Forms.Button();
this.group2 = new System.Windows.Forms.GroupBox();
this.txtUpdownStart = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtTargetPosition = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.btnUpdownP = new System.Windows.Forms.Button();
this.group4 = new System.Windows.Forms.GroupBox();
this.label4 = new System.Windows.Forms.Label();
this.txtP4Offset = new System.Windows.Forms.TextBox();
this.txtP5Offset = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.txtP3Offset = new System.Windows.Forms.TextBox();
this.txtP6Offset = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.group3 = new System.Windows.Forms.GroupBox();
this.btnMStop = new System.Windows.Forms.Button();
this.btnMHome = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_position = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_Del = new System.Windows.Forms.DataGridViewLinkColumn();
this.btnAddMiddleP = new System.Windows.Forms.Button();
this.group1 = new System.Windows.Forms.GroupBox();
this.label11 = new System.Windows.Forms.Label();
this.btnInoutP = new System.Windows.Forms.Button();
this.txtInout = new System.Windows.Forms.TextBox();
this.group5 = new System.Windows.Forms.GroupBox();
this.ioSingle = new UserFromControl.IOTextControl();
this.txtSpeed = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.btnStart = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.axisJogControl1 = new OnlineStore.ACSingleStore.AxisJogControl();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panelAll.SuspendLayout();
this.group6.SuspendLayout();
this.group2.SuspendLayout();
this.group4.SuspendLayout();
this.group3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.group1.SuspendLayout();
this.group5.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// panelAll
//
this.panelAll.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panelAll.Controls.Add(this.lblErrorMsg);
this.panelAll.Controls.Add(this.lblMoveInfo);
this.panelAll.Controls.Add(this.group6);
this.panelAll.Controls.Add(this.group2);
this.panelAll.Controls.Add(this.group4);
this.panelAll.Controls.Add(this.group3);
this.panelAll.Controls.Add(this.group1);
this.panelAll.Controls.Add(this.group5);
this.panelAll.Controls.Add(this.btnExit);
this.panelAll.Controls.Add(this.panel1);
this.panelAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.panelAll.Location = new System.Drawing.Point(5, 3);
this.panelAll.Name = "panelAll";
this.panelAll.Size = new System.Drawing.Size(1089, 649);
this.panelAll.TabIndex = 250;
//
// lblErrorMsg
//
this.lblErrorMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblErrorMsg.ForeColor = System.Drawing.Color.Red;
this.lblErrorMsg.Location = new System.Drawing.Point(417, 443);
this.lblErrorMsg.Name = "lblErrorMsg";
this.lblErrorMsg.Size = new System.Drawing.Size(661, 24);
this.lblErrorMsg.TabIndex = 325;
this.lblErrorMsg.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lblMoveInfo
//
this.lblMoveInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveInfo.ForeColor = System.Drawing.Color.Blue;
this.lblMoveInfo.Location = new System.Drawing.Point(417, 394);
this.lblMoveInfo.Name = "lblMoveInfo";
this.lblMoveInfo.Size = new System.Drawing.Size(523, 43);
this.lblMoveInfo.TabIndex = 324;
this.lblMoveInfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// group6
//
this.group6.Controls.Add(this.lblFileP);
this.group6.Controls.Add(this.btnOpenFolder);
this.group6.Location = new System.Drawing.Point(727, 479);
this.group6.Name = "group6";
this.group6.Size = new System.Drawing.Size(346, 155);
this.group6.TabIndex = 323;
this.group6.TabStop = false;
this.group6.Text = "第六步:查看位置列表:";
//
// lblFileP
//
this.lblFileP.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblFileP.Location = new System.Drawing.Point(6, 28);
this.lblFileP.Name = "lblFileP";
this.lblFileP.Size = new System.Drawing.Size(324, 67);
this.lblFileP.TabIndex = 281;
this.lblFileP.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// btnOpenFolder
//
this.btnOpenFolder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenFolder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenFolder.Location = new System.Drawing.Point(198, 104);
this.btnOpenFolder.Name = "btnOpenFolder";
this.btnOpenFolder.Size = new System.Drawing.Size(132, 36);
this.btnOpenFolder.TabIndex = 280;
this.btnOpenFolder.Text = "打开文件夹";
this.btnOpenFolder.UseVisualStyleBackColor = true;
this.btnOpenFolder.Click += new System.EventHandler(this.btnOpenFolder_Click);
//
// group2
//
this.group2.Controls.Add(this.txtUpdownStart);
this.group2.Controls.Add(this.label1);
this.group2.Controls.Add(this.txtTargetPosition);
this.group2.Controls.Add(this.label14);
this.group2.Controls.Add(this.btnUpdownP);
this.group2.Location = new System.Drawing.Point(6, 85);
this.group2.Name = "group2";
this.group2.Size = new System.Drawing.Size(399, 113);
this.group2.TabIndex = 322;
this.group2.TabStop = false;
this.group2.Text = "第二步:确认(轴二)升降轴最高位置:";
//
// txtUpdownStart
//
this.txtUpdownStart.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpdownStart.Location = new System.Drawing.Point(126, 23);
this.txtUpdownStart.MaxLength = 30;
this.txtUpdownStart.Name = "txtUpdownStart";
this.txtUpdownStart.Size = new System.Drawing.Size(105, 26);
this.txtUpdownStart.TabIndex = 260;
//
// label1
//
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(8, 27);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(110, 20);
this.label1.TabIndex = 261;
this.label1.Text = "升降轴开始位置:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtTargetPosition
//
this.txtTargetPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtTargetPosition.Location = new System.Drawing.Point(126, 65);
this.txtTargetPosition.MaxLength = 30;
this.txtTargetPosition.Name = "txtTargetPosition";
this.txtTargetPosition.Size = new System.Drawing.Size(105, 26);
this.txtTargetPosition.TabIndex = 89;
//
// label14
//
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.Location = new System.Drawing.Point(8, 69);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(110, 20);
this.label14.TabIndex = 94;
this.label14.Text = "升降轴最高位置:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnUpdownP
//
this.btnUpdownP.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdownP.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpdownP.Location = new System.Drawing.Point(238, 61);
this.btnUpdownP.Name = "btnUpdownP";
this.btnUpdownP.Size = new System.Drawing.Size(138, 36);
this.btnUpdownP.TabIndex = 259;
this.btnUpdownP.Text = "使用实时位置";
this.btnUpdownP.UseVisualStyleBackColor = true;
this.btnUpdownP.Click += new System.EventHandler(this.btnUpdownP_Click);
//
// group4
//
this.group4.Controls.Add(this.label4);
this.group4.Controls.Add(this.txtP4Offset);
this.group4.Controls.Add(this.txtP5Offset);
this.group4.Controls.Add(this.label10);
this.group4.Controls.Add(this.label5);
this.group4.Controls.Add(this.txtP3Offset);
this.group4.Controls.Add(this.txtP6Offset);
this.group4.Controls.Add(this.label9);
this.group4.Location = new System.Drawing.Point(6, 479);
this.group4.Name = "group4";
this.group4.Size = new System.Drawing.Size(324, 155);
this.group4.TabIndex = 321;
this.group4.TabStop = false;
this.group4.Text = "第四步:确认点位偏移量:";
//
// label4
//
this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(11, 23);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(160, 20);
this.label4.TabIndex = 282;
this.label4.Text = "出料前点P5偏移值:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtP4Offset
//
this.txtP4Offset.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtP4Offset.Location = new System.Drawing.Point(182, 117);
this.txtP4Offset.MaxLength = 30;
this.txtP4Offset.Name = "txtP4Offset";
this.txtP4Offset.Size = new System.Drawing.Size(105, 26);
this.txtP4Offset.TabIndex = 287;
this.txtP4Offset.Text = "30";
//
// txtP5Offset
//
this.txtP5Offset.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtP5Offset.Location = new System.Drawing.Point(182, 21);
this.txtP5Offset.MaxLength = 30;
this.txtP5Offset.Name = "txtP5Offset";
this.txtP5Offset.Size = new System.Drawing.Size(105, 26);
this.txtP5Offset.TabIndex = 281;
this.txtP5Offset.Text = "30";
//
// label10
//
this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.Location = new System.Drawing.Point(11, 119);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(160, 20);
this.label10.TabIndex = 288;
this.label10.Text = "入料缓冲点P4偏移量:";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label5
//
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.Location = new System.Drawing.Point(11, 55);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(160, 20);
this.label5.TabIndex = 284;
this.label5.Text = "出料缓冲点P6偏移量:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtP3Offset
//
this.txtP3Offset.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtP3Offset.Location = new System.Drawing.Point(182, 85);
this.txtP3Offset.MaxLength = 30;
this.txtP3Offset.Name = "txtP3Offset";
this.txtP3Offset.Size = new System.Drawing.Size(105, 26);
this.txtP3Offset.TabIndex = 285;
this.txtP3Offset.Text = "100";
//
// txtP6Offset
//
this.txtP6Offset.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtP6Offset.Location = new System.Drawing.Point(182, 53);
this.txtP6Offset.MaxLength = 30;
this.txtP6Offset.Name = "txtP6Offset";
this.txtP6Offset.Size = new System.Drawing.Size(105, 26);
this.txtP6Offset.TabIndex = 283;
this.txtP6Offset.Text = "100";
//
// label9
//
this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(11, 87);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(160, 20);
this.label9.TabIndex = 286;
this.label9.Text = "入料前点P3偏移量:";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// group3
//
this.group3.Controls.Add(this.btnMStop);
this.group3.Controls.Add(this.btnMHome);
this.group3.Controls.Add(this.dataGridView1);
this.group3.Controls.Add(this.btnAddMiddleP);
this.group3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.group3.Location = new System.Drawing.Point(6, 204);
this.group3.Name = "group3";
this.group3.Size = new System.Drawing.Size(399, 269);
this.group3.TabIndex = 320;
this.group3.TabStop = false;
this.group3.Text = "第三步:确认(轴一)旋转轴位置列表:";
//
// btnMStop
//
this.btnMStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnMStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMStop.ForeColor = System.Drawing.Color.Black;
this.btnMStop.Location = new System.Drawing.Point(137, 223);
this.btnMStop.Name = "btnMStop";
this.btnMStop.Size = new System.Drawing.Size(121, 36);
this.btnMStop.TabIndex = 325;
this.btnMStop.Text = "旋转轴停止";
this.btnMStop.UseVisualStyleBackColor = true;
this.btnMStop.Click += new System.EventHandler(this.btnMStop_Click);
//
// btnMHome
//
this.btnMHome.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnMHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMHome.ForeColor = System.Drawing.Color.Black;
this.btnMHome.Location = new System.Drawing.Point(11, 223);
this.btnMHome.Name = "btnMHome";
this.btnMHome.Size = new System.Drawing.Size(121, 36);
this.btnMHome.TabIndex = 324;
this.btnMHome.Text = "旋转轴回原点";
this.btnMHome.UseVisualStyleBackColor = true;
this.btnMHome.Click += new System.EventHandler(this.btnMHome_Click);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column_Index,
this.Column_position,
this.Column_Del});
this.dataGridView1.Location = new System.Drawing.Point(10, 20);
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 5;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(375, 198);
this.dataGridView1.TabIndex = 323;
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
this.dataGridView1.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.dataGridView1_CellValidating);
//
// Column_Index
//
this.Column_Index.HeaderText = "编号";
this.Column_Index.Name = "Column_Index";
this.Column_Index.Width = 60;
//
// Column_position
//
this.Column_position.HeaderText = "位置";
this.Column_position.Name = "Column_position";
this.Column_position.Width = 120;
//
// Column_Del
//
this.Column_Del.FillWeight = 60F;
this.Column_Del.HeaderText = "删除";
this.Column_Del.Name = "Column_Del";
this.Column_Del.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.Column_Del.Text = "删除";
this.Column_Del.ToolTipText = "删除";
this.Column_Del.UseColumnTextForLinkValue = true;
this.Column_Del.Width = 80;
//
// btnAddMiddleP
//
this.btnAddMiddleP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnAddMiddleP.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAddMiddleP.ForeColor = System.Drawing.Color.Black;
this.btnAddMiddleP.Location = new System.Drawing.Point(263, 223);
this.btnAddMiddleP.Name = "btnAddMiddleP";
this.btnAddMiddleP.Size = new System.Drawing.Size(121, 36);
this.btnAddMiddleP.TabIndex = 322;
this.btnAddMiddleP.Text = "加入实时位置";
this.btnAddMiddleP.UseVisualStyleBackColor = true;
this.btnAddMiddleP.Click += new System.EventHandler(this.btnAddMiddleP_Click);
//
// group1
//
this.group1.Controls.Add(this.label11);
this.group1.Controls.Add(this.btnInoutP);
this.group1.Controls.Add(this.txtInout);
this.group1.Location = new System.Drawing.Point(6, 5);
this.group1.Name = "group1";
this.group1.Size = new System.Drawing.Size(399, 74);
this.group1.TabIndex = 285;
this.group1.TabStop = false;
this.group1.Text = "第一步:确认(轴三)进出轴前进位置:";
//
// label11
//
this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.Location = new System.Drawing.Point(8, 28);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(110, 20);
this.label11.TabIndex = 1;
this.label11.Text = "进出轴前进位置:";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnInoutP
//
this.btnInoutP.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInoutP.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInoutP.Location = new System.Drawing.Point(238, 20);
this.btnInoutP.Name = "btnInoutP";
this.btnInoutP.Size = new System.Drawing.Size(138, 36);
this.btnInoutP.TabIndex = 258;
this.btnInoutP.Text = "使用实时位置";
this.btnInoutP.UseVisualStyleBackColor = true;
this.btnInoutP.Click += new System.EventHandler(this.btnInoutP_Click);
//
// txtInout
//
this.txtInout.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInout.Location = new System.Drawing.Point(126, 25);
this.txtInout.MaxLength = 30;
this.txtInout.Name = "txtInout";
this.txtInout.Size = new System.Drawing.Size(105, 26);
this.txtInout.TabIndex = 276;
//
// group5
//
this.group5.Controls.Add(this.ioSingle);
this.group5.Controls.Add(this.txtSpeed);
this.group5.Controls.Add(this.label8);
this.group5.Controls.Add(this.btnStart);
this.group5.Controls.Add(this.btnStop);
this.group5.Location = new System.Drawing.Point(336, 479);
this.group5.Name = "group5";
this.group5.Size = new System.Drawing.Size(385, 155);
this.group5.TabIndex = 283;
this.group5.TabStop = false;
this.group5.Text = "第五步:开始校对位置:";
//
// ioSingle
//
this.ioSingle.BackColor = System.Drawing.Color.White;
this.ioSingle.IOName = "检测信号";
this.ioSingle.IOValue = 0;
this.ioSingle.isCanClick = false;
this.ioSingle.Location = new System.Drawing.Point(3, 118);
this.ioSingle.Name = "ioSingle";
this.ioSingle.Size = new System.Drawing.Size(220, 28);
this.ioSingle.TabIndex = 289;
//
// txtSpeed
//
this.txtSpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtSpeed.Location = new System.Drawing.Point(111, 43);
this.txtSpeed.MaxLength = 30;
this.txtSpeed.Name = "txtSpeed";
this.txtSpeed.Size = new System.Drawing.Size(105, 26);
this.txtSpeed.TabIndex = 83;
this.txtSpeed.Text = "20";
//
// label8
//
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(21, 47);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(87, 20);
this.label8.TabIndex = 84;
this.label8.Text = "移动速度:";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnStart
//
this.btnStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStart.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStart.Location = new System.Drawing.Point(228, 40);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(132, 36);
this.btnStart.TabIndex = 88;
this.btnStart.Text = "开始校对位置";
this.btnStart.UseVisualStyleBackColor = true;
this.btnStart.Click += new System.EventHandler(this.btnAbsMove_Click);
//
// btnStop
//
this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStop.Location = new System.Drawing.Point(228, 90);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(132, 36);
this.btnStop.TabIndex = 257;
this.btnStop.Text = "停止";
this.btnStop.UseVisualStyleBackColor = true;
this.btnStop.Click += new System.EventHandler(this.btnSdStop_Click);
//
// btnExit
//
this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExit.Location = new System.Drawing.Point(944, 402);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(132, 36);
this.btnExit.TabIndex = 281;
this.btnExit.Text = "退出";
this.btnExit.UseVisualStyleBackColor = true;
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// panel1
//
this.panel1.Controls.Add(this.axisJogControl1);
this.panel1.Location = new System.Drawing.Point(421, 5);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(655, 370);
this.panel1.TabIndex = 284;
//
// axisJogControl1
//
this.axisJogControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.axisJogControl1.BackColor = System.Drawing.Color.White;
this.axisJogControl1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.axisJogControl1.Location = new System.Drawing.Point(4, 3);
this.axisJogControl1.Name = "axisJogControl1";
this.axisJogControl1.Size = new System.Drawing.Size(648, 364);
this.axisJogControl1.TabIndex = 0;
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// FrmTool
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(1099, 658);
this.Controls.Add(this.panelAll);
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.MinimizeBox = false;
this.Name = "FrmTool";
this.Text = "自动对点位";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmPositionTool_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmTool_FormClosed);
this.Load += new System.EventHandler(this.Form1_Load);
this.panelAll.ResumeLayout(false);
this.group6.ResumeLayout(false);
this.group2.ResumeLayout(false);
this.group2.PerformLayout();
this.group4.ResumeLayout(false);
this.group4.PerformLayout();
this.group3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.group1.ResumeLayout(false);
this.group1.PerformLayout();
this.group5.ResumeLayout(false);
this.group5.PerformLayout();
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panelAll;
private System.Windows.Forms.TextBox txtTargetPosition;
private System.Windows.Forms.Button btnStart;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtSpeed;
private System.Windows.Forms.Button btnStop;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Button btnOpenFolder;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.GroupBox group5;
private System.Windows.Forms.TextBox txtP4Offset;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtP3Offset;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox txtP6Offset;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtP5Offset;
private System.Windows.Forms.Label label4;
private UserFromControl.IOTextControl ioSingle;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.GroupBox group1;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Button btnInoutP;
private System.Windows.Forms.TextBox txtInout;
private System.Windows.Forms.Button btnUpdownP;
private System.Windows.Forms.GroupBox group3;
private System.Windows.Forms.Button btnAddMiddleP;
private System.Windows.Forms.GroupBox group4;
private System.Windows.Forms.GroupBox group2;
private System.Windows.Forms.GroupBox group6;
private AxisJogControl axisJogControl1;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Label lblFileP;
private System.Windows.Forms.Label lblMoveInfo;
private System.Windows.Forms.Button btnMHome;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_Index;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_position;
private System.Windows.Forms.DataGridViewLinkColumn Column_Del;
private System.Windows.Forms.Button btnMStop;
private System.Windows.Forms.TextBox txtUpdownStart;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lblErrorMsg;
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Column_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_position.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Del.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_position.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Del.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!