Commit be24b727 刘韬

1

1 个父辈 e7c204e4
......@@ -53,5 +53,7 @@ namespace OnlineStore.Common
public static string CodeParamPath = "CodeParamPath";
public static string QRCodeCount = "QRCodeCount";
public static string CodeTimeOut = "CodeTimeOut";
}
}
......@@ -20,6 +20,7 @@ namespace DeviceLibrary
{
public static string CodeType = ConfigHelper.Config.Get(Setting_Init.CodeType,"QR Code");
private static int QRCodeCount = ConfigHelper.Config.Get(Setting_Init.QRCodeCount,3);
private static int CodeTimeOut = ConfigHelper.Config.Get(Setting_Init.CodeTimeOut, 1000);
public static List<string> cameraNameList = new List<string>();
public static List<string> codeTypeList = new List<string>();
public static List<string> hikNameList = new List<string>();
......@@ -194,6 +195,7 @@ namespace DeviceLibrary
for (int ii = 0; ii < cameraNameList.Count(); ii++)
{
var cameraName = cameraNameList[ii];
var idx = ii;
cameraTask[ii] = Task.Run(new Action(() =>
{
int retrytime = 0;
......@@ -226,14 +228,15 @@ namespace DeviceLibrary
CloseCamera(cameraName);
return;
}
camera_event?.Invoke(null, bmp);
if (idx==0)
camera_event?.Invoke(null, bmp);
LogUtil.info(" 【" + cameraName + "】取图片完成,开始扫码");
string r = "";
RemoteDecodeHelper.RemoteDecodeParam remoteDecodeParam = new RemoteDecodeHelper.RemoteDecodeParam
{
codeTypeList = codeTypeList.ToArray(),
codeCount = 3,
timeout = 3000
codeCount = QRCodeCount,
timeout = CodeTimeOut
};
List<CodeInfo> cc = new List<CodeInfo>();
......
......@@ -39,6 +39,7 @@ namespace DeviceLibrary
}
static string baseDir = Application.StartupPath;
static Thread mainThread;
public static bool haveFixpos=false;
public static HIKCamera CameraA=new HIKCamera();
......@@ -65,6 +66,7 @@ namespace DeviceLibrary
string fixpositionConfigFile = Path.Combine(baseDir, "StoreConfig\\fixPositions.csv");
if (File.Exists(fixpositionConfigFile))
{
haveFixpos = true;
LogUtil.info("加载校准库位文件:" + fixpositionConfigFile);
CSVPositionReader<ACStorePosition>.AddCSVFile(fixpositionConfigFile);
}
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,旋转机构,Middle_Axis,0,HC,,60000,0,0,0,20000,0,10,300,0,0
AXIS,,升降机构,UpDown_Axis,1,HC,,20000,0,0,0,40000,0,10,300,0,0
AXIS,,进出机构,InOut_Axis,2,HC,,100000,0,0,0,40000,0,10,300,0,0
AXIS,,压紧机构,Comp_Axis,3,HC,,40000,0,0,0,8000,0,10,300,0,0
AXIS,,上料提升机构,Batch_Axis,4,HC,,40000,0,0,0,8000,0,10,300,0,0
AXIS,,取料机构,Clamp_Axis,5,HC,,40000,0,0,0,8000,0,10,300,0,0
AXIS,,旋转机构,Middle_Axis,0,HC,,60000,0,0,0,10000,0,10,700,0,0
AXIS,,升降机构,UpDown_Axis,1,HC,,20000,0,0,0,40000,0,10,700,0,0
AXIS,,进出机构,InOut_Axis,2,HC,,100000,0,0,0,40000,0,10,700,0,0
AXIS,,压紧机构,Comp_Axis,3,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,上料提升机构,Batch_Axis,4,HC,,40000,0,0,0,20000,0,10,700,0,0
AXIS,,取料机构,Clamp_Axis,5,HC,,40000,0,0,0,30000,0,10,700,0,0
,,,,,,,,,,,,,,,,
PRO,50,IO信号超时时间(秒),IOSingle_TimerOut,15,,,,,,,,,,,,
PRO,50,IO信号超时时间(秒),IOSingle_TimerOut,5,,,,,,,,,,,,
PRO,0,气压检测超时,AirCheckSeconds,5,,,,,,,,,,,,
PRO,50,最后一盘料补充高度mm,LastTrayAddHeight,3,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,10,旋转机构待机点P1,Middle_P1,123,,,250000,,,,,,,,,
PRO,10,旋转机构单料口P2,Middle_P2,123,,,250000,,,,,,,,,
PRO,10,旋转机构料串P3,Middle_P3,123,,,250000,,,,,,,,,
PRO,10,旋转机构待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
PRO,10,旋转机构单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
PRO,10,旋转机构料串P3,Middle_P3,168460,,,80000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,11,升降轴待机点P1,UpDown_P1,456,,,60000,,,,,,,,,
PRO,11,升降轴单料口高点P2,UpDown_P2,456,,,60000,,,,,,,,,
PRO,11,升降轴单料口低点P3,UpDown_P3,456,,,60000,,,,,,,,,
PRO,11,升降轴料串放料高点P3,UpDown_P4,456,,,60000,,,,,,,,,
PRO,11,升降轴料串放料低点P4,UpDown_P5,427,,,60000,,,,,,,,,
PRO,11,升降轴待机点P1,UpDown_P1,1006626,,,500000,,,,,,,,,
PRO,11,升降轴单料口高点P2,UpDown_P2,1051119,,,280000,,,,,,,,,
PRO,11,升降轴单料口低点P3,UpDown_P3,1015409,,,280000,,,,,,,,,
PRO,11,升降轴料串放料高点P3,UpDown_P4,682777,,,280000,,,,,,,,,
PRO,11,升降轴料串放料低点P4,UpDown_P5,659963,,,280000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,12,进出机构待机点P1,InOut_P1,678,,,800000,,,,,,,,,
PRO,12,进出机构单料口P2,InOut_P2,678,,,800000,,,,,,,,,
PRO,12,进出机构料串放料P3,InOut_P3,678,,,800000,,,,,,,,,
PRO,12,进出机构待机点P1,InOut_P1,0,,,500000,,,,,,,,,
PRO,12,进出机构单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
PRO,12,进出机构料串放料P3,InOut_P3,234184,,,500000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,13,压紧机构待机点P1,Comp_P1,678,,,800000,,,,,,,,,
PRO,13,压紧机构8mm盘压紧点P2,Comp_P2,678,,,800000,,,,,,,,,
PRO,13,压紧机构待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
PRO,13,压紧机构8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
PRO,13,压紧机构每毫米脉冲,Comp_PoToMM,1000,,,,,,,,,,,,
PRO,13,压紧机构库位高点偏移MM,Comp_PH_MM,5,,,,,,,,,,,,
PRO,13,压紧机构压紧点偏移mm,Comp_PL_MM,2,,,,,,,,,,,,
PRO,13,压紧机构库位高点偏移MM,Comp_PH_MM,14,,,,,,,,,,,,
PRO,13,压紧机构压紧点偏移mm,Comp_PL_MM,0,,,,,,,,,,,,
PRO,0,压紧机构压紧点集合P2,Comp_P2_List,8=44201;12=38557;16=34550;20=30540;24=26030;,,,800000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,14,上料提升机构待机点P1,Batch_P1,123,,,800000,,,,,,,,,
PRO,14,上料提升机构上料高点P2,Batch_P2,234,,,800000,,,,,,,,,
PRO,14,上料提升机构高度转换系数,Batch_PoToMM,1000,,,,,,,,,,,,
PRO,14,接触料盘后下降mm,Batch_DetectDownMM,5,,,,,,,,,,,,
PRO,14,出库时初始下降mm,Batch_OutStoreDownMM,5,,,,,,,,,,,,
PRO,14,上料提升机构待机点P1,Batch_P1,0,,,30000,,,,,,,,,
PRO,14,上料提升机构上料高点P2,Batch_P2,715329,,,30000,,,,,,,,,
PRO,14,上料提升机构高度转换系数,Batch_PoToMM,2300,,,,,,,,,,,,
PRO,14,接触料盘后下降mm,Batch_DetectDownMM,15,,,,,,,,,,,,
PRO,14,出库时初始下降mm,Batch_OutStoreDownMM,30,,,,,,,,,,,,
PRO,14,出库时每盘料补偿mm,Batch_OutPlateDownMM,4,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,15,取料机构待机点P1,Clamp_P1,234,,,800000,,,,,,,,,
PRO,15,取料机构料串取料P2,Clamp_P2,234,,,800000,,,,,,,,,
PRO,15,取料机构单料口8mm放料P3,Clamp_P3,234,,,800000,,,,,,,,,
PRO,15,取料机构待机点P1,Clamp_P1,0,,,200000,,,,,,,,,
PRO,15,取料机构料串取料P2,Clamp_P2,596495,,,200000,,,,,,,,,
PRO,15,取料机构单料口8mm放料P3,Clamp_P3,270518,,,200000,,,,,,,,,
PRO,15,取料机构高度转换系数,Clamp_PoToMM,1000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
......
......@@ -140,7 +140,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);
......@@ -148,7 +148,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);
......@@ -156,7 +156,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);
......@@ -360,6 +360,7 @@ namespace TheMachine
this.btn_run.Name = "btn_run";
this.btn_run.Size = new System.Drawing.Size(105, 55);
this.btn_run.TabIndex = 4;
this.btn_run.Tag = "not";
this.btn_run.Text = "启动";
this.btn_run.UseVisualStyleBackColor = true;
this.btn_run.Click += new System.EventHandler(this.btn_run_Click);
......
......@@ -72,6 +72,11 @@ namespace TheMachine
this.Width = Screen.PrimaryScreen.WorkingArea.Width;//获取主显⽰设备的桌⾯宽度
this.Height = Screen.PrimaryScreen.WorkingArea.Height;//获取主显⽰设备的桌⾯⾼度
if (this.Width > 1366)
this.Width = 1366;
if (this.Height > 900)
this.Height = 900;
List<CodeInfo> codeInfos = new List<CodeInfo>();
//codeInfos.Add(new CodeInfo("", 528, 406));
codeInfos.Add(new CodeInfo("", 925, 520));
......@@ -597,6 +602,16 @@ namespace TheMachine
启用调试模式ToolStripMenuItem.Text = !RobotManage.IsConfigMode ? crc.GetString(L.enable_config_mode, "启用配置模式") : crc.GetString(L.disable_config_mode, "停用配置模式");
btn_releasestring.Text = crc.GetString(L.safty_release_string, "安全释放料串");
btn_run.Text = crc.GetString(L.start, "启动");
if (RobotManage.isRunning)
{
if (userpause)
(btn_run as Button).Text = crc.GetString(L.device_resume, "恢复运行");
else
(btn_run as Button).Text = crc.GetString(L.device_pause, "暂停运行");
}
}
private void 简体中文ToolStripMenuItem_Click(object sender, EventArgs e)
......
......@@ -39,7 +39,10 @@ namespace TheMachine
private void RobotManage_LoadFinishEvent(bool state, string msg)
{
if (!state)
return;
return;
if (!RobotManage.haveFixpos)
cb_usefixpos.Visible = false;
}
......
......@@ -156,7 +156,7 @@ namespace TheMachine
this.dataGridView1.ShowCellToolTips = false;
this.dataGridView1.ShowEditingIcon = false;
this.dataGridView1.ShowRowErrors = false;
this.dataGridView1.Size = new System.Drawing.Size(981, 246);
this.dataGridView1.Size = new System.Drawing.Size(981, 308);
this.dataGridView1.TabIndex = 103;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
this.dataGridView1.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDown);
......
......@@ -55,6 +55,9 @@ namespace TheMachine
FillBoxPos();
RobotManage.mainMachine.InOutEndProcessEvent += Store_InOutEndProcessEvent;
timer1.Enabled = true;
if (!RobotManage.haveFixpos)
cb_fixpos.Visible = false;
return;
}
private void Store_InOutEndProcessEvent(string arg1, StoreMoveType arg2, bool arg3)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!