コード例 #1
0
 public void DoPatternWeight()
 {
     DirUtils.CreateDir(string.Format("mes\\{0}", DateTime.Today.ToString("yyyy-MM-dd")));
     PatternWeightSettings.FilePathDotWeight =
         string.Format("mes\\{0}\\DotWeight-{0}.csv",
                       DateTime.Today.ToString("yyyy-MM-dd"));
     PatternWeightSettings.FilePathMatrixWeight = string.Format("mes\\{0}\\MatrixWeight-{0}.csv",
                                                                DateTime.Today.ToString("yyyy-MM-dd"));
     if (!string.IsNullOrEmpty(PatternWeightSettings.FileDirUser))
     {
         DirUtils.CreateDir(string.Format("{0}\\{1}", PatternWeightSettings.FileDirUser, DateTime.Today.ToString("yyyy-MM-dd")));
     }
     if (!string.IsNullOrEmpty(PatternWeightSettings.FileDirUser))
     {
         PatternWeightSettings.FilePathDotWeightUser    = string.Format("{0}\\{1}\\DotWeight-{1}.csv", PatternWeightSettings.FileDirUser, DateTime.Today.ToString("yyyy-MM-dd"));
         PatternWeightSettings.FilePathMatrixWeightUser = string.Format("{0}\\{1}\\MatrixWeight-{1}.csv", PatternWeightSettings.FileDirUser, DateTime.Today.ToString("yyyy-MM-dd"));
     }
     //this.recdPatternWeight();
     //this.recDotWeight();
     Executor.Instance.ShotNums = 0;
     if (String.IsNullOrEmpty(patterName))
     {
         return;
     }
     //if (this.runnableModule==null)
     //    return;
     Machine.Instance.Robot.MoveSafeZAndReply();
     this.Valve.MoveToScaleLoc();
     Valve.DoWeight(spray);
     this.shotNums = Executor.Instance.ShotNums;
     this.recdPatternWeight();
     this.recDotWeight();
 }
コード例 #2
0
        public void SaveResult(string pathDir)
        {
            string path = pathDir;

            DirUtils.CreateDir(path);
            //this.FileName = this.FileName.Replace(':', '_');
            path = path + "\\" + DateTime.Now.ToString("yyyyMMdd HHmmss");
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append(this.Barcode + "\r\n");
            stringBuilder.Append(FluidProgram.CurrentOrDefault().RuntimeSettings.CustomParam.RTVParam.Depart + "\r\n");
            stringBuilder.Append(FluidProgram.CurrentOrDefault().RuntimeSettings.CustomParam.RTVParam.ComputerInfo + "\r\n");
            stringBuilder.Append(FluidProgram.CurrentOrDefault().RuntimeSettings.CustomParam.RTVParam.MachineInfo + "\r\n");
            stringBuilder.Append(this.GetBarcodePart(this.Barcode) + "\r\n");
            stringBuilder.Append(FluidProgram.CurrentOrDefault().RuntimeSettings.CustomParam.RTVParam.ProductLineInfo + "\r\n");
            stringBuilder.Append(FluidProgram.CurrentOrDefault().RuntimeSettings.CustomParam.RTVParam.OwkInfo + "\r\n");
            stringBuilder.Append(FluidProgram.CurrentOrDefault().RuntimeSettings.CustomParam.RTVParam.UserInfo + "\r\n");
            stringBuilder.Append(this.GetProgramRunTime() + "\r\n");
            stringBuilder.Append(this.GetProgramEndTime() + "\r\n");
            stringBuilder.Append("No  Width  MaxValue  MinValue  Height  MaxValue  MinValue" + "\r\n");
            for (int i = 0; i < this.Results.Count; i++)
            {
                string s = "";
                s += (1 + i).ToString() + "   ";
                s += this.Results[i][0] + "   ";
                s += this.Results[i][1] + "      ";
                s += this.Results[i][2] + "      ";
                s += this.Results[i][3] + "    ";
                s += this.Results[i][4] + "      ";
                s += this.Results[i][5];
                stringBuilder.Append(s + "\r\n");
            }

            CsvUtil.WriteLine(path, stringBuilder.ToString());
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: SetCode/Fluid
 private void createPath()
 {
     DirUtils.CreateDir(SettingsPath.PathSettings);
     DirUtils.CreateDir(SettingsPath.PathMachine);
     DirUtils.CreateDir(SettingsPath.PathBusiness);
 }