Commit 1fb8f362 刘韬

1

1 个父辈 6aa01049
......@@ -9,14 +9,37 @@ namespace OnlineStore
public enum Runtime_StepE
{
None,
/// <summary>
/// 准备放入扫码贴标区
/// </summary>
InToLabel,
/// <summary>
/// 进入扫码贴标区
/// </summary>
LabelProcess,
/// <summary>
/// 标签已打印
/// </summary>
Printed,
/// <summary>
/// 标签已获取
/// </summary>
LabelGot,
/// <summary>
/// 标签中
/// </summary>
LabelPaste,
/// <summary>
/// 标签完成
/// </summary>
LabelPasteFinish,
/// <summary>
/// 正在进入库位
/// </summary>
InToStore,
/// <summary>
/// 正在出库
/// </summary>
Out
}
}
......@@ -66,11 +66,11 @@ namespace OnlineStore.Common
/// =4时扫码入库
/// =5时服务器发送预警温度
/// </summary>
private Dictionary<string, string> _data = new Dictionary<string, string>();
public Dictionary<string, string> data
//private Dictionary<string, string> _data = new Dictionary<string, string>();
public Dictionary<string, object> data
{
get { return _data; }
set { _data = value; }
get;
set;
}
/// <summary>
/// 整体料仓状态
......@@ -295,9 +295,9 @@ namespace OnlineStore.Common
public static string outDoorStatus= "outDoorStatus";
public static string open= "open";
public static string close= "close";
public static string openInLock;
public static string closeInLock;
public static string closeOutLock;
public static string openOutLock;
public static string openInLock= "openInLock";
public static string closeInLock = "closeInLock";
public static string closeOutLock = "closeOutLock";
public static string openOutLock = "openOutLock";
}
}
......@@ -148,8 +148,8 @@ namespace DeviceLibrary
else if (len < 0)
{
TurnToEnd(true, true).Wait();
Task.Delay(500).Wait();
TurnToEnd(false, false).Wait();
//Task.Delay(500).Wait();
//TurnToEnd(false, false).Wait();
}
});
......@@ -189,6 +189,42 @@ namespace DeviceLibrary
TurnToEnd(false).Wait();
});
}
public void TurnDouble()
{
TurnWork = Task.Run(() =>
{
if (IOManager.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
{
moveInfo.log($"急停未解除");
return;
}
if (!axisBean.IsServeoOn)
axisBean.Open(true, out string msg);
var len = (int)(StrokeLength / 90 * 45);
if (len > 0)
{
TurnToEnd(false).Wait();
}
RobotManage.mainMachine.CylinderMove(null, IO_Type.Tin_Dock_Rotate_Release, IO_Type.Tin_Dock_Rotate_Clamp, IO_VALUE.HIGH);
while (!IOManager.IOValue(IO_Type.Tin_Dock_Rotate_Clamp).Equals(IO_VALUE.HIGH))
{
Task.Delay(100).Wait();
}
TurnToEnd(true, true).Wait();
TurnToEnd(false, false).Wait();
TurnToEnd(true, true).Wait();
RobotManage.mainMachine.CylinderMove(null, IO_Type.Tin_Dock_Rotate_Release, IO_Type.Tin_Dock_Rotate_Clamp, IO_VALUE.LOW);
while (!IOManager.IOValue(IO_Type.Tin_Dock_Rotate_Release).Equals(IO_VALUE.HIGH))
{
Task.Delay(100).Wait();
}
TurnToEnd(false).Wait();
});
}
public void TurnRound2()
{
TurnWork = Task.Run(() =>
......
......@@ -15,7 +15,7 @@ namespace DeviceLibrary
string Port;
public PrinterHelper() {
print = new Asa.PrintLabel(Application.StartupPath + "\\Label");
print = new Asa.PrintLabel(Application.StartupPath + "\\Label",300);
}
......@@ -48,9 +48,10 @@ namespace DeviceLibrary
{
string labelname = Setting_Init.Printer_Labelname;
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("RI", reel.ReeID);
//data.Add("PN", reel.PN);
//data.Add("QTY", reel.QTY.ToString());
data.Add("PN", reel.PN);
data.Add("LOT", reel.LOT);
data.Add("EXP", reel.EXP);
data.Add("SN", reel.SN);
data.Add("datetime", DateTime.Now.ToString());
LogUtil.info($"打印标签:{reel.ToDetailStr()}");
var result = Print(labelname, data, out string msg);
......
......@@ -101,17 +101,8 @@ namespace DeviceLibrary
var code = ProcessCode(codelist, reel.PlateW, reel.PlateH);
Operation operation = getLineBoxStatus();
operation.op = 1;
operation.data = new Dictionary<string, string>() { { "code", code }, { "boxId", StoreID.ToString() }, { "doorReelSignal", "1" } };
if (reel.PlateH == 100 && Setting_Init.Device_SingleInSingleOut)
{
//singleIn 单盘入库
operation.data.Add("singleIn", "true");
}
else
{
operation.data.Add("singleIn", "false");
}
operation.data = new Dictionary<string, object>() { { "code", code }, { "boxId", StoreID.ToString() }, { "doorReelSignal", "1" } };
operation.data.Add("singleIn", "false");
int retrytimes = 0;
retry:
Operation resultOperation = HttpHelper.Post(GetPostApi(), operation, 15000, printlog);
......@@ -143,12 +134,12 @@ namespace DeviceLibrary
if (resultOperation == null)
{
LogUtil.info($"SendStoreState error,posid:{posid}, storeStatus:{storeStatus}");
LogUtil.error($"SendStoreState error,posid:{posid}, storeStatus:{storeStatus}");
return false;
}
if (operation.seq != resultOperation.seq)
{
LogUtil.info($"SendStoreState seq error,posid:{posid}, storeStatus:{storeStatus}");
LogUtil.error($"SendStoreState seq error,posid:{posid}, storeStatus:{storeStatus}");
return false;
}
......@@ -205,6 +196,8 @@ namespace DeviceLibrary
lineOperation.data = GetBtnStatus();
lineOperation.data.Add("inArea", CameraPointTest.inArea);
lineOperation.data.Add("outArea", CameraPointTest.outArea);
lineOperation.status = (int)storeStatus;
//判断如果是等待料盘拿走超时,状态改为4Warning
......@@ -324,7 +317,7 @@ namespace DeviceLibrary
{
var barcode = "";
if (resultOperation.data.ContainsKey("code"))
barcode = resultOperation.data["code"];
barcode = resultOperation.data["code"].ToString();
ReviceInStoreProcess(barcode, resultOperation);
}
else if (resultOperation.op.Equals(2))
......@@ -339,11 +332,11 @@ namespace DeviceLibrary
if (resultOperation.data != null)
{
string result = "";
Dictionary<string, string> dataMap = resultOperation.data;
Dictionary<string, object> dataMap = resultOperation.data;
if (dataMap.ContainsKey(ParamDefine.queueTaskCount))
{
var s = dataMap[ParamDefine.queueTaskCount];
var s = dataMap[ParamDefine.queueTaskCount].ToString();
if (int.TryParse(s, out int c))
{
queueTaskCount = c;
......@@ -395,9 +388,9 @@ namespace DeviceLibrary
}
public Dictionary<string, string> GetBtnStatus()
public Dictionary<string, object> GetBtnStatus()
{
Dictionary<string, string> map = new Dictionary<string, string>();
Dictionary<string, object> map = new Dictionary<string, object>();
map.Add(ParamDefine.inDoorStatus, ParamDefine.disable);
map.Add(ParamDefine.outDoorStatus, ParamDefine.disable);
......@@ -444,12 +437,12 @@ namespace DeviceLibrary
/// <param name="resultOperation"></param>
private void ReviceInStoreProcess(string message, Operation resultOperation)
{
Dictionary<string, string> data = resultOperation.data;
Dictionary<string, object> data = resultOperation.data;
if (data != null && data.ContainsKey(ParamDefine.posId) && data.ContainsKey(ParamDefine.plateH) && data.ContainsKey(ParamDefine.plateW))
{
//服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度,
//postId格式BoxId#位置
string posId = data[ParamDefine.posId];
string posId = data[ParamDefine.posId].ToString();
//int storeId = int.Parse(posArray[0]);
//根据发送的posId获取位置列表
......@@ -462,35 +455,23 @@ namespace DeviceLibrary
LogUtil.info("收到服务器入库命令:入库未找到库位:二维码【" + message + "】库位【" + posId + "】");
return;
}
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if (RobotManage.mainMachine.IsInStoreReady)
{
WarnMsg = "";
JobInfo inStoreJob = new JobInfo(message, posId);
RobotManage.mainMachine.StartInStore(inStoreJob);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info(StoreName + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 开始入库!");
}
else
{
SendStoreState("", StoreStatus.InStoreError);
}
WarnMsg = "";
JobInfo inStoreJob = new JobInfo(message, posId);
RobotManage.mainMachine.LabelingMoveInfo.MoveParam.PosID = inStoreJob.PosId;
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info(StoreName + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 开始入库!");
}
else if (RobotManage.mainMachine.LabelingMoveInfo.MoveStep == MoveStep.InWaitServerCallback)
else
{
string msg = resultOperation.msg;
SendStoreState("", StoreStatus.InStoreError);
RobotManage.mainMachine.LabelingMoveInfo.MoveParam.IsNg = true;
RobotManage.mainMachine.LabelingMoveInfo.MoveParam.NgMsg = msg;
RobotManage.mainMachine.LabelingMoveInfo.NextMoveStep(MoveStep.WaitInStore);
//RobotManage.mainMachine.NGPuted(msg);
RobotManage.mainMachine.LabelingMoveInfo.MoveParam.PosID = "NG";
LogUtil.info("服务器没有正确返回库位. msg=" + msg);
}
else
{
}
}
public float Max_Humidity;
......@@ -503,11 +484,11 @@ namespace DeviceLibrary
{
if (resultOperation.data == null)
return;
Dictionary<string, string> data = resultOperation.data;
Dictionary<string, object> data = resultOperation.data;
if (data.ContainsKey(ParamDefine.maxHumidity) && data.ContainsKey(ParamDefine.maxTemperature))
{
string maxHumidity = data[ParamDefine.maxHumidity];
string maxTemp = data[ParamDefine.maxTemperature];
string maxHumidity = data[ParamDefine.maxHumidity].ToString();
string maxTemp = data[ParamDefine.maxTemperature].ToString();
LogUtil.info("收到服务器温湿度预警值:maxHumidity=" + maxHumidity + ",maxTemperature=" + maxTemp);
try
......@@ -529,15 +510,15 @@ namespace DeviceLibrary
private void ReviceOutStoreProcess(Operation resultOperation)
{
DateTime time = DateTime.Now;
Dictionary<string, string> data = resultOperation.data;
Dictionary<string, object> data = resultOperation.data;
if (data != null && data.ContainsKey(ParamDefine.posId)
&& data.ContainsKey(ParamDefine.plateH) && data.ContainsKey(ParamDefine.plateW))
{
string posIdStr = data[ParamDefine.posId];
string plateWStr = data[ParamDefine.plateW];
string plateHStr = data[ParamDefine.plateH];
string singleOut = data[ParamDefine.singleOut];
string code = "";
string posIdStr = data[ParamDefine.posId].ToString();
string plateWStr = data[ParamDefine.plateW].ToString();
string plateHStr = data[ParamDefine.plateH].ToString();
string singleOut = data[ParamDefine.singleOut].ToString();
object code = "";
if (!data.TryGetValue("code", out code))
data.TryGetValue(ParamDefine.barcode, out code);
LogUtil.info("收到服务器出库消息:poaIs=" + posIdStr + ",platew=" + plateWStr + ",plateh=" + plateHStr + ",singleOut=" + singleOut + ",code=" + code);
......@@ -565,7 +546,7 @@ namespace DeviceLibrary
}
else
{
RobotManage.mainMachine.AddOutStoreTask(code, posId);
RobotManage.mainMachine.AddOutStoreTask(code.ToString(), posId);
}
}
TimeSpan span = DateTime.Now - time;
......
......@@ -177,8 +177,11 @@ namespace DeviceLibrary
case MoveStep.StoreTS08:
MoveInfo.NextMoveStep(MoveStep.StoreTS09);
RobotManage.mainMachine.CylinderMove(MoveInfo, IO_Type.Taking_Release, IO_Type.Taking_Clamp, IO_VALUE.HIGH);
if (storeMoveType== StoreMoveType.InStore)
Setting_Init.Runtime_Posid = To.posid;
if (storeMoveType== StoreMoveType.InStore && To.posid==MainMachine.LabelP)
Setting_Init.Runtime_Step = Runtime_StepE.InToLabel;
if (storeMoveType == StoreMoveType.InStore && To.posid != MainMachine.LabelP)
Setting_Init.Runtime_Step = Runtime_StepE.InToStore;
else if (storeMoveType == StoreMoveType.OutStore)
Setting_Init.Runtime_Step = Runtime_StepE.Out;
......
......@@ -13,9 +13,15 @@ using System.Threading.Tasks;
namespace DeviceLibrary
{
[Serializable]
public enum TestStorePointPort {
入口, 出口, 上层左侧, 上层右侧, 下层左侧, 下层右侧,贴标
}
[Serializable]
public class tstoredata {
public string name="";
public List<int> Value = new List<int>();
}
public class CameraPointTest
{
static CameraData CameraData;
......@@ -24,9 +30,26 @@ namespace DeviceLibrary
{
var fd = File.ReadAllText("Config\\CameraPointTest.json");
CameraData = JsonConvert.DeserializeObject<CameraData>(fd);
for (int i = 0; i < 5; i++)
{
inArea.Add(new tstoredata());
inArea[i].name = "L" + ((char)(0x41 + i)).ToString();
for (int j = 0; j < 4; j++)
{
inArea[i].Value.Add(-1);
}
}
for (int i = 0; i < 5; i++)
{
outArea.Add(new tstoredata());
outArea[i].name = "U" + ((char)(0x41 + i)).ToString();
outArea[i].Value.Add(-1);
}
}
public static event EventHandler<Bitmap> TestStorePointEvent;
public static List<tstoredata> inArea = new List<tstoredata>();
public static List<tstoredata> outArea = new List<tstoredata>();
public static List<string> GetThingStoreName(TestStorePointPort tp,bool TestHas=true) {
//var tl = Test(tp);
try
......@@ -39,10 +62,24 @@ namespace DeviceLibrary
case TestStorePointPort.入口:
startindex = RobotManage.AllPositionMapNumList.IndexOf("LA1");
haslistindex = TestStorePoint(RobotManage.CameraA.GetImage(0), TestStorePointPort.入口);
int index = 0;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 4; j++)
{
inArea[i].Value[j]=haslistindex[index];
index++;
}
}
break;
case TestStorePointPort.出口:
startindex = RobotManage.AllPositionMapNumList.IndexOf("UA1");
haslistindex = TestStorePoint(RobotManage.CameraA.GetImage(1), TestStorePointPort.出口);
index = 0;
for (int i = 0; i < 5; i++)
{
outArea[i].Value[0]=haslistindex[index];
index++;
}
break;
case TestStorePointPort.上层左侧:
startindex = RobotManage.AllPositionMapNumList.IndexOf("LA1");
......@@ -206,42 +243,59 @@ namespace DeviceLibrary
return StorePoint;
}
public static int ScanRectangle() {
var r = CameraData[TestStorePointPort.贴标.ToString()].ObjectPoint;
public static bool ScanRectangle() {
var r = CameraData[TestStorePointPort.贴标.ToString()].PointList;
Point Start = r[0];
Point End = r[1];
int width = Start.X = End.X;
int height = Start.Y = End.Y;
int width = End.X - Start.X;
int height = End.Y - Start.Y;
LogUtil.info($"开始扫描绿色区域:{Start},{width}x{height}");
var bmp = Camera._cam.GrabOneImage(CodeManager.hikNameList[0], PixelType.RGB8);
var bd = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, bmp.PixelFormat);
List<Rectangle> RectScanList = new List<Rectangle>();
int RectScanindex = 0;
//var bmp = new Bitmap("Image_20221208134139341.bmp");
var bd = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadWrite, bmp.PixelFormat);
int HeightCount = 0;
int errlinecount = 0;
try {
for (int i = 0; i < height; i++)
{
int linecount = 0;
for (int j = 0; j < width; j++)
{
var x = Start.X + j;
var y = Start.Y + i;
var addr = y * bd.Stride + x * 4;
var x = Start.X+ j;
var y = Start.Y + height - i;
var addr = y * bd.Stride + x * 3;
var cr = Marshal.ReadByte(bd.Scan0, addr + 2);
var cg = Marshal.ReadByte(bd.Scan0, addr + 1);
var cb = Marshal.ReadByte(bd.Scan0, addr);
var hh = ColorHelper.RgbToHsv(new ColorRGB(cr, cg, cb));
var s = hh.S;
var h = hh.H;
var has = s > 15 && h > 80 && h < 150;
if (has) linecount++;//本行绿色计数
var has = s > 15 && h > 90 && h < 150;
if (has)
{
linecount++;//本行绿色计数
Marshal.WriteByte(bd.Scan0, addr + 2, 0xFF);
Marshal.WriteByte(bd.Scan0, addr + 1, 0);
Marshal.WriteByte(bd.Scan0, addr, 0);
}
}
if (linecount < width * 0.9)
if (linecount < width * 0.6)
{
return HeightCount;
errlinecount++;
HeightCount = 0;
if (errlinecount > 60)
{
return false;
}
//return HeightCount;
}
else {
HeightCount++;
if (HeightCount > 50) {
return true;
}
}
}
}
......@@ -252,8 +306,9 @@ namespace DeviceLibrary
finally
{
bmp.UnlockBits(bd);
}
return HeightCount;
bmp.Save("\\Image\\LabelDebug\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + "-"+ errlinecount +"-"+ HeightCount + ".bmp");
}
return false;
}
}
public class CameraData : Dictionary<string, CameraPointData> { }
......
......@@ -367,7 +367,8 @@ namespace DeviceLibrary
ResetBtn,
RunBtn,
SuddenStop,
X09_Clear
X09_Clear,
LabelInPaste
}
public class IdWorker
{
......
......@@ -52,6 +52,9 @@ namespace DeviceLibrary
/// 物料编码
/// </summary>
public string PN { get; set; }
public string LOT { get; set; }
public string EXP { get; set; }
public string SN { get; set; }
/// <summary>
/// 数量
/// </summary>
......@@ -99,7 +102,7 @@ namespace DeviceLibrary
}
public string ToDetailStr()
{
return $"{DateTime.Now:HH:mm:ss},{ReeID},{PN},{NgMsg},{WareCode}";
return $"{DateTime.Now:HH:mm:ss},{SN},{LOT},{EXP},{PN},{NgMsg},{WareCode}";
}
}
[Serializable]
......
......@@ -274,6 +274,17 @@ namespace DeviceLibrary
Msg.add(crc.GetString("Res0095","出料抽屉没有关闭"), MsgLevel.alarm);
return;
}
if (IOValue(IO_Type.Taking_Clamp).Equals(IO_VALUE.LOW))
{
if (Setting_Init.Runtime_Step >= Runtime_StepE.Printed && Setting_Init.Runtime_Step < Runtime_StepE.LabelPasteFinish)
{
StoreMoveInfo.log("检测到上次正在贴标:" + Setting_Init.Runtime_Step + "," + Setting_Init.Runtime_Posid);
//LabelingMoveInfo.NextMoveStep(MoveStep.Labeling01);
//StoreMoveInfo.NextMoveStep(MoveStep.StoreIn03);
Msg.add("重置前物料正在贴标,无法继续,请手动处理", MsgLevel.warning, ErrInfo.LabelInPaste);
RobotManage.UserPause("重置前物料正在贴标,无法继续,请手动处理");
}
}
ResetMoveInfo.NextMoveStep(MoveStep.H02_HomeReset_01);
ResetMoveInfo.log("锁定抽屉");
IOMove(IO_Type.Entry_Drawer_Lock, IO_VALUE.HIGH);
......
......@@ -15,6 +15,7 @@ namespace DeviceLibrary
{
Task<(bool, string)> PrintTask = null;
int ScanTimes = 0;
List<CodeInfo> CodeList;
void LabelingProcess()
{
if (CheckWait(LabelingMoveInfo))
......@@ -36,6 +37,8 @@ namespace DeviceLibrary
CylinderMove(LabelingMoveInfo, IO_Type.Label_Dock_Back, IO_Type.Label_Dock_Front, IO_VALUE.HIGH);
LabelingMoveInfo.log("锡膏横移到右侧");
ScanTimes = 0;
CodeList = new List<CodeInfo>();
LabelingMoveInfo.MoveParam = new ReelParam();
break;
case MoveStep.Labeling03:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling04);
......@@ -52,11 +55,34 @@ namespace DeviceLibrary
break;
case MoveStep.Labeling05:
if (IsScanFinish) {
var xx = ScanTask.Result;
if (xx!=null && xx.Count > 0)
{
LabelingMoveInfo.log($"扫到部分条码:"+ string.Join(",", xx.Select(x => x.CodeType + ":" + x.CodeStr).ToArray()));
CodeList.AddRange(xx);
if (HasRightCode(xx.ToArray(), LabelingMoveInfo.MoveParam))
{
LabelingMoveInfo.MoveParam.IsNg = false;
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06);
//ServerCM.SendInStoreRequest(new string[] { LabelingMoveInfo.MoveParam.SN }, LabelingMoveInfo.MoveParam, true);
return;
}
}
if (demomode && false)
{
LabelingMoveInfo.MoveParam.IsNg = false;
LabelingMoveInfo.MoveParam.WareCode = "Demo";
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06);
return;
}
ScanTimes++;
if (ScanTimes >= 3)
if (ScanTimes >= 10)
{
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06);
LabelingMoveInfo.log($"未识别到有效二维码,送到NG口");
LabelingMoveInfo.MoveParam.IsNg = true;
LabelingMoveInfo.MoveParam.NgMsg = crc.GetString(L.not_detect_reel_code, "未识别到有效二维码");
}
else {
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling03);
......@@ -65,39 +91,50 @@ namespace DeviceLibrary
}
break;
case MoveStep.Labeling06:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling04);
RotateEquip.TurnDegree(36);
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling07);
RotateEquip.TurnDegree(-36);
LabelingMoveInfo.log("滚动锡膏");
break;
case MoveStep.Labeling07:
if (RotateEquip.TurnWork.IsCompleted)
{
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling05);
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06);
var hc = CameraPointTest.ScanRectangle();
LabelingMoveInfo.log("检测到绿色宽度:"+hc);
if (hc>20) {
if (demomode && false)
{
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling08);
return;
}
if (hc)
{
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling08);
}
}
break;
case MoveStep.Labeling08:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling08);
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling09);
RotateEquip.TurnToEnd(false);
LabelingMoveInfo.log("滚动回位");
break;
case MoveStep.Labeling09:
if (RotateEquip.WaitStatus(null))
{
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling10);
if (LabelingMoveInfo.MoveParam.IsNg)
{
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling50);
LabelingMoveInfo.log("物料NG直接退出");
}
else {
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling10);
}
}
break;
case MoveStep.Labeling10:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling11);
ReelParam reel = new ReelParam();
reel.WareCode = "Test";
reel.ReeID = "Test";
PrintTask = RobotManage.printerHelper.PrintLabel(reel);
LabelingMoveInfo.log("检测到打印任务开始打印:" + reel.ToDetailStr());
PrintTask = RobotManage.printerHelper.PrintLabel(LabelingMoveInfo.MoveParam);
Setting_Init.Runtime_Step = Runtime_StepE.Printed;
LabelingMoveInfo.log("检测到打印任务开始打印:" + LabelingMoveInfo.MoveParam.ToDetailStr());
break;
case MoveStep.Labeling11:
if (PrintTask.IsCompleted)
......@@ -106,7 +143,7 @@ namespace DeviceLibrary
if (result)
{
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling12);
LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
LabelingMoveInfo.log("打印成功,等待标签被取走");
}
else
......@@ -120,18 +157,19 @@ namespace DeviceLibrary
break;
case MoveStep.Labeling12:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling13);
CylinderMove(LabelingMoveInfo, IO_Type.Label_Dock_Back, IO_Type.Label_Dock_Front, IO_VALUE.LOW);
LabelingMoveInfo.log("接标台左移动");
CylinderMove(LabelingMoveInfo, IO_Type.Label_Dock_Down, IO_Type.Label_Dock_Up, IO_VALUE.HIGH);
LabelingMoveInfo.log("接标台上升");
break;
case MoveStep.Labeling13:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling14);
CylinderMove(LabelingMoveInfo, IO_Type.Label_Dock_Down, IO_Type.Label_Dock_Up, IO_VALUE.HIGH);
LabelingMoveInfo.log("接标台上升");
CylinderMove(LabelingMoveInfo, IO_Type.Label_Dock_Back, IO_Type.Label_Dock_Front, IO_VALUE.LOW);
LabelingMoveInfo.log("接标台左移动");
break;
case MoveStep.Labeling14:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling15);
IOMove(IO_Type.Label_Vacuum, IO_VALUE.HIGH);
CylinderMove(null, IO_Type.Labeling_Down, IO_Type.Labeling_Up, IO_VALUE.LOW);
Setting_Init.Runtime_Step = Runtime_StepE.LabelGot;
LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
LabelingMoveInfo.log("吸标下降");
break;
......@@ -153,17 +191,20 @@ namespace DeviceLibrary
case MoveStep.Labeling51:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling52);
CylinderMove(null, IO_Type.Labeling_Down, IO_Type.Labeling_Up, IO_VALUE.LOW);
LabelingMoveInfo.log("贴标下降");
Setting_Init.Runtime_Step = Runtime_StepE.LabelPaste;
LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
break;
case MoveStep.Labeling52:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling53);
IOMove(IO_Type.Label_Vacuum, IO_VALUE.LOW);
RotateEquip.TurnRound();
RotateEquip.TurnDouble();
break;
case MoveStep.Labeling53:
if (RotateEquip.TurnWork.IsCompleted)
{
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling54);
Setting_Init.Runtime_Step = Runtime_StepE.LabelPasteFinish;
LabelingMoveInfo.log("滚动回位");
}
break;
......@@ -219,7 +260,6 @@ namespace DeviceLibrary
/// 扫码线程
/// </summary>
Task<List<CodeInfo>> ScanTask;
List<CodeInfo> LastCodeList;
public void ScanCode()
{
LabelingMoveInfo.log("开始扫码");
......@@ -230,7 +270,7 @@ namespace DeviceLibrary
IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
//Task.Delay(10).Wait();
var l = CodeManager.CameraScan(CodeManager.hikNameList);
LastCodeList.AddRange(l);
//LastCodeList.AddRange(l);
return l;
}));
......@@ -240,5 +280,24 @@ namespace DeviceLibrary
LogUtil.error("FI_13_ScanCode扫码出错:", ex);
}
}
public bool HasRightCode(CodeInfo[] codeInfos, ReelParam reelParam) {
foreach (var c in codeInfos) {
if (c.CodeStr.IndexOf("|") > 0) {
var cs = c.CodeStr.Split('|');
if (cs.Length == 7) {
reelParam.PN = cs[0].Substring(1);
reelParam.LOT = cs[3].Substring(1);
reelParam.EXP = cs[4].Substring(1);
reelParam.SN = cs[5].Substring(1);
reelParam.WareCode = reelParam.SN;
return true;
}
}
}
return false;
}
}
}
\ No newline at end of file
......@@ -26,10 +26,6 @@ namespace DeviceLibrary
LogUtil.info($"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}");
}
public bool IsInStoreReady { get => true; }
public bool StartInStore(JobInfo jobInfo)
{
return true;
}
public void DemoIn()
{
......@@ -40,6 +36,7 @@ namespace DeviceLibrary
StoreMoveInfo.log($"开始入库任务");
}
}
bool demomode = true;
public void DemoOut()
{
if (StoreMoveInfo.MoveStep == MoveStep.Wait)
......@@ -56,22 +53,40 @@ namespace DeviceLibrary
//常规上料扫码流程
switch (StoreMoveInfo.MoveStep)
{
case MoveStep.Wait:
case MoveStep.Wait:
StoreMoveInfo.MoveParam.ReelOnFixture = false;
if (demomode && false)
return;
if (IOValue(IO_Type.Taking_Clamp).Equals(IO_VALUE.LOW)) {
if (Setting_Init.Runtime_Step == Runtime_StepE.LabelProcess) {
StoreMoveInfo.log("检测到上次正在贴标:" + Setting_Init.Runtime_Posid);
StoreMoveInfo.log("检测到上次正在贴标:" + Setting_Init.Runtime_Step + "," + Setting_Init.Runtime_Posid);
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling01);
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn03);
}else
if (Setting_Init.Runtime_Step == Runtime_StepE.LabelPasteFinish)
{
StoreMoveInfo.log("检测到上次已完成贴标:" + Setting_Init.Runtime_Step + "," + Setting_Init.Runtime_Posid);
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn03);
}
Setting_Init.Runtime_Step = Runtime_StepE.None;
else
if (Setting_Init.Runtime_Step >= Runtime_StepE.Printed && Setting_Init.Runtime_Step< Runtime_StepE.LabelPasteFinish)
{
StoreMoveInfo.log("检测到上次正在贴标:" + Setting_Init.Runtime_Step + "," + Setting_Init.Runtime_Posid);
//LabelingMoveInfo.NextMoveStep(MoveStep.Labeling01);
//StoreMoveInfo.NextMoveStep(MoveStep.StoreIn03);
Msg.add("重置前物料正在贴标,无法继续,请手动处理", MsgLevel.warning, ErrInfo.LabelInPaste);
RobotManage.UserPause("重置前物料正在贴标,无法继续,请手动处理");
}else
if (IOValue(IO_Type.Entry_Drawer_Lock).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.Entry_Drawer).Equals(IO_VALUE.HIGH))
{
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn01);
StoreMoveInfo.log($"检测到入库抽屉已锁定");
}
Setting_Init.Runtime_Step = Runtime_StepE.None;
return;
}
return;
if (Setting_Init.Runtime_Step!= Runtime_StepE.None)
StoreMoveInfo.log("Runtime_Step:"+ Setting_Init.Runtime_Step);
if (Setting_Init.Runtime_Step == Runtime_StepE.InToLabel) {
......@@ -87,6 +102,8 @@ namespace DeviceLibrary
{
StoreMoveInfo.log("检测到上次正在准备去库位:" + Setting_Init.Runtime_Posid);
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn04);
StoreMoveInfo.MoveParam.PosID = Setting_Init.Runtime_Posid;
StoreMoveInfo.MoveParam.ReelOnFixture = true;
}
else if (Setting_Init.Runtime_Step == Runtime_StepE.Out)
{
......@@ -131,7 +148,7 @@ namespace DeviceLibrary
var to = CSVPositionReader<ACStorePosition>.GetPositon(LabelP);
StoreMoveInfo.MoveParam.PosID = inposid;
StoreMoveInfo.MoveParam.WareCode = "";
StoreMoveInfo.MoveParam.ReelOnFixture = false;
//StoreMoveInfo.MoveParam.ReelOnFixture = false;
boxTransport.Start(new BoxStorePosition(Config, from, StoreMoveInfo.MoveParam), new BoxStorePosition(Config, to, StoreMoveInfo.MoveParam), StoreMoveType.InStore, true);
StoreMoveInfo.log($"开始转运入贴标机构");
break;
......@@ -153,8 +170,42 @@ namespace DeviceLibrary
case MoveStep.StoreIn03:
if (LabelingMoveInfo.MoveStep == MoveStep.Wait)
{
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn04);
StoreMoveInfo.log($"收到完成贴标");
if (demomode)
{
string outposid = "";
var olist = CameraPointTest.GetThingStoreName(TestStorePointPort.下层右侧);
olist = RobotManage.PositionNumList.ToList().Where(p => { return Regex.IsMatch(p, "^S[H-N]([7-9]|\\d{2})$") && !olist.Contains(p); }).ToList();
if (olist.Count == 0)
{
StoreMoveInfo.NextMoveStep(MoveStep.Wait);
StoreMoveInfo.log($"没有检测到有空余库位");
return;
}
else
{
outposid = olist[0];
StoreMoveInfo.log($"检测到库位有料:{outposid}, 其他有料库位:{string.Join(",", olist)}");
}
LabelingMoveInfo.MoveParam.PosID = outposid;
}
if (string.IsNullOrEmpty(LabelingMoveInfo.MoveParam.PosID))
{
Msg.add("等待服务器返回库位", MsgLevel.info);
StoreMoveInfo.log($"等待服务器返回库位");
return;
}
StoreMoveInfo.MoveParam = LabelingMoveInfo.MoveParam.clone();
if (StoreMoveInfo.MoveParam.IsNg)
{
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn04);
StoreMoveInfo.log($"收到完成贴标");
}
else
{
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn04);
StoreMoveInfo.log($"收到完成贴标");
}
}
else
{
......@@ -164,9 +215,28 @@ namespace DeviceLibrary
case MoveStep.StoreIn04:
if (boxTransport.IsComplateOrFree)
{
var outposid="";
var olist = CameraPointTest.GetThingStoreName(TestStorePointPort.下层右侧);
olist = RobotManage.PositionNumList.ToList().Where(p => { return Regex.IsMatch(p, "^S[H-N]([7-9]|\\d{2})$") && !olist.Contains(p); }).ToList();
var outposid= StoreMoveInfo.MoveParam.PosID;
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn09);
from = CSVPositionReader<ACStorePosition>.GetPositon(LabelP);
to = CSVPositionReader<ACStorePosition>.GetPositon(outposid);
StoreMoveInfo.MoveParam.PosID = outposid;
StoreMoveInfo.MoveParam.WareCode = "";
//StoreMoveInfo.MoveParam.ReelOnFixture = false;
boxTransport.Start(new BoxStorePosition(Config, from, StoreMoveInfo.MoveParam), new BoxStorePosition(Config, to, StoreMoveInfo.MoveParam), StoreMoveType.InStore, true);
StoreMoveInfo.log($"开始转运入库");
}
break;
case MoveStep.StoreIn05:
break;
case MoveStep.StoreIn08:
if (boxTransport.IsComplateOrFree)
{
var outposid = "";
var olist = CameraPointTest.GetThingStoreName(TestStorePointPort.入口);
olist = RobotManage.PositionNumList.ToList().Where(p => { return p.StartsWith("L") && !olist.Contains(p); }).ToList();
if (olist.Count == 0)
{
StoreMoveInfo.NextMoveStep(MoveStep.Wait);
......@@ -176,25 +246,25 @@ namespace DeviceLibrary
else
{
outposid = olist[0];
StoreMoveInfo.log($"检测到库位有料:{outposid}, 其他有料库位:{string.Join(",", olist)}");
StoreMoveInfo.log($"检测到空库位:{outposid}, 其他空库位:{string.Join(",", olist)}");
}
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn05);
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn09);
from = CSVPositionReader<ACStorePosition>.GetPositon(LabelP);
to = CSVPositionReader<ACStorePosition>.GetPositon(outposid);
StoreMoveInfo.MoveParam.PosID = outposid;
StoreMoveInfo.MoveParam.WareCode = "";
StoreMoveInfo.MoveParam.ReelOnFixture = false;
//StoreMoveInfo.MoveParam.ReelOnFixture = false;
boxTransport.Start(new BoxStorePosition(Config, from, StoreMoveInfo.MoveParam), new BoxStorePosition(Config, to, StoreMoveInfo.MoveParam), StoreMoveType.InStore, true);
StoreMoveInfo.log($"开始转运入库");
StoreMoveInfo.log($"开始转运");
}
break;
case MoveStep.StoreIn05:
case MoveStep.StoreIn09:
if (boxTransport.IsComplateOrFree)
{
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn01);
StoreMoveInfo.log($"入库完成");
}
break;
case MoveStep.StoreOut10:
......@@ -232,7 +302,7 @@ namespace DeviceLibrary
to = CSVPositionReader<ACStorePosition>.GetPositon(RFIDP);
StoreMoveInfo.MoveParam.PosID = outposid;
StoreMoveInfo.MoveParam.WareCode = "";
StoreMoveInfo.MoveParam.ReelOnFixture = false;
//StoreMoveInfo.MoveParam.ReelOnFixture = false;
boxTransport.Start(new BoxStorePosition(Config, from, StoreMoveInfo.MoveParam), new BoxStorePosition(Config, to, StoreMoveInfo.MoveParam), StoreMoveType.InStore, true);
StoreMoveInfo.log($"开始转运出库");
}
......@@ -240,21 +310,6 @@ namespace DeviceLibrary
case MoveStep.StoreOut11:
if (boxTransport.IsComplateOrFree)
{
//var outposid = OutList[currentpos];
//var olist = CameraPointTest.GetThingStoreName(TestStorePointPort.出口);
//StoreMoveInfo.log($"检测到出库口有料库位:{string.Join(",", olist)}");
//olist = RobotManage.AllPositionMapNumList.ToList().Where(p => { return p.StartsWith("U") && !olist.Contains(p); }).ToList();
//if (olist.Count == 0)
//{
// StoreMoveInfo.NextMoveStep(MoveStep.Wait);
// StoreMoveInfo.log($"没有检测到出库未有空位");
// return;
//}
//else
//{
// outposid = olist[0];
// StoreMoveInfo.log($"检测到出库位有料:{outposid}, 其他有料出库位:{string.Join(",", olist)}");
//}
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut12);
from = CSVPositionReader<ACStorePosition>.GetPositon(RFIDP);
to = CSVPositionReader<ACStorePosition>.GetPositon(StoreMoveInfo.MoveParam.PosID);
......
......@@ -32,72 +32,7 @@ namespace DeviceLibrary
HEND_HomeReset,
StringLoad_01,
StringLoad_01a,
StringLoad_02,
StringLoad_02a,
StringLoad_02b,
StringLoad_03,
StringLoad_04,
StringLoad_05,
StringLoad_06,
StringLoad_07,
StringReadyGet,
StringReelGet,
StringReelGetFail,
StringReelGetFail_02,
StringReadyPut,
StringReelPut,
StringReelPut_01,
StringReelPut_02,
StringReelPut_03,
StringReelPut_04,
StringOut_01,
StringOut_02,
StringOut_03,
StringOut_Released,
StringOut_05,
StringOut_06,
StringOut_07,
ReelClamp_01,
ReelClamp_02,
ReelClamp_03,
ReelClamp_04,
ReelClamp_05,
ReelClamp_WaitGaugeHeight,
ReelClamp_GetHeight,
ReelClamp_06,
ReelClamp_07,
ReelClamp_08,
ReelClamp_09,
ReelClamp_10,
ReelClamp_11,
InWaitServerCallback,
WaitInStore,
ReelTaked,
NGOUT_00,
NGOUT_01,
NGOUT_02,
NGOUT_03,
NGOUT_04,
NGOUT_05,
NGOUT_06,
NGOUT_07,
NGOUT_08,
NGOUT_09,
NGOUT_10,
NGOUT_11,
SingleIn,
SingleIn_01,
SingleIn_02,
SingleInReady,
SingleInRun,
SingleInRun_01,
SingleInRun_02,
SingleInRun_03,
SingleInRun_04,
SingleInRun_05,
OutBoxPutOn,
Out01,
......@@ -184,6 +119,7 @@ namespace DeviceLibrary
Labeling07,
Labeling08,
Labeling09,
WaitInStore,
Labeling10,
Labeling11,
Labeling12,
......
......@@ -397,7 +397,21 @@ namespace TheMachine
{
btn_IgnoreX09.Visible = false;
}
else if (msg.errInfo == ErrInfo.LabelInPaste)
{
if (FrmAlarm.ShowAlarmDialog("贴标区内可能有物料未完成贴标,请手动取出") == DialogResult.OK)
{
LogUtil.info("用户确认已处理");
Setting_Init.Runtime_Step = Runtime_StepE.None;
RobotManage.UserPause(false);
}
else {
btn_stop_Click(this, EventArgs.Empty);
LogUtil.info("用户取消处理,系统停止");
}
}
}
this.ResumeLayout(true);
}
......

namespace TheMachine
{
partial class FrmAlarm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btn_ok = new System.Windows.Forms.Button();
this.btn_cancel = new System.Windows.Forms.Button();
this.lbl_info = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// btn_ok
//
this.btn_ok.Location = new System.Drawing.Point(493, 374);
this.btn_ok.Name = "btn_ok";
this.btn_ok.Size = new System.Drawing.Size(232, 54);
this.btn_ok.TabIndex = 0;
this.btn_ok.Text = "已处理完毕,继续运行";
this.btn_ok.UseVisualStyleBackColor = true;
this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
//
// btn_cancel
//
this.btn_cancel.Location = new System.Drawing.Point(12, 374);
this.btn_cancel.Name = "btn_cancel";
this.btn_cancel.Size = new System.Drawing.Size(232, 54);
this.btn_cancel.TabIndex = 1;
this.btn_cancel.Text = "暂不处理,停止运行";
this.btn_cancel.UseVisualStyleBackColor = true;
this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);
//
// lbl_info
//
this.lbl_info.Font = new System.Drawing.Font("Arial", 42F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_info.ForeColor = System.Drawing.Color.Red;
this.lbl_info.Location = new System.Drawing.Point(12, 39);
this.lbl_info.Name = "lbl_info";
this.lbl_info.Size = new System.Drawing.Size(713, 261);
this.lbl_info.TabIndex = 2;
this.lbl_info.Text = "123123123123";
this.lbl_info.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// FrmAlarm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(770, 459);
this.ControlBox = false;
this.Controls.Add(this.lbl_info);
this.Controls.Add(this.btn_cancel);
this.Controls.Add(this.btn_ok);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmAlarm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FrmAlarm";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btn_ok;
private System.Windows.Forms.Button btn_cancel;
public System.Windows.Forms.Label lbl_info;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TheMachine
{
public partial class FrmAlarm : Form
{
public FrmAlarm()
{
InitializeComponent();
}
public static DialogResult ShowAlarmDialog(string info) {
FrmAlarm frmAlarm = new FrmAlarm();
frmAlarm.lbl_info.Text = info;
return frmAlarm.ShowDialog();
}
private void btn_cancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
private void btn_ok_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Close();
}
}
}
<?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>
</root>
\ No newline at end of file
......@@ -25,6 +25,7 @@ namespace TheMachine
static void Main()
{
CameraPointTest.Init();
//CameraPointTest.ScanRectangle();
//var bmpfile = @"D:\rick\vs\SO20031_TinStorage\料架照片\106_监控点1_106_20221125194616_31932401.bmp";
//var bmp = new Bitmap(bmpfile);
//var r = Common.CalcStoreBMP(bmp,4, 5);
......
......@@ -96,6 +96,12 @@
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="FrmAlarm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmAlarm.Designer.cs">
<DependentUpon>FrmAlarm.cs</DependentUpon>
</Compile>
<Compile Include="IOControls.cs">
<SubType>UserControl</SubType>
</Compile>
......@@ -175,6 +181,7 @@
</Compile>
<EmbeddedResource Include="AboutBox1.resx">
<DependentUpon>AboutBox1.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="AxisControl.resx">
<DependentUpon>AxisControl.cs</DependentUpon>
......@@ -183,6 +190,9 @@
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmAlarm.resx">
<DependentUpon>FrmAlarm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="IOControls.resx">
<DependentUpon>IOControls.cs</DependentUpon>
</EmbeddedResource>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!