- P9045 선별기2->외부출력9

- P9046 선별기1->선별기2, 선별기2->외부출력10
 -> 기존 설정값 다시 클릭하여 설정해야 함
master V3.1.1
DESKTOP-999R8N3\CJY 2024-12-18 16:43:53 +09:00
parent ee76e013c6
commit 26d99e116a
8 changed files with 468 additions and 18 deletions

View File

@ -63,7 +63,7 @@ namespace ITC81DB_2.Controls
private void DefaultSetting()
{
this.labelSerialNo.Text = this.ParentForm.ParentForm.SystemConfig.SerialNumber;
this.labelDisplayVer.Text = "3.1.0";
this.labelDisplayVer.Text = "3.1.1";
}
public void UpdateMainBoardVersionDisplay(string version)

View File

@ -583,7 +583,7 @@ namespace ITC81DB_2.Controls
this.labelOut4RunTime.Text = value;
#endregion
#region ExternalOut5
#region ExternalOut9
this.comboBoxOut9Mode.SelectedIndexChanged -= new EventHandler(this.comboBoxOut9Mode_SelectedIndexChanged);
index = int.Parse(item.ExternalOut9Mode.Trim());
if (this.comboBoxOut9Mode.SelectedIndex != index)
@ -597,7 +597,7 @@ namespace ITC81DB_2.Controls
this.labelOut9RunTime.Text = value;
#endregion
#region ExternalOut6
#region ExternalOut10
this.comboBoxOut10Mode.SelectedIndexChanged -= new EventHandler(this.comboBoxOut10Mode_SelectedIndexChanged);
index = int.Parse(item.ExternalOut10Mode.Trim());
if (this.comboBoxOut10Mode.SelectedIndex != index)
@ -1023,6 +1023,8 @@ namespace ITC81DB_2.Controls
string value = "";
this.ParentForm.ParentForm.CurrentSystemParameter9509.ExternalOut9Mode = this.comboBoxOut9Mode.SelectedIndex.ToString();
this.ParentForm.ParentForm.CurrentSystemParameter3.ExternalOut9Mode = this.comboBoxOut9Mode.SelectedIndex.ToString();
this.ParentForm.ParentForm.SaveSystemParameter3File(this.ParentForm.ParentForm.CurrentSystemParameter3);
value = Helper.StringZeroFillDigits4(this.comboBoxOut9Mode.SelectedIndex.ToString());
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5225_ExternalOut9Mode, value);
@ -1045,6 +1047,8 @@ namespace ITC81DB_2.Controls
this.labelOut9DelayTime.Text = myKeyPad.StringValue;
this.ParentForm.ParentForm.CurrentSystemParameter9509.ExternalOut9DelayTime = myKeyPad.StringValue;
this.ParentForm.ParentForm.CurrentSystemParameter3.ExternalOut9DelayTime = myKeyPad.StringValue;
this.ParentForm.ParentForm.SaveSystemParameter3File(this.ParentForm.ParentForm.CurrentSystemParameter3);
value = Helper.StringZeroFillDigits4(myKeyPad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5226_ExternalOut9DelayTime, value);
@ -1069,6 +1073,8 @@ namespace ITC81DB_2.Controls
this.labelOut9RunTime.Text = myKeyPad.StringValue;
this.ParentForm.ParentForm.CurrentSystemParameter9509.ExternalOut9RunTime = myKeyPad.StringValue;
this.ParentForm.ParentForm.CurrentSystemParameter3.ExternalOut9RunTime = myKeyPad.StringValue;
this.ParentForm.ParentForm.SaveSystemParameter3File(this.ParentForm.ParentForm.CurrentSystemParameter3);
value = Helper.StringZeroFillDigits4(myKeyPad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5227_ExternalOut9RunTime, value);
@ -1081,6 +1087,8 @@ namespace ITC81DB_2.Controls
string value = "";
this.ParentForm.ParentForm.CurrentSystemParameter9509.ExternalOut10Mode = this.comboBoxOut10Mode.SelectedIndex.ToString();
this.ParentForm.ParentForm.CurrentSystemParameter3.ExternalOut10Mode = this.comboBoxOut9Mode.SelectedIndex.ToString();
this.ParentForm.ParentForm.SaveSystemParameter3File(this.ParentForm.ParentForm.CurrentSystemParameter3);
value = Helper.StringZeroFillDigits4(this.comboBoxOut10Mode.SelectedIndex.ToString());
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5228_ExternalOut10Mode, value);
@ -1103,6 +1111,8 @@ namespace ITC81DB_2.Controls
this.labelOut10DelayTime.Text = myKeyPad.StringValue;
this.ParentForm.ParentForm.CurrentSystemParameter9509.ExternalOut10DelayTime = myKeyPad.StringValue;
this.ParentForm.ParentForm.CurrentSystemParameter3.ExternalOut10DelayTime = myKeyPad.StringValue;
this.ParentForm.ParentForm.SaveSystemParameter3File(this.ParentForm.ParentForm.CurrentSystemParameter3);
value = Helper.StringZeroFillDigits4(myKeyPad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5229_ExternalOut10DelayTime, value);
@ -1127,6 +1137,8 @@ namespace ITC81DB_2.Controls
this.labelOut10RunTime.Text = myKeyPad.StringValue;
this.ParentForm.ParentForm.CurrentSystemParameter9509.ExternalOut10RunTime = myKeyPad.StringValue;
this.ParentForm.ParentForm.CurrentSystemParameter3.ExternalOut10RunTime = myKeyPad.StringValue;
this.ParentForm.ParentForm.SaveSystemParameter3File(this.ParentForm.ParentForm.CurrentSystemParameter3);
value = Helper.StringZeroFillDigits4(myKeyPad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5230_ExternalOut10RunTime, value);

View File

@ -1160,6 +1160,240 @@ namespace ITC81DB_2
}
#endregion
#region SystemParameter3
public class SystemParameter3
{
#region Field
private string m_ExternalOut1Mode;
private string m_ExternalOut1DelayTime;
private string m_ExternalOut1RunTime;
private string m_ExternalOut2Mode;
private string m_ExternalOut2DelayTime;
private string m_ExternalOut2RunTime;
private string m_ExternalOut3Mode;
private string m_ExternalOut3DelayTime;
private string m_ExternalOut3RunTime;
private string m_ExternalOut4Mode;
private string m_ExternalOut4DelayTime;
private string m_ExternalOut4RunTime;
private string m_ExternalOut9Mode;
private string m_ExternalOut9DelayTime;
private string m_ExternalOut9RunTime;
private string m_ExternalOut10Mode;
private string m_ExternalOut10DelayTime;
private string m_ExternalOut10RunTime;
private string m_Dummy1;
private string m_Dummy2;
#endregion
#region Constructor
public SystemParameter3()
{
this.Initialization();
}
#endregion
#region Property
public string ExternalOut1Mode
{
get { return this.m_ExternalOut1Mode; }
set { this.m_ExternalOut1Mode = value; }
}
public string ExternalOut1DelayTime
{
get { return this.m_ExternalOut1DelayTime; }
set { this.m_ExternalOut1DelayTime = value; }
}
public string ExternalOut1RunTime
{
get { return this.m_ExternalOut1RunTime; }
set { this.m_ExternalOut1RunTime = value; }
}
public string ExternalOut2Mode
{
get { return this.m_ExternalOut2Mode; }
set { this.m_ExternalOut2Mode = value; }
}
public string ExternalOut2DelayTime
{
get { return this.m_ExternalOut2DelayTime; }
set { this.m_ExternalOut2DelayTime = value; }
}
public string ExternalOut2RunTime
{
get { return this.m_ExternalOut2RunTime; }
set { this.m_ExternalOut2RunTime = value; }
}
public string ExternalOut3Mode
{
get { return this.m_ExternalOut3Mode; }
set { this.m_ExternalOut3Mode = value; }
}
public string ExternalOut3DelayTime
{
get { return this.m_ExternalOut3DelayTime; }
set { this.m_ExternalOut3DelayTime = value; }
}
public string ExternalOut3RunTime
{
get { return this.m_ExternalOut3RunTime; }
set { this.m_ExternalOut3RunTime = value; }
}
public string ExternalOut4Mode
{
get { return this.m_ExternalOut4Mode; }
set { this.m_ExternalOut4Mode = value; }
}
public string ExternalOut4DelayTime
{
get { return this.m_ExternalOut4DelayTime; }
set { this.m_ExternalOut4DelayTime = value; }
}
public string ExternalOut4RunTime
{
get { return this.m_ExternalOut4RunTime; }
set { this.m_ExternalOut4RunTime = value; }
}
public string ExternalOut9Mode
{
get { return this.m_ExternalOut9Mode; }
set { this.m_ExternalOut9Mode = value; }
}
public string ExternalOut9DelayTime
{
get { return this.m_ExternalOut9DelayTime; }
set { this.m_ExternalOut9DelayTime = value; }
}
public string ExternalOut9RunTime
{
get { return this.m_ExternalOut9RunTime; }
set { this.m_ExternalOut9RunTime = value; }
}
public string ExternalOut10Mode
{
get { return this.m_ExternalOut10Mode; }
set { this.m_ExternalOut10Mode = value; }
}
public string ExternalOut10DelayTime
{
get { return this.m_ExternalOut10DelayTime; }
set { this.m_ExternalOut10DelayTime = value; }
}
public string ExternalOut10RunTime
{
get { return this.m_ExternalOut10RunTime; }
set { this.m_ExternalOut10RunTime = value; }
}
public string Dummy1
{
get { return this.m_Dummy1; }
set { this.m_Dummy1 = value; }
}
public string Dummy2
{
get { return this.m_Dummy2; }
set { this.m_Dummy2 = value; }
}
#endregion
#region Method
public void Initialization()
{
this.ExternalOut1Mode = "0";
this.ExternalOut1DelayTime = "500";
this.ExternalOut1RunTime = "1000";
this.ExternalOut2Mode = "0";
this.ExternalOut2DelayTime = "500";
this.ExternalOut2RunTime = "1000";
this.ExternalOut3Mode = "0";
this.ExternalOut3DelayTime = "500";
this.ExternalOut3RunTime = "1000";
this.ExternalOut4Mode = "0";
this.ExternalOut4DelayTime = "500";
this.ExternalOut4RunTime = "1000";
this.ExternalOut9Mode = "0";
this.ExternalOut9DelayTime = "500";
this.ExternalOut9RunTime = "1000";
this.ExternalOut10Mode = "0";
this.ExternalOut10DelayTime = "500";
this.ExternalOut10RunTime = "1000";
this.Dummy1 = "0";
this.Dummy2 = "0";
}
#endregion
}
#endregion
#region StructSystemParameter3
[StructLayout(LayoutKind.Sequential)]
public struct StructSystemParameter3
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut1Mode;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut1DelayTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut1RunTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut2Mode;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut2DelayTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut2RunTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut3Mode;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut3DelayTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut3RunTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut4Mode;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut4DelayTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut4RunTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut9Mode;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut9DelayTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut9RunTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut10Mode;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut10DelayTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOut10RunTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy2;
}
#endregion
#region Modbus
public class _30000_ModbusAddress
{

View File

@ -108,6 +108,9 @@ namespace ITC81DB_2.Forms
// 시스템파라미터 - 9511
public SystemParameter9511 CurrentSystemParameter9511;
// 시스템파라미터3 : 외부출력
public SystemParameter3 CurrentSystemParameter3;
// Form
public FormMainDisplay ChildFormMainDisplay;
public FormMenu ChildFormMenu;
@ -250,6 +253,8 @@ namespace ITC81DB_2.Forms
this.CurrentUser = new User();
this.CurrentUserGroup = new UserGroup();
this.CurrentSystemParameter3 = new SystemParameter3();
// SystemFile1 폴더 생성
if (Directory.Exists(this.PathSystemFileFolder1) == false)
Directory.CreateDirectory(this.PathSystemFileFolder1);
@ -312,6 +317,32 @@ namespace ITC81DB_2.Forms
this.smartForm.AddChildForm(this.ChildFormMenu);
}
public static void Exception(Exception ex)
{
try
{
string fileName = "SD Card\\Data\\Others\\Log\\" + string.Format("{0:yyyyMMdd_HHmmss}_Exception.txt", DateTime.Now);
FileStream fs = new FileStream(fileName, FileMode.OpenOrCreate);
StreamWriter sw = new StreamWriter(fs);
sw.Write(ex.ToString());
sw.Close();
fs.Close();
}
catch
{
string fileName = "Flash Disk\\" + string.Format("{0:yyyyMMdd_HHmmss}_Exception.txt", DateTime.Now);
FileStream fs = new FileStream(fileName, FileMode.OpenOrCreate);
StreamWriter sw = new StreamWriter(fs);
sw.Write(ex.ToString());
sw.Close();
fs.Close();
}
}
public void TransferProductParameter1(int productNumber)
{
string value = "";
@ -319,9 +350,11 @@ namespace ITC81DB_2.Forms
StringBuilder sb = new StringBuilder();
ProductItem pItem = new ProductItem();
JudgmentSetItem jItem = new JudgmentSetItem();
SystemParameter3 sItem = new SystemParameter3();
this.LoadProductFile1(ref pItem, productNumber - 1);
this.LoadJudgmentSetFile1(ref jItem, productNumber - 1);
this.LoadSystemParameter3File(ref sItem);
sb.Append(Helper.StringZeroFillDigits7(pItem.UnderRange)); // 하한값(7)
sb.Append(Helper.StringZeroFillDigits7(pItem.PassRange)); // 기준값(7)
@ -346,9 +379,9 @@ namespace ITC81DB_2.Forms
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter1Mode.ToString())); // 선별기1모드(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter1DelayTime.ToString())); // 선별기1지연시간(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter1RunTime.ToString())); // 선별기1동작시간(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter2Mode.ToString())); // 선별기2모드(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter2DelayTime.ToString())); // 선별기2지연시간(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter2RunTime.ToString())); // 선별기2동작시간(4)
sb.Append(Helper.StringZeroFillDigits4(sItem.ExternalOut9Mode)); // 외부출력9모드(4)
sb.Append(Helper.StringZeroFillDigits4(sItem.ExternalOut9DelayTime)); // 외부출력9지연시간(4)
sb.Append(Helper.StringZeroFillDigits4(sItem.ExternalOut9RunTime)); // 외부출력9동작시간(4)
sb.Append(Helper.StringZeroFillDigits4(this.SystemConfig.EquipmentID.ToString())); // 장비ID(4)
sb.Append("0000000"); // Dummy1(7)
sb.Append("0000000"); // Dummy2(7)
@ -366,9 +399,11 @@ namespace ITC81DB_2.Forms
StringBuilder sb = new StringBuilder();
ProductItem pItem = new ProductItem();
JudgmentSetItem jItem = new JudgmentSetItem();
SystemParameter3 sItem = new SystemParameter3();
this.LoadProductFile2(ref pItem, productNumber - 1);
this.LoadJudgmentSetFile2(ref jItem, productNumber - 1);
this.LoadSystemParameter3File(ref sItem);
sb.Append(Helper.StringZeroFillDigits7(pItem.UnderRange)); // 하한값(7)
sb.Append(Helper.StringZeroFillDigits7(pItem.PassRange)); // 기준값(7)
@ -390,12 +425,12 @@ namespace ITC81DB_2.Forms
sb.Append(Helper.StringZeroFillDigits4(jItem.AutoJudgment1.ToString())); // 자동판정-1(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.AutoJudgment2.ToString())); // 자동판정-2(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.AutoJudgment3.ToString())); // 자동판정-3(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter1Mode.ToString())); // 선별기1모드(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter1DelayTime.ToString())); // 선별기1지연시간(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter1RunTime.ToString())); // 선별기1동작시간(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter2Mode.ToString())); // 선별기2모드(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter2DelayTime.ToString())); // 선별기2지연시간(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.Sorter2RunTime.ToString())); // 선별기2동작시간(4)
sb.Append(Helper.StringZeroFillDigits4(sItem.ExternalOut10Mode)); // 외부출력10모드(4)
sb.Append(Helper.StringZeroFillDigits4(sItem.ExternalOut10DelayTime)); // 외부출력10지연시간(4)
sb.Append(Helper.StringZeroFillDigits4(sItem.ExternalOut10RunTime)); // 외부출력10동작시간(4)
sb.Append(Helper.StringZeroFillDigits4(this.SystemConfig.EquipmentID.ToString())); // 장비ID(4)
sb.Append("0000000"); // Dummy1(7)
sb.Append("0000000"); // Dummy2(7)
@ -6332,7 +6367,15 @@ namespace ITC81DB_2.Forms
try
{
structItem = (StructSystemConfigurationItem2)this.smartFileIO.ReadStructure(1, typeof(StructSystemConfigurationItem2));
try
{
structItem = (StructSystemConfigurationItem2)this.smartFileIO.ReadStructure(1, typeof(StructSystemConfigurationItem2));
}
catch
{
this.CreateSystemConfigurationFile2();
structItem = (StructSystemConfigurationItem2)this.smartFileIO.ReadStructure(1, typeof(StructSystemConfigurationItem2));
}
this.SystemConfig.IsModbus = structItem.IsModbus;
this.SystemConfig.IsPart11 = structItem.IsPart11;
@ -6392,6 +6435,154 @@ namespace ITC81DB_2.Forms
}
#endregion
#region SystemParameter3
private void CreateSystemParameter3File()
{
StructSystemParameter3 structItem;
this.CurrentSystemParameter3.Initialization();
structItem.ExternalOut1Mode = this.CurrentSystemParameter3.ExternalOut1Mode;
structItem.ExternalOut1DelayTime = this.CurrentSystemParameter3.ExternalOut1DelayTime;
structItem.ExternalOut1RunTime = this.CurrentSystemParameter3.ExternalOut1RunTime;
structItem.ExternalOut2Mode = this.CurrentSystemParameter3.ExternalOut2Mode;
structItem.ExternalOut2DelayTime = this.CurrentSystemParameter3.ExternalOut2DelayTime;
structItem.ExternalOut2RunTime = this.CurrentSystemParameter3.ExternalOut2RunTime;
structItem.ExternalOut3Mode = this.CurrentSystemParameter3.ExternalOut3Mode;
structItem.ExternalOut3DelayTime = this.CurrentSystemParameter3.ExternalOut3DelayTime;
structItem.ExternalOut3RunTime = this.CurrentSystemParameter3.ExternalOut3RunTime;
structItem.ExternalOut4Mode = this.CurrentSystemParameter3.ExternalOut4Mode;
structItem.ExternalOut4DelayTime = this.CurrentSystemParameter3.ExternalOut4DelayTime;
structItem.ExternalOut4RunTime = this.CurrentSystemParameter3.ExternalOut4RunTime;
structItem.ExternalOut9Mode = this.CurrentSystemParameter3.ExternalOut9Mode;
structItem.ExternalOut9DelayTime = this.CurrentSystemParameter3.ExternalOut9DelayTime;
structItem.ExternalOut9RunTime = this.CurrentSystemParameter3.ExternalOut9RunTime;
structItem.ExternalOut10Mode = this.CurrentSystemParameter3.ExternalOut10Mode;
structItem.ExternalOut10DelayTime = this.CurrentSystemParameter3.ExternalOut10DelayTime;
structItem.ExternalOut10RunTime = this.CurrentSystemParameter3.ExternalOut10RunTime;
structItem.Dummy1 = "0";
structItem.Dummy2 = "0";
this.smartFileIO.WriteStructure(structItem, 0);
}
public void SaveSystemParameter3File(SystemParameter3 item)
{
string fullFilePath = "";
bool fileCheck = false;
StructSystemParameter3 structItem;
fullFilePath = this.PathSystemFileFolder1 + "SystemParameter3.cfg";
this.smartFileIO.FilePathName = fullFilePath;
FileInfo fileInfo = new FileInfo(fullFilePath);
fileCheck = fileInfo.Exists;
if (fileCheck == true)
this.smartFileIO.Open(this.BufferSmartUart);
else
{
this.smartFileIO.Open(this.BufferSmartUart);
this.CreateSystemParameter3File();
}
structItem.ExternalOut1Mode = item.ExternalOut1Mode;
structItem.ExternalOut1DelayTime = item.ExternalOut1DelayTime;
structItem.ExternalOut1RunTime = item.ExternalOut1RunTime;
structItem.ExternalOut2Mode = item.ExternalOut2Mode;
structItem.ExternalOut2DelayTime = item.ExternalOut2DelayTime;
structItem.ExternalOut2RunTime = item.ExternalOut2RunTime;
structItem.ExternalOut3Mode = item.ExternalOut3Mode;
structItem.ExternalOut3DelayTime = item.ExternalOut3DelayTime;
structItem.ExternalOut3RunTime = item.ExternalOut3RunTime;
structItem.ExternalOut4Mode = item.ExternalOut4Mode;
structItem.ExternalOut4DelayTime = item.ExternalOut4DelayTime;
structItem.ExternalOut4RunTime = item.ExternalOut4RunTime;
structItem.ExternalOut9Mode = item.ExternalOut9Mode;
structItem.ExternalOut9DelayTime = item.ExternalOut9DelayTime;
structItem.ExternalOut9RunTime = item.ExternalOut9RunTime;
structItem.ExternalOut10Mode = item.ExternalOut10Mode;
structItem.ExternalOut10DelayTime = item.ExternalOut10DelayTime;
structItem.ExternalOut10RunTime = item.ExternalOut10RunTime;
structItem.Dummy1 = "0";
structItem.Dummy2 = "0";
this.smartFileIO.WriteStructure(structItem, 0);
this.smartFileIO.Close();
}
public void LoadSystemParameter3File(ref SystemParameter3 pItem)
{
string fullFilePath = "";
bool fileCheck = false;
StructSystemParameter3 structItem;
fullFilePath = this.PathSystemFileFolder1 + "SystemParameter3.cfg";
this.smartFileIO.FilePathName = fullFilePath;
FileInfo fileInfo = new FileInfo(fullFilePath);
fileCheck = fileInfo.Exists;
if (fileCheck == true)
this.smartFileIO.Open(this.BufferSmartUart);
else
{
this.smartFileIO.Open(this.BufferSmartUart);
this.CreateSystemParameter3File();
}
try
{
structItem = (StructSystemParameter3)this.smartFileIO.ReadStructure(0, typeof(StructSystemParameter3));
pItem.ExternalOut1Mode = structItem.ExternalOut1Mode;
pItem.ExternalOut1DelayTime = structItem.ExternalOut1DelayTime;
pItem.ExternalOut1RunTime = structItem.ExternalOut1RunTime;
pItem.ExternalOut2Mode = structItem.ExternalOut2Mode;
pItem.ExternalOut2DelayTime = structItem.ExternalOut2DelayTime;
pItem.ExternalOut2RunTime = structItem.ExternalOut2RunTime;
pItem.ExternalOut3Mode = structItem.ExternalOut3Mode;
pItem.ExternalOut3DelayTime = structItem.ExternalOut3DelayTime;
pItem.ExternalOut3RunTime = structItem.ExternalOut3RunTime;
pItem.ExternalOut4Mode = structItem.ExternalOut4Mode;
pItem.ExternalOut4DelayTime = structItem.ExternalOut4DelayTime;
pItem.ExternalOut4RunTime = structItem.ExternalOut4RunTime;
pItem.ExternalOut9Mode = structItem.ExternalOut9Mode;
pItem.ExternalOut9DelayTime = structItem.ExternalOut9DelayTime;
pItem.ExternalOut9RunTime = structItem.ExternalOut9RunTime;
pItem.ExternalOut10Mode = structItem.ExternalOut10Mode;
pItem.ExternalOut10DelayTime = structItem.ExternalOut10DelayTime;
pItem.ExternalOut10RunTime = structItem.ExternalOut10RunTime;
}
catch
{
DialogFormMessage myMsg = new DialogFormMessage(17, this.SystemConfig.Language);
myMsg.ShowDialog();
this.smartFileIO.Close();
}
this.smartFileIO.Close();
}
#endregion
#region UserGroupFile
private void CreateUserGroupFile()
{
@ -8313,6 +8504,10 @@ namespace ITC81DB_2.Forms
this.LoadSystemConfigurationFile2();
Thread.Sleep(50);
// SystemParameter3
this.LoadSystemParameter3File(ref this.CurrentSystemParameter3);
Thread.Sleep(50);
// Counter 파일 읽기
this.LoadCounterFile1(ref this.CurrentWeightData1, this.SystemConfig.ProductNumber - 1);
this.LoadCounterFile2(ref this.CurrentWeightData2, this.SystemConfig.ProductNumber - 1);

View File

@ -15,14 +15,16 @@ namespace ITC81DB_2
[MTAThread]
static void Main()
{
//try
//{
try
{
Application.Run(new FormMain());
//}
//catch (Exception ex)
//{
// System.IO.File.AppendText(@"SD Card\\Text.txt").Write(ex.ToString());
//}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
FormMain.Exception(ex);
}
}
}
}

View File

@ -14,13 +14,20 @@
2열 기본형 컨베어 계량기
*/
@ Ver 3.1.1 by CJY
- 2024.12.18
- Ver 3.1.0 Modify
- P9045 선별기2->외부출력9
- P9046 선별기1->선별기2, 선별기2->외부출력10
-> 기존 설정값 다시 클릭하여 설정해야 함
@ Ver 3.1.0 by CJY
- 2024.11.30
- Ver 3.0.1 Modify
- DataStore -> Define 추가
- 데이터집계 하한/기준/상한 비율 계산 시 TotalCount 기존 ExNG 수량 제외 -> 포함으로 변경
- 시리얼통신 -> COM1/COM3/COM4 화면 나눔
- 이더넷통신 추가
- 이더넷통신 추가 - 기존 system.cfg 파일 삭제해야함
@ Ver 3.0.1 by CJY
- 2024.5.17

Binary file not shown.

Binary file not shown.