@ Ver 12.1.0 by LSJ
- 2024.12.09 - Ver 12.0.0 Modify - Framework : SmartX Framework V3.2.4(update: 2021.01.20) - SerialDll 미사용 SmartSerialPort 사용 - 중량 표시 Reverse 사용 시, 피드백 데이터 버그 수정 데이터 수신 시 바꿔서 저장했는데, 전송할때 또 바꿔서 전송함. 화면 표시랑, 전송데이터랑 안맞음.master V12.1.0
parent
06d732ed50
commit
4d822fa6d1
|
@ -142,7 +142,7 @@ namespace INT69DC_7C.Forms
|
|||
}
|
||||
private void DefaultSetting()
|
||||
{
|
||||
this.labelDisplayVer.Text = "12.0.0";
|
||||
this.labelDisplayVer.Text = "12.1.0";
|
||||
if(this.ParentForm.SystemConfig.EquipmentMode == 7)
|
||||
this.labelTitleMainboardName.Text = "INT68M-2A";
|
||||
else
|
||||
|
@ -393,6 +393,8 @@ namespace INT69DC_7C.Forms
|
|||
{
|
||||
this.ParentForm.SystemConfig.CurrentForm = DataStore.FormStore.FormInformation;
|
||||
this.ParentForm.TransferDataStream(CommunicationCommand.Read, CommunicationID.MainBoard, CommunicationAddress._1500_ProgramVersion, "");
|
||||
|
||||
if (this.ParentForm.FlagDllSerial == true)
|
||||
SerialMgrComm.serialPort_GetVersion();
|
||||
|
||||
if (this.ParentForm.SystemConfig.IsLogin == true)
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
this.smartTCPMultiServer = new SmartX.SmartTCPMultiServer();
|
||||
this.timerTimeOutTransmission = new System.Windows.Forms.Timer();
|
||||
this.timerUserList = new System.Windows.Forms.Timer();
|
||||
this.smartSerialPortLink = new SmartX.SmartSerialPort();
|
||||
((System.ComponentModel.ISupportInitialize)(this.smartForm)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
@ -177,6 +178,27 @@
|
|||
this.timerUserList.Interval = 1000;
|
||||
this.timerUserList.Tick += new System.EventHandler(this.timerUserList_Tick);
|
||||
//
|
||||
// smartSerialPortLink
|
||||
//
|
||||
this.smartSerialPortLink.Baud_Rate = SmartX.SmartSerialPort.BAUDRATE._115200bps;
|
||||
this.smartSerialPortLink.ErrorCheckCodeType = SmartX.SmartSerialPort.ERRORCHECKCODETYPES.ASCIICODE;
|
||||
this.smartSerialPortLink.ErrorCheckMode = SmartX.SmartSerialPort.ERRORCHECK.NONE;
|
||||
this.smartSerialPortLink.ErrorCode_Location = SmartX.SmartSerialPort.ERRORCODELOCATION.HEADER;
|
||||
this.smartSerialPortLink.ETXCode = ((byte)(3));
|
||||
this.smartSerialPortLink.ETXCodes = null;
|
||||
this.smartSerialPortLink.FrameBufferSize = ((uint)(4096u));
|
||||
this.smartSerialPortLink.FrameSeparationType = SmartX.SmartSerialPort.FRAMESEPARATIONTYPES.STXANDETX;
|
||||
this.smartSerialPortLink.HeadErrorCodeOffset = 0;
|
||||
this.smartSerialPortLink.PortNo = SmartX.SmartSerialPort.COMPORTNO.COM2;
|
||||
this.smartSerialPortLink.ReadTimeout = -1;
|
||||
this.smartSerialPortLink.ReceiveDetect = SmartX.SmartSerialPort.RECEIVEDETECTTYPE.EVENT_QUEUE;
|
||||
this.smartSerialPortLink.ReceiveFrameDebugMode = false;
|
||||
this.smartSerialPortLink.RS485SoftwareDetection = false;
|
||||
this.smartSerialPortLink.STXCode = ((byte)(2));
|
||||
this.smartSerialPortLink.STXCodes = null;
|
||||
this.smartSerialPortLink.TailErrorCodeOffset = 0;
|
||||
this.smartSerialPortLink.OnReadQueueEvent += new SmartX.SmartSerialPort.ReceiveDataHandler(this.smartSerialPortLink_OnReadQueueEvent);
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
|
@ -212,5 +234,6 @@
|
|||
public SmartX.SmartTCPMultiServer smartTCPMultiServer;
|
||||
public System.Windows.Forms.Timer timerTimeOutTransmission;
|
||||
private System.Windows.Forms.Timer timerUserList;
|
||||
private SmartX.SmartSerialPort smartSerialPortLink;
|
||||
}
|
||||
}
|
|
@ -36,6 +36,8 @@ namespace INT69DC_7C.Forms
|
|||
private bool IsModbusCommonDataSend; // Modbus 공통 데이터 Start 시 한번 전송용
|
||||
public int FlagAutomaticLogoutWarningTime; //Part11 Auto Logout
|
||||
private string ComPortMainToLCD; // DllSerial Port
|
||||
public bool FlagDllSerial; // DllSerial 사용여부
|
||||
private string TransferNum; // 수신데이터 ID저장 (재전송 시 사용)
|
||||
|
||||
// OPC
|
||||
private static int ModbusTotalBytes = 232; // 전체 bytes
|
||||
|
@ -413,6 +415,7 @@ namespace INT69DC_7C.Forms
|
|||
this.BufferSmartUart = 1000000; // 1MB
|
||||
this.FlagThreadMessage1 = false;
|
||||
this.IsModbusCommonDataSend = false;
|
||||
this.TransferNum = "-";
|
||||
|
||||
this.PathLaunchFolder = "SD Card\\";
|
||||
this.PathSystemFileFolder = this.PathLaunchFolder + "SystemFile\\";
|
||||
|
@ -510,6 +513,11 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
this.CurrentAlarmTotalPassCnt = new Counter(this.SystemConfig.EquipmentColumns, this.SystemConfig.AlarmTotalPassCnt);
|
||||
|
||||
|
||||
// DllSerial 사용여부 설정
|
||||
this.FlagDllSerial = false;
|
||||
if (this.FlagDllSerial == true)
|
||||
{
|
||||
// SerialDll Initialize
|
||||
this.ComPortMainToLCD = "COM2:";
|
||||
SerialMgrComm.IntializeSerialManager();
|
||||
|
@ -517,6 +525,7 @@ namespace INT69DC_7C.Forms
|
|||
SerialMgrComm.SerialPortErrMessageReceive += this.SerialPort_ErrMessageReceive;
|
||||
SerialMgrComm.SerialPortGetVersionDataEvent += this.Serialport_GetVersionDataEvent;
|
||||
}
|
||||
}
|
||||
private bool UI_Invoke(ThreadStart invoker)
|
||||
{
|
||||
try
|
||||
|
@ -703,7 +712,13 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
try
|
||||
{
|
||||
if (this.FlagDllSerial == true)
|
||||
SerialMgrComm.serialPortOpen(this.ComPortMainToLCD, 115200, 0, 0, 8);
|
||||
else
|
||||
{
|
||||
if (this.smartSerialPortLink.IsOpen == false)
|
||||
this.smartSerialPortLink.Open();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
@ -723,7 +738,10 @@ namespace INT69DC_7C.Forms
|
|||
}
|
||||
public void CloseSmartUartLink()
|
||||
{
|
||||
if (this.FlagDllSerial == true)
|
||||
SerialMgrComm.serialPortClose(this.ComPortMainToLCD);
|
||||
else
|
||||
this.smartSerialPortLink.Close();
|
||||
}
|
||||
|
||||
private bool SizeCheck(string cmd, string strTemp)
|
||||
|
@ -884,7 +902,14 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
sb.Append(chkSum);
|
||||
|
||||
// Serial Write
|
||||
if (this.FlagDllSerial == true)
|
||||
SerialMgrComm.serialPortMessage(this.ComPortMainToLCD, sb.ToString());
|
||||
else
|
||||
{
|
||||
if (this.smartSerialPortLink.IsOpen == true)
|
||||
this.smartSerialPortLink.WriteFrame(sb.ToString(), SmartSerialPort.CODETYPES.ASCIICODE);
|
||||
}
|
||||
|
||||
// 통신 확인 로그
|
||||
if (this.IsCommunicationLogOpen == true)
|
||||
|
@ -931,7 +956,14 @@ namespace INT69DC_7C.Forms
|
|||
for (int i = 0; i < byteCollection.Count; i++)
|
||||
byteData[i] = byteCollection[i];
|
||||
|
||||
// Serial Write
|
||||
if (this.FlagDllSerial == true)
|
||||
SerialMgrComm.serialPortMessageByte(this.ComPortMainToLCD, byteData, byteData.Length);
|
||||
else
|
||||
{
|
||||
if (this.smartSerialPortLink.IsOpen == true)
|
||||
this.smartSerialPortLink.WriteFrame(byteData);
|
||||
}
|
||||
|
||||
// 통신 확인 로그
|
||||
if (this.IsCommunicationLogOpen == true)
|
||||
|
@ -962,7 +994,14 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
sb.Append(chkSum);
|
||||
|
||||
// Serial Write
|
||||
if (this.FlagDllSerial == true)
|
||||
SerialMgrComm.serialPortMessage(this.ComPortMainToLCD, sb.ToString());
|
||||
else
|
||||
{
|
||||
if (this.smartSerialPortLink.IsOpen == true)
|
||||
this.smartSerialPortLink.WriteFrame(sb.ToString(), SmartSerialPort.CODETYPES.ASCIICODE);
|
||||
}
|
||||
|
||||
// 통신 확인 로그
|
||||
if (this.IsCommunicationLogOpen == true)
|
||||
|
@ -998,6 +1037,46 @@ namespace INT69DC_7C.Forms
|
|||
{
|
||||
}
|
||||
}
|
||||
private void ReceiveData()
|
||||
{
|
||||
int ret = 0;
|
||||
string strTemp = "";
|
||||
byte[] readByte;
|
||||
|
||||
SmartSerialPort.FRAMEDATAREADSTATUS receiveDataState = SmartSerialPort.FRAMEDATAREADSTATUS.EMPTY;
|
||||
|
||||
receiveDataState = this.smartSerialPortLink.ReadQueue(out readByte);
|
||||
strTemp = Encoding.Default.GetString(readByte, 0, readByte.Length);
|
||||
|
||||
if ((receiveDataState == SmartSerialPort.FRAMEDATAREADSTATUS.EMPTY) || (receiveDataState == SmartSerialPort.FRAMEDATAREADSTATUS.FAILDATA))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
switch (strTemp[0])
|
||||
{
|
||||
case 'C':
|
||||
if ((ret = this.ReceiveCommandC(strTemp)) != 0)
|
||||
return;
|
||||
break;
|
||||
case 'P':
|
||||
if ((ret = this.ReceiveCommandP(strTemp)) != 0)
|
||||
return;
|
||||
break;
|
||||
case 'S':
|
||||
if ((ret = this.ReceiveCommandS(strTemp)) != 0)
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private int ReceiveCommandC(string strTemp)
|
||||
{
|
||||
|
@ -1169,6 +1248,7 @@ namespace INT69DC_7C.Forms
|
|||
{
|
||||
int ret = 0;
|
||||
string cmd = "", lane = "", receiveData = "";
|
||||
string transferNum = "";
|
||||
|
||||
// SIZE 확인
|
||||
if (this.SizeCheck("S", strTemp) == false)
|
||||
|
@ -1192,6 +1272,7 @@ namespace INT69DC_7C.Forms
|
|||
this.smartFileCommunicationLog.WriteString(string.Format("Receive ({0:yyyy-MM-dd HH:mm:ss}): {1}", DateTime.Now, strTemp));
|
||||
|
||||
cmd = strTemp.Substring(0, 3);
|
||||
transferNum = strTemp.Substring(3, 1);
|
||||
lane = strTemp.Substring(5, 1);
|
||||
receiveData = strTemp.Substring(10, strTemp.Length - 12);
|
||||
|
||||
|
@ -1202,6 +1283,11 @@ namespace INT69DC_7C.Forms
|
|||
return ret;
|
||||
break;
|
||||
case "SR0":
|
||||
if (this.TransferNum != transferNum)
|
||||
this.TransferNum = transferNum;
|
||||
else
|
||||
return ret = -1;
|
||||
|
||||
if ((ret = this.ReceiveCommandSR0(lane, receiveData)) != 0)
|
||||
return ret;
|
||||
break;
|
||||
|
@ -5062,6 +5148,7 @@ namespace INT69DC_7C.Forms
|
|||
{
|
||||
if (this.SystemConfig.IsWeightViewForward == true)
|
||||
{
|
||||
#region Forward
|
||||
DataStore.JudgmentStatus jStatus = DataStore.JudgmentStatus.Empty;
|
||||
bool result1 = false;
|
||||
|
||||
|
@ -5097,9 +5184,11 @@ namespace INT69DC_7C.Forms
|
|||
if (this.SystemConfig.EthernetOperationMode == 3)
|
||||
this.Update30000ModbusData(i);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
else
|
||||
{
|
||||
#region Reverse
|
||||
DataStore.JudgmentStatus jStatus = DataStore.JudgmentStatus.Empty;
|
||||
bool result1 = false;
|
||||
|
||||
|
@ -5119,8 +5208,8 @@ namespace INT69DC_7C.Forms
|
|||
{
|
||||
for (int i = 1; i <= this.SystemConfig.EquipmentColumns; i++)
|
||||
{
|
||||
if (this.CollJudgmentStatus[i] == DataStore.JudgmentStatus.Pass)
|
||||
this.CollJudgmentStatus[i] = DataStore.JudgmentStatus.EXNg;
|
||||
if (this.CollJudgmentStatus[this.SystemConfig.EquipmentColumns - i] == DataStore.JudgmentStatus.Pass)
|
||||
this.CollJudgmentStatus[this.SystemConfig.EquipmentColumns - i] = DataStore.JudgmentStatus.EXNg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5135,6 +5224,7 @@ namespace INT69DC_7C.Forms
|
|||
if (this.SystemConfig.EthernetOperationMode == 3)
|
||||
this.Update30000ModbusData(this.CollectionWeightData.Count - i);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest)
|
||||
|
@ -7970,8 +8060,6 @@ namespace INT69DC_7C.Forms
|
|||
sb.Append(string.Format("IN{0:D3}", system.EquipmentID));
|
||||
sb.Append(string.Format("{0:D4}", system.ProductNumber));
|
||||
|
||||
if (system.IsWeightViewForward == true)
|
||||
{
|
||||
for (int i = 0; i < system.EquipmentColumns; i++)
|
||||
{
|
||||
if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
|
@ -7987,25 +8075,6 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 1; i <= system.EquipmentColumns; i++)
|
||||
{
|
||||
if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Pass)
|
||||
sb.Append("P");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Over)
|
||||
sb.Append("O");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Double)
|
||||
sb.Append("D");
|
||||
else
|
||||
sb.Append("E");
|
||||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[datas.Count - i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
@ -8016,11 +8085,9 @@ namespace INT69DC_7C.Forms
|
|||
sb.Append(string.Format("IN{0:D3}", system.EquipmentID));
|
||||
sb.Append(string.Format("{0:D4}", system.ProductNumber));
|
||||
|
||||
if (system.IsWeightViewForward == true)
|
||||
{
|
||||
for (int i = 0; i < system.EquipmentColumns; i++)
|
||||
{
|
||||
if (this.SystemConfig.EquipmentMode == 2)
|
||||
if (system.EquipmentMode == 2)
|
||||
{
|
||||
if (datas[i].IsUpdate == true)
|
||||
{
|
||||
|
@ -8054,46 +8121,6 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 1; i <= system.EquipmentColumns; i++)
|
||||
{
|
||||
if (this.SystemConfig.EquipmentMode == 2)
|
||||
{
|
||||
if (datas[datas.Count - i].IsUpdate == true)
|
||||
{
|
||||
if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Pass)
|
||||
sb.Append("P");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Over)
|
||||
sb.Append("O");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Double)
|
||||
sb.Append("D");
|
||||
else
|
||||
sb.Append("E");
|
||||
}
|
||||
else
|
||||
sb.Append("E");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Pass)
|
||||
sb.Append("P");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Over)
|
||||
sb.Append("O");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Double)
|
||||
sb.Append("D");
|
||||
else
|
||||
sb.Append("E");
|
||||
}
|
||||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[datas.Count - i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
@ -8147,12 +8174,9 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
sb.Append(string.Format("IN{0:D3}", system.EquipmentID));
|
||||
sb.Append(string.Format("{0:D4}", system.ProductNumber));
|
||||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.StringToDecimalPlaces(pItem.PassRange, system.DecimalPlaces)));
|
||||
|
||||
if (this.SystemConfig.IsWeightViewForward == true)
|
||||
{
|
||||
for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++)
|
||||
for (int i = 0; i < system.EquipmentColumns; i++)
|
||||
{
|
||||
if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
|
@ -8167,25 +8191,6 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 1; i <= this.SystemConfig.EquipmentColumns; i++)
|
||||
{
|
||||
if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Pass)
|
||||
sb.Append("P");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Over)
|
||||
sb.Append("O");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Double)
|
||||
sb.Append("D");
|
||||
else
|
||||
sb.Append("E");
|
||||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[datas.Count - i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
@ -8195,14 +8200,11 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
sb.Append(string.Format("IN{0:D3}", system.EquipmentID));
|
||||
sb.Append(string.Format("{0:D4}", system.ProductNumber));
|
||||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.StringToDecimalPlaces(pItem.PassRange, system.DecimalPlaces)));
|
||||
|
||||
if (this.SystemConfig.IsWeightViewForward == true)
|
||||
for (int i = 0; i < system.EquipmentColumns; i++)
|
||||
{
|
||||
for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++)
|
||||
{
|
||||
if (this.SystemConfig.EquipmentMode == 2)
|
||||
if (system.EquipmentMode == 2)
|
||||
{
|
||||
if (datas[i].IsUpdate == true)
|
||||
{
|
||||
|
@ -8236,46 +8238,6 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 1; i <= this.SystemConfig.EquipmentColumns; i++)
|
||||
{
|
||||
if (this.SystemConfig.EquipmentMode == 2)
|
||||
{
|
||||
if (datas[datas.Count - i].IsUpdate == true)
|
||||
{
|
||||
if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Pass)
|
||||
sb.Append("P");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Over)
|
||||
sb.Append("O");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Double)
|
||||
sb.Append("D");
|
||||
else
|
||||
sb.Append("E");
|
||||
}
|
||||
else
|
||||
sb.Append("E");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Pass)
|
||||
sb.Append("P");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Over)
|
||||
sb.Append("O");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Double)
|
||||
sb.Append("D");
|
||||
else
|
||||
sb.Append("E");
|
||||
}
|
||||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[datas.Count - i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
@ -8337,9 +8299,7 @@ namespace INT69DC_7C.Forms
|
|||
sb.Append(Helper.StringBlankFillDigits6(Helper.StringToDecimalPlaces(pItem.OverRange, system.DecimalPlaces)));
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.StringToDecimalPlaces(pItem.TareRange, system.DecimalPlaces)));
|
||||
|
||||
if (this.SystemConfig.IsWeightViewForward == true)
|
||||
{
|
||||
for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++)
|
||||
for (int i = 0; i < system.EquipmentColumns; i++)
|
||||
{
|
||||
if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
|
@ -8354,25 +8314,6 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 1; i <= this.SystemConfig.EquipmentColumns; i++)
|
||||
{
|
||||
if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Pass)
|
||||
sb.Append("P");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Over)
|
||||
sb.Append("O");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Double)
|
||||
sb.Append("D");
|
||||
else
|
||||
sb.Append("E");
|
||||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[datas.Count - i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
@ -8388,11 +8329,9 @@ namespace INT69DC_7C.Forms
|
|||
sb.Append(Helper.StringBlankFillDigits6(Helper.StringToDecimalPlaces(pItem.OverRange, system.DecimalPlaces)));
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.StringToDecimalPlaces(pItem.TareRange, system.DecimalPlaces)));
|
||||
|
||||
if (this.SystemConfig.IsWeightViewForward == true)
|
||||
for (int i = 0; i < system.EquipmentColumns; i++)
|
||||
{
|
||||
for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++)
|
||||
{
|
||||
if (this.SystemConfig.EquipmentMode == 2)
|
||||
if (system.EquipmentMode == 2)
|
||||
{
|
||||
if (datas[i].IsUpdate == true)
|
||||
{
|
||||
|
@ -8426,46 +8365,6 @@ namespace INT69DC_7C.Forms
|
|||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 1; i <= this.SystemConfig.EquipmentColumns; i++)
|
||||
{
|
||||
if (this.SystemConfig.EquipmentMode == 2)
|
||||
{
|
||||
if (datas[datas.Count - i].IsUpdate == true)
|
||||
{
|
||||
if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Pass)
|
||||
sb.Append("P");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Over)
|
||||
sb.Append("O");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Double)
|
||||
sb.Append("D");
|
||||
else
|
||||
sb.Append("E");
|
||||
}
|
||||
else
|
||||
sb.Append("E");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under)
|
||||
sb.Append("U");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Pass)
|
||||
sb.Append("P");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Over)
|
||||
sb.Append("O");
|
||||
else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Double)
|
||||
sb.Append("D");
|
||||
else
|
||||
sb.Append("E");
|
||||
}
|
||||
|
||||
sb.Append(Helper.StringBlankFillDigits6(Helper.DoubleToString(datas[datas.Count - i].Weight, system.DecimalPlaces)));
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
@ -11758,6 +11657,20 @@ namespace INT69DC_7C.Forms
|
|||
this.timerTimeoutOPT4_OnlineCheck.Enabled = false;
|
||||
this.ChildFormMainDisplay.UpdateFeedbackBoardStatusDisplay(false);
|
||||
}
|
||||
private void timerTimeOutTransmission_Tick(object sender, EventArgs e)
|
||||
{
|
||||
this.timerTimeOutTransmission.Enabled = false;
|
||||
|
||||
this.IntegratedTransmission(this.CollectionWeightData);
|
||||
|
||||
foreach (WeightData data in this.CollectionWeightData)
|
||||
data.IsUpdate = false;
|
||||
}
|
||||
private void timerUserList_Tick(object sender, EventArgs e)
|
||||
{
|
||||
this.timerUserList.Enabled = false;
|
||||
UserManager.UserManager_GetUserListName();
|
||||
}
|
||||
|
||||
private void smartThread_UIThreadFunction(ThreadArgs args)
|
||||
{
|
||||
|
@ -11922,47 +11835,21 @@ namespace INT69DC_7C.Forms
|
|||
}
|
||||
}
|
||||
|
||||
private void smartTimer1_Tick(object sender, EventArgs e)
|
||||
private void smartSerialPortLink_OnReadQueueEvent()
|
||||
{
|
||||
this.smartTimer1.Stop();
|
||||
this.ReceiveData();
|
||||
|
||||
this.DefaultSetting2();
|
||||
this.Update30000ModbusData();
|
||||
for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++)
|
||||
this.Update30000ModbusData(i);
|
||||
|
||||
this.smartForm.Show((int)DataStore.FormStore.FormMainDisplay);
|
||||
|
||||
// 통신 OPEN
|
||||
this.OpenSmartUartLink();
|
||||
|
||||
// Serial3 통신 Open
|
||||
this.UartCom3Open();
|
||||
|
||||
Thread.Sleep(100);
|
||||
// 초기 파라미터 전송
|
||||
this.TransferDataStream(CommunicationCommand.Read, CommunicationID.MainBoard, CommunicationAddress._6901_ParameterRead, "");
|
||||
|
||||
if (this.SystemConfig.IsOptFeedbackBoardUse == true && this.SystemConfig.Serial3Mode == 4)
|
||||
this.UartCom3FeedbackBoardBooting();
|
||||
|
||||
// UserManager_GetUserListName
|
||||
this.timerUserList.Enabled = true;
|
||||
// 통신 확인
|
||||
if (this.CommunicationCheckCount / 3 == 1)
|
||||
{
|
||||
this.ChildFormMainDisplay.pictureBoxCommunicationStatus.Visible = true;
|
||||
this.CommunicationCheckCount = 0;
|
||||
}
|
||||
|
||||
private void timerTimeOutTransmission_Tick(object sender, EventArgs e)
|
||||
else
|
||||
{
|
||||
this.timerTimeOutTransmission.Enabled = false;
|
||||
|
||||
this.IntegratedTransmission(this.CollectionWeightData);
|
||||
|
||||
foreach (WeightData data in this.CollectionWeightData)
|
||||
data.IsUpdate = false;
|
||||
this.ChildFormMainDisplay.pictureBoxCommunicationStatus.Visible = false;
|
||||
this.CommunicationCheckCount += 1;
|
||||
}
|
||||
private void timerUserList_Tick(object sender, EventArgs e)
|
||||
{
|
||||
this.timerUserList.Enabled = false;
|
||||
UserManager.UserManager_GetUserListName();
|
||||
}
|
||||
|
||||
#region DLL_SerialportEvent
|
||||
|
@ -12238,6 +12125,34 @@ namespace INT69DC_7C.Forms
|
|||
this.ChildFormInformation.UpdatePart11AesEncryptionVersionDisplay(data.ToString());
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void smartTimer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
this.smartTimer1.Stop();
|
||||
|
||||
this.DefaultSetting2();
|
||||
this.Update30000ModbusData();
|
||||
for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++)
|
||||
this.Update30000ModbusData(i);
|
||||
|
||||
this.smartForm.Show((int)DataStore.FormStore.FormMainDisplay);
|
||||
|
||||
// 통신 OPEN
|
||||
this.OpenSmartUartLink();
|
||||
|
||||
// Serial3 통신 Open
|
||||
this.UartCom3Open();
|
||||
|
||||
Thread.Sleep(100);
|
||||
// 초기 파라미터 전송
|
||||
this.TransferDataStream(CommunicationCommand.Read, CommunicationID.MainBoard, CommunicationAddress._6901_ParameterRead, "");
|
||||
|
||||
if (this.SystemConfig.IsOptFeedbackBoardUse == true && this.SystemConfig.Serial3Mode == 4)
|
||||
this.UartCom3FeedbackBoardBooting();
|
||||
|
||||
// UserManager_GetUserListName
|
||||
this.timerUserList.Enabled = true;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -171,6 +171,9 @@
|
|||
<metadata name="timerUserList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 93</value>
|
||||
</metadata>
|
||||
<metadata name="smartSerialPortLink.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>342, 93</value>
|
||||
</metadata>
|
||||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve">
|
||||
<value>WEBPAD</value>
|
||||
</metadata>
|
||||
|
|
|
@ -21,6 +21,16 @@
|
|||
멀티형 8,10,12열 컨베어/스틱 계량기
|
||||
*/
|
||||
|
||||
@ Ver 12.1.0 by LSJ
|
||||
- 2024.12.09
|
||||
- Ver 12.0.0 Modify
|
||||
- Framework : SmartX Framework V3.2.4(update: 2021.01.20)
|
||||
- SerialDll 미사용
|
||||
SmartSerialPort 사용
|
||||
- 중량 표시 Reverse 사용 시, 피드백 데이터 버그 수정
|
||||
데이터 수신 시 바꿔서 저장했는데, 전송할때 또 바꿔서 전송함.
|
||||
화면 표시랑, 전송데이터랑 안맞음.
|
||||
|
||||
@ Ver 12.0.0 by LSJ
|
||||
- 2024.10.29
|
||||
- Ver 11.4.5 Modify
|
||||
|
|
Loading…
Reference in New Issue