using System;
using System.Linq;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using InModbus;
namespace ITC81DB
{
public class DataStore
{
#region Enum
public enum EquipmentStatus
{
Stop = 0,
Start = 1,
}
public enum DisplayMode
{
Normal,
Menu,
Calibration,
SystemSetting,
IOTest,
Bypass,
EquipmentTest,
SorterTest,
}
public enum DisplayStore
{
MainDisplay,
BasicDataBackup,
BasicDataStatistics,
BasicHelp,
BasicProduct,
BasicRandomMode,
BasicTime,
ConfiCountingOutput,
ConfiSerial,
ConfiEthernet,
ConfiHelp,
ConfiOption,
ConfiOptionBoard,
ConfiSerialSeparate,
ConfiOptionBoard1,
ConfiOptionBoard2,
EquipHelp,
EquipInitialize,
EquipUpdate,
EquipFuctionSetting,
EquipUser,
EquipTest,
EquipEngineer,
EquipSystemLog,
InforAS,
InforHelp,
InforSystem,
InforSystem2,
InforSystem3,
SystemAutoZero,
SystemCalibration,
SystemHelp,
SystemIOTest,
SystemJudgmentManual,
SystemJudgmentUpdown,
SystemExternalOutput,
SystemSorterSetting,
SystemJudgmentAuto,
SystemJudgmentSelect,
SystemExternalInput,
}
public enum FormStore
{
FormNone = 0,
FormMainDisplay,
FormMenu,
ControlConversion,
}
public enum MainDisplayStore
{
//DisplayStop,
BarGraph,
LineGraph,
List,
ListForRFID,
DataStat,
SpotCheck,
SubMenu,
Feedback,
AverageTracking,
Modbus,
}
public enum MenuSide
{
Basic,
Configuration,
System,
Equipment,
Information,
HiddenMenu,
}
public enum MenuBottomBasic
{
DataBackup,
DataStatistics,
Help,
Product,
Time,
}
public enum MenuBottomConfiguration
{
CountingOutput,
SerialCOM1,
SerialCOM3,
SerialCOM4,
Ethernet,
Help,
Option,
OptionBoard,
}
public enum MenuBottomEquipment
{
FunctionSetting,
Help,
Initialize,
Test,
Update,
User,
Engineer,
SystemLog,
}
public enum MenuBottomSystem
{
AutoZero,
Calibration,
ExternalOutput,
Help,
IOTest,
JudgmentSetting,
SorterSetting,
ExternalInput,
}
public enum MenuBottomInformation
{
Help,
SystemInformation,
AS,
SystemInformation2,
SystemInformation3,
}
public enum LanguageID
{
Korean,
English,
German,
Chinese,
Russian,
Spanish,
Czech,
}
public enum JudgmentStatus
{
Empty,
Under,
Pass,
Over,
Double,
Metal,
ExNg,
ExNg1, // 외부입력 PIN5
ExNg2, // 외부입력 Photo B
LengthError, // 제품길이 이상
}
public enum WeightStatus
{
Empty,
WeightChange,
WeightZero,
CalNomal,
CalBalans,
CalStandby,
CalFinish,
CalError,
}
public enum UserGroup
{
None = 0,
Level1Operator,
Level2Engineer,
Level3Manager,
Level4Developer,
NotLogin,
LogOut,
}
public enum ResponseData
{
NAK = 0,
ACK = 1,
}
public enum UpdateCheck
{
Fail,
Success,
NotUsbMomery,
NotUpdateFolder,
NotFile,
}
public enum WeightInputMode
{
Weight,
Deviation,
}
public enum Step2
{
Step1,
Step2,
}
public enum Step3
{
Step1,
Step2,
Step3,
}
public enum Step4
{
Step1,
Step2,
Step3,
Step4,
}
public enum Step5
{
Step1 = 1,
Step2 = 2,
Step3 = 3,
Step4 = 4,
Step5 = 5,
}
public enum SeparateType
{
STXANDETX,
ETXONLY,
NONEFRAME_READTIMEOUT,
STXONLY,
}
public enum EnumFileUserPassword
{
f0_Level1 = 0,
f1_Level2 = 1,
f2_Level3 = 2,
}
public enum EnumFileUserGroup
{
f0_Level1 = 0,
f1_Level2 = 1,
f2_Level3 = 2,
f3_NotLogin = 3,
}
public enum JudgmentResult
{
None,
OK,
NG,
STOP, // 정지
Timeout, // 타임아웃
}
public enum CharValue
{
ENQ, // 0x05
ACK, // 0x06
NAK, // 0x15
Space, // 0x20
}
public enum SerialCOM
{
COM1 = 0,
COM3 = 1,
COM4 = 2,
}
public enum SerialMode
{
f0_None = 0,
f1_STD1,
f2_Remote,
f3_Printer,
f4_imaje_9410_OPT1,
f5_imaje_9028_OPT1 = 5,
f6_OPT0,
f7_imaje_9410_OPT2,
f8_imaje_9028_OPT2,
f9_Hitachi,
f10_MACSA_Laser = 10,
f11_Markoprint,
f12_alphaJET,
f13_Marking_VJ1510,
f14_OPT1,
f15_OPT2 = 15,
f16_OPC,
f17_OPT3,
f18_HP_200,
f19_SmartJet,
f20_imaje_9410_OPT3 = 20,
f21_Impinj_Speedway_R420 = 21, // RFID
f22_Modbus_RTU,
f23_STD2,
f24_MULTi_JET,
f25_DJ_VIDEOJET,
f26_LINX8830,
f27_MYJET,
f28_OPT4,
}
public enum EthernetMode
{
f0_None = 0,
f1_STD1,
f2_Remote,
f3_Printer,
f4_imaje_9410_OPT1,
f5_imaje_9028_OPT1 = 5,
f6_OPT0,
f7_imaje_9410_OPT2,
f8_imaje_9028_OPT2,
f9_Hitachi,
f10_MACSA_Laser = 10,
f11_Markoprint,
f12_alphaJET,
f13_Marking_VJ1510,
f14_OPT1,
f15_OPT2 = 15,
f16_OPC,
f17_OPT3,
f18_HP_200,
f19_SmartJet,
f20_imaje_9410_OPT3 = 20,
f21_Impinj_Speedway_R420 = 21, // RFID
f22_Modbus_TCP,
f23_STD2,
f24_MULTi_JET,
f25_DJ_VIDEOJET,
f26_LINX8830,
f27_MYJET,
f28_OPT4,
}
public enum ExternalInputMode
{
IN0_None,
IN1_Metal,
IN2_START,
IN3_STOP,
IN4_DischargeSorterA,
IN5_Air = 5,
IN6_Door,
IN7_Stopper,
IN8_Windproof,
IN9_ExternalOperation,
IN10_DispensorEntry1 = 10,
IN11_DispensorEntry2,
IN12_StackUp,
IN13_ExNG1,
IN14_ExNG2,
IN15_ExInputCheck,
IN16_DischargeSorterB,
}
public enum ExternalOutputMode
{
OUT0_None,
OUT1_Over,
OUT2_Under,
OUT3_NG,
OUT4_Pass,
OUT5_Run,
OUT6_Count,
OUT7_CountingOutput1,
OUT8_CountingOutput2,
OUT9_ExNG,
OUT10_LatchControl = 10,
OUT11_Stopper,
OUT12_ExternalInput,
OUT13_Alarm_Level,
OUT14_Alarm_Pulse,
}
public enum ModbusFunction
{
_04_ReadInputRegister,
_16_WriteMultipleRegister,
_03_ReadHoldingRegister,
}
#endregion
}
#region AlarmList
public class AlarmList
{
#region Field
private bool m_Flag;
private bool m_IsLoadCellError;
private bool m_IsEntrySensorError;
private bool m_IsInverterError;
private bool m_IsPressureSensingError;
private bool m_IsEmergencyStop;
private bool m_IsDoorInterlock;
private bool m_IsSorterAError;
private bool m_IsStackUpSensorError;
private bool m_IsWindProofError;
private bool m_IsSorterBError;
private bool m_IsEntryNotDetected;
#endregion
#region Constructor
public AlarmList()
{
this.Initialize();
}
#endregion
#region Property
public bool Flag
{
get { return this.m_Flag; }
set { this.m_Flag = value; }
}
public bool IsLoadCellError
{
get { return this.m_IsLoadCellError; }
set { this.m_IsLoadCellError = value; }
}
public bool IsEntrySensorError
{
get { return this.m_IsEntrySensorError; }
set { this.m_IsEntrySensorError = value; }
}
public bool IsInverterError
{
get { return this.m_IsInverterError; }
set { this.m_IsInverterError = value; }
}
public bool IsPressureSensingError
{
get { return this.m_IsPressureSensingError; }
set { this.m_IsPressureSensingError = value; }
}
public bool IsEmergencyStop
{
get { return this.m_IsEmergencyStop; }
set { this.m_IsEmergencyStop = value; }
}
public bool IsDoorInterlock
{
get { return this.m_IsDoorInterlock; }
set { this.m_IsDoorInterlock = value; }
}
public bool IsSorterAError
{
get { return this.m_IsSorterAError; }
set { this.m_IsSorterAError = value; }
}
public bool IsStackUpSensorError
{
get { return this.m_IsStackUpSensorError; }
set { this.m_IsStackUpSensorError = value; }
}
public bool IsWindProofError
{
get { return this.m_IsWindProofError; }
set { this.m_IsWindProofError = value; }
}
public bool IsSorterBError
{
get { return this.m_IsSorterBError; }
set { this.m_IsSorterBError = value; }
}
public bool IsEntryNotDetected
{
get { return this.m_IsEntryNotDetected; }
set { this.m_IsEntryNotDetected = value; }
}
#endregion
#region Method
private void Initialize()
{
this.Flag = false;
this.IsLoadCellError = false;
this.IsEntrySensorError = false;
this.IsInverterError = false;
this.IsPressureSensingError = false;
this.IsEmergencyStop = false;
this.IsDoorInterlock = false;
this.IsSorterAError = false;
this.IsStackUpSensorError = false;
this.IsWindProofError = false;
this.IsSorterBError = false;
this.IsEntryNotDetected = false;
}
public bool IsAlarmOccured(string alarm)
{
bool occur = false;
if (alarm != "00000000")
occur = true;
return occur;
}
public void SetAlarm(string alarm)
{
string sValue1 = "", sValue2 = "", sValue3 = "", sValue4 = "", sValue5 = "", sValue6 = "", sValue7 = "", sValue8 = "";
this.Flag = false;
if (alarm.Length != 8)
return;
sValue1 = Convert.ToString(Convert.ToInt16(alarm.Substring(0, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue2 = Convert.ToString(Convert.ToInt16(alarm.Substring(1, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue3 = Convert.ToString(Convert.ToInt16(alarm.Substring(2, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue4 = Convert.ToString(Convert.ToInt16(alarm.Substring(3, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue5 = Convert.ToString(Convert.ToInt16(alarm.Substring(4, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue6 = Convert.ToString(Convert.ToInt16(alarm.Substring(5, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue7 = Convert.ToString(Convert.ToInt16(alarm.Substring(6, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
sValue8 = Convert.ToString(Convert.ToInt16(alarm.Substring(7, 1), 16), 2).PadLeft((4 <= 1) ? 1 : 4, '0');
// 알람 20-
if (sValue5[0] == '0')
{ }
else
{ }
// 알람 19-
if (sValue5[1] == '0')
{ }
else
{ }
// 알람 18-제품진입 미감지
if (sValue5[2] == '0')
this.IsEntryNotDetected = false;
else
{
this.IsEntryNotDetected = true;
this.Flag = true;
}
// 알람 17-사용X
if (sValue5[3] == '0')
{ }
else
{ }
// 알람 16-
if (sValue4[0] == '0')
{ }
else
{ }
// 알람 15-
if (sValue4[1] == '0')
{ }
else
{ }
// 알람 14-배출센서 B
if (sValue4[2] == '0')
this.IsSorterBError = false;
else
{
this.IsSorterBError = true;
this.Flag = true;
}
// 알람 13-방풍커버열림
if (sValue4[3] == '0')
this.IsWindProofError = false;
else
{
this.IsWindProofError = true;
this.Flag = true;
}
// 알람 12-서보알람토크
if (sValue3[0] == '0')
{ }
else
{ }
// 알람 11-통신에러
if (sValue3[1] == '0')
{ }
else
{ }
// 알람 10-서보알람
if (sValue3[2] == '0')
{ }
else
{ }
// 알람 9-인버터알람
if (sValue3[3] == '0')
this.IsInverterError = false;
else
{
this.IsInverterError = true;
this.Flag = true;
}
// 알람 8-비상정지
if (sValue2[0] == '0')
this.IsEmergencyStop = false;
else
{
this.IsEmergencyStop = true;
this.Flag = true;
}
// 알람 7-리젝터알람(배출센서 A)
if (sValue2[1] == '0')
this.IsSorterAError = false;
else
{
this.IsSorterAError = true;
this.Flag = true;
}
// 알람 6-적체센서
if (sValue2[2] == '0')
this.IsStackUpSensorError = false;
else
{
this.IsStackUpSensorError = true;
this.Flag = true;
}
// 알람 5-입력센서2(넘어짐)
if (sValue2[3] == '0')
{ }
else
{ }
// 알람 4-도어알람
if (sValue1[0] == '0')
this.IsDoorInterlock = false;
else
{
this.IsDoorInterlock = true;
this.Flag = true;
}
// 알람 3-공압에러
if (sValue1[1] == '0')
this.IsPressureSensingError = false;
else
{
this.IsPressureSensingError = true;
this.Flag = true;
}
// 알람 2-셀 에러
if (sValue1[2] == '0')
this.IsLoadCellError = false;
else
{
this.IsLoadCellError = true;
this.Flag = true;
}
// 알람 1-입력센서 에러
if (sValue1[3] == '0')
this.IsEntrySensorError = false;
else
{
this.IsEntrySensorError = true;
this.Flag = true;
}
}
#endregion
}
#endregion
#region SerialData
public class SerialData
{
public static readonly char STX = Convert.ToChar(0x02);
public static readonly char ETX = Convert.ToChar(0x03);
public static readonly char ETXs1 = Convert.ToChar(0x0D);
public static readonly char ETXs2 = Convert.ToChar(0x0A);
public static readonly char[] CharSaperate = { (char)0x0D, (char)0x0A };
}
#endregion
#region CommunicationCommand
public class CommunicationCommand
{
// 운전데이터 Respone
public static readonly string StartDataCMD = "Sr0";
// 불량알람(레벨)
public static readonly string AlarmNgLevel = "Caa00";
// 불량알람 해지
public static readonly string AlarmNgClear = "CAA00";
// 불량알람(펄스)
public static readonly string AlarmPulse = "Cac00";
// 부저ON(부저ON시간과 연동)
public static readonly string BuzzerOn = "Cad00";
// 부저ON(연속)
public static readonly string BuzzerOnContinuousEnable = "Cae00";
// 외부출력ON(연속)
public static readonly string ExternalOutputContinuousEnable = "Cai00";
// 부저해지
public static readonly string BuzzerOnContinuousDisable = "CAE00";
// 선별기알람해지
public static readonly string AlarmNgClearSorter = "CA700";
// 카운팅출력1(펄스)
public static readonly string CountingOutput1Pulse = "Caf00";
// 카운팅출력2(펄스)
public static readonly string CountingOutput2Pulse = "Cag00";
// 램프ON(연속, 적색/황색 점등)
public static readonly string LampOnContinuousEnable = "Cah00";
// 램프해지
public static readonly string LampOnContinuousDisable = "CAH00";
// 외부출력 해지
public static readonly string ExternalOutputContinuousDisable = "CAI00";
// 중량조정모드
public static readonly string ModeCalibration = "Csc00";
// 노멀모드
public static readonly string ModeNormal = "Csn00";
// 메뉴 모드
public static readonly string ModeMenu = "Csm00";
// 판정설정모드
public static readonly string ModeJudgment = "Csg00";
// IO 테스트모드
public static readonly string ModeIOTest = "Cst00";
// 바이패스
public static readonly string ModeBypass = "Csb00";
// 장비 테스트모드
public static readonly string ModeEquipmentTest = "Csy00";
// 선별기 테스트모드
public static readonly string ModeRejectorTest = "Csr00";
// 중량조정 - 분동
public static readonly string CalibrationBalance = "Ccb00";
// 중량조정 - 시작
public static readonly string CalibrationStart = "Ccs00";
// 중량조정 - 취소
public static readonly string CalibrationCancel = "Ccx00";
// 중량보정 - 한자리올림
public static readonly string CalibrationUp = "Ccu00";
// 중량보정 - 한자리내림
public static readonly string CalibrationDown = "Ccd00";
// 파라미터 쓰기
public static readonly string Write = "Pw000";
// 파라미터 읽기
public static readonly string Read = "Pr000";
// Bypass To Motor
public static readonly string BypassToMotor = "Pb000";
// IO테스트 - OUT
public static readonly string IOTest = "Pt000";
// 임펠러 모터 - 정회전
public static readonly string ImpellerMotorForward = "Cmc00";
// 임펠러 모터 - 역회전
public static readonly string ImpellerMotorReverse = "Cmr00";
// 모터 - 원점초기화
public static readonly string MotorOrigin = "Cmo00";
// 모터 - Step
public static readonly string MotorStep = "Cms00";
// 업다운 - 다운
public static readonly string MotorDown = "Cmd00";
// 업다운 - 업
public static readonly string MotorUp = "Cmu00";
// 모터 - 업2
public static readonly string MotorUp2 = "Cmp00";
// Cut 신호
public static readonly string CutInpupt = "Cbc00";
// 공장초기화
public static readonly string Initialization = "Cbi00";
// 외부출력(Pulse)
public static readonly string ExternalOutput = "Cbd00";
// 운전
public static readonly string Start = "Cbs00";
// 정지
public static readonly string Stop = "Cbt00";
// 영점
public static readonly string Zero = "Cbz00";
// 소거
public static readonly string Clear = "Cbe00";
// Output 제어
public static readonly string Output = "Cbd00";
// ACK
public static readonly string ACK = "ACK";
// NAK
public static readonly string NAK = "NAK";
// 운전중 중량
public static readonly string RunWeightData = "Sr";
// 카운팅출력 - 통신에러
public static readonly string CountingOutputClearCommunicationError = "Cra00";
// 기타NG
public static readonly string JudgmentExternalNG = "Cja00";
// 판정 - bypass 1회
public static readonly string BypassOnce = "Cjb00";
// 판정 - byNG 1회
public static readonly string ByNGOnce = "Cjc00";
// 판정 - bypass 연속 OFF
public static readonly string BypassOFF = "Cjd00";
// 판정 - bypass 연속 ON
public static readonly string BypassON = "Cjd01";
// 판정 - byNG 연속 OFF
public static readonly string ByNGOFF = "Cje00";
// 판정 - byNG 연속 ON
public static readonly string ByNGON = "Cje01";
}
public class CommunicationID
{
public static readonly string MainBoard = "0";
public static readonly string SubBoard1 = "A";
public static readonly string SubBoard2 = "B";
public static readonly string SubBoard3 = "C";
public static readonly string SubBoard4 = "D";
public static readonly string SubBoard5 = "E";
public static readonly string SubBoard6 = "F";
public static readonly string SubBoard7 = "G";
public static readonly string SubBoard8 = "H";
public static readonly string SubBoard9 = "I";
public static readonly string SubBoard10 = "J";
public static readonly string SubBoard11 = "K";
public static readonly string SubBoard12 = "L";
public static readonly string SubBoardAll = "Z";
}
public class CommunicationAddress
{
// Address None
public static readonly string None = "0000";
// 장비타입
public static readonly string EquipmentType = "1002";
// 임펠러 모터 - 회전각도
public static readonly string ImpellerMotorAngle = "1101";
// 임펠러 모터 - 통신속도
public static readonly string ImpellerMotorBaudrate = "1102";
// 임펠러 모터 - 회전방향
public static readonly string ImpellerMotorDirection = "1103";
// 바이패스
public static readonly string Bypass = "1201";
// 정지계량 사용 여부
public static readonly string IsStopWeighing = "1401";
// OPT(옵션보드) 사용
public static readonly string OptionBoard = "1402";
// 외부운전 사용 여부
public static readonly string IsExternalOperation = "1403";
// 초기구동 사용 여부
public static readonly string IsInitialDrive = "1404";
// 공기압감지 사용 여부
public static readonly string IsPressureSensing = "1405";
// 적체센서 사용 여부
public static readonly string IsStackSensing = "1406";
// 선별부 동작감지 사용 여부
public static readonly string IsSorterDetecting = "1407";
// 진입 스토퍼 사용 여부
public static readonly string IsEntryStopper = "1408";
// 품번선별 기능 사용 여부
public static readonly string IsSortByProductNo = "1409";
// 인버터 선택(미쯔비시, LS산전)
public static readonly string Inverter = "1410";
// PI2
public static readonly string PI2 = "1421";
// PI3
public static readonly string PI3 = "1422";
// PI4
public static readonly string PI4 = "1423";
// PI5
public static readonly string PI5 = "1424";
// PI6
public static readonly string PI6 = "1425";
// PI7
public static readonly string PI7 = "1426";
// PI8
public static readonly string PI8 = "1427";
// 메인보드1 버전 읽기
public static readonly string ProgramVersion = "1501";
// 품목설정 - 품번
public static readonly string ProductNumber = "2001";
// 품목설정 - 하한 설정값
public static readonly string UnderRange = "2002";
// 품목설정 - 기준 설정값
public static readonly string PassRange = "2003";
// 품목설정 - 상한 설정값
public static readonly string OverRange = "2004";
// 품목설정 - 용기 설정값
public static readonly string TareRange = "2005";
// 품목설정 - 센서검출시간
public static readonly string SensingTime = "2020";
// 중량조정 - 최대중량 설정값
public static readonly string MaxWeight = "3001";
// 중량조정 - 분동중량 설정값
public static readonly string BalanceWeight = "3002";
// 중량조정 - 한눈의 값
public static readonly string Digit = "3003";
// 중량조정 - 상수값 읽기
public static readonly string ReadConstant = "3601";
// 중량조정 - 파라미터 읽기
public static readonly string ParameterRead3901 = "3901";
// 자동영점 - 모드1 시간
public static readonly string Zero1Time = "4001";
// 자동영점 - 모드1 범위
public static readonly string Zero1Range = "4002";
// 자동영점 - 모드1 변량
public static readonly string Zero1Variate = "4003";
// 자동영점 - 모드1 모드
public static readonly string Zero1Mode = "4004";
// 자동영점 - 모드2 모드
public static readonly string Zero2Mode = "4005";
// 자동영점 - 모드2 시간
public static readonly string Zero2Time = "4006";
// 자동영점 - 모드2 범위
public static readonly string Zero2Range = "4007";
// 자동영점 - 모드2 변량
public static readonly string Zero2Variate = "4008";
// 자동영점 - 모드1 파라미터 읽기
public static readonly string ParameterRead4901 = "4901";
// 자동영점 - 모드2 파라미터 읽기
public static readonly string ParameterRead4902 = "4902";
// 판정설정 - 필터
public static readonly string Filter = "5001";
// 판정설정 - 판정지연
public static readonly string JudgmentDelayTime = "5002";
// 판정설정 - 이중지연
public static readonly string DoubleDelayTime = "5003";
// 판정설정 - 판정개수
public static readonly string JudgmentCount = "5004";
// 판정설정 - 이송속도
public static readonly string FeedSpeed = "5005";
// 판정설정 - 동보정
public static readonly string DynamicCorrection = "5006";
// 판정설정 - Feeding 컨베어 지연시간
public static readonly string FeedingConveyorDelayTime = "5007";
// 판정설정 - Feeding 컨베어 동작시간
public static readonly string FeedingConveyorRunTime = "5008";
// 판정설정 - 배출 컨베어 지연시간
public static readonly string DischargeConveyorDelayTime = "5009";
// 판정설정 - 배출 컨베어 동작시간
public static readonly string DischargeConveyorRunTime = "5010";
// 판정설정 - 자동판정 - 센서 검출 시간 읽기
public static readonly string ReadSensingTime = "5057";
// 판정설정 - 자동판정 - 필터갭
public static readonly string FilterGap = "5058";
// 판정설정 - 상승 지연시간
public static readonly string AscendDelayTime = "5011";
// 판정설정 - 하강 지연시간
public static readonly string DescendDelayTime = "5012";
// 판정설정 - 선별기 테스트
public static readonly string SorterTest = "5100";
// 판정설정 - 선별기1 모드 값
public static readonly string Sorter1Mode = "5101";
// 판정설정 - 선별기1 지연시간
public static readonly string Sorter1DelayTime = "5102";
// 판정설정 - 선별기1 동작시간
public static readonly string Sorter1RunTime = "5103";
// 판정설정 - 선별기2 모드 값
public static readonly string Sorter2Mode = "5104";
// 판정설정 - 선별기2 지연시간
public static readonly string Sorter2DelayTime = "5105";
// 판정설정 - 선별기2 동작시간
public static readonly string Sorter2RunTime = "5106";
// 판정설정 - 외부출력1 모드
public static readonly string ExternalOut1Mode = "5201";
// 판정설정 - 외부출력1 지연시간
public static readonly string ExternalOut1DelayTime = "5202";
// 판정설정 - 외부출력1 동작시간
public static readonly string ExternalOut1RunTime = "5203";
// 판정설정 - 외부출력2 모드
public static readonly string ExternalOut2Mode = "5204";
// 판정설정 - 외부출력2 지연시간
public static readonly string ExternalOut2DelayTime = "5205";
// 판정설정 - 외부출력2 동작시간
public static readonly string ExternalOut2RunTime = "5206";
// 판정설정 - 외부출력3 모드
public static readonly string ExternalOut3Mode = "5207";
// 판정설정 - 외부출력3 지연시간
public static readonly string ExternalOut3DelayTime = "5208";
// 판정설정 - 외부출력3 동작시간
public static readonly string ExternalOut3RunTime = "5209";
// 판정설정 - 외부출력4 모드
public static readonly string ExternalOut4Mode = "5210";
// 판정설정 - 외부출력4 지연시간
public static readonly string ExternalOut4DelayTime = "5211";
// 판정설정 - 외부출력4 동작시간
public static readonly string ExternalOut4RunTime = "5212";
// 판정설정 - 외부출력9 모드
public static readonly string ExternalOut9Mode = "5225";
// 판정설정 - 외부출력9 지연시간
public static readonly string ExternalOut9DelayTime = "5226";
// 판정설정 - 외부출력9 동작시간
public static readonly string ExternalOut9RunTime = "5227";
// 판정설정 - 외부출력10 모드
public static readonly string ExternalOut10Mode = "5228";
// 판정설정 - 외부출력10 지연시간
public static readonly string ExternalOut10DelayTime = "5229";
// 판정설정 - 외부출력10 동작시간
public static readonly string ExternalOut10RunTime = "5230";
// 판정설정 - 파라미터 읽기
public static readonly string ParameterRead5901 = "5901";
// 판정설정 - 스타휠 회전주기
public static readonly string WheelCycleTime = "5301";
// 판정설정 - 스타휠 슬롯개수
public static readonly string WheelSlotCount = "5302";
// 판정설정 - 스타휠 슬롯배출지연개수
public static readonly string WheelSlotOutCount = "5303";
// 판정설정 - 진입센서 지연시간
public static readonly string EntrySensorDelayTime = "5304";
// 판정설정 - 서보드라이버 토크제한
public static readonly string ServoTorque = "5351";
// 판정설정 - 서보드라이버 회전속도
public static readonly string ServoSpeed = "5352";
// 판정설정 - 원점옵셋
public static readonly string ServoOffset = "5353";
// 판정설정 - 사용자정의1(선별기1모드,지연,동작,선별기2모드,지연,동작)
public static readonly string UserDefined1 = "5901";
// 옵션 - 부저 ON시간
public static readonly string BuzzerOnTime = "6001";
// 옵션 - 릴레이 동작시간
public static readonly string RelayRunTime = "6002";
// 옵션 - 이중진입사용여부
public static readonly string DoubleEnter = "6005";
// 옵션 - 채터링감지 설정
public static readonly string Chattering = "6006";
// 옵션 - 외부 NG 입력 사용
public static readonly string ExternalInput = "6007";
// 옵션 - 기타 NG 사용
public static readonly string ExternalNG = "6008";
// 옵션 - 제품길이 이상 시 선별
public static readonly string SortingWhenNGLength = "6009";
// 옵션 - 제품진입 미감지
public static readonly string EntryNotDetectedWeight = "6010";
// 옵션 - OPT1_샘플링개수
public static readonly string OPT1SamplingCount = "6201";
// 옵션 - OPT1_지연개수
public static readonly string OPT1DelayCount = "6202";
// 옵션 - OPT1_펄스폭
public static readonly string OPT1PulseWidth = "6203";
// 옵션 - OPT1_범위설정사용여부
public static readonly string OPT1RangeSetting = "6204";
// 옵션 - OPT1_상한범위
public static readonly string OPT1OverRange = "6205";
// 옵션 - OPT1_하한범위
public static readonly string OPT1UnderRange = "6206";
// 옵션 - OPT1_포트
public static readonly string OPT1Port = "6207";
// 옵션 - OPT2_포트
public static readonly string OPT2Port = "6231";
// 옵션 - OPT2_지연시간1
public static readonly string OPT2DelayTime1 = "6232";
// 옵션 - OPT2_지연시간2
public static readonly string OPT2DelayTime2 = "6233";
// 옵션 - OPT2_영점실행주기
public static readonly string OPT2ZeroZoneCycle = "6234";
// 옵션 - OPT2_영점실행개수
public static readonly string OPT2ZeroZoneCount = "6235";
// 옵션 - 파라미터 읽기
public static readonly string ParameterRead6901 = "6901";
// RS232 통신1 속도
public static readonly string Serial1_BaudRate = "7001";
// RS232 통신1 모드
public static readonly string Serial1_Mode = "7002";
// RS232 통신 1 속도, 모드
public static readonly string Serial1 = "7003";
// 통신,IO설정 - INPUT ALL
public static readonly string InputAll = "7500";
// 통신,IO설정 = OUTPUT1
public static readonly string Output1 = "7701";
// 통신,IO설정 = OUTPUT2
public static readonly string Output2 = "7702";
// 통신,IO설정 = OUTPUT3
public static readonly string Output3 = "7703";
// 통신,IO설정 = OUTPUT4
public static readonly string Output4 = "7704";
// 통신,IO설정 = OUTPUT5
public static readonly string Output5 = "7705";
// 통신,IO설정 = OUTPUT6
public static readonly string Output6 = "7706";
// 통신,IO설정 = OUTPUT7
public static readonly string Output7 = "7707";
// 통신,IO설정 = OUTPUT8
public static readonly string Output8 = "7708";
// 통신,IO설정 = OUTPUT9
public static readonly string Output9 = "7709";
// 통신,IO설정 = OUTPUT10
public static readonly string Output10 = "7710";
// 통신,IO설정 = OUTPUT11
public static readonly string Output11 = "7711";
// 통신,IO설정 = OUTPUT12
public static readonly string Output12 = "7712";
// 통신,IO설정 = OUTPUT13
public static readonly string Output13 = "7713";
// 통신,IO설정 = OUTPUT14
public static readonly string Output14 = "7714";
// 통신,IO설정 = OUTPUT15
public static readonly string Output15 = "7715";
// 통신,IO설정 = OUTPUT16
public static readonly string Output16 = "7716";
// 전체파라미터 쓰기 1
public static readonly string SystemParameterWrite1 = "9018";
// 전체파라미터 쓰기 2
public static readonly string SystemParameterWrite2 = "9019";
// 전체파라미터 쓰기 3
public static readonly string SystemParameterWrite3 = "9020";
// 전체파라미터 쓰기 4
public static readonly string SystemParameterWrite4 = "9021";
// 랜덤모드 쓰기
public static readonly string RandomModeWrite = "9023";
// 중량설정값 쓰기
public static readonly string ParameterWeightSetting = "9024";
// 전체파라미터 쓰기(Ver5 이전 : 9014, Ver5부터 : 9025)
public static readonly string SystemParameterWriteAll = "9025";
// 전체 카운트 읽기/쓰기
public static readonly string ParameterCount = "9031";
//// 시스템파라미터 읽기1
//public static readonly string SystemParameterRead1 = "9501";
//// 시스템파라미터 읽기2
//public static readonly string SystemParameterRead2 = "9502";
//// 시스템파라미터 읽기3
//public static readonly string SystemParameterRead3 = "9503";
//// 시스템파라미터 읽기4
//public static readonly string SystemParameterRead4 = "9504";
// 시스템정보 파라미터 읽기1
public static readonly string SystemInformationRead1 = "9512";
// 시스템정보 파라미터 읽기2
public static readonly string SystemInformationRead2 = "9513";
// 시스템정보 파라미터 읽기3
public static readonly string SystemInformationRead3 = "9514";
// 시스템정보 파라미터 읽기4
public static readonly string SystemInformationRead4 = "9515";
}
#endregion
#region CommunicationServo
public class ServoMotorParameterAddress
{
// Alarm Reset - 0x0049
public static readonly int AlarmReset = 73;
// CCW TRQ LMT - 0x00C8
public static readonly int CCWTorqueLimit = 200;
// CW TRQ LMT - 0x00C9
public static readonly int CWTorqueLimit = 201;
// Grop Speed 0 - 0x0131
public static readonly int GropSpeed0 = 305;
// Position CMD 0 - 0x01F4
public static readonly int PositionCMD0 = 500;
// Position CMD 1 - 0x01F5
public static readonly int PositionCMD1 = 501;
// Position CMD 2 - 0x01F6
public static readonly int PositionCMD2 = 502;
// Position CMD 3 - 0x01F7
public static readonly int PositionCMD3 = 503;
// ORG Speed 0 - 0x0258
public static readonly int ORGSpeed0 = 600;
// ORG Speed 1 - 0x0259
public static readonly int ORGSpeed1 = 601;
// Origin Offset - 0x025B
public static readonly int OriginOffset = 603;
// Jog Speed 0 - 0x025D
public static readonly int JogSpeed0 = 605;
// Angle Division - 0x02C2
public static readonly int AngleDivision = 706;
}
#endregion
#region Modbus
public class _30000_ModbusAddress
{
public const int _01_IsUpdate_High = 10;
public const int _02_IsUpdate_Low = 11;
public const int _03_EquipmentID_High = 12;
public const int _04_EquipmentID_Low = 13;
public const int _05_ProductNo_High = 14;
public const int _06_ProductNo_Low = 15;
public const int _07_UnderValue_High = 16;
public const int _08_UnderValue_Low = 17;
public const int _09_PassValue_High = 18;
public const int _10_PassValue_Low = 19;
public const int _11_OverValue_High = 20;
public const int _12_OverValue_Low = 21;
public const int _13_TareValue_High = 22;
public const int _14_TareValue_Low = 23;
public const int _15_UnderCount_High = 24;
public const int _16_UnderCount_Low = 25;
public const int _17_PassCount_High = 26;
public const int _18_PassCount_Low = 27;
public const int _19_OverCount_High = 28;
public const int _20_OverCount_Low = 29;
public const int _21_NGCount_High = 30;
public const int _22_NGCount_Low = 31;
public const int _23_ExNGCount_High = 32;
public const int _24_ExNGCount_Low = 33;
public const int _25_TotalCount_High = 34;
public const int _26_TotalCount_Low = 35;
public const int _27_Grade_High = 36;
public const int _28_Grade_Low = 37;
public const int _29_Weight_High = 38;
public const int _30_Weight_Low = 39;
public const int _31_OperationStatus_High = 40;
public const int _32_OperationStatus_Low = 41;
public const int _33_AlarmStatus_High = 42;
public const int _34_AlarmStatus_Low = 43;
#region V7
//public const int _01_EquipmentID = 10;
//public const int _02_ProductNo = 11;
//public const int _03_UnderValue_High = 12;
//public const int _04_UnderValue_Low = 13;
//public const int _05_PassValue_High = 14;
//public const int _06_PassValue_Low = 15;
//public const int _07_OverValue_High = 16;
//public const int _08_OverValue_Low = 17;
//public const int _09_UnderCount_High = 18;
//public const int _10_UnderCount_Low = 19;
//public const int _11_PassCount_High = 20;
//public const int _12_PassCount_Low = 21;
//public const int _13_OverCount_High = 22;
//public const int _14_OverCount_Low = 23;
//public const int _15_NGCount_High = 24;
//public const int _16_NGCount_Low = 25;
//public const int _17_ExNGCount_High = 26;
//public const int _18_ExNGCount_Low = 27;
//public const int _19_TotalCount_High = 28;
//public const int _20_TotalCount_Low = 29;
//public const int _21_Grade = 30;
//public const int _22_Weight_High = 31;
//public const int _23_Weight_Low = 32;
//public const int _24_OperationStatus = 33;
#endregion
}
public class _30000_ModbusData
{
#region Field
private int m_IsUpdate;
private int m_EquipmentID;
private int m_ProductNo;
private double m_UnderValue;
private double m_PassValue;
private double m_OverValue;
private double m_TareValue;
private UInt32 m_UnderCount;
private UInt32 m_PassCount;
private UInt32 m_OverCount;
private UInt32 m_NGCount;
private UInt32 m_ExNGCount;
private UInt32 m_TotalCount;
private int m_Grade;
private double m_Weight;
private int m_OperationStatus;
private int m_AlarmStatus;
#endregion
#region Constructor
public _30000_ModbusData()
{
this.Initialization();
}
#endregion
#region Property
public int IsUpdate
{
get { return this.m_IsUpdate; }
set { this.m_IsUpdate = value; }
}
public int EquipmentID
{
get { return this.m_EquipmentID; }
set { this.m_EquipmentID = value; }
}
public int ProductNo
{
get { return this.m_ProductNo; }
set { this.m_ProductNo = value; }
}
public double UnderValue
{
get { return this.m_UnderValue; }
set { this.m_UnderValue = value; }
}
public double PassValue
{
get { return this.m_PassValue; }
set { this.m_PassValue = value; }
}
public double OverValue
{
get { return this.m_OverValue; }
set { this.m_OverValue = value; }
}
public double TareValue
{
get { return this.m_TareValue; }
set { this.m_TareValue = value; }
}
public UInt32 UnderCount
{
get { return this.m_UnderCount; }
set { this.m_UnderCount = value; }
}
public UInt32 PassCount
{
get { return this.m_PassCount; }
set { this.m_PassCount = value; }
}
public UInt32 OverCount
{
get { return this.m_OverCount; }
set { this.m_OverCount = value; }
}
public UInt32 NGCount
{
get { return this.m_NGCount; }
set { this.m_NGCount = value; }
}
public UInt32 ExNGCount
{
get { return this.m_ExNGCount; }
set { this.m_ExNGCount = value; }
}
public UInt32 TotalCount
{
get { return this.m_TotalCount; }
set { this.m_TotalCount = value; }
}
public int Grade
{
get { return this.m_Grade; }
set { this.m_Grade = value; }
}
public double Weight
{
get { return this.m_Weight; }
set { this.m_Weight = value; }
}
public int OperationStatus
{
get { return this.m_OperationStatus; }
set { this.m_OperationStatus = value; }
}
public int AlarmStatus
{
get { return this.m_AlarmStatus; }
set { this.m_AlarmStatus = value; }
}
public string HexStringIsUpdate
{
get
{
string hexString = this.IsUpdate.ToString("X8");
return hexString;
}
}
public string HexStringEquipmentID
{
get
{
string hexString = this.EquipmentID.ToString("X8");
return hexString;
}
}
public string HexStringProductNo
{
get
{
string hexString = this.ProductNo.ToString("X8");
return hexString;
}
}
public string HexStringUnderValue
{
get
{
byte[] bytes = BitConverter.GetBytes((float)this.UnderValue);
Array.Reverse(bytes);
string hexString = BitConverter.ToString(bytes);
hexString = hexString.Replace("-", "");
return hexString;
}
}
public string HexStringPassValue
{
get
{
byte[] bytes = BitConverter.GetBytes((float)this.PassValue);
Array.Reverse(bytes);
string hexString = BitConverter.ToString(bytes);
hexString = hexString.Replace("-", "");
return hexString;
}
}
public string HexStringOverValue
{
get
{
byte[] bytes = BitConverter.GetBytes((float)this.OverValue);
Array.Reverse(bytes);
string hexString = BitConverter.ToString(bytes);
hexString = hexString.Replace("-", "");
return hexString;
}
}
public string HexStringTareValue
{
get
{
byte[] bytes = BitConverter.GetBytes((float)this.TareValue);
Array.Reverse(bytes);
string hexString = BitConverter.ToString(bytes);
hexString = hexString.Replace("-", "");
return hexString;
}
}
public string HexStringUnderCount
{
get
{
string hexString = this.UnderCount.ToString("X8");
return hexString;
}
}
public string HexStringPassCount
{
get
{
string hexString = this.PassCount.ToString("X8");
return hexString;
}
}
public string HexStringOverCount
{
get
{
string hexString = this.OverCount.ToString("X8");
return hexString;
}
}
public string HexStringNGCount
{
get
{
string hexString = this.NGCount.ToString("X8");
return hexString;
}
}
public string HexStringExNGCount
{
get
{
string hexString = this.ExNGCount.ToString("X8");
return hexString;
}
}
public string HexStringTotalCount
{
get
{
string hexString = this.TotalCount.ToString("X8");
return hexString;
}
}
public string HexStringGrade
{
get
{
string hexString = this.Grade.ToString("X8");
return hexString;
}
}
public string HexStringWeight
{
get
{
byte[] bytes = BitConverter.GetBytes((float)this.Weight);
byte[] reverseBytes = new byte[bytes.Length];
for (int i = 0; i < bytes.Length; i++)
reverseBytes[bytes.Length - 1 - i] = bytes[i];
string hexString = BitConverter.ToString(reverseBytes);
hexString = hexString.Replace("-", "");
return hexString;
}
}
public string HexStringOperationStatus
{
get
{
string hexString = this.OperationStatus.ToString("X8");
return hexString;
}
}
public string HexStringAlarmStatus
{
get
{
string hexString = this.AlarmStatus.ToString("X8");
return hexString;
}
}
public byte[] _01_IsUpdate_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.IsUpdate);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _02_IsUpdate_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.IsUpdate);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _03_EquipmentID_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.EquipmentID);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _04_EquipmentID_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.EquipmentID);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _05_ProductNo_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.ProductNo);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _06_ProductNo_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.ProductNo);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _07_UnderValue_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes((Single)this.UnderValue);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _08_UnderValue_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes((Single)this.UnderValue);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _09_PassValue_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes((Single)this.PassValue);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _10_PassValue_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes((Single)this.PassValue);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _11_OverValue_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes((Single)this.OverValue);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _12_OverValue_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes((Single)this.OverValue);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _13_TareValue_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes((Single)this.TareValue);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _14_TareValue_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes((Single)this.TareValue);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _15_UnderCount_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.UnderCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _16_UnderCount_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.UnderCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _17_PassCount_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.PassCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _18_PassCount_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.PassCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _19_OverCount_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.OverCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _20_OverCount_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.OverCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _21_NGCount_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.NGCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _22_NGCount_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.NGCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _23_ExNGCount_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.ExNGCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _24_ExNGCount_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.ExNGCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _25_TotalCount_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.TotalCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _26_TotalCount_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.TotalCount);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _27_Grade_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.Grade);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _28_Grade_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.Grade);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _29_Weight_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes((Single)this.Weight);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _30_Weight_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes((Single)this.Weight);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _31_OperationStatus_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.OperationStatus);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _32_OperationStatus_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.OperationStatus);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
public byte[] _33_AlarmStatus_High
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.AlarmStatus);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[3 - i];
return madeData;
}
}
public byte[] _34_AlarmStatus_Low
{
get
{
byte[] madeData = new byte[2];
byte[] Length4Value = new byte[4];
Length4Value = Modbus.GetBytes(this.AlarmStatus);
for (int i = 0; i < 2; i++)
madeData[i] = Length4Value[1 - i];
return madeData;
}
}
#endregion
#region Method
public void Initialization()
{
this.IsUpdate = 0;
this.EquipmentID = 1;
this.ProductNo = 1;
this.UnderValue = 100.0;
this.PassValue = 200.0;
this.OverValue = 300.0;
this.TareValue = 0.0;
this.UnderCount = 0;
this.PassCount = 0;
this.OverCount = 0;
this.NGCount = 0;
this.ExNGCount = 0;
this.TotalCount = 0;
this.Grade = 5;
this.Weight = 0.0;
this.OperationStatus = 0;
this.AlarmStatus = 0;
}
#endregion
}
public class _40000_ModbusAddress
{
public const int _01_Clear = 10;
public const int _02_ClearResult = 11;
public const int _03_Operation = 12;
public const int _04_OperationResult = 13;
public const int _05_ProductChange_High = 14;
public const int _06_ProductChange_Low = 15;
public const int _07_ProductChangeResult = 16;
public const int _08_UnderRange_High = 17;
public const int _09_UnderRange_Low = 18;
public const int _10_UnderRangeResult = 19;
public const int _11_PassRange_High = 20;
public const int _12_PassRange_Low = 21;
public const int _13_PassRangeResult = 22;
public const int _14_OverRange_High = 23;
public const int _15_OverRange_Low = 24;
public const int _16_OverRangeResult = 25;
public const int _17_TareWeight_High = 26;
public const int _18_TareWeight_Low = 27;
public const int _19_TareWeightResult = 28;
}
public class _40000_ModbusData
{
#region Field
private int m_40011_Clear;
private int m_40012_ClearResult;
private int m_40013_Operation;
private int m_40014_OperationResult;
private int m_40015_ProductChange;
private int m_40017_ProductChangeResult;
private int m_40018_UnderRange;
private int m_40020_UnderRangeResult;
private int m_40021_PassRange;
private int m_40023_PassRangeResult;
private int m_40024_OverRange;
private int m_40026_OverRangeResult;
private int m_40027_TareWeight;
private int m_40029_TareWeightResult;
#endregion
#region Constructor
public _40000_ModbusData()
{
this.Initialization();
}
#endregion
#region Property
public int _40011_Clear
{
get { return this.m_40011_Clear; }
set { this.m_40011_Clear = value; }
}
public int _40012_ClearResult
{
get { return this.m_40012_ClearResult; }
set { this.m_40012_ClearResult = value; }
}
public int _40013_Operation
{
get { return this.m_40013_Operation; }
set { this.m_40013_Operation = value; }
}
public int _40014_OperationResult
{
get { return this.m_40014_OperationResult; }
set { this.m_40014_OperationResult = value; }
}
public int _40015_ProductChange
{
get { return this.m_40015_ProductChange; }
set { this.m_40015_ProductChange = value; }
}
public int _40017_ProductChangeResult
{
get { return this.m_40017_ProductChangeResult; }
set { this.m_40017_ProductChangeResult = value; }
}
public int _40018_UnderRange
{
get { return this.m_40018_UnderRange; }
set { this.m_40018_UnderRange = value; }
}
public int _40020_UnderRangeResult
{
get { return this.m_40020_UnderRangeResult; }
set { this.m_40020_UnderRangeResult = value; }
}
public int _40021_PassRange
{
get { return this.m_40021_PassRange; }
set { this.m_40021_PassRange = value; }
}
public int _40023_PassRangeResult
{
get { return this.m_40023_PassRangeResult; }
set { this.m_40023_PassRangeResult = value; }
}
public int _40024_OverRange
{
get { return this.m_40024_OverRange; }
set { this.m_40024_OverRange = value; }
}
public int _40026_OverRangeResult
{
get { return this.m_40026_OverRangeResult; }
set { this.m_40026_OverRangeResult = value; }
}
public int _40027_TareWeight
{
get { return this.m_40027_TareWeight; }
set { this.m_40027_TareWeight = value; }
}
public int _40029_TareWeightResult
{
get { return this.m_40029_TareWeightResult; }
set { this.m_40029_TareWeightResult = value; }
}
#endregion
#region Method
public void Initialization()
{
this._40011_Clear = 0;
this._40012_ClearResult = 0;
this._40013_Operation = 0;
this._40014_OperationResult = 0;
this._40015_ProductChange = 0;
this._40017_ProductChangeResult = 0;
this._40018_UnderRange = 0;
this._40020_UnderRangeResult = 0;
this._40021_PassRange = 0;
this._40023_PassRangeResult = 0;
this._40024_OverRange = 0;
this._40026_OverRangeResult = 0;
this._40027_TareWeight = 0;
this._40029_TareWeightResult = 0;
}
#endregion
}
#endregion
#region CommunicationRespone
public class CommunicationRespone
{
#region Field
private bool m_IsFirst;
private string m_TransactionID;
private string m_TransferCount;
#endregion
#region Constructor
public CommunicationRespone()
{
this.Initialization();
}
#endregion
#region Property
public bool IsFirst
{
get { return this.m_IsFirst; }
set { this.m_IsFirst = value; }
}
///
/// Data ID (0~9)
///
public string TransactionID
{
get { return this.m_TransactionID; }
set { this.m_TransactionID = value; }
}
///
/// 재전송 CNT (0~9)
///
public string TransferCount
{
get { return this.m_TransferCount; }
set { this.m_TransferCount = value; }
}
#endregion
#region Method
public void Initialization()
{
this.IsFirst = false;
this.TransactionID = "a";
this.TransferCount = "a";
}
#endregion
}
#endregion
#region SystemConfigurationItem1
public class SystemConfigurationItem1
{
#region Field
private bool m_IsDataBackup;
private bool m_IsLogin;
private bool m_IsPrintPerProductEnable;
private bool m_IsExternalInputBuzzer;
private bool m_IsExternalInputLamp;
private bool m_IsAverageTracking;
private int m_EquipmentID;
private int m_DecimalPlaces;
private int m_ProductNumber;
private int m_SerialCOM1BaudRate;
private int m_SerialCOM1Mode;
private int m_SerialCOM3BaudRate;
private int m_SerialCOM3Mode;
private int m_SerialCOM4BaudRate;
private int m_SerialCOM4Mode;
private int m_DatabackupFormat;
private int m_TransmissionDelayTimeCOM1;
private int m_TransmissionDelayTimeCOM3;
private int m_TransmissionDelayTimeCOM4;
private int m_StatisticsPrintFormat;
private string m_SerialNumber;
private string m_MainBoardVersion;
private string m_Unit;
private string m_UserDefineCOM1;
private string m_UserDefineCOM3;
private string m_UserDefineCOM4;
private DataStore.LanguageID m_Language;
#endregion
#region Constructor
public SystemConfigurationItem1()
{
this.Initialization();
}
#endregion
#region Property
public bool IsDataBackup
{
get { return this.m_IsDataBackup; }
set { this.m_IsDataBackup = value; }
}
public bool IsLogin
{
get { return this.m_IsLogin; }
set { this.m_IsLogin = value; }
}
public bool IsPrinterEnable
{
get
{
if (this.SerialCOM1Mode == 3 || this.SerialCOM3Mode == 3 || this.SerialCOM4Mode == 3)
return true;
else
return false;
}
}
public bool IsPrintPerProductEnable
{
get { return this.m_IsPrintPerProductEnable; }
set { this.m_IsPrintPerProductEnable = value; }
}
public bool IsExternalInputLamp
{
get { return this.m_IsExternalInputLamp; }
set { this.m_IsExternalInputLamp = value; }
}
public bool IsExternalInputBuzzer
{
get { return this.m_IsExternalInputBuzzer; }
set { this.m_IsExternalInputBuzzer = value; }
}
public bool IsAverageTracking
{
get { return this.m_IsAverageTracking; }
set { this.m_IsAverageTracking = value; }
}
public int EquipmentID
{
get { return this.m_EquipmentID; }
set { this.m_EquipmentID = value; }
}
public int DecimalPlaces
{
get { return this.m_DecimalPlaces; }
set { this.m_DecimalPlaces = value; }
}
public int ProductNumber
{
get { return this.m_ProductNumber; }
set { this.m_ProductNumber = value; }
}
public int SerialCOM1BaudRate
{
get { return this.m_SerialCOM1BaudRate; }
set { this.m_SerialCOM1BaudRate = value; }
}
public int SerialCOM1Mode
{
get { return this.m_SerialCOM1Mode; }
set { this.m_SerialCOM1Mode = value; }
}
public int SerialCOM3BaudRate
{
get { return this.m_SerialCOM3BaudRate; }
set { this.m_SerialCOM3BaudRate = value; }
}
public int SerialCOM3Mode
{
get { return this.m_SerialCOM3Mode; }
set { this.m_SerialCOM3Mode = value; }
}
public int SerialCOM4BaudRate
{
get { return this.m_SerialCOM4BaudRate; }
set { this.m_SerialCOM4BaudRate = value; }
}
public int SerialCOM4Mode
{
get { return this.m_SerialCOM4Mode; }
set { this.m_SerialCOM4Mode = value; }
}
public int DatabackupFormat
{
get { return this.m_DatabackupFormat; }
set { this.m_DatabackupFormat = value; }
}
public int ProductCount
{
get
{
return 1000;
}
}
public int TransmissionDelayTimeCOM1
{
get { return this.m_TransmissionDelayTimeCOM1; }
set { this.m_TransmissionDelayTimeCOM1 = value; }
}
public int TransmissionDelayTimeCOM3
{
get { return this.m_TransmissionDelayTimeCOM3; }
set { this.m_TransmissionDelayTimeCOM3 = value; }
}
public int TransmissionDelayTimeCOM4
{
get { return this.m_TransmissionDelayTimeCOM4; }
set { this.m_TransmissionDelayTimeCOM4 = value; }
}
public int StatisticsPrintFormat
{
get { return this.m_StatisticsPrintFormat; }
set { this.m_StatisticsPrintFormat = value; }
}
public string SerialNumber
{
get { return this.m_SerialNumber; }
set { this.m_SerialNumber = value; }
}
public string MainBoardVersion
{
get { return this.m_MainBoardVersion; }
set { this.m_MainBoardVersion = value; }
}
public string Unit
{
get { return this.m_Unit; }
set { this.m_Unit = value; }
}
public string UserDefineCOM1
{
get { return this.m_UserDefineCOM1; }
set { this.m_UserDefineCOM1 = value; }
}
public string UserDefineCOM3
{
get { return this.m_UserDefineCOM3; }
set { this.m_UserDefineCOM3 = value; }
}
public string UserDefineCOM4
{
get { return this.m_UserDefineCOM4; }
set { this.m_UserDefineCOM4 = value; }
}
public DataStore.LanguageID Language
{
get { return this.m_Language; }
set { this.m_Language = value; }
}
#endregion
#region Method
public void Initialization()
{
this.IsDataBackup = false;
this.IsLogin = false;
this.IsPrintPerProductEnable = false;
this.IsExternalInputBuzzer = false;
this.IsExternalInputLamp = false;
this.IsAverageTracking = false;
this.EquipmentID = 1;
this.DecimalPlaces = 1;
this.ProductNumber = 1;
this.SerialCOM1BaudRate = 0;
this.SerialCOM1Mode = 0;
this.SerialCOM3BaudRate = 0;
this.SerialCOM3Mode = 0;
this.SerialCOM4BaudRate = 0;
this.SerialCOM4Mode = 0;
this.DatabackupFormat = 0;
this.TransmissionDelayTimeCOM1 = 0;
this.TransmissionDelayTimeCOM3 = 0;
this.TransmissionDelayTimeCOM4 = 0;
this.StatisticsPrintFormat = 0;
this.SerialNumber = "23A0000";
this.MainBoardVersion = "000";
this.Unit = "g";
this.UserDefineCOM1 = "";
this.UserDefineCOM3 = "";
this.UserDefineCOM4 = "";
this.Language = DataStore.LanguageID.Korean;
}
#endregion
}
#endregion
#region StructSystemConfigurationItem1
[StructLayout(LayoutKind.Sequential)]
public struct StructSystemConfigurationItem1
{
public bool IsDataBackup;
public bool IsLogin;
public int EquipmentID;
public int DecimalPlaces;
public int ProductNumber;
public int Dummy1Int;
public int Serial1BaudRate;
public int Serial1Mode;
public int Serial2BaudRate;
public int Serial2Mode;
public int Serial3BaudRate;
public int Serial3Mode;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 15)]
public string SerialNumber;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
public string Unit;
public DataStore.LanguageID Language;
public bool IsAverageTracking;
public bool IsExternalInputLamp;
public bool IsExternalInputBuzzer;
public bool IsPrintPerProductEnable;
public bool DummyBool1;
public int StatisticsPrintFormat;
public int TransmissionDelayTimeCOM1;
public int TransmissionDelayTimeCOM3;
public int TransmissionDelayTimeCOM4;
public int DatabackupFormat;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string DummyString1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string UserDefineCOM1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string UserDefineCOM3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string UserDefineCOM4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)]
public string DummyString5;
}
#endregion
#region SystemConfigurationItem2
public class SystemConfigurationItem2
{
#region Field
// 카운터출력 관련
private int m_CountingOutput1Mode;
private int m_CountingOutput1Number;
private int m_CountingOutput1BuzzerTime;
private bool m_IsCountingOutput1ConveyorStop;
private bool m_IsCountingOutput1BuzzerOn;
private bool m_IsCountingOutput1Continuous;
private bool m_IsCountingOutput1ExternalOutput;
private int m_CountingOutput2Mode;
private int m_CountingOutput2Number;
private int m_CountingOutput2BuzzerTime;
private bool m_IsCountingOutput2Continuous;
private bool m_IsCountingOutput2ConveyorStop;
private bool m_IsCountingOutput2BuzzerOn;
private bool m_IsCountingOutput2ExternalOutput;
// 통신모드 관련
private int m_HitachiRoomNumberCOM1;
private int m_MarkoprintLineNumberCOM1;
private bool m_IsHitachiBlankToNoneCOM1;
private bool m_IsMarkoprintDatePrintCOM1;
private bool m_IsMarkoprintTodaytDatePrintCOM1;
private string m_MarkoprintDateSettingCOM1;
private int m_HitachiRoomNumberCOM3;
private int m_MarkoprintLineNumberCOM3;
private bool m_IsHitachiBlankToNoneCOM3;
private bool m_IsMarkoprintDatePrintCOM3;
private bool m_IsMarkoprintTodaytDatePrintCOM3;
private string m_MarkoprintDateSettingCOM3;
private int m_HitachiRoomNumberCOM4;
private int m_MarkoprintLineNumberCOM4;
private bool m_IsHitachiBlankToNoneCOM4;
private bool m_IsMarkoprintDatePrintCOM4;
private bool m_IsMarkoprintTodaytDatePrintCOM4;
private string m_MarkoprintDateSettingCOM4;
// 랜덤모드 관련
private bool m_IsGroup1UsingRandomMode;
private bool m_IsGroup2UsingRandomMode;
private bool m_IsGroup3UsingRandomMode;
private bool m_IsGroup4UsingRandomMode;
private bool m_IsGroup5UsingRandomMode;
private int m_FileNameExtension;
private int m_HitachiRoomNumberEthernet;
private int m_MarkoprintLineNumberEthernet;
private bool m_IsMarkoprintDatePrintEthernet;
private bool m_IsMarkoprintTodaytDatePrintEthernet;
private string m_MarkoprintDateSettingEthernet;
private int m_EthernetHostPort;
private int m_EthernetCommMode;
private int m_EthernetOperationMode;
private string m_EthernetAddress;
private int m_ConveyorLength;
private int m_SortingPointLength;
private int m_Barcode;
private int m_CommunicationControlCharacter;
private int m_EthernetLocalPort;
private bool m_IsBypassDirectionPass;
private bool m_IsBypassOnce;
private bool m_IsCommunicationOption;
private bool m_IsRFIDSpeedwayR420;
private int m_ModbusRTUSelectFunction;
private int m_ModbusSlaveIDCOM1;
private int m_ModbusSlaveIDCOM3;
private int m_ModbusSlaveIDCOM4;
private int m_ModbusTCPSelectFunction;
private string m_EntryNotDetectedWeight;
private string m_RFID_R420_BARCD;
private string m_RFID_R420_EPC_Filter;
private int m_AverageTracking;
private int m_MULTiJETSlaveAddressCOM1;
private int m_MULTiJETSlaveAddressCOM3;
private int m_MULTiJETSlaveAddressCOM4;
private int m_MULTiJETSlaveAddressEthernet;
#endregion
#region Constructor
public SystemConfigurationItem2()
{
this.Initialization();
}
#endregion
#region Property
public int CountingOutput1Mode
{
get { return this.m_CountingOutput1Mode; }
set { this.m_CountingOutput1Mode = value; }
}
public int CountingOutput1Number
{
get { return this.m_CountingOutput1Number; }
set { this.m_CountingOutput1Number = value; }
}
public bool IsCountingOutput1Continuous
{
get { return this.m_IsCountingOutput1Continuous; }
set { this.m_IsCountingOutput1Continuous = value; }
}
public bool IsCountingOutput1ConveyorStop
{
get { return this.m_IsCountingOutput1ConveyorStop; }
set { this.m_IsCountingOutput1ConveyorStop = value; }
}
public bool IsCountingOutput1BuzzerOn
{
get { return this.m_IsCountingOutput1BuzzerOn; }
set { this.m_IsCountingOutput1BuzzerOn = value; }
}
public bool IsCountingOutput1ExternalOutput
{
get { return this.m_IsCountingOutput1ExternalOutput; }
set { this.m_IsCountingOutput1ExternalOutput = value; }
}
public int CountingOutput2Mode
{
get { return this.m_CountingOutput2Mode; }
set { this.m_CountingOutput2Mode = value; }
}
public int CountingOutput2Number
{
get { return this.m_CountingOutput2Number; }
set { this.m_CountingOutput2Number = value; }
}
public bool IsCountingOutput2Continuous
{
get { return this.m_IsCountingOutput2Continuous; }
set { this.m_IsCountingOutput2Continuous = value; }
}
public bool IsCountingOutput2ConveyorStop
{
get { return this.m_IsCountingOutput2ConveyorStop; }
set { this.m_IsCountingOutput2ConveyorStop = value; }
}
public bool IsCountingOutput2BuzzerOn
{
get { return this.m_IsCountingOutput2BuzzerOn; }
set { this.m_IsCountingOutput2BuzzerOn = value; }
}
public bool IsCountingOutput2ExternalOutput
{
get { return this.m_IsCountingOutput2ExternalOutput; }
set { this.m_IsCountingOutput2ExternalOutput = value; }
}
public int CountingOutput1BuzzerTime
{
get { return this.m_CountingOutput1BuzzerTime; }
set { this.m_CountingOutput1BuzzerTime = value; }
}
public int CountingOutput2BuzzerTime
{
get { return this.m_CountingOutput2BuzzerTime; }
set { this.m_CountingOutput2BuzzerTime = value; }
}
public int HitachiRoomNumberCOM1
{
get { return this.m_HitachiRoomNumberCOM1; }
set { this.m_HitachiRoomNumberCOM1 = value; }
}
public bool IsHitachiBlankToNoneCOM1
{
get { return this.m_IsHitachiBlankToNoneCOM1; }
set { this.m_IsHitachiBlankToNoneCOM1 = value; }
}
public int MarkoprintLineNumberCOM1
{
get { return this.m_MarkoprintLineNumberCOM1; }
set { this.m_MarkoprintLineNumberCOM1 = value; }
}
public bool IsMarkoprintDatePrintCOM1
{
get { return this.m_IsMarkoprintDatePrintCOM1; }
set { this.m_IsMarkoprintDatePrintCOM1 = value; }
}
public bool IsMarkoprintTodaytDatePrintCOM1
{
get { return this.m_IsMarkoprintTodaytDatePrintCOM1; }
set { this.m_IsMarkoprintTodaytDatePrintCOM1 = value; }
}
public string MarkoprintDateSettingCOM1
{
get { return this.m_MarkoprintDateSettingCOM1; }
set { this.m_MarkoprintDateSettingCOM1 = value; }
}
public int HitachiRoomNumberCOM3
{
get { return this.m_HitachiRoomNumberCOM3; }
set { this.m_HitachiRoomNumberCOM3 = value; }
}
public bool IsHitachiBlankToNoneCOM3
{
get { return this.m_IsHitachiBlankToNoneCOM3; }
set { this.m_IsHitachiBlankToNoneCOM3 = value; }
}
public int MarkoprintLineNumberCOM3
{
get { return this.m_MarkoprintLineNumberCOM3; }
set { this.m_MarkoprintLineNumberCOM3 = value; }
}
public bool IsMarkoprintDatePrintCOM3
{
get { return this.m_IsMarkoprintDatePrintCOM3; }
set { this.m_IsMarkoprintDatePrintCOM3 = value; }
}
public bool IsMarkoprintTodaytDatePrintCOM3
{
get { return this.m_IsMarkoprintTodaytDatePrintCOM3; }
set { this.m_IsMarkoprintTodaytDatePrintCOM3 = value; }
}
public string MarkoprintDateSettingCOM3
{
get { return this.m_MarkoprintDateSettingCOM3; }
set { this.m_MarkoprintDateSettingCOM3 = value; }
}
public int HitachiRoomNumberCOM4
{
get { return this.m_HitachiRoomNumberCOM4; }
set { this.m_HitachiRoomNumberCOM4 = value; }
}
public bool IsHitachiBlankToNoneCOM4
{
get { return this.m_IsHitachiBlankToNoneCOM4; }
set { this.m_IsHitachiBlankToNoneCOM4 = value; }
}
public int MarkoprintLineNumberCOM4
{
get { return this.m_MarkoprintLineNumberCOM4; }
set { this.m_MarkoprintLineNumberCOM4 = value; }
}
public bool IsMarkoprintDatePrintCOM4
{
get { return this.m_IsMarkoprintDatePrintCOM4; }
set { this.m_IsMarkoprintDatePrintCOM4 = value; }
}
public bool IsMarkoprintTodaytDatePrintCOM4
{
get { return this.m_IsMarkoprintTodaytDatePrintCOM4; }
set { this.m_IsMarkoprintTodaytDatePrintCOM4 = value; }
}
public string MarkoprintDateSettingCOM4
{
get { return this.m_MarkoprintDateSettingCOM4; }
set { this.m_MarkoprintDateSettingCOM4 = value; }
}
public bool IsGroup1UsingRandomMode
{
get { return this.m_IsGroup1UsingRandomMode; }
set { this.m_IsGroup1UsingRandomMode = value; }
}
public bool IsGroup2UsingRandomMode
{
get { return this.m_IsGroup2UsingRandomMode; }
set { this.m_IsGroup2UsingRandomMode = value; }
}
public bool IsGroup3UsingRandomMode
{
get { return this.m_IsGroup3UsingRandomMode; }
set { this.m_IsGroup3UsingRandomMode = value; }
}
public bool IsGroup4UsingRandomMode
{
get { return this.m_IsGroup4UsingRandomMode; }
set { this.m_IsGroup4UsingRandomMode = value; }
}
public bool IsGroup5UsingRandomMode
{
get { return this.m_IsGroup5UsingRandomMode; }
set { this.m_IsGroup5UsingRandomMode = value; }
}
public bool IsUsingRandomMode
{
get
{
if (this.IsGroup1UsingRandomMode == true || this.IsGroup2UsingRandomMode == true ||
this.IsGroup3UsingRandomMode == true || this.IsGroup4UsingRandomMode == true ||
this.IsGroup5UsingRandomMode == true)
return true;
else
return false;
}
}
public int FileNameExtension
{
get { return this.m_FileNameExtension; }
set { this.m_FileNameExtension = value; }
}
public int HitachiRoomNumberEthernet
{
get { return this.m_HitachiRoomNumberEthernet; }
set { this.m_HitachiRoomNumberEthernet = value; }
}
public int MarkoprintLineNumberEthernet
{
get { return this.m_MarkoprintLineNumberEthernet; }
set { this.m_MarkoprintLineNumberEthernet = value; }
}
public bool IsMarkoprintDatePrintEthernet
{
get { return this.m_IsMarkoprintDatePrintEthernet; }
set { this.m_IsMarkoprintDatePrintEthernet = value; }
}
public bool IsMarkoprintTodaytDatePrintEthernet
{
get { return this.m_IsMarkoprintTodaytDatePrintEthernet; }
set { this.m_IsMarkoprintTodaytDatePrintEthernet = value; }
}
public string MarkoprintDateSettingEthernet
{
get { return this.m_MarkoprintDateSettingEthernet; }
set { this.m_MarkoprintDateSettingEthernet = value; }
}
public bool IsEthernetEnable
{
get
{
if (this.EthernetOperationMode != 0)
return true;
else
return false;
}
}
public int EthernetHostPort
{
get { return this.m_EthernetHostPort; }
set { this.m_EthernetHostPort = value; }
}
public int EthernetCommMode
{
get { return this.m_EthernetCommMode; }
set { this.m_EthernetCommMode = value; }
}
public int EthernetOperationMode
{
get { return this.m_EthernetOperationMode; }
set { this.m_EthernetOperationMode = value; }
}
public string EthernetAddress
{
get { return this.m_EthernetAddress; }
set { this.m_EthernetAddress = value; }
}
public int ConveyorLength
{
get { return this.m_ConveyorLength; }
set { this.m_ConveyorLength = value; }
}
public int SortingPointLength
{
get { return this.m_SortingPointLength; }
set { this.m_SortingPointLength = value; }
}
public int Barcode
{
get { return this.m_Barcode; }
set { this.m_Barcode = value; }
}
public int CommunicationControlCharacter
{
get { return this.m_CommunicationControlCharacter; }
set { this.m_CommunicationControlCharacter = value; }
}
public int EthernetLocalPort
{
get { return this.m_EthernetLocalPort; }
set { this.m_EthernetLocalPort = value; }
}
public bool IsBypassDirectionPass
{
get { return this.m_IsBypassDirectionPass; }
set { this.m_IsBypassDirectionPass = value; }
}
public bool IsBypassOnce
{
get { return this.m_IsBypassOnce; }
set { this.m_IsBypassOnce = value; }
}
public bool IsCommunicationOption
{
get { return this.m_IsCommunicationOption; }
set { this.m_IsCommunicationOption = value; }
}
public bool IsRFIDSpeedwayR420
{
get { return this.m_IsRFIDSpeedwayR420; }
set { this.m_IsRFIDSpeedwayR420 = value; }
}
public int ModbusRTUSelectFunction
{
get { return this.m_ModbusRTUSelectFunction; }
set { this.m_ModbusRTUSelectFunction = value; }
}
public int ModbusSlaveIDCOM1
{
get { return this.m_ModbusSlaveIDCOM1; }
set { this.m_ModbusSlaveIDCOM1 = value; }
}
public int ModbusSlaveIDCOM3
{
get { return this.m_ModbusSlaveIDCOM3; }
set { this.m_ModbusSlaveIDCOM3 = value; }
}
public int ModbusSlaveIDCOM4
{
get { return this.m_ModbusSlaveIDCOM4; }
set { this.m_ModbusSlaveIDCOM4 = value; }
}
public int ModbusTCPSelectFunction
{
get { return this.m_ModbusTCPSelectFunction; }
set { this.m_ModbusTCPSelectFunction = value; }
}
public string EntryNotDetectedWeight
{
get { return this.m_EntryNotDetectedWeight; }
set { this.m_EntryNotDetectedWeight = value; }
}
public int EntryNotDetectedWeightInt
{
get
{
if (this.EntryNotDetectedWeight == null)
return -1;
else
return int.Parse(this.EntryNotDetectedWeight);
}
}
public bool IsUsingEntryNotDetected
{
get
{
if (this.EntryNotDetectedWeight == "0")
return false;
else
return true;
}
}
public string RFID_R420_BARCD
{
get { return this.m_RFID_R420_BARCD; }
set { this.m_RFID_R420_BARCD = value; }
}
public string RFID_R420_EPC_Filter
{
get { return this.m_RFID_R420_EPC_Filter; }
set { this.m_RFID_R420_EPC_Filter = value; }
}
public int AverageTrackingCount
{
get { return this.m_AverageTracking; }
set { this.m_AverageTracking = value; }
}
public int MULTiJETSlaveAddressCOM1
{
get { return this.m_MULTiJETSlaveAddressCOM1; }
set { this.m_MULTiJETSlaveAddressCOM1 = value; }
}
public int MULTiJETSlaveAddressCOM3
{
get { return this.m_MULTiJETSlaveAddressCOM3; }
set { this.m_MULTiJETSlaveAddressCOM3 = value; }
}
public int MULTiJETSlaveAddressCOM4
{
get { return this.m_MULTiJETSlaveAddressCOM4; }
set { this.m_MULTiJETSlaveAddressCOM4 = value; }
}
public int MULTiJETSlaveAddressEthernet
{
get { return this.m_MULTiJETSlaveAddressEthernet; }
set { this.m_MULTiJETSlaveAddressEthernet = value; }
}
#endregion
#region Method
public void Initialization()
{
this.CountingOutput1Mode = 0;
this.CountingOutput1Number = 0;
this.CountingOutput1BuzzerTime = 1000;
this.IsCountingOutput1Continuous = false;
this.IsCountingOutput1ConveyorStop = false;
this.IsCountingOutput1BuzzerOn = false;
this.IsCountingOutput1ExternalOutput = false;
this.CountingOutput2Mode = 0;
this.CountingOutput2Number = 0;
this.CountingOutput2BuzzerTime = 1000;
this.IsCountingOutput2Continuous = false;
this.IsCountingOutput2ConveyorStop = false;
this.IsCountingOutput2BuzzerOn = false;
this.IsCountingOutput2ExternalOutput = false;
this.HitachiRoomNumberCOM1 = 1;
this.MarkoprintLineNumberCOM1 = 0;
this.IsHitachiBlankToNoneCOM1 = false;
this.IsMarkoprintDatePrintCOM1 = false;
this.IsMarkoprintTodaytDatePrintCOM1 = false;
this.MarkoprintDateSettingCOM1 = "";
this.HitachiRoomNumberCOM3 = 1;
this.MarkoprintLineNumberCOM3 = 0;
this.IsHitachiBlankToNoneCOM3 = false;
this.IsMarkoprintDatePrintCOM3 = false;
this.IsMarkoprintTodaytDatePrintCOM3 = false;
this.MarkoprintDateSettingCOM3 = "";
this.HitachiRoomNumberCOM4 = 1;
this.MarkoprintLineNumberCOM4 = 0;
this.IsHitachiBlankToNoneCOM4 = false;
this.IsMarkoprintDatePrintCOM4 = false;
this.IsMarkoprintTodaytDatePrintCOM4 = false;
this.MarkoprintDateSettingCOM4 = "";
this.IsGroup1UsingRandomMode = false;
this.IsGroup2UsingRandomMode = false;
this.IsGroup3UsingRandomMode = false;
this.IsGroup4UsingRandomMode = false;
this.IsGroup5UsingRandomMode = false;
this.FileNameExtension = 0;
this.HitachiRoomNumberEthernet = 1;
this.MarkoprintLineNumberEthernet = 0;
this.IsMarkoprintDatePrintEthernet = false;
this.IsMarkoprintTodaytDatePrintEthernet = false;
this.MarkoprintDateSettingEthernet = "";
this.EthernetHostPort = 0;
this.EthernetCommMode = 0;
this.EthernetOperationMode = 0;
this.EthernetAddress = "0.0.0.0";
this.ConveyorLength = 450;
this.SortingPointLength = 250;
this.Barcode = 0;
this.CommunicationControlCharacter = 0;
this.EthernetLocalPort = 0;
this.IsBypassDirectionPass = true;
this.IsBypassOnce = true;
this.IsCommunicationOption = false;
this.IsRFIDSpeedwayR420 = false;
this.ModbusRTUSelectFunction = (int)DataStore.ModbusFunction._04_ReadInputRegister;
this.ModbusSlaveIDCOM1 = 1;
this.ModbusSlaveIDCOM3 = 1;
this.ModbusSlaveIDCOM4 = 1;
this.ModbusTCPSelectFunction = (int)DataStore.ModbusFunction._04_ReadInputRegister;
this.EntryNotDetectedWeight = "0";
this.RFID_R420_BARCD = "0000000000000";
this.RFID_R420_EPC_Filter = "1";
this.AverageTrackingCount = 0;
this.MULTiJETSlaveAddressCOM1 = 58;
this.MULTiJETSlaveAddressCOM3 = 58;
this.MULTiJETSlaveAddressCOM4 = 58;
this.MULTiJETSlaveAddressEthernet = 58;
}
public bool IsCountingOutput1Activated()
{
bool ret;
if (this.CountingOutput1Mode != 0 && this.CountingOutput1Number > 0)
ret = true;
else
ret = false;
return ret;
}
public bool IsCountingOutput2Activated()
{
bool ret;
if (this.CountingOutput2Mode != 0 && this.CountingOutput2Number > 0)
ret = true;
else
ret = false;
return ret;
}
#endregion
}
#endregion
#region StructSystemConfigurationItem2
[StructLayout(LayoutKind.Sequential)]
public struct StructSystemConfigurationItem2
{
public bool IsCountingOutput1Continuous;
public bool IsCountingOutput1ConveyorStop;
public bool IsCountingOutput1BuzzerOn;
public bool IsCountingOutput1ExternalOutput;
public bool IsCountingOutput2Continuous;
public bool IsCountingOutput2ConveyorStop;
public bool IsCountingOutput2BuzzerOn;
public bool IsCountingOutput2ExternalOutput;
public bool IsRFIDSpeedwayR420;
public bool IsCommunicationOption;
public bool IsBypassOnce;
public bool IsBypassDirectionPass;
public bool IsHitachiBlankToNoneCOM4;
public bool IsHitachiBlankToNoneCOM3;
public bool IsHitachiBlankToNoneCOM1;
public bool IsMarkoprintTodaytDatePrintEthernet;
public bool IsMarkoprintDatePrintEthernet;
public bool IsGroup1UsingRandomMode;
public bool IsGroup2UsingRandomMode;
public bool IsGroup3UsingRandomMode;
public bool IsGroup4UsingRandomMode;
public bool IsGroup5UsingRandomMode;
public bool IsMarkoprintTodaytDatePrintCOM4;
public bool IsMarkoprintDatePrintCOM4;
public bool IsMarkoprintTodaytDatePrintCOM3;
public bool IsMarkoprintDatePrintCOM3;
public bool IsMarkoprintTodaytDatePrintCOM1;
public bool IsMarkoprintDatePrintCOM1;
public int CountingOutput1Mode;
public int CountingOutput1Number;
public int CountingOutput2Mode;
public int CountingOutput2Number;
public int DummyInt1;
public int MULTiJETSlaveAddressEthernet;
public int MULTiJETSlaveAddressCOM1;
public int MULTiJETSlaveAddressCOM3;
public int MULTiJETSlaveAddressCOM4;
public int ModbusTCPSelectFunction;
public int EthernetLocalPort;
public int CommunicationControlCharacter;
public int Barcode;
public int AverageTracking;
public int ModbusRTUSelectFunction;
public int ModbusRTUSlaveIDCOM1;
public int ModbusRTUSlaveIDCOM3;
public int ModbusRTUSlaveIDCOM4;
public int Alarm1BuzzerTime;
public int Alarm2BuzzerTime;
public int SortingPointLength;
public int ConveyorLength;
public int MarkoprintLineNumberEthernet;
public int HitachiRoomNumberEthernet;
public int EthernetHostPort;
public int EthernetCommMode;
public int EthernetOperationMode;
public int FileNameExtension;
public int MarkoprintLineNumberCOM4;
public int HitachiRoomNumberCOM4;
public int MarkoprintLineNumberCOM3;
public int HitachiRoomNumberCOM3;
public int MarkoprintLineNumberCOM1;
public int HitachiRoomNumberCOM1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string DummyString1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string DummyString2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString5;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString6;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString7;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string EntryNotDetectedWeight; // 제품진입 미감지
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string RFID_R420_EPC_Filter;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string RFID_R420_BARCD;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string MarkoprintDateSettingEthernet;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string EthernetAddress;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string MarkoprintDateSettingCOM4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string MarkoprintDateSettingCOM3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string MarkoprintDateSettingCOM1;
}
#endregion
#region SystemConfigurationItem3
public class SystemConfigurationItem3
{
#region Field
private bool m_IsCountingOutputCrossMode;
private bool m_IsStartStopLog;
private bool m_IsEthernetPingTimer;
private bool m_IsCharToFillZeroEthernet;
private bool m_IsTransmitWhenPassEthernet;
private bool m_IsCharToFillZeroCOM1;
private bool m_IsTransmitWhenPassCOM1;
private bool m_IsCharToFillZeroCOM3;
private bool m_IsTransmitWhenPassCOM3;
private bool m_IsCharToFillZeroCOM4;
private bool m_IsTransmitWhenPassCOM4;
private int m_SensorErrorDetectingTime;
private int m_LOTExtractDataFromIndex;
private int m_LOTExtractDataToIndex;
private int m_ModbusTCPStartAddress;
private int m_ModbusRTUStartAddressCOM1;
private int m_ModbusRTUStartAddressCOM3;
private int m_ModbusRTUStartAddressCOM4;
#endregion
#region Constructor
public SystemConfigurationItem3()
{
this.Initialization();
}
#endregion
#region Property
public bool IsCountingOutputCrossMode
{
get { return this.m_IsCountingOutputCrossMode; }
set { this.m_IsCountingOutputCrossMode = value; }
}
public bool IsStartStopLog
{
get { return this.m_IsStartStopLog; }
set { this.m_IsStartStopLog = value; }
}
public bool IsEthernetPingTimer
{
get { return this.m_IsEthernetPingTimer; }
set { this.m_IsEthernetPingTimer = value; }
}
public bool IsCharToFillZeroEthernet
{
get { return this.m_IsCharToFillZeroEthernet; }
set { this.m_IsCharToFillZeroEthernet = value; }
}
public bool IsTransmitWhenPassEthernet
{
get { return this.m_IsTransmitWhenPassEthernet; }
set { this.m_IsTransmitWhenPassEthernet = value; }
}
public bool IsCharToFillZeroCOM1
{
get { return this.m_IsCharToFillZeroCOM1; }
set { this.m_IsCharToFillZeroCOM1 = value; }
}
public bool IsTransmitWhenPassCOM1
{
get { return this.m_IsTransmitWhenPassCOM1; }
set { this.m_IsTransmitWhenPassCOM1 = value; }
}
public bool IsCharToFillZeroCOM3
{
get { return this.m_IsCharToFillZeroCOM3; }
set { this.m_IsCharToFillZeroCOM3 = value; }
}
public bool IsTransmitWhenPassCOM3
{
get { return this.m_IsTransmitWhenPassCOM3; }
set { this.m_IsTransmitWhenPassCOM3 = value; }
}
public bool IsCharToFillZeroCOM4
{
get { return this.m_IsCharToFillZeroCOM4; }
set { this.m_IsCharToFillZeroCOM4 = value; }
}
public bool IsTransmitWhenPassCOM4
{
get { return this.m_IsTransmitWhenPassCOM4; }
set { this.m_IsTransmitWhenPassCOM4 = value; }
}
public int SensorErrorDetectingTime
{
get { return this.m_SensorErrorDetectingTime; }
set { this.m_SensorErrorDetectingTime = value; }
}
public int LOTExtractDataFromIndex
{
get { return this.m_LOTExtractDataFromIndex; }
set { this.m_LOTExtractDataFromIndex = value; }
}
public int LOTExtractDataToIndex
{
get { return this.m_LOTExtractDataToIndex; }
set { this.m_LOTExtractDataToIndex = value; }
}
public int ModbusTCPStartAddress
{
get { return this.m_ModbusTCPStartAddress; }
set { this.m_ModbusTCPStartAddress = value; }
}
public int ModbusRTUStartAddressCOM1
{
get { return this.m_ModbusRTUStartAddressCOM1; }
set { this.m_ModbusRTUStartAddressCOM1 = value; }
}
public int ModbusRTUStartAddressCOM3
{
get { return this.m_ModbusRTUStartAddressCOM3; }
set { this.m_ModbusRTUStartAddressCOM3 = value; }
}
public int ModbusRTUStartAddressCOM4
{
get { return this.m_ModbusRTUStartAddressCOM4; }
set { this.m_ModbusRTUStartAddressCOM4 = value; }
}
#endregion
#region Method
public void Initialization()
{
this.IsCountingOutputCrossMode = false;
this.IsStartStopLog = false;
this.IsEthernetPingTimer = false;
this.IsCharToFillZeroEthernet = false;
this.IsTransmitWhenPassEthernet = false;
this.IsCharToFillZeroCOM1 = false;
this.IsTransmitWhenPassCOM1 = false;
this.IsCharToFillZeroCOM3 = false;
this.IsTransmitWhenPassCOM3 = false;
this.IsCharToFillZeroCOM4 = false;
this.IsTransmitWhenPassCOM4 = false;
this.SensorErrorDetectingTime = 0;
this.LOTExtractDataFromIndex = 0;
this.LOTExtractDataToIndex = 13;
this.ModbusTCPStartAddress = 10;
this.ModbusRTUStartAddressCOM1 = 10;
this.ModbusRTUStartAddressCOM3 = 10;
this.ModbusRTUStartAddressCOM4 = 10;
}
#endregion
}
#endregion
#region StructSystemConfigurationItem3
[StructLayout(LayoutKind.Sequential)]
public struct StructSystemConfigurationItem3
{
public bool DummyBool1;
public bool DummyBool2;
public bool DummyBool3;
public bool DummyBool4;
public bool DummyBool5;
public bool DummyBool6;
public bool DummyBool7;
public bool DummyBool8;
public bool DummyBool9;
public bool DummyBool10;
public bool DummyBool11;
public bool DummyBool12;
public bool DummyBool13;
public bool DummyBool14;
public bool DummyBool15;
public bool DummyBool16;
public bool DummyBool17;
public bool DummyBool18;
public bool IsCountingOutputCrossMode;
public bool DummyBool20;
public bool IsStartStopLog;
public bool IsEthernetPingTimer;
public bool IsCharToFillZeroEthernet;
public bool IsTransmitWhenPassEthernet;
public bool IsCharToFillZeroCOM1;
public bool IsTransmitWhenPassCOM1;
public bool IsCharToFillZeroCOM3;
public bool IsTransmitWhenPassCOM3;
public bool IsCharToFillZeroCOM4;
public bool IsTransmitWhenPassCOM4;
public int DummyInt1;
public int DummyInt2;
public int DummyInt3;
public int DummyInt4;
public int DummyInt5;
public int DummyInt6;
public int DummyInt7;
public int DummyInt8;
public int DummyInt9;
public int DummyInt10;
public int DummyInt11;
public int DummyInt12;
public int DummyInt13;
public int DummyInt14;
public int DummyInt15;
public int DummyInt16;
public int DummyInt17;
public int DummyInt18;
public int DummyInt19;
public int DummyInt20;
public int DummyInt21;
public int DummyInt22;
public int DummyInt23;
public int SensorErrorDetectingTime;
public int LOTExtractDataFromIndex;
public int LOTExtractDataToIndex;
public int ModbusTCPStartAddress;
public int ModbusRTUStartAddressCOM1;
public int ModbusRTUStartAddressCOM3;
public int ModbusRTUStartAddressCOM4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string DummyString1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string DummyString2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString5;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString6;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString7;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString8;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString9;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString10;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString11;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString12;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString13;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString14;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString15;
}
#endregion
#region ProductItem
public class ProductItem
{
#region Field
private int m_Number;
private string m_Name;
private string m_LotNo;
private string m_UnderRange;
private string m_PassRange;
private string m_OverRange;
private string m_TareRange;
private string m_SensingTime;
private string m_DispenserDelayTime1;
private string m_DispenserDelayTime2;
private string m_Sorting;
private int m_ProgressBarMaximum;
private int m_ProgressBarMinimum;
private Collection m_CollectionNormalDistributionRange;
private Collection m_CollectionNormalDistributionViewRange;
#endregion
#region Constructor
public ProductItem()
{
this.Initialization();
}
#endregion
#region Property
public int Number
{
get { return this.m_Number; }
set { this.m_Number = value; }
}
public string Name
{
get { return this.m_Name; }
set { this.m_Name = value; }
}
public string LotNo
{
get { return this.m_LotNo; }
set { this.m_LotNo = value; }
}
public string UnderRange
{
get { return this.m_UnderRange; }
set
{
this.m_UnderRange = value;
this.ProgressBarLevelRescale();
this.NormalDistributionRangeCalculation();
}
}
public string PassRange
{
get { return this.m_PassRange; }
set
{
this.m_PassRange = value;
this.NormalDistributionRangeCalculation();
}
}
public string OverRange
{
get { return this.m_OverRange; }
set
{
this.m_OverRange = value;
this.ProgressBarLevelRescale();
this.NormalDistributionRangeCalculation();
}
}
public string TareRange
{
get { return this.m_TareRange; }
set { this.m_TareRange = value; }
}
public string DispenserDelayTime1
{
get { return this.m_DispenserDelayTime1; }
set { this.m_DispenserDelayTime1 = value; }
}
public string DispenserDelayTime2
{
get { return this.m_DispenserDelayTime2; }
set { this.m_DispenserDelayTime2 = value; }
}
public string Sorting
{
get { return this.m_Sorting; }
set { this.m_Sorting = value; }
}
public int OverRangeDeviation
{
get { return this.OverRangeInt - this.PassRangeInt; }
//set
//{
// int iValue = 0;
// iValue = this.OverRangeInt - Math.Abs(value);
// this.m_OverRange = iValue.ToString();
// this.m_OverRangeDeviation = value;
//}
}
public int UnderRangeDeviation
{
get { return this.UnderRangeInt - this.PassRangeInt; }
//set
//{
// int iValue = 0;
// iValue = this.UnderRangeInt - Math.Abs(value);
// this.m_UnderRange = iValue.ToString();
// this.m_UnderRangeDeviation = value;
//}
}
public int UnderRangeInt
{
get
{
if (this.UnderRange == null)
return -1;
else
return int.Parse(this.UnderRange);
}
}
public int PassRangeInt
{
get
{
if (this.PassRange == null)
return -1;
else
return int.Parse(this.PassRange);
}
}
public int OverRangeInt
{
get
{
if (this.OverRange == null)
return -1;
else
return int.Parse(this.OverRange);
}
}
public int TareRangeInt
{
get { return int.Parse(this.TareRange); }
}
public string SensingTime
{
get { return this.m_SensingTime; }
set { this.m_SensingTime = value; }
}
public int ProgressBarMaximum
{
get { return this.m_ProgressBarMaximum; }
private set { this.m_ProgressBarMaximum = value; }
}
public int ProgressBarMinimum
{
get { return this.m_ProgressBarMinimum; }
private set { this.m_ProgressBarMinimum = value; }
}
public Collection CollectionNormalDistributionRange
{
get { return this.m_CollectionNormalDistributionRange; }
private set { this.m_CollectionNormalDistributionRange = value; }
}
public Collection CollectionNormalDistributionViewRange
{
get { return this.m_CollectionNormalDistributionViewRange; }
private set { this.m_CollectionNormalDistributionViewRange = value; }
}
#endregion
#region Method
public void Initialization()
{
this.CollectionNormalDistributionRange = new Collection();
this.CollectionNormalDistributionRange.Clear();
for (int i = 0; i < 8; i++)
this.CollectionNormalDistributionRange.Add(0);
this.CollectionNormalDistributionViewRange = new Collection();
this.CollectionNormalDistributionViewRange.Clear();
for (int i = 0; i < 9; i++)
this.CollectionNormalDistributionViewRange.Add(0);
this.Number = 1;
this.Name = "Product 1";
this.LotNo = "Lot 1";
this.PassRange = "2000";
this.UnderRange = "1000";
this.OverRange = "3000";
this.TareRange = "0";
this.SensingTime = "0";
this.DispenserDelayTime1 = "200";
this.DispenserDelayTime2 = "200";
this.Sorting = "0";
this.ProgressBarMinimum = 0;
this.ProgressBarMaximum = 5000;
}
private void ProgressBarLevelRescale()
{
int minBar, maxBar, gap;
int OverRange, UnderRange;
if (this.OverRange == null || this.UnderRange == null)
return;
OverRange = int.Parse(this.OverRange);
UnderRange = int.Parse(this.UnderRange);
gap = OverRange - UnderRange;
minBar = UnderRange - gap;
maxBar = OverRange + gap;
this.ProgressBarMaximum = maxBar;
this.ProgressBarMinimum = minBar;
}
private void NormalDistributionRangeCalculation()
{
int overGap = 0, underGap = 0, gap = 0, gap1 = 0;
if (this.OverRangeInt == -1 || this.PassRangeInt == -1 || this.UnderRangeInt == -1)
return;
overGap = this.OverRangeInt - this.PassRangeInt;
underGap = this.PassRangeInt - this.UnderRangeInt;
if (overGap > underGap)
gap = overGap;
else
gap = underGap;
gap1 = gap / 5;
if (gap1 == 0)
gap1 = gap;
this.CollectionNormalDistributionViewRange[0] = gap1 * 12;
this.CollectionNormalDistributionViewRange[1] = gap1 * 9;
this.CollectionNormalDistributionViewRange[2] = gap1 * 6;
this.CollectionNormalDistributionViewRange[3] = gap1 * 3;
this.CollectionNormalDistributionViewRange[4] = 0;
this.CollectionNormalDistributionViewRange[5] = gap1 * 3;
this.CollectionNormalDistributionViewRange[6] = gap1 * 6;
this.CollectionNormalDistributionViewRange[7] = gap1 * 9;
this.CollectionNormalDistributionViewRange[8] = gap1 * 12;
this.CollectionNormalDistributionRange[0] = this.PassRangeInt + (gap1 * 9) + 1;
this.CollectionNormalDistributionRange[1] = this.PassRangeInt + (gap1 * 6) + 1;
this.CollectionNormalDistributionRange[2] = this.PassRangeInt + (gap1 * 3) + 1;
this.CollectionNormalDistributionRange[3] = this.PassRangeInt + gap1 + 1;
this.CollectionNormalDistributionRange[4] = this.PassRangeInt - gap1 + 1;
this.CollectionNormalDistributionRange[5] = this.PassRangeInt - (gap1 * 3) + 1;
this.CollectionNormalDistributionRange[6] = this.PassRangeInt - (gap1 * 6) + 1;
this.CollectionNormalDistributionRange[7] = this.PassRangeInt - (gap1 * 9) + 1;
}
#endregion
}
#endregion
#region StructProductItem
#region ~V7
//[StructLayout(LayoutKind.Sequential)]
//public struct StructProductItem
//{
// public int Number;
// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
// public string Name;
// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
// public string LotNo;
// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
// public string OverRange;
// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
// public string UnderRange;
// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
// public string PassRange;
// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
// public string TareRange;
// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
// public string SensingTime;
// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
// public string DummyString1;
// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
// public string DummyString2;
// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
// public string DummyString3;
//}
#endregion
[StructLayout(LayoutKind.Sequential)]
public struct StructProductItemUntilV7
{
public int Number;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string Name;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string LotNo;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string OverRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string UnderRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string PassRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string TareRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string SensingTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string DummyString1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string DummyString2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string DummyString3;
}
[StructLayout(LayoutKind.Sequential)]
public struct StructProductItem
{
public int Number;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string Name;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string LotNo;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string OverRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string UnderRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string PassRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string TareRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string SensingTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string DispenserDelayTime1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string DispenserDelayTime2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Sorting;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string DummyString1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string DummyString2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string DummyString3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string DummyString4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string DummyString5;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string DummyString6;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string DummyString7;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string DummyString8;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
public string DummyString9;
}
#endregion
#region WeightData
public class WeightData
{
#region Field
private bool m_IsLoadCellError;
private bool m_IsEntrySensorError;
private bool m_IsInverterError;
private bool m_IsPressureSensingError;
private bool m_IsMetalError;
private bool m_IsEmergencyStop;
private bool m_IsDoorInterlock;
private bool m_IsSorterError;
private bool m_IsStackUpSensorError;
private bool m_IsWindProofError;
private double m_SumOfSquare;
private double m_PassMaxWeight;
private double m_PassMinWeight;
private double m_ExNGSumWeight;
private DateTime m_StartTime;
private DateTime m_StopTime;
private int m_UnderCount;
private double m_UnderSumWeight;
private int m_PassCount;
private double m_PassSumWeight;
private int m_OverCount;
private double m_OverSumWeight;
private int m_ExNGCount;
private double m_Weight;
private DataStore.JudgmentStatus m_JudgmentStatus;
private DataStore.WeightStatus m_Status;
private string m_ADCValue;
private int m_ProductionSpeed;
private int PreviousTimeTickCount;
private bool m_IsStart;
private string m_WeightString;
private Collection m_CollectionNormalDistributionCount;
private string m_ReceiveDataID;
private string m_ReceiveTransferCount;
private int m_BoardProductNumber;
private int m_BoardUnderCount;
private int m_BoardPassCount;
private int m_BoardOverCount;
private int m_BoardExNGCount;
private int m_BoardNGCount;
private int m_BoardTotalCount;
#endregion
#region Constructor
public WeightData()
{
this.Initialization();
}
#endregion
#region Property
public bool IsLoadCellError
{
get { return this.m_IsLoadCellError; }
set { this.m_IsLoadCellError = value; }
}
public bool IsEntrySensorError
{
get { return this.m_IsEntrySensorError; }
set { this.m_IsEntrySensorError = value; }
}
public bool IsInverterError
{
get { return this.m_IsInverterError; }
set { this.m_IsInverterError = value; }
}
public bool IsPressureSensingError
{
get { return this.m_IsPressureSensingError; }
set { this.m_IsPressureSensingError = value; }
}
public bool IsMetalError
{
get { return this.m_IsMetalError; }
set { this.m_IsMetalError = value; }
}
public bool IsEmergencyStop
{
get { return this.m_IsEmergencyStop; }
set { this.m_IsEmergencyStop = value; }
}
public bool IsDoorInterlock
{
get { return this.m_IsDoorInterlock; }
set { this.m_IsDoorInterlock = value; }
}
public bool IsSorterError
{
get { return this.m_IsSorterError; }
set { this.m_IsSorterError = value; }
}
public bool IsStackUpSensorError
{
get { return this.m_IsStackUpSensorError; }
set { this.m_IsStackUpSensorError = value; }
}
public bool IsWindProofError
{
get { return this.m_IsWindProofError; }
set { this.m_IsWindProofError = value; }
}
public DateTime StartTime
{
get { return this.m_StartTime; }
set { this.m_StartTime = value; }
}
public DateTime StopTime
{
get { return this.m_StopTime; }
set { this.m_StopTime = value; }
}
public int UnderCount
{
get { return this.m_UnderCount; }
set { this.m_UnderCount = value; }
}
public double UnderSumWeight
{
get { return this.m_UnderSumWeight; }
set { this.m_UnderSumWeight = value; }
}
public string UnderRatio
{
get
{
string ret = "";
if (this.UnderCount == 0 || this.TotalCount == 0)
ret = "0.00";
else
ret = string.Format("{0:##0.00}", (float.Parse(this.UnderCount.ToString()) * 100.0F) / this.TotalCount);
return ret;
}
}
public double UnderAverage
{
get
{
double ret = 0.0;
if (this.UnderCount == 0 || this.UnderSumWeight == 0.0)
ret = 0.0;
else
ret = this.UnderSumWeight / this.UnderCount;
return ret;
}
}
public string UnderSumWeightKG
{
get
{
string temp = "", ret = "";
temp = string.Format("{0:f0}", this.UnderSumWeight);
ret = string.Format("{0:0.00}", double.Parse(temp) / 1000);
return ret;
}
}
public int PassCount
{
get { return this.m_PassCount; }
set { this.m_PassCount = value; }
}
public double PassSumWeight
{
get { return this.m_PassSumWeight; }
set { this.m_PassSumWeight = value; }
}
public string PassRatio
{
get
{
string ret = "";
if (this.PassCount == 0 || this.TotalCount == 0)
ret = "0.00";
else
ret = string.Format("{0:##0.00}", (float.Parse(this.PassCount.ToString()) * 100.0F) / this.TotalCount);
return ret;
}
}
public double PassAverage
{
get
{
double ret = 0.0;
if (this.PassCount == 0 || this.PassSumWeight == 0.0)
ret = 0.0;
else
ret = this.PassSumWeight / this.PassCount;
return ret;
}
}
public string PassSumWeightKG
{
get
{
string temp = "", ret = "";
temp = string.Format("{0:f0}", this.PassSumWeight);
ret = string.Format("{0:0.00}", double.Parse(temp) / 1000);
return ret;
}
}
public int OverCount
{
get { return this.m_OverCount; }
set { this.m_OverCount = value; }
}
public double OverSumWeight
{
get { return this.m_OverSumWeight; }
set { this.m_OverSumWeight = value; }
}
public string OverRatio
{
get
{
string ret = "";
if (this.OverCount == 0 || this.TotalCount == 0)
ret = "0.00";
else
ret = string.Format("{0:##0.00}", (float.Parse(this.OverCount.ToString()) * 100.0F) / this.TotalCount);
return ret;
}
}
public double OverAverage
{
get
{
double ret = 0.0;
if (this.OverCount == 0 || this.OverSumWeight == 0.0)
ret = 0.0;
else
ret = this.OverSumWeight / this.OverCount;
return ret;
}
}
public string OverSumWeightKG
{
get
{
string temp = "", ret = "";
temp = string.Format("{0:f0}", this.OverSumWeight);
ret = string.Format("{0:0.00}", double.Parse(temp) / 1000);
return ret;
}
}
public int CountForSD
{
get
{
return this.OverCount + this.PassCount + this.UnderCount;
}
}
// Under + Over
public double NGAverage
{
get
{
double ret = 0.0;
if (this.OverCount + this.UnderCount == 0)
ret = 0.0;
else
ret = (this.OverSumWeight + this.UnderSumWeight) / (this.OverCount + this.UnderCount);
return ret;
}
}
public double PassMinWeight
{
get { return this.m_PassMinWeight; }
set { this.m_PassMinWeight = value; }
}
public double PassMaxWeight
{
get { return this.m_PassMaxWeight; }
set { this.m_PassMaxWeight = value; }
}
public double MaxMinusMinWeight
{
get
{
double ret = 0.0;
ret = this.PassMaxWeight - this.PassMinWeight;
return ret;
}
}
public double AverageForSD
{
get
{
if (this.CountForSD == 0)
return 0.0;
else
{
double average = (this.OverSumWeight + this.UnderSumWeight + this.PassSumWeight) / CountForSD;
return average;
}
}
}
public double SumOfSquaresDivideByCount
{
get
{
if (CountForSD == 0)
return 0.0;
else
{
return this.SumOfSquare / CountForSD;
}
}
}
public double SumOfSquare
{
get { return this.m_SumOfSquare; }
set { this.m_SumOfSquare = value; }
}
public int ExNGCount
{
get { return this.m_ExNGCount; }
set { this.m_ExNGCount = value; }
}
public string ExNGRatio
{
get
{
string ret = "";
if (this.ExNGCount == 0 || this.TotalCount == 0)
ret = "0.00";
else
ret = string.Format("{0:##0.00}", (float.Parse(this.ExNGCount.ToString()) * 100.0F) / this.TotalCount);
return ret;
}
}
public double ExNGSumWeight
{
get { return this.m_ExNGSumWeight; }
set { this.m_ExNGSumWeight = value; }
}
public string ExNGSumWeightKG
{
get
{
string temp = "", ret = "";
temp = string.Format("{0:f0}", this.ExNGSumWeight);
ret = string.Format("{0:0.00}", double.Parse(temp) / 1000);
return ret;
}
}
public int TotalUnderOverCount
{
get { return this.UnderCount + this.OverCount; }
}
public int TotalNGCount
{
get { return this.UnderCount + this.OverCount + this.ExNGCount; }
}
public int TotalCount
{
get { return this.UnderCount + this.PassCount + this.OverCount + this.ExNGCount; }
}
public double TotalWeight
{
get { return this.UnderSumWeight + this.OverSumWeight + this.PassSumWeight + this.ExNGSumWeight; }
}
public string TotalWeightKG
{
get
{
string temp = "", ret = "";
temp = string.Format("{0:f0}", this.TotalWeight);
ret = string.Format("{0:0.00}", double.Parse(temp) / 1000);
return ret;
}
}
public double StandardDeviation
{
// Under + Pass + Over 표준편차
get
{
double average = this.AverageForSD;
return Math.Sqrt(this.SumOfSquaresDivideByCount - (average * average));
}
}
public double Weight
{
get { return this.m_Weight; }
set { this.m_Weight = value; }
}
public string ADCValue
{
get { return this.m_ADCValue; }
set { this.m_ADCValue = value; }
}
public DataStore.JudgmentStatus JudgmentStatus
{
get { return this.m_JudgmentStatus; }
set
{
this.m_JudgmentStatus = value;
if (value == DataStore.JudgmentStatus.Under)
{
if (this.UnderCount < 10000000)
this.UnderCount++;
else
this.UnderCount = 0;
}
else if (value == DataStore.JudgmentStatus.Pass)
{
if (this.PassCount < 10000000)
this.PassCount++;
else
this.PassCount = 0;
}
else if (value == DataStore.JudgmentStatus.Over)
{
if (this.OverCount < 10000000)
this.OverCount++;
else
this.OverCount = 0;
}
else if (value == DataStore.JudgmentStatus.Double || value == DataStore.JudgmentStatus.Metal
|| value == DataStore.JudgmentStatus.ExNg || value == DataStore.JudgmentStatus.ExNg1 || value == DataStore.JudgmentStatus.ExNg2
|| value == DataStore.JudgmentStatus.LengthError)
{
if (this.ExNGCount < 10000000)
this.ExNGCount++;
else
this.ExNGCount = 0;
}
}
}
public DataStore.WeightStatus Status
{
get { return this.m_Status; }
set { this.m_Status = value; }
}
public int ProductionSpeed
{
get { return this.m_ProductionSpeed; }
set { this.m_ProductionSpeed = value; }
}
// 미사용
public bool IsStart
{
get { return this.m_IsStart; }
set { this.m_IsStart = value; }
}
public string WeightString
{
get { return this.m_WeightString; }
set { this.m_WeightString = value; }
}
public Collection CollectionNormalDistributionCount
{
get { return this.m_CollectionNormalDistributionCount; }
set { this.m_CollectionNormalDistributionCount = value; }
}
public string ReceiveDataID
{
get { return this.m_ReceiveDataID; }
private set { this.m_ReceiveDataID = value; }
}
public string ReceiveTransferCount
{
get { return this.m_ReceiveTransferCount; }
private set { this.m_ReceiveTransferCount = value; }
}
public int BoardProductNumber
{
get { return this.m_BoardProductNumber; }
set { this.m_BoardProductNumber = value; }
}
public int BoardUnderCount
{
get { return this.m_BoardUnderCount; }
set { this.m_BoardUnderCount = value; }
}
public int BoardPassCount
{
get { return this.m_BoardPassCount; }
set { this.m_BoardPassCount = value; }
}
public int BoardOverCount
{
get { return this.m_BoardOverCount; }
set { this.m_BoardOverCount = value; }
}
public int BoardExNGCount
{
get { return this.m_BoardExNGCount; }
set { this.m_BoardExNGCount = value; }
}
public int BoardNGCount
{
get { return this.BoardUnderCount + this.BoardOverCount; }
}
public int BoardTotalCount
{
get { return this.BoardUnderCount + this.BoardPassCount + this.BoardOverCount + this.BoardExNGCount; }
}
#endregion
#region Mehtod
public void ClearCount()
{
// 1
this.UnderCount = 0;
this.UnderSumWeight = 0.0;
this.PassCount = 0;
this.PassSumWeight = 0.0;
this.OverCount = 0;
this.OverSumWeight = 0.0;
this.ExNGCount = 0;
this.StartTime = new DateTime(1111, 11, 11, 11, 11, 11);
this.StopTime = new DateTime(1111, 11, 11, 11, 11, 11);
for (int i = 0; i < this.CollectionNormalDistributionCount.Count; i++)
this.CollectionNormalDistributionCount[i] = 0;
// 2
this.SumOfSquare = 0.0;
this.PassMaxWeight = 0.0;
this.PassMinWeight = 0.0;
this.ExNGSumWeight = 0.0;
}
private void Initialization()
{
this.IsLoadCellError = false;
this.IsEntrySensorError = false;
this.IsInverterError = false;
this.IsPressureSensingError = false;
this.IsMetalError = false;
this.IsDoorInterlock = false;
this.IsSorterError = false;
this.IsStackUpSensorError = false;
this.IsWindProofError = false;
this.StartTime = new DateTime(1111, 11, 11, 11, 11, 11);
this.StopTime = new DateTime(1111, 11, 11, 11, 11, 11);
this.UnderCount = 0;
this.UnderSumWeight = 0.0;
this.PassCount = 0;
this.PassSumWeight = 0.0;
this.OverCount = 0;
this.OverSumWeight = 0.0;
this.ExNGSumWeight = 0.0;
this.ExNGCount = 0;
this.Weight = 0.0;
this.ADCValue = "12345";
this.JudgmentStatus = DataStore.JudgmentStatus.Empty;
this.Status = DataStore.WeightStatus.Empty;
this.ProductionSpeed = 0;
this.WeightString = "0";
this.PassMaxWeight = 0.0;
this.PassMinWeight = 0.0;
this.SumOfSquare = 0.0;
this.CollectionNormalDistributionCount = new Collection();
this.CollectionNormalDistributionCount.Clear();
for (int i = 0; i < 10; i++)
this.CollectionNormalDistributionCount.Add(0);
this.ReceiveDataID = "0";
this.ReceiveTransferCount = "0";
this.BoardProductNumber = 1;
this.BoardOverCount = 0;
this.BoardPassCount = 0;
this.BoardUnderCount = 0;
this.BoardExNGCount = 0;
}
// 미사용
private void ProductionSpeedCalculation()
{
int currentTimeTickCount = 0, gap = 0;
double millisecond = 0.0, speed = 0.0;
if (this.IsStart == false)
{
this.PreviousTimeTickCount = Environment.TickCount & Int32.MaxValue;
this.IsStart = true;
}
else
{
currentTimeTickCount = Environment.TickCount & Int32.MaxValue;
gap = Math.Abs(currentTimeTickCount - this.PreviousTimeTickCount);
millisecond = gap / 1000.0;
speed = 60 / millisecond;
this.ProductionSpeed = int.Parse(string.Format("{0:f0}", speed));
this.PreviousTimeTickCount = Environment.TickCount;
}
}
public void WeightSum(DataStore.JudgmentStatus status)
{
if (status != DataStore.JudgmentStatus.Over && status != DataStore.JudgmentStatus.Pass && status != DataStore.JudgmentStatus.Under)
{
this.ExNGSumWeight += this.Weight;
}
else
{
this.SumOfSquare += this.Weight * this.Weight;
if (status == DataStore.JudgmentStatus.Over)
this.OverSumWeight += this.Weight;
else if (status == DataStore.JudgmentStatus.Pass)
{
if (this.PassMaxWeight == 0.0 || this.PassMaxWeight < this.Weight)
this.PassMaxWeight = this.Weight;
if (this.PassMinWeight == 0.0 || this.PassMinWeight > this.Weight)
this.PassMinWeight = this.Weight;
this.PassSumWeight += this.Weight;
}
else if (status == DataStore.JudgmentStatus.Under)
{
if (this.Weight > 0.0)
this.UnderSumWeight += this.Weight;
}
}
}
public void SetNormalDistribution(Collection collectionRange, string weight)
{
int value = 0;
value = int.Parse(weight);
for (int i = 0; i < this.CollectionNormalDistributionCount.Count; i++)
{
if (i == collectionRange.Count)
{
this.CollectionNormalDistributionCount[i]++;
break;
}
if (collectionRange[i] < value)
{
this.CollectionNormalDistributionCount[i]++;
break;
}
}
}
public void SetDataIDTransferCount(string dataId, string transferCount)
{
this.ReceiveDataID = dataId;
this.ReceiveTransferCount = transferCount;
}
#endregion
}
#endregion
#region StructCounter
[StructLayout(LayoutKind.Sequential)]
public struct StructCounterItem
{
public int OverCount;
public int PassCount;
public int UnderCount;
public int ExNGCount;
public int NormalDistribution1;
public int NormalDistribution2;
public int NormalDistribution3;
public int NormalDistribution4;
public int NormalDistribution5;
public int NormalDistribution6;
public int NormalDistribution7;
public int NormalDistribution8;
public int NormalDistribution9;
public int NormalDistribution10;
public double OverSumWeight;
public double PassSumWeight;
public double UnderSumWeight;
public DateTime StartTime;
public DateTime StopTime;
public int DummyInt1;
public int DummyInt2;
public int DummyInt3;
public int DummyInt4;
public int DummyInt5;
}
[StructLayout(LayoutKind.Sequential)]
public struct StructCounterItem2
{
// Under/Over/Pass 판정 제품의 제곱의 합 / Under/Over/Pass 판정 제품 개수
public double SumOfSquaresDividedByCount;
public double PassMaxWeight;
public double PassMinWeight;
public double ExNGSumWeight;
public double DummyDouble1;
public double DummyDouble2;
public double DummyDouble3;
public double DummyDouble4;
public double DummyDouble5;
public double DummyDouble6;
public double DummyDouble7;
public double DummyDouble8;
public double DummyDouble9;
public double DummyDouble10;
public double DummyDouble11;
public double DummyDouble12;
public double DummyDouble13;
public double DummyDouble14;
public double DummyDouble15;
public double DummyDouble16;
public double DummyDouble17;
public double DummyDouble18;
public double DummyDouble19;
public double DummyDouble20;
public int DummyInt1;
public int DummyInt2;
public int DummyInt3;
public int DummyInt4;
public int DummyInt5;
public int DummyInt6;
public int DummyInt7;
public int DummyInt8;
public int DummyInt9;
public int DummyInt10;
public int DummyInt11;
public int DummyInt12;
public int DummyInt13;
public int DummyInt14;
public int DummyInt15;
public int DummyInt16;
public int DummyInt17;
public int DummyInt18;
public int DummyInt19;
public int DummyInt20;
public DateTime DummyDateTime1;
public DateTime DummyDateTime2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString5;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString6;
}
#endregion
#region AverageTrackingData
public class AverageTrackingItem
{
#region Field
private string m_LimitOver;
private string m_LimitUnder;
private Queue m_QueueWeight;
private int m_SumWeight;
#endregion
#region Constructor
public AverageTrackingItem()
{
this.Initialization();
}
#endregion
#region Property
public string LimitUnder
{
get { return this.m_LimitUnder; }
set { this.m_LimitUnder = value; }
}
public string LimitOver
{
get { return this.m_LimitOver; }
set { this.m_LimitOver = value; }
}
public Queue QueueWeight
{
get { return this.m_QueueWeight; }
private set { this.m_QueueWeight = value; }
}
public int SumWeight
{
get { return this.m_SumWeight; }
private set { this.m_SumWeight = value; }
}
public int GetQueueCount
{
get { return this.QueueWeight.Count; }
}
public int GetAverageWeight
{
get
{
int value = 0;
if (this.QueueWeight.Count == 0)
return value;
try
{
value = this.SumWeight / this.GetQueueCount;
return value;
}
catch
{
return value;
}
}
}
#endregion
#region Method
public void Initialization()
{
this.LimitOver = "99999";
this.LimitUnder = "0";
this.QueueWeight = new Queue();
this.SumWeight = 0;
}
public void SetValue(int value, int trackingCount)
{
int iValue = 0;
if (this.QueueWeight.Count == trackingCount)
{
iValue = this.QueueWeight.Dequeue();
this.SumWeight -= iValue;
}
this.QueueWeight.Enqueue(value);
this.SumWeight += value;
}
public void DataClear()
{
this.QueueWeight.Clear();
this.SumWeight = 0;
}
#endregion
}
#endregion
#region StructAverageTracking
[StructLayout(LayoutKind.Sequential)]
public struct StructAverageTrackingItem
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string LimitOver;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string LimitUnder;
public int DummyInt1;
public int DummyInt2;
public int DummyInt3;
public int DummyInt4;
public int DummyInt5;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string DummyString1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string DummyString2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string DummyString3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string DummyString4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
public string DummyString5;
}
#endregion
#region JudgmentSetItem
public class JudgmentSetItem
{
#region Field
private int m_Filter;
private int m_JudgmentDelayTime;
private int m_DoubleDelayTime;
private int m_JudgmentCount;
private int m_FeedSpeed1;
private int m_FeedSpeed2;
private int m_FeedSpeed3;
private double m_DynamicCorrection;
private int m_Sorter1Mode;
private int m_Sorter1DelayTime;
private int m_Sorter1RunTime;
private int m_Sorter2Mode;
private int m_Sorter2DelayTime;
private int m_Sorter2RunTime;
private int m_ProductLength;
private int m_AutoJudgmentTime;
private int m_AutoJudgment2;
private int m_AutoJudgment3;
private int m_AscendDelayTime;
private int m_DescendDelayTime;
#endregion
#region Constructor
public JudgmentSetItem()
{
this.Initialization();
}
#endregion
#region Property
public int Filter
{
get { return this.m_Filter; }
set { this.m_Filter = value; }
}
public int JudgmentDelayTime
{
get { return this.m_JudgmentDelayTime; }
set { this.m_JudgmentDelayTime = value; }
}
public int DoubleDelayTime
{
get { return this.m_DoubleDelayTime; }
set { this.m_DoubleDelayTime = value; }
}
public int JudgmentCount
{
get { return this.m_JudgmentCount; }
set { this.m_JudgmentCount = value; }
}
public int FeedSpeed1
{
get { return this.m_FeedSpeed1; }
set { this.m_FeedSpeed1 = value; }
}
public int FeedSpeed2
{
get { return this.m_FeedSpeed2; }
set { this.m_FeedSpeed2 = value; }
}
public int FeedSpeed3
{
get { return this.m_FeedSpeed3; }
set { this.m_FeedSpeed3 = value; }
}
public double DynamicCorrection
{
get { return this.m_DynamicCorrection; }
set { this.m_DynamicCorrection = value; }
}
public int DescendDelayTime
{
get { return this.m_DescendDelayTime; }
set { this.m_DescendDelayTime = value; }
}
public int AscendDelayTime
{
get { return this.m_AscendDelayTime; }
set { this.m_AscendDelayTime = value; }
}
public int Sorter1Mode
{
get { return this.m_Sorter1Mode; }
set { this.m_Sorter1Mode = value; }
}
public int Sorter1DelayTime
{
get { return this.m_Sorter1DelayTime; }
set { this.m_Sorter1DelayTime = value; }
}
public int Sorter1RunTime
{
get { return this.m_Sorter1RunTime; }
set { this.m_Sorter1RunTime = value; }
}
public int Sorter2Mode
{
get { return this.m_Sorter2Mode; }
set { this.m_Sorter2Mode = value; }
}
public int Sorter2DelayTime
{
get { return this.m_Sorter2DelayTime; }
set { this.m_Sorter2DelayTime = value; }
}
public int Sorter2RunTime
{
get { return this.m_Sorter2RunTime; }
set { this.m_Sorter2RunTime = value; }
}
public int ProductLength
{
get { return this.m_ProductLength; }
set { this.m_ProductLength = value; }
}
public int AutoJudgment1
{
get { return this.m_AutoJudgmentTime; }
set { this.m_AutoJudgmentTime = value; }
}
public int AutoJudgment2
{
get { return this.m_AutoJudgment2; }
set { this.m_AutoJudgment2 = value; }
}
public int AutoJudgment3
{
get { return this.m_AutoJudgment3; }
set { this.m_AutoJudgment3 = value; }
}
#endregion
#region Method
public void Initialization()
{
this.Filter = 8;
this.JudgmentDelayTime = 1000;
this.DoubleDelayTime = 900;
this.JudgmentCount = 10;
this.FeedSpeed1 = 60;
this.FeedSpeed2 = 60;
this.FeedSpeed3 = 60;
this.DynamicCorrection = 1.000000;
this.AscendDelayTime = 1000;
this.DescendDelayTime = 1000;
this.Sorter1Mode = 0;
this.Sorter1DelayTime = 1;
this.Sorter1RunTime = 1000;
this.Sorter2Mode = 0;
this.Sorter2DelayTime = 1;
this.Sorter2RunTime = 1000;
this.ProductLength = 100;
this.AutoJudgment1 = 100;
this.AutoJudgment2 = 100;
this.AutoJudgment3 = 100;
}
#endregion
}
#endregion
#region Struct JudgmentSetItem
[StructLayout(LayoutKind.Sequential)]
public struct StructJudgmentSetItem
{
public int Filter;
public int JudgmentDelayTime;
public int DoubleDelayTime;
public int JudgmentCount;
public int FeedSpeed1;
public int FeedSpeed2;
public int FeedSpeed3;
public double DynamicCorrection;
public int Sorter1Mode;
public int Sorter1DelayTime;
public int Sorter1RunTime;
public int Sorter2Mode;
public int Sorter2DelayTime;
public int Sorter2RunTime;
public int ProductLength;
public int AutoJudgment1;
public int AutoJudgment2;
public int AutoJudgment3;
public int DescendDelayTime;
public int AscendDelayTime;
public int DummyInt1;
public int DummyInt2;
public int DummyInt3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString5;
}
#endregion
#region CalibrationItem
public class CalibrationItem
{
#region Field
private string m_BalanceWeight;
private string m_MaxWeight;
private string m_Digit;
private string m_Constant;
#endregion
#region Constructor
public CalibrationItem()
{
this.BalanceWeight = "5000";
this.MaxWeight = "9999";
this.Digit = "1";
this.Constant = "1000000";
}
#endregion
#region Property
public string BalanceWeight
{
get { return this.m_BalanceWeight; }
set { this.m_BalanceWeight = value; }
}
public string MaxWeight
{
get { return this.m_MaxWeight; }
set { this.m_MaxWeight = value; }
}
public string OverloadWeightString
{
get { return string.Format("{0, 5}", Math.Floor(double.Parse(this.MaxWeight) * 1.1)); }
}
public string Digit
{
get { return this.m_Digit; }
set { this.m_Digit = value; }
}
public string Constant
{
get { return this.m_Constant; }
set { this.m_Constant = value; }
}
#endregion
}
#endregion
#region FeedbackItem
public class FeedbackItem
{
#region Field
private bool m_IsUsingFeedback;
private string m_SampleCount;
private string m_DelayCount;
private string m_Sign;
private string m_FeedbackWeight;
private string m_UnderRangeDeviation;
private string m_OverRangeDeviation;
#endregion
#region Constructor
public FeedbackItem()
{
this.IsUsingFeedback = false;
this.SampleCount = "0";
this.DelayCount = "0";
this.Sign = "+";
this.FeedbackWeight = "0";
this.UnderRangeDeviation = "0";
this.OverRangeDeviation = "0";
}
#endregion
#region Property
public bool IsUsingFeedback
{
get { return this.m_IsUsingFeedback; }
set { this.m_IsUsingFeedback = value; }
}
public string SampleCount
{
get { return this.m_SampleCount; }
set { this.m_SampleCount = value; }
}
public string DelayCount
{
get { return this.m_DelayCount; }
set { this.m_DelayCount = value; }
}
public string Sign
{
get { return this.m_Sign; }
set { this.m_Sign = value; }
}
public string FeedbackWeight
{
get { return this.m_FeedbackWeight; }
set { this.m_FeedbackWeight = value; }
}
public string UnderRangeDeviation
{
get { return this.m_UnderRangeDeviation; }
set { this.m_UnderRangeDeviation = value; }
}
public string OverRangeDeviation
{
get { return this.m_OverRangeDeviation; }
set { this.m_OverRangeDeviation = value; }
}
public int OverRangeDeviationInt
{
get
{
if (this.OverRangeDeviation == null)
return -1;
else
return int.Parse(this.OverRangeDeviation);
}
}
public int UnderRangeDeviationInt
{
get
{
if (this.UnderRangeDeviation == null)
return -1;
else
return int.Parse(this.UnderRangeDeviation);
}
}
#endregion
#region Method
#endregion
}
#endregion
#region SystemParameter1
public class SystemParameter1
{
#region Field
private string m_BuzzerOnTime;
private string m_RelayOnTime;
private string m_SorterDoubleEntry;
private string m_Chattering;
private string m_SorterExternalNgInput;
private string m_SorterEtcNg;
private string m_StopWeighing;
private string m_OptionBoard;
private string m_InitialDrive;
private int m_PI2;
private int m_PI3;
private int m_PI4;
private int m_PI5;
private int m_PI6;
private int m_PI7;
private int m_PI8;
private string m_SortingWhenNGLength;
private string m_SortingByProductNo;
private string m_Inverter;
private string m_EquipmentType;
#endregion
#region Constructor
public SystemParameter1()
{
this.Initialization();
}
#endregion
#region Property
public string BuzzerOnTime
{
get { return this.m_BuzzerOnTime; }
set { this.m_BuzzerOnTime = value; }
}
public string RelayOnTime
{
get { return this.m_RelayOnTime; }
set { this.m_RelayOnTime = value; }
}
public string SorterDoubleEntry
{
get { return this.m_SorterDoubleEntry; }
set { this.m_SorterDoubleEntry = value; }
}
public string Chattering
{
get { return this.m_Chattering; }
set { this.m_Chattering = value; }
}
public string SorterExternalNgInput
{
get { return this.m_SorterExternalNgInput; }
set { this.m_SorterExternalNgInput = value; }
}
public string SorterEtcNg
{
get { return this.m_SorterEtcNg; }
set { this.m_SorterEtcNg = value; }
}
public string StopWeighing
{
get { return this.m_StopWeighing; }
set { this.m_StopWeighing = value; }
}
public string OptionBoard
{
get { return this.m_OptionBoard; }
set { this.m_OptionBoard = value; }
}
public string InitialDrive
{
get { return this.m_InitialDrive; }
set { this.m_InitialDrive = value; }
}
public int PI2
{
get { return this.m_PI2; }
set { this.m_PI2 = value; }
}
public int PI3
{
get { return this.m_PI3; }
set { this.m_PI3 = value; }
}
public int PI4
{
get { return this.m_PI4; }
set { this.m_PI4 = value; }
}
public int PI5
{
get { return this.m_PI5; }
set { this.m_PI5 = value; }
}
public int PI6
{
get { return this.m_PI6; }
set { this.m_PI6 = value; }
}
public int PI7
{
get { return this.m_PI7; }
set { this.m_PI7 = value; }
}
public int PI8
{
get { return this.m_PI8; }
set { this.m_PI8 = value; }
}
public string EquipmentType
{
get { return this.m_EquipmentType; }
set { this.m_EquipmentType = value; }
}
public string SortingWhenNGLength
{
get { return this.m_SortingWhenNGLength; }
set { this.m_SortingWhenNGLength = value; }
}
public string SortingByProductNo
{
get { return this.m_SortingByProductNo; }
set { this.m_SortingByProductNo = value; }
}
public string Inverter
{
get { return this.m_Inverter; }
set { this.m_Inverter = value; }
}
#endregion
#region Method
public void Initialization()
{
this.BuzzerOnTime = "1000";
this.RelayOnTime = "1000";
this.Chattering = "100";
this.SorterDoubleEntry = "0";
this.SorterExternalNgInput = "0";
this.SorterEtcNg = "0";
this.StopWeighing = "0";
this.OptionBoard = "0";
this.InitialDrive = "0";
this.PI2 = 0;
this.PI3 = 0;
this.PI4 = 0;
this.PI5 = 0;
this.PI6 = 0;
this.PI7 = 0;
this.PI8 = 0;
this.EquipmentType = "0";
this.SortingWhenNGLength = "0";
this.SortingByProductNo = "0";
this.Inverter = "0";
}
#endregion
}
#endregion
#region StructSystemParameter1
[StructLayout(LayoutKind.Sequential)]
public struct StructSystemParameter1
{
public int PI2;
public int PI3;
public int PI4;
public int PI5;
public int PI6;
public int PI7;
public int PI8;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string BuzzerOnTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string RelayOnTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string SorterDoubleEntry;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Chattering;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string SorterExternalNgInput;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string SorterEtcNgInput;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string StopWeighing;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OptionBoard;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string InitialDrive;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string EquipmentType;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string SortingWhenNGLength;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string SortingByProductNo;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Inverter;
}
#endregion
#region StructSystemParameter1V1V2
[StructLayout(LayoutKind.Sequential)]
public struct StructSystemParameter1V1V2
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Serial1Mode;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Serial1BaudRate;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string BuzzerOnTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string RelayOnTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Chattering;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string SorterDoubleEntry;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string SorterExternalNgInput;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string StopWeighting;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string ExternalOperation;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string InitialDrive;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string PressureSensing;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string StackSensing;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string SorterDetecting;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OptionBoard;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string EntryStopper;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy5;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy6;
}
#endregion
#region SystemParameter2
public class SystemParameter2
{
#region Field
private string m_OPT1SamplingCount;
private string m_OPT1DelayCount;
private string m_OPT1PulseWidth;
private string m_OPT1IsWeightSetting;
private string m_OPT1OverRange;
private string m_OPT1UnderRange;
private string m_OPT1Port;
private string m_OPT2Port;
private string m_OPT2DelayTime1;
private string m_OPT2DelayTime2;
private string m_OPT2ZeroZoneCycle;
private string m_OPT2ZeroZoneCount;
private string m_Dummy1;
private string m_Dummy2;
private string m_Dummy3;
private string m_Dummy4;
private string m_Dummy5;
#endregion
#region Constructor
public SystemParameter2()
{
this.Initialization();
}
#endregion
#region Property
public string OPT1SamplingCount
{
get { return this.m_OPT1SamplingCount; }
set { this.m_OPT1SamplingCount = value; }
}
public string OPT1DelayCount
{
get { return this.m_OPT1DelayCount; }
set { this.m_OPT1DelayCount = value; }
}
public string OPT1PulseWidth
{
get { return this.m_OPT1PulseWidth; }
set { this.m_OPT1PulseWidth = value; }
}
public string OPT1IsWeightSetting
{
get { return this.m_OPT1IsWeightSetting; }
set { this.m_OPT1IsWeightSetting = value; }
}
public string OPT1OverRange
{
get { return this.m_OPT1OverRange; }
set { this.m_OPT1OverRange = value; }
}
public string OPT1UnderRange
{
get { return this.m_OPT1UnderRange; }
set { this.m_OPT1UnderRange = value; }
}
public string OPT1Port
{
get { return this.m_OPT1Port; }
set { this.m_OPT1Port = value; }
}
public int OPT1OverRangeInt
{
get
{
if (this.OPT1OverRange == null)
return -1;
else
return int.Parse(this.OPT1OverRange);
}
}
public int OPT1UnderRangeInt
{
get
{
if (this.OPT1UnderRange == null)
return -1;
else
return int.Parse(this.OPT1UnderRange);
}
}
public string OPT2Port
{
get { return this.m_OPT2Port; }
set { this.m_OPT2Port = value; }
}
public string OPT2DelayTime1
{
get { return this.m_OPT2DelayTime1; }
set { this.m_OPT2DelayTime1 = value; }
}
public string OPT2DelayTime2
{
get { return this.m_OPT2DelayTime2; }
set { this.m_OPT2DelayTime2 = value; }
}
public string OPT2ZeroZoneCycle
{
get { return this.m_OPT2ZeroZoneCycle; }
set { this.m_OPT2ZeroZoneCycle = value; }
}
public string OPT2ZeroZoneCount
{
get { return this.m_OPT2ZeroZoneCount; }
set { this.m_OPT2ZeroZoneCount = 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; }
}
public string Dummy3
{
get { return this.m_Dummy3; }
set { this.m_Dummy3 = value; }
}
public string Dummy4
{
get { return this.m_Dummy4; }
set { this.m_Dummy4 = value; }
}
public string Dummy5
{
get { return this.m_Dummy5; }
set { this.m_Dummy5 = value; }
}
#endregion
#region Method
public void Initialization()
{
this.OPT1SamplingCount = "0";
this.OPT1DelayCount = "0";
this.OPT1PulseWidth = "0";
this.OPT1IsWeightSetting = "0";
this.OPT1OverRange = "0";
this.OPT1UnderRange = "0";
this.OPT1Port = "0";
this.OPT2Port = "0";
this.OPT2DelayTime1 = "200";
this.OPT2DelayTime2 = "200";
this.OPT2ZeroZoneCycle = "0";
this.OPT2ZeroZoneCount = "0";
this.Dummy1 = "0";
this.Dummy2 = "0";
this.Dummy3 = "0";
this.Dummy4 = "0";
this.Dummy5 = "0";
}
#endregion
}
#endregion
#region StructSystemParameter2
[StructLayout(LayoutKind.Sequential)]
public struct StructSystemParameter2
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT1SamplingCount;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT1DelayCount;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT1PulseWidth;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT1IsWeightSetting;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT1OverRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT1UnderRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT1Port;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT2Port;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT2DelayTime1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT2DelayTime2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT2ZeroZoneCycle;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string OPT2ZeroZoneCount;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy5;
}
#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 SystemParameter4
public class SystemParameter4
{
#region Field
// 메인보드 저장값
private string m_MainAutoZero1Range;
private string m_MainAutoZero1Time;
private string m_MainAutoZero1Variate;
private string m_MainAutoZero1Mode;
private string m_MainAutoZero2Mode;
private string m_MainAutoZero2Range;
private string m_MainAutoZero2Time;
private string m_MainAutoZero2Variate;
// LCD 저장값
private string m_LCDAutoZero1Range;
private string m_LCDAutoZero1Time;
private string m_LCDAutoZero1Variate;
private string m_LCDAutoZero1Mode;
private string m_LCDAutoZero2Mode;
private string m_LCDAutoZero2Range;
private string m_LCDAutoZero2Time;
private string m_LCDAutoZero2Variate;
private string m_Dummy1;
private string m_Dummy2;
private string m_Dummy3;
private string m_Dummy4;
private string m_Dummy5;
private string m_Dummy6;
#endregion
#region Constructor
public SystemParameter4()
{
this.Initialization();
}
#endregion
#region Property
public string MainAutoZero1Range
{
get { return this.m_MainAutoZero1Range; }
set { this.m_MainAutoZero1Range = value; }
}
public string MainAutoZero1Time
{
get { return this.m_MainAutoZero1Time; }
set { this.m_MainAutoZero1Time = value; }
}
public string MainAutoZero1Variate
{
get { return this.m_MainAutoZero1Variate; }
set { this.m_MainAutoZero1Variate = value; }
}
public string MainAutoZero1Mode
{
get { return this.m_MainAutoZero1Mode; }
set { this.m_MainAutoZero1Mode = value; }
}
public string MainAutoZero2Mode
{
get { return this.m_MainAutoZero2Mode; }
set { this.m_MainAutoZero2Mode = value; }
}
public string MainAutoZero2Range
{
get { return this.m_MainAutoZero2Range; }
set { this.m_MainAutoZero2Range = value; }
}
public string MainAutoZero2Time
{
get { return this.m_MainAutoZero2Time; }
set { this.m_MainAutoZero2Time = value; }
}
public string MainAutoZero2Variate
{
get { return this.m_MainAutoZero2Variate; }
set { this.m_MainAutoZero2Variate = value; }
}
public string LCDAutoZero1Range
{
get { return this.m_LCDAutoZero1Range; }
set { this.m_LCDAutoZero1Range = value; }
}
public string LCDAutoZero1Time
{
get { return this.m_LCDAutoZero1Time; }
set { this.m_LCDAutoZero1Time = value; }
}
public string LCDAutoZero1Variate
{
get { return this.m_LCDAutoZero1Variate; }
set { this.m_LCDAutoZero1Variate = value; }
}
public string LCDAutoZero1Mode
{
get { return this.m_LCDAutoZero1Mode; }
set { this.m_LCDAutoZero1Mode = value; }
}
public string LCDAutoZero2Mode
{
get { return this.m_LCDAutoZero2Mode; }
set { this.m_LCDAutoZero2Mode = value; }
}
public string LCDAutoZero2Range
{
get { return this.m_LCDAutoZero2Range; }
set { this.m_LCDAutoZero2Range = value; }
}
public string LCDAutoZero2Time
{
get { return this.m_LCDAutoZero2Time; }
set { this.m_LCDAutoZero2Time = value; }
}
public string LCDAutoZero2Variate
{
get { return this.m_LCDAutoZero2Variate; }
set { this.m_LCDAutoZero2Variate = 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; }
}
public string Dummy3
{
get { return this.m_Dummy3; }
set { this.m_Dummy3 = value; }
}
public string Dummy4
{
get { return this.m_Dummy4; }
set { this.m_Dummy4 = value; }
}
public string Dummy5
{
get { return this.m_Dummy5; }
set { this.m_Dummy5 = value; }
}
public string Dummy6
{
get { return this.m_Dummy6; }
set { this.m_Dummy6 = value; }
}
#endregion
#region Method
public void Initialization()
{
this.MainAutoZero1Time = "100";
this.MainAutoZero1Range = "17";
this.MainAutoZero1Variate = "1";
this.MainAutoZero1Mode = "2";
this.MainAutoZero2Mode = "0";
this.MainAutoZero2Time = "5";
this.MainAutoZero2Range = "10";
this.MainAutoZero2Variate = "1";
this.LCDAutoZero1Mode = "2";
this.LCDAutoZero1Time = "100";
this.LCDAutoZero1Range = "17";
this.LCDAutoZero1Variate = "1";
this.LCDAutoZero2Mode = "0";
this.LCDAutoZero2Time = "5";
this.LCDAutoZero2Range = "10";
this.LCDAutoZero2Variate = "1";
this.Dummy1 = "0";
this.Dummy2 = "0";
this.Dummy3 = "0";
this.Dummy4 = "0";
this.Dummy5 = "0";
this.Dummy6 = "0";
}
#endregion
}
#endregion
#region StructSystemParameter4
[StructLayout(LayoutKind.Sequential)]
public struct StructSystemParameter4
{
// 각 모드별 시간/범위/변량 저장값은 UserSetting 값만
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string AutoZero1UserSettingRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string AutoZero1UserSettingTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string AutoZero1UserSettingVariate;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string AutoZero1Mode;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string AutoZero2UserSettingRange;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string AutoZero2UserSettingTime;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string AutoZero2UserSettingVariate;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string AutoZero2Mode;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy5;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy6;
}
#endregion
#region SystemParameter5
public class SystemParameter5
{
#region Field
private bool m_PhotoBBuzzer;
private bool m_PIN3Buzzer;
private bool m_PIN4Buzzer;
private bool m_PIN5Buzzer;
private bool m_PIN6Buzzer;
private bool m_PIN7Buzzer;
private bool m_PIN8Buzzer;
private bool m_PhotoBLamp;
private bool m_PIN3Lamp;
private bool m_PIN4Lamp;
private bool m_PIN5Lamp;
private bool m_PIN6Lamp;
private bool m_PIN7Lamp;
private bool m_PIN8Lamp;
private bool m_PhotoBConveyorStop;
private bool m_PIN3ConveyorStop;
private bool m_PIN4ConveyorStop;
private bool m_PIN5ConveyorStop;
private bool m_PIN6ConveyorStop;
private bool m_PIN7ConveyorStop;
private bool m_PIN8ConveyorStop;
private bool m_DummyBool1;
private bool m_DummyBool2;
private bool m_DummyBool3;
private bool m_DummyBool4;
private bool m_DummyBool5;
private bool m_DummyBool6;
private bool m_DummyBool7;
private bool m_DummyBool8;
private bool m_DummyBool9;
private bool m_DummyBool10;
private bool m_DummyBool11;
private bool m_DummyBool12;
private bool m_DummyBool13;
private bool m_DummyBool14;
private int m_DummyInt1;
private int m_DummyInt2;
private int m_DummyInt3;
private int m_DummyInt4;
private int m_DummyInt5;
private int m_DummyInt6;
private int m_DummyInt7;
private int m_DummyInt8;
private int m_DummyInt9;
private int m_DummyInt10;
private int m_DummyInt11;
private int m_DummyInt12;
private int m_DummyInt13;
private int m_DummyInt14;
private string m_Dummy1;
private string m_Dummy2;
private string m_Dummy3;
private string m_Dummy4;
private string m_Dummy5;
private string m_Dummy6;
private string m_Dummy7;
#endregion
#region Constructor
public SystemParameter5()
{
this.Initialization();
}
#endregion
#region Property
public bool PhotoBBuzzer
{
get { return this.m_PhotoBBuzzer; }
set { this.m_PhotoBBuzzer = value; }
}
public bool PIN3Buzzer
{
get { return this.m_PIN3Buzzer; }
set { this.m_PIN3Buzzer = value; }
}
public bool PIN4Buzzer
{
get { return this.m_PIN4Buzzer; }
set { this.m_PIN4Buzzer = value; }
}
public bool PIN5Buzzer
{
get { return this.m_PIN5Buzzer; }
set { this.m_PIN5Buzzer = value; }
}
public bool PIN6Buzzer
{
get { return this.m_PIN6Buzzer; }
set { this.m_PIN6Buzzer = value; }
}
public bool PIN7Buzzer
{
get { return this.m_PIN7Buzzer; }
set { this.m_PIN7Buzzer = value; }
}
public bool PIN8Buzzer
{
get { return this.m_PIN8Buzzer; }
set { this.m_PIN8Buzzer = value; }
}
public bool PhotoBLamp
{
get { return this.m_PhotoBLamp; }
set { this.m_PhotoBLamp = value; }
}
public bool PIN3Lamp
{
get { return this.m_PIN3Lamp; }
set { this.m_PIN3Lamp = value; }
}
public bool PIN4Lamp
{
get { return this.m_PIN4Lamp; }
set { this.m_PIN4Lamp = value; }
}
public bool PIN5Lamp
{
get { return this.m_PIN5Lamp; }
set { this.m_PIN5Lamp = value; }
}
public bool PIN6Lamp
{
get { return this.m_PIN6Lamp; }
set { this.m_PIN6Lamp = value; }
}
public bool PIN7Lamp
{
get { return this.m_PIN7Lamp; }
set { this.m_PIN7Lamp = value; }
}
public bool PIN8Lamp
{
get { return this.m_PIN8Lamp; }
set { this.m_PIN8Lamp = value; }
}
public bool PhotoBConveyorStop
{
get { return this.m_PhotoBConveyorStop; }
set { this.m_PhotoBConveyorStop = value; }
}
public bool PIN3ConveyorStop
{
get { return this.m_PIN3ConveyorStop; }
set { this.m_PIN3ConveyorStop = value; }
}
public bool PIN4ConveyorStop
{
get { return this.m_PIN4ConveyorStop; }
set { this.m_PIN4ConveyorStop = value; }
}
public bool PIN5ConveyorStop
{
get { return this.m_PIN5ConveyorStop; }
set { this.m_PIN5ConveyorStop = value; }
}
public bool PIN6ConveyorStop
{
get { return this.m_PIN6ConveyorStop; }
set { this.m_PIN6ConveyorStop = value; }
}
public bool PIN7ConveyorStop
{
get { return this.m_PIN7ConveyorStop; }
set { this.m_PIN7ConveyorStop = value; }
}
public bool PIN8ConveyorStop
{
get { return this.m_PIN8ConveyorStop; }
set { this.m_PIN8ConveyorStop = value; }
}
public bool DummyBool1
{
get { return this.m_DummyBool1; }
set { this.m_DummyBool1 = value; }
}
public bool DummyBool2
{
get { return this.m_DummyBool2; }
set { this.m_DummyBool2 = value; }
}
public bool DummyBool3
{
get { return this.m_DummyBool3; }
set { this.m_DummyBool3 = value; }
}
public bool DummyBool4
{
get { return this.m_DummyBool4; }
set { this.m_DummyBool4 = value; }
}
public bool DummyBool5
{
get { return this.m_DummyBool5; }
set { this.m_DummyBool5 = value; }
}
public bool DummyBool6
{
get { return this.m_DummyBool6; }
set { this.m_DummyBool6 = value; }
}
public bool DummyBool7
{
get { return this.m_DummyBool7; }
set { this.m_DummyBool7 = value; }
}
public bool DummyBool8
{
get { return this.m_DummyBool8; }
set { this.m_DummyBool8 = value; }
}
public bool DummyBool9
{
get { return this.m_DummyBool9; }
set { this.m_DummyBool9 = value; }
}
public bool DummyBool10
{
get { return this.m_DummyBool10; }
set { this.m_DummyBool10 = value; }
}
public bool DummyBool11
{
get { return this.m_DummyBool11; }
set { this.m_DummyBool11 = value; }
}
public bool DummyBool12
{
get { return this.m_DummyBool12; }
set { this.m_DummyBool12 = value; }
}
public bool DummyBool13
{
get { return this.m_DummyBool13; }
set { this.m_DummyBool13 = value; }
}
public bool DummyBool14
{
get { return this.m_DummyBool14; }
set { this.m_DummyBool14 = value; }
}
public int DummyInt1
{
get { return this.m_DummyInt1; }
set { this.m_DummyInt1 = value; }
}
public int DummyInt2
{
get { return this.m_DummyInt2; }
set { this.m_DummyInt2 = value; }
}
public int DummyInt3
{
get { return this.m_DummyInt3; }
set { this.m_DummyInt3 = value; }
}
public int DummyInt4
{
get { return this.m_DummyInt4; }
set { this.m_DummyInt4 = value; }
}
public int DummyInt5
{
get { return this.m_DummyInt5; }
set { this.m_DummyInt5 = value; }
}
public int DummyInt6
{
get { return this.m_DummyInt6; }
set { this.m_DummyInt6 = value; }
}
public int DummyInt7
{
get { return this.m_DummyInt7; }
set { this.m_DummyInt7 = value; }
}
public int DummyInt8
{
get { return this.m_DummyInt8; }
set { this.m_DummyInt8 = value; }
}
public int DummyInt9
{
get { return this.m_DummyInt9; }
set { this.m_DummyInt9 = value; }
}
public int DummyInt10
{
get { return this.m_DummyInt10; }
set { this.m_DummyInt10 = value; }
}
public int DummyInt11
{
get { return this.m_DummyInt11; }
set { this.m_DummyInt11 = value; }
}
public int DummyInt12
{
get { return this.m_DummyInt12; }
set { this.m_DummyInt12 = value; }
}
public int DummyInt13
{
get { return this.m_DummyInt13; }
set { this.m_DummyInt13 = value; }
}
public int DummyInt14
{
get { return this.m_DummyInt14; }
set { this.m_DummyInt14 = 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; }
}
public string Dummy3
{
get { return this.m_Dummy3; }
set { this.m_Dummy3 = value; }
}
public string Dummy4
{
get { return this.m_Dummy4; }
set { this.m_Dummy4 = value; }
}
public string Dummy5
{
get { return this.m_Dummy5; }
set { this.m_Dummy5 = value; }
}
public string Dummy6
{
get { return this.m_Dummy6; }
set { this.m_Dummy6 = value; }
}
public string Dummy7
{
get { return this.m_Dummy7; }
set { this.m_Dummy7 = value; }
}
#endregion
#region Method
public void Initialization()
{
this.PhotoBBuzzer = false;
this.PIN3Buzzer = false;
this.PIN4Buzzer = false;
this.PIN5Buzzer = false;
this.PIN6Buzzer = false;
this.PIN7Buzzer = false;
this.PIN8Buzzer = false;
this.PhotoBLamp = false;
this.PIN3Lamp = false;
this.PIN4Lamp = false;
this.PIN5Lamp = false;
this.PIN6Lamp = false;
this.PIN7Lamp = false;
this.PIN8Lamp = false;
this.PhotoBConveyorStop = false;
this.PIN3ConveyorStop = false;
this.PIN4ConveyorStop = false;
this.PIN5ConveyorStop = false;
this.PIN6ConveyorStop = false;
this.PIN7ConveyorStop = false;
this.PIN8ConveyorStop = false;
this.DummyBool1 = false;
this.DummyBool2 = false;
this.DummyBool3 = false;
this.DummyBool4 = false;
this.DummyBool5 = false;
this.DummyBool6 = false;
this.DummyBool7 = false;
this.DummyBool8 = false;
this.DummyBool9 = false;
this.DummyBool10 = false;
this.DummyBool11 = false;
this.DummyBool12 = false;
this.DummyBool13 = false;
this.DummyBool14 = false;
this.DummyInt1 = 0;
this.DummyInt2 = 0;
this.DummyInt3 = 0;
this.DummyInt4 = 0;
this.DummyInt5 = 0;
this.DummyInt6 = 0;
this.DummyInt7 = 0;
this.DummyInt8 = 0;
this.DummyInt9 = 0;
this.DummyInt10 = 0;
this.DummyInt11 = 0;
this.DummyInt12 = 0;
this.DummyInt13 = 0;
this.DummyInt14 = 0;
this.Dummy1 = "0";
this.Dummy2 = "0";
this.Dummy3 = "0";
this.Dummy4 = "0";
this.Dummy5 = "0";
this.Dummy6 = "0";
this.Dummy7 = "0";
}
#endregion
}
#endregion
#region StructSystemParameter5
[StructLayout(LayoutKind.Sequential)]
public struct StructSystemParameter5
{
public bool PhotoBBuzzer;
public bool PIN3Buzzer;
public bool PIN4Buzzer;
public bool PIN5Buzzer;
public bool PIN6Buzzer;
public bool PIN7Buzzer;
public bool PIN8Buzzer;
public bool PhotoBLamp;
public bool PIN3Lamp;
public bool PIN4Lamp;
public bool PIN5Lamp;
public bool PIN6Lamp;
public bool PIN7Lamp;
public bool PIN8Lamp;
public bool PhotoBConveyorStop;
public bool PIN3ConveyorStop;
public bool PIN4ConveyorStop;
public bool PIN5ConveyorStop;
public bool PIN6ConveyorStop;
public bool PIN7ConveyorStop;
public bool PIN8ConveyorStop;
public bool DummyBool1;
public bool DummyBool2;
public bool DummyBool3;
public bool DummyBool4;
public bool DummyBool5;
public bool DummyBool6;
public bool DummyBool7;
public bool DummyBool8;
public bool DummyBool9;
public bool DummyBool10;
public bool DummyBool11;
public bool DummyBool12;
public bool DummyBool13;
public bool DummyBool14;
public int DummyInt1;
public int DummyInt2;
public int DummyInt3;
public int DummyInt4;
public int DummyInt5;
public int DummyInt6;
public int DummyInt7;
public int DummyInt8;
public int DummyInt9;
public int DummyInt10;
public int DummyInt11;
public int DummyInt12;
public int DummyInt13;
public int DummyInt14;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy5;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy6;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string Dummy7;
}
#endregion
#region SystemStatus
public class SystemStatus
{
#region Field
private DataStore.EquipmentStatus m_Equipment;
private DataStore.DisplayStore m_CurrentDisplay;
private DataStore.DisplayMode m_CurrentMode;
private DataStore.WeightInputMode m_CurrentWeightInputMode;
private UserPasswordType m_CurrentUserPasswordType;
private UserItem m_CurrentUser;
#endregion
#region Constructor
public SystemStatus()
{
this.Initialization();
}
#endregion
#region Property
public DataStore.EquipmentStatus Equipment
{
get { return this.m_Equipment; }
set { this.m_Equipment = value; }
}
public DataStore.DisplayStore CurrentDisplay
{
get { return this.m_CurrentDisplay; }
set { this.m_CurrentDisplay = value; }
}
public DataStore.DisplayMode CurrentMode
{
get { return this.m_CurrentMode; }
set { this.m_CurrentMode = value; }
}
public DataStore.WeightInputMode CurrentWeightInputMode
{
get { return this.m_CurrentWeightInputMode; }
set { this.m_CurrentWeightInputMode = value; }
}
public UserPasswordType CurrentUserPasswordType
{
get { return this.m_CurrentUserPasswordType; }
set { this.m_CurrentUserPasswordType = value; }
}
public UserItem CurrentUser
{
get { return this.m_CurrentUser; }
set { this.m_CurrentUser = value; }
}
#endregion
#region Method
public void Initialization()
{
this.Equipment = DataStore.EquipmentStatus.Stop;
this.CurrentDisplay = DataStore.DisplayStore.MainDisplay;
this.CurrentMode = DataStore.DisplayMode.Normal;
this.CurrentWeightInputMode = DataStore.WeightInputMode.Weight;
this.CurrentUserPasswordType = new UserPasswordType();
this.CurrentUser = new UserItem();
this.CurrentUser.ID = "";
this.CurrentUser.Password = "";
this.CurrentUser.Group = DataStore.UserGroup.LogOut;
}
#endregion
}
#endregion
#region SystemInformation2
public class SystemInformation2
{
#region Field
private string m_MaxWeight;
private string m_BalanceWeight;
private string m_Digit;
private string m_Calc;
private string m_Filter;
private string m_JudgmentDelay;
private string m_DoubleDelay;
private string m_JudgmentNumber;
private string m_Speed;
private string m_Dynamic;
private string m_SorterAMode;
private string m_SorterADelay;
private string m_SorterAOperation;
private string m_SorterBMode;
private string m_SorterBDelay;
private string m_SorterBOperation;
private string m_DoubleEntry;
private string m_ExternalInput;
private string m_ETCNG;
private string m_AutoZero1Time;
private string m_AutoZero1Range;
private string m_AutoZero1Variate;
private string m_AutoZero1Mode;
private string m_AutoZero2Time;
private string m_AutoZero2Range;
private string m_AutoZero2Variate;
private string m_AutoZero2Mode;
private string m_UnderRange;
private string m_PassRange;
private string m_OverRange;
private string m_TareRange;
private string m_ExternalOutput1Mode;
private string m_ExternalOutput1Delay;
private string m_ExternalOutput1Operation;
private string m_ExternalOutput2Mode;
private string m_ExternalOutput2Delay;
private string m_ExternalOutput2Operation;
private string m_ExternalOutput3Mode;
private string m_ExternalOutput3Delay;
private string m_ExternalOutput3Operation;
private string m_ExternalOutput4Mode;
private string m_ExternalOutput4Delay;
private string m_ExternalOutput4Operation;
private string m_ExternalOutput9Mode;
private string m_ExternalOutput9Delay;
private string m_ExternalOutput9Operation;
private string m_ExternalOutput10Mode;
private string m_ExternalOutput10Delay;
private string m_ExternalOutput10Operation;
private string m_AscendDelay;
private string m_DescendDelay;
private string m_dummy1;
private string m_dummy2;
private string m_dummy3;
private string m_dummy4;
private string m_dummy5;
private string m_dummy6;
private string m_dummy7;
private string m_dummy8;
#endregion
#region Constructor
public SystemInformation2()
{
this.Initialization();
}
#endregion
#region Property
public string MaxWeight
{
get { return this.m_MaxWeight; }
set { this.m_MaxWeight = value; }
}
public string BalanceWeight
{
get { return this.m_BalanceWeight; }
set { this.m_BalanceWeight = value; }
}
public string Digit
{
get { return this.m_Digit; }
set { this.m_Digit = value; }
}
public string Calc
{
get { return this.m_Calc; }
set { this.m_Calc = value; }
}
public string Filter
{
get { return this.m_Filter; }
set { this.m_Filter = value; }
}
public string JudgmentDelay
{
get { return this.m_JudgmentDelay; }
set { this.m_JudgmentDelay = value; }
}
public string DoubleDelay
{
get { return this.m_DoubleDelay; }
set { this.m_DoubleDelay = value; }
}
public string JudgmentNumber
{
get { return this.m_JudgmentNumber; }
set { this.m_JudgmentNumber = value; }
}
public string Speed
{
get { return this.m_Speed; }
set { this.m_Speed = value; }
}
public string Dynamic
{
get { return this.m_Dynamic; }
set { this.m_Dynamic = value; }
}
public string SorterAMode
{
get { return this.m_SorterAMode; }
set { this.m_SorterAMode = value; }
}
public string SorterADelay
{
get { return this.m_SorterADelay; }
set { this.m_SorterADelay = value; }
}
public string SorterAOperation
{
get { return this.m_SorterAOperation; }
set { this.m_SorterAOperation = value; }
}
public string SorterBMode
{
get { return this.m_SorterBMode; }
set { this.m_SorterBMode = value; }
}
public string SorterBDelay
{
get { return this.m_SorterBDelay; }
set { this.m_SorterBDelay = value; }
}
public string SorterBOperation
{
get { return this.m_SorterBOperation; }
set { this.m_SorterBOperation = value; }
}
public string DoubleEntry
{
get { return this.m_DoubleEntry; }
set { this.m_DoubleEntry = value; }
}
public string ExternalInput
{
get { return this.m_ExternalInput; }
set { this.m_ExternalInput = value; }
}
public string ETCNG
{
get { return this.m_ETCNG; }
set { this.m_ETCNG = value; }
}
public string AutoZero1Time
{
get { return this.m_AutoZero1Time; }
set { this.m_AutoZero1Time = value; }
}
public string AutoZero1Range
{
get { return this.m_AutoZero1Range; }
set { this.m_AutoZero1Range = value; }
}
public string AutoZero1Variate
{
get { return this.m_AutoZero1Variate; }
set { this.m_AutoZero1Variate = value; }
}
public string AutoZero1Mode
{
get { return this.m_AutoZero1Mode; }
set { this.m_AutoZero1Mode = value; }
}
public string AutoZero2Time
{
get { return this.m_AutoZero2Time; }
set { this.m_AutoZero2Time = value; }
}
public string AutoZero2Range
{
get { return this.m_AutoZero2Range; }
set { this.m_AutoZero2Range = value; }
}
public string AutoZero2Variate
{
get { return this.m_AutoZero2Variate; }
set { this.m_AutoZero2Variate = value; }
}
public string AutoZero2Mode
{
get { return this.m_AutoZero2Mode; }
set { this.m_AutoZero2Mode = value; }
}
public string UnderRange
{
get { return this.m_UnderRange; }
set { this.m_UnderRange = value; }
}
public string PassRange
{
get { return this.m_PassRange; }
set { this.m_PassRange = value; }
}
public string OverRange
{
get { return this.m_OverRange; }
set { this.m_OverRange = value; }
}
public string TareRange
{
get { return this.m_TareRange; }
set { this.m_TareRange = value; }
}
public string ExternalOutput1Mode
{
get { return this.m_ExternalOutput1Mode; }
set { this.m_ExternalOutput1Mode = value; }
}
public string ExternalOutput1Delay
{
get { return this.m_ExternalOutput1Delay; }
set { this.m_ExternalOutput1Delay = value; }
}
public string ExternalOutput1Operation
{
get { return this.m_ExternalOutput1Operation; }
set { this.m_ExternalOutput1Operation = value; }
}
public string ExternalOutput2Mode
{
get { return this.m_ExternalOutput2Mode; }
set { this.m_ExternalOutput2Mode = value; }
}
public string ExternalOutput2Delay
{
get { return this.m_ExternalOutput2Delay; }
set { this.m_ExternalOutput2Delay = value; }
}
public string ExternalOutput2Operation
{
get { return this.m_ExternalOutput2Operation; }
set { this.m_ExternalOutput2Operation = value; }
}
public string ExternalOutput3Mode
{
get { return this.m_ExternalOutput3Mode; }
set { this.m_ExternalOutput3Mode = value; }
}
public string ExternalOutput3Delay
{
get { return this.m_ExternalOutput3Delay; }
set { this.m_ExternalOutput3Delay = value; }
}
public string ExternalOutput3Operation
{
get { return this.m_ExternalOutput3Operation; }
set { this.m_ExternalOutput3Operation = value; }
}
public string ExternalOutput4Mode
{
get { return this.m_ExternalOutput4Mode; }
set { this.m_ExternalOutput4Mode = value; }
}
public string ExternalOutput4Delay
{
get { return this.m_ExternalOutput4Delay; }
set { this.m_ExternalOutput4Delay = value; }
}
public string ExternalOutput4Operation
{
get { return this.m_ExternalOutput4Operation; }
set { this.m_ExternalOutput4Operation = value; }
}
public string ExternalOutput9Mode
{
get { return this.m_ExternalOutput9Mode; }
set { this.m_ExternalOutput9Mode = value; }
}
public string ExternalOutput9Delay
{
get { return this.m_ExternalOutput9Delay; }
set { this.m_ExternalOutput9Delay = value; }
}
public string ExternalOutput9Operation
{
get { return this.m_ExternalOutput9Operation; }
set { this.m_ExternalOutput9Operation = value; }
}
public string ExternalOutput10Mode
{
get { return this.m_ExternalOutput10Mode; }
set { this.m_ExternalOutput10Mode = value; }
}
public string ExternalOutput10Delay
{
get { return this.m_ExternalOutput10Delay; }
set { this.m_ExternalOutput10Delay = value; }
}
public string ExternalOutput10Operation
{
get { return this.m_ExternalOutput10Operation; }
set { this.m_ExternalOutput10Operation = value; }
}
public string AscendDelay
{
get { return this.m_AscendDelay; }
set { this.m_AscendDelay = value; }
}
public string DescendDelay
{
get { return this.m_DescendDelay; }
set { this.m_DescendDelay = 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; }
}
public string dummy3
{
get { return this.m_dummy3; }
set { this.m_dummy3 = value; }
}
public string dummy4
{
get { return this.m_dummy4; }
set { this.m_dummy4 = value; }
}
public string dummy5
{
get { return this.m_dummy5; }
set { this.m_dummy5 = value; }
}
public string dummy6
{
get { return this.m_dummy6; }
set { this.m_dummy6 = value; }
}
public string dummy7
{
get { return this.m_dummy7; }
set { this.m_dummy7 = value; }
}
public string dummy8
{
get { return this.m_dummy8; }
set { this.m_dummy8 = value; }
}
#endregion
#region Method
public void Initialization()
{
this.MaxWeight = "0";
this.BalanceWeight = "0";
this.Digit = "0";
this.Calc = "0";
this.Filter = "8";
this.JudgmentDelay = "1000";
this.DoubleDelay = "900";
this.JudgmentNumber = "10";
this.Speed = "60";
this.Dynamic = "1000000";
this.SorterAMode = "0";
this.SorterADelay = "1";
this.SorterAOperation = "1000";
this.SorterBMode = "0";
this.SorterBDelay = "1";
this.SorterBOperation = "1000";
this.DoubleEntry = "0";
this.ExternalInput = "0";
this.ETCNG = "0";
this.AutoZero1Mode = "2";
this.AutoZero1Range = "17";
this.AutoZero1Time = "100";
this.AutoZero1Variate = "1";
this.AutoZero2Mode = "0";
this.AutoZero2Range = "10";
this.AutoZero2Time = "5";
this.AutoZero2Variate = "1";
this.UnderRange = "0";
this.PassRange = "0";
this.OverRange = "0";
this.TareRange = "0";
this.ExternalOutput1Mode = "0";
this.ExternalOutput1Delay = "500";
this.ExternalOutput1Operation = "1000";
this.ExternalOutput2Mode = "0";
this.ExternalOutput2Delay = "500";
this.ExternalOutput2Operation = "1000";
this.ExternalOutput3Mode = "0";
this.ExternalOutput3Delay = "500";
this.ExternalOutput3Operation = "1000";
this.ExternalOutput4Mode = "0";
this.ExternalOutput4Delay = "500";
this.ExternalOutput4Operation = "1000";
this.ExternalOutput9Mode = "0";
this.ExternalOutput9Delay = "500";
this.ExternalOutput9Operation = "1000";
this.ExternalOutput10Mode = "0";
this.ExternalOutput10Delay = "500";
this.ExternalOutput10Operation = "1000";
this.AscendDelay = "1000";
this.DescendDelay = "1000";
this.dummy1 = "0";
this.dummy2 = "0";
this.dummy3 = "0";
this.dummy4 = "0";
this.dummy5 = "0";
this.dummy6 = "0";
this.dummy7 = "0";
this.dummy8 = "0";
}
#endregion
}
#endregion
#region SystemInformation3
public class SystemInformation3
{
#region Field
private string m_Random1Number;
private string m_Random1Using;
private string m_Random1Under;
private string m_Random1Over;
private string m_Random1Tare;
private string m_Random2Number;
private string m_Random2Using;
private string m_Random2Under;
private string m_Random2Over;
private string m_Random2Tare;
private string m_Random3Number;
private string m_Random3Using;
private string m_Random3Under;
private string m_Random3Over;
private string m_Random3Tare;
private string m_Random4Number;
private string m_Random4Using;
private string m_Random4Under;
private string m_Random4Over;
private string m_Random4Tare;
private string m_Random5Number;
private string m_Random5Using;
private string m_Random5Under;
private string m_Random5Over;
private string m_Random5Tare;
private string m_OPT1SampleNumber;
private string m_OPT1DelayNumber;
private string m_OPT1PulseWidth;
private string m_OPT1Using;
private string m_OPT1OverRange;
private string m_OPT1UnderRange;
private string m_OPT2Port;
private string m_OPT2Delay1;
private string m_OPT2Delay2;
private string m_PI8;
private string m_PI7;
private string m_PI6;
private string m_PI5;
private string m_PI4;
private string m_PI3;
private string m_PhotoB;
private string m_EquipmentType;
private string m_OptionBoard;
private string m_Relay;
private string m_Chattering;
private string m_BuzzerONTime;
private string m_dummy1;
private string m_dummy2;
private string m_dummy3;
private string m_dummy4;
private string m_dummy5;
private string m_dummy6;
private string m_dummy7;
private string m_dummy8;
private string m_dummy9;
private string m_dummy10;
#endregion
#region Constructor
public SystemInformation3()
{
this.Initialization();
}
#endregion
#region Property
public string Random1Number
{
get { return this.m_Random1Number; }
set { this.m_Random1Number = value; }
}
public string Random1Using
{
get { return this.m_Random1Using; }
set { this.m_Random1Using = value; }
}
public string Random1Under
{
get { return this.m_Random1Under; }
set { this.m_Random1Under = value; }
}
public string Random1Over
{
get { return this.m_Random1Over; }
set { this.m_Random1Over = value; }
}
public string Random1Tare
{
get { return this.m_Random1Tare; }
set { this.m_Random1Tare = value; }
}
public string Random2Number
{
get { return this.m_Random2Number; }
set { this.m_Random2Number = value; }
}
public string Random2Using
{
get { return this.m_Random2Using; }
set { this.m_Random2Using = value; }
}
public string Random2Under
{
get { return this.m_Random2Under; }
set { this.m_Random2Under = value; }
}
public string Random2Over
{
get { return this.m_Random2Over; }
set { this.m_Random2Over = value; }
}
public string Random2Tare
{
get { return this.m_Random2Tare; }
set { this.m_Random2Tare = value; }
}
public string Random3Number
{
get { return this.m_Random3Number; }
set { this.m_Random3Number = value; }
}
public string Random3Using
{
get { return this.m_Random3Using; }
set { this.m_Random3Using = value; }
}
public string Random3Under
{
get { return this.m_Random3Under; }
set { this.m_Random3Under = value; }
}
public string Random3Over
{
get { return this.m_Random3Over; }
set { this.m_Random3Over = value; }
}
public string Random3Tare
{
get { return this.m_Random3Tare; }
set { this.m_Random3Tare = value; }
}
public string Random4Number
{
get { return this.m_Random4Number; }
set { this.m_Random4Number = value; }
}
public string Random4Using
{
get { return this.m_Random4Using; }
set { this.m_Random4Using = value; }
}
public string Random4Under
{
get { return this.m_Random4Under; }
set { this.m_Random4Under = value; }
}
public string Random4Over
{
get { return this.m_Random4Over; }
set { this.m_Random4Over = value; }
}
public string Random4Tare
{
get { return this.m_Random4Tare; }
set { this.m_Random4Tare = value; }
}
public string Random5Number
{
get { return this.m_Random5Number; }
set { this.m_Random5Number = value; }
}
public string Random5Using
{
get { return this.m_Random5Using; }
set { this.m_Random5Using = value; }
}
public string Random5Under
{
get { return this.m_Random5Under; }
set { this.m_Random5Under = value; }
}
public string Random5Over
{
get { return this.m_Random5Over; }
set { this.m_Random5Over = value; }
}
public string Random5Tare
{
get { return this.m_Random5Tare; }
set { this.m_Random5Tare = value; }
}
public string OPT1SampleNumber
{
get { return this.m_OPT1SampleNumber; }
set { this.m_OPT1SampleNumber = value; }
}
public string OPT1DelayNumber
{
get { return this.m_OPT1DelayNumber; }
set { this.m_OPT1DelayNumber = value; }
}
public string OPT1PulseWidth
{
get { return this.m_OPT1PulseWidth; }
set { this.m_OPT1PulseWidth = value; }
}
public string OPT1Using
{
get { return this.m_OPT1Using; }
set { this.m_OPT1Using = value; }
}
public string OPT1OverRange
{
get { return this.m_OPT1OverRange; }
set { this.m_OPT1OverRange = value; }
}
public string OPT1UnderRange
{
get { return this.m_OPT1UnderRange; }
set { this.m_OPT1UnderRange = value; }
}
public string OPT2Port
{
get { return this.m_OPT2Port; }
set { this.m_OPT2Port = value; }
}
public string OPT2Delay1
{
get { return this.m_OPT2Delay1; }
set { this.m_OPT2Delay1 = value; }
}
public string OPT2Delay2
{
get { return this.m_OPT2Delay2; }
set { this.m_OPT2Delay2 = value; }
}
public string BuzzerONTime
{
get { return this.m_BuzzerONTime; }
set { this.m_BuzzerONTime = value; }
}
public string Chattering
{
get { return this.m_Chattering; }
set { this.m_Chattering = value; }
}
public string Relay
{
get { return this.m_Relay; }
set { this.m_Relay = value; }
}
public string OptionBoard
{
get { return this.m_OptionBoard; }
set { this.m_OptionBoard = value; }
}
public string EquipmentType
{
get { return this.m_EquipmentType; }
set { this.m_EquipmentType = value; }
}
public string PhotoB
{
get { return this.m_PhotoB; }
set { this.m_PhotoB = value; }
}
public string PI3
{
get { return this.m_PI3; }
set { this.m_PI3 = value; }
}
public string PI4
{
get { return this.m_PI4; }
set { this.m_PI4 = value; }
}
public string PI5
{
get { return this.m_PI5; }
set { this.m_PI5 = value; }
}
public string PI6
{
get { return this.m_PI6; }
set { this.m_PI6 = value; }
}
public string PI7
{
get { return this.m_PI7; }
set { this.m_PI7 = value; }
}
public string PI8
{
get { return this.m_PI8; }
set { this.m_PI8 = 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; }
}
public string dummy3
{
get { return this.m_dummy3; }
set { this.m_dummy3 = value; }
}
public string dummy4
{
get { return this.m_dummy4; }
set { this.m_dummy4 = value; }
}
public string dummy5
{
get { return this.m_dummy5; }
set { this.m_dummy5 = value; }
}
public string dummy6
{
get { return this.m_dummy6; }
set { this.m_dummy6 = value; }
}
public string dummy7
{
get { return this.m_dummy7; }
set { this.m_dummy7 = value; }
}
public string dummy8
{
get { return this.m_dummy8; }
set { this.m_dummy8 = value; }
}
public string dummy9
{
get { return this.m_dummy9; }
set { this.m_dummy9 = value; }
}
public string dummy10
{
get { return this.m_dummy10; }
set { this.m_dummy10 = value; }
}
#endregion
#region Method
public void Initialization()
{
this.Random1Number = "996";
this.Random1Using = "0";
this.Random1Under = "0";
this.Random1Over = "0";
this.Random1Tare = "0";
this.Random2Number = "997";
this.Random2Using = "0";
this.Random2Under = "0";
this.Random2Over = "0";
this.Random2Tare = "0";
this.Random3Number = "998";
this.Random3Using = "0";
this.Random3Under = "0";
this.Random3Over = "0";
this.Random3Tare = "0";
this.Random4Number = "999";
this.Random4Using = "0";
this.Random4Under = "0";
this.Random4Over = "0";
this.Random4Tare = "0";
this.Random5Number = "1000";
this.Random5Using = "0";
this.Random5Under = "0";
this.Random5Over = "0";
this.Random5Tare = "0";
this.OPT1SampleNumber = "0";
this.OPT1DelayNumber = "0";
this.OPT1PulseWidth = "0";
this.OPT1Using = "0";
this.OPT1OverRange = "0";
this.OPT1UnderRange = "0";
this.OPT2Port = "0";
this.OPT2Delay1 = "0";
this.OPT2Delay2 = "0";
this.BuzzerONTime = "1000";
this.Chattering = "100";
this.Relay = "1000";
this.OptionBoard = "0";
this.EquipmentType = "0";
this.PhotoB = "0";
this.PI3 = "1";
this.PI4 = "2";
this.PI5 = "0";
this.PI6 = "0";
this.PI7 = "0";
this.PI8 = "2";
this.dummy1 = "0";
this.dummy2 = "0";
this.dummy3 = "0";
this.dummy4 = "0";
this.dummy5 = "0";
this.dummy6 = "0";
this.dummy7 = "0";
this.dummy8 = "0";
this.dummy9 = "0";
this.dummy10 = "0";
}
#endregion
}
#endregion
#region UserPasswordType
public class UserPasswordType
{
#region Field
private string m_Level1Password;
private string m_Level2Password;
private string m_Level3Password;
private string m_Level4Password;
private string m_HiddenMenuPassword;
private DataStore.UserGroup m_Group;
#endregion
#region Constructor
public UserPasswordType()
{
this.Initialization();
}
#endregion
#region Property
public string Level1Password
{
get { return this.m_Level1Password; }
set { this.m_Level1Password = value; }
}
public string Level2Password
{
get { return this.m_Level2Password; }
set { this.m_Level2Password = value; }
}
public string Level3Password
{
get { return this.m_Level3Password; }
set { this.m_Level3Password = value; }
}
public string Level4Password
{
get { return this.m_Level4Password; }
set { this.m_Level4Password = value; }
}
public string HiddenMenuPassword
{
get { return this.m_HiddenMenuPassword; }
set { this.m_HiddenMenuPassword = value; }
}
public DataStore.UserGroup Group
{
get { return this.m_Group; }
set { this.m_Group = value; }
}
#endregion
#region Method
public void Initialization()
{
this.Level1Password = "1000";
this.Level2Password = "2000";
this.Level3Password = "3000";
this.Level4Password = "0714";
this.HiddenMenuPassword = DateTime.Now.ToString("MMdd") + "0810";
this.Group = DataStore.UserGroup.None;
}
#endregion
}
#endregion
#region DataBackup OPT1
public class DataBackupOPT1
{
#region Field
private string m_DataID;
private string m_Name;
private string m_Lot;
private string m_OverRange;
private string m_UnderRange;
private string m_Weight;
private string m_Date;
private string m_Time;
private string m_PassCount;
private string m_Grade;
private string m_Status;
#endregion
#region Constructor
public DataBackupOPT1()
{
this.Initialize();
}
#endregion
#region Property
public string DataID
{
get { return this.m_DataID; }
set { this.m_DataID = value; }
}
public string Name
{
get { return this.m_Name; }
private set { this.m_Name = value; }
}
public string Lot
{
get { return this.m_Lot; }
private set { this.m_Lot = value; }
}
public string OverRange
{
get { return this.m_OverRange; }
private set { this.m_OverRange = value; }
}
public string UnderRange
{
get { return this.m_UnderRange; }
private set { this.m_UnderRange = value; }
}
public string Weight
{
get { return this.m_Weight; }
private set { this.m_Weight = value; }
}
public string Date
{
get { return this.m_Date; }
private set { this.m_Date = value; }
}
public string Time
{
get { return this.m_Time; }
private set { this.m_Time = value; }
}
public string PassCount
{
get { return this.m_PassCount; }
private set { this.m_PassCount = value; }
}
public string Grade
{
get { return this.m_Grade; }
private set { this.m_Grade = value; }
}
public string Status
{
get { return this.m_Status; }
set { this.m_Status = value; }
}
#endregion
#region Method
private void Initialize()
{
this.DataID = "";
this.Name = "";
this.Lot = "";
this.OverRange = "";
this.UnderRange = "";
this.Weight = "";
this.Date = "";
this.Time = "";
this.PassCount = "";
this.Grade = "";
this.Status = "";
}
public void SetData(ProductItem item, WeightData data, SystemConfigurationItem1 system, DateTime time)
{
this.DataID = data.ReceiveDataID;
this.Name = item.Name;
this.Lot = item.LotNo;
this.OverRange = Helper.StringToDecimalPlaces(item.OverRange, system.DecimalPlaces);
this.UnderRange = Helper.StringToDecimalPlaces(item.UnderRange, system.DecimalPlaces);
this.Weight = Helper.DoubleToString(data.Weight, system.DecimalPlaces);
this.Date = string.Format("{0:yyyy-MM-dd}", time);
this.Time = string.Format("{0:HH:mm:ss}", time);
this.PassCount = data.PassCount.ToString();
this.Grade = data.JudgmentStatus.ToString();
}
#endregion
}
#endregion
#region JudgmentResult
public class JudgmentResult
{
#region Field
private DataStore.JudgmentResult m_Judgment1;
private DataStore.JudgmentResult m_Judgment2;
private DataStore.JudgmentResult m_Judgment3;
private DataStore.JudgmentResult m_Judgment4;
private DataStore.JudgmentResult m_Judgment5;
private DataStore.JudgmentResult m_Judgment6;
private DataStore.JudgmentResult m_Judgment7;
private DataStore.JudgmentResult m_Judgment8;
private DataStore.JudgmentResult m_PreviousRejectData;
private DataStore.JudgmentResult m_Judgment10;
private DataStore.JudgmentResult m_Judgment11;
private DataStore.JudgmentResult m_Judgment12;
private DataStore.JudgmentResult m_CurrentRejectData;
private DataStore.JudgmentResult m_Judgment14;
private DataStore.JudgmentResult m_Judgment15;
private DataStore.JudgmentResult m_Judgment16;
#endregion
#region Constructor
public JudgmentResult()
{
this.Initialize();
}
#endregion
#region Property
public DataStore.JudgmentResult Judgment1
{
get { return this.m_Judgment1; }
set { this.m_Judgment1 = value; }
}
public DataStore.JudgmentResult Judgment2
{
get { return this.m_Judgment2; }
set { this.m_Judgment2 = value; }
}
public DataStore.JudgmentResult Judgment3
{
get { return this.m_Judgment3; }
set { this.m_Judgment3 = value; }
}
public DataStore.JudgmentResult Judgment4
{
get { return this.m_Judgment4; }
set { this.m_Judgment4 = value; }
}
public DataStore.JudgmentResult Judgment5
{
get { return this.m_Judgment5; }
set { this.m_Judgment5 = value; }
}
public DataStore.JudgmentResult Judgment6
{
get { return this.m_Judgment6; }
set { this.m_Judgment6 = value; }
}
public DataStore.JudgmentResult Judgment7
{
get { return this.m_Judgment7; }
set { this.m_Judgment7 = value; }
}
public DataStore.JudgmentResult Judgment8
{
get { return this.m_Judgment8; }
set { this.m_Judgment8 = value; }
}
public DataStore.JudgmentResult PreviousRejectData
{
get { return this.m_PreviousRejectData; }
set { this.m_PreviousRejectData = value; }
}
public DataStore.JudgmentResult Judgment10
{
get { return this.m_Judgment10; }
set { this.m_Judgment10 = value; }
}
public DataStore.JudgmentResult Judgment11
{
get { return this.m_Judgment11; }
set { this.m_Judgment11 = value; }
}
public DataStore.JudgmentResult Judgment12
{
get { return this.m_Judgment12; }
set { this.m_Judgment12 = value; }
}
public DataStore.JudgmentResult CurrentRejectData
{
get { return this.m_CurrentRejectData; }
set { this.m_CurrentRejectData = value; }
}
public DataStore.JudgmentResult Judgment14
{
get { return this.m_Judgment14; }
set { this.m_Judgment14 = value; }
}
public DataStore.JudgmentResult Judgment15
{
get { return this.m_Judgment15; }
set { this.m_Judgment15 = value; }
}
public DataStore.JudgmentResult Judgment16
{
get { return this.m_Judgment16; }
set { this.m_Judgment16 = value; }
}
#endregion
#region Method
public void Initialize()
{
this.Judgment1 = DataStore.JudgmentResult.None;
this.Judgment2 = DataStore.JudgmentResult.None;
this.Judgment3 = DataStore.JudgmentResult.None;
this.Judgment4 = DataStore.JudgmentResult.None;
this.Judgment5 = DataStore.JudgmentResult.None;
this.Judgment6 = DataStore.JudgmentResult.None;
this.Judgment7 = DataStore.JudgmentResult.None;
this.Judgment8 = DataStore.JudgmentResult.None;
this.PreviousRejectData = DataStore.JudgmentResult.None;
this.Judgment10 = DataStore.JudgmentResult.None;
this.Judgment11 = DataStore.JudgmentResult.None;
this.Judgment12 = DataStore.JudgmentResult.None;
this.CurrentRejectData = DataStore.JudgmentResult.None;
this.Judgment14 = DataStore.JudgmentResult.None;
this.Judgment15 = DataStore.JudgmentResult.None;
this.Judgment16 = DataStore.JudgmentResult.None;
}
#endregion
}
#endregion
#region Serial Com - OPT2(나우시스템즈)
public class SerialOPT2
{
#region Field
private bool m_IsReceivedData;
private bool m_IsErrorReceivedData;
private bool m_IsErrorSettingStatus;
private bool m_IsFailProductChange;
#endregion
#region Constructor
public SerialOPT2()
{
this.Initialization();
}
#endregion
#region Property
public bool IsReceivedData
{
get { return this.m_IsReceivedData; }
set { this.m_IsReceivedData = value; }
}
public bool IsErrorReceivedData
{
get { return this.m_IsErrorReceivedData; }
set { this.m_IsErrorReceivedData = value; }
}
public bool IsErrorSettingStatus
{
get { return this.m_IsErrorSettingStatus; }
set { this.m_IsErrorSettingStatus = value; }
}
public bool IsFailProductChange
{
get { return this.m_IsFailProductChange; }
set { this.m_IsFailProductChange = value; }
}
#endregion
#region Method
public void Initialization()
{
this.IsReceivedData = false;
this.IsErrorReceivedData = false;
this.IsErrorSettingStatus = false;
this.IsFailProductChange = false;
}
#endregion
}
#endregion
#region User
public class User
{
#region Field
private Collection m_Level1Users;
private Collection m_Level2Users;
private Collection m_Level3Users;
private UserItem m_DeveloperUser;
#endregion
#region Constructor
public User()
{
this.Initialize();
}
#endregion
#region Property
public Collection Level1Users
{
get { return this.m_Level1Users; }
set { this.m_Level1Users = value; }
}
public Collection Level2Users
{
get { return this.m_Level2Users; }
set { this.m_Level2Users = value; }
}
public Collection Level3Users
{
get { return this.m_Level3Users; }
set { this.m_Level3Users = value; }
}
public UserItem DeveloperUser
{
get { return this.m_DeveloperUser; }
private set { this.m_DeveloperUser = value; }
}
#endregion
#region Method
private void Initialize()
{
this.Level1Users = new Collection();
this.Level2Users = new Collection();
this.Level3Users = new Collection();
this.Level1Users.Clear();
this.Level2Users.Clear();
this.Level3Users.Clear();
for (int i = 0; i < 5; i++)
{
this.Level1Users.Add(new UserItem());
this.Level2Users.Add(new UserItem());
this.Level3Users.Add(new UserItem());
}
this.DeveloperUser = new UserItem();
this.DeveloperUser.ID = "Intech";
this.DeveloperUser.Password = "20090810";
this.DeveloperUser.Group = DataStore.UserGroup.Level4Developer;
}
public UserItem FindUser(string id)
{
UserItem user = null;
// 개발자 유저 검색
if (id == this.DeveloperUser.ID)
{
user = new UserItem();
user.ID = this.DeveloperUser.ID;
user.Password = this.DeveloperUser.Password;
user.Group = this.DeveloperUser.Group;
return user;
}
// 일반 유저 검색
for (int i = 0; i < this.Level1Users.Count; i++)
{
if (this.Level1Users[i].Group != DataStore.UserGroup.None)
{
if (this.Level1Users[i].ID.Trim() == id.Trim())
{
user = new UserItem();
user.ID = this.Level1Users[i].ID.Trim();
user.Password = this.Level1Users[i].Password;
user.Group = this.Level1Users[i].Group;
return user;
}
}
if (this.Level2Users[i].Group != DataStore.UserGroup.None)
{
if (this.Level2Users[i].ID.Trim() == id.Trim())
{
user = new UserItem();
user.ID = this.Level2Users[i].ID.Trim();
user.Password = this.Level2Users[i].Password;
user.Group = this.Level2Users[i].Group;
return user;
}
}
if (this.Level3Users[i].Group != DataStore.UserGroup.None)
{
if (this.Level3Users[i].ID.Trim() == id.Trim())
{
user = new UserItem();
user.ID = this.Level3Users[i].ID.Trim();
user.Password = this.Level3Users[i].Password;
user.Group = this.Level3Users[i].Group;
return user;
}
}
}
return user;
}
public UserItem FindDeveloperUser(string id)
{
UserItem user = null;
// 개발자 유저 검색
if (id == this.DeveloperUser.ID)
{
user = new UserItem();
user.ID = this.DeveloperUser.ID;
user.Password = this.DeveloperUser.Password;
user.Group = this.DeveloperUser.Group;
return user;
}
return user;
}
public bool SearchID(string id)
{
bool ret = false;
for (int i = 0; i < this.Level1Users.Count; i++)
{
if (this.Level1Users[i].ID.Trim() == id.Trim())
return ret = true;
}
for (int i = 0; i < this.Level2Users.Count; i++)
{
if (this.Level2Users[i].ID.Trim() == id.Trim())
return ret = true;
}
for (int i = 0; i < this.Level3Users.Count; i++)
{
if (this.Level3Users[i].ID.Trim() == id.Trim())
return ret = true;
}
return ret;
}
#region Level1
public UserItem Level1FindUser(string id)
{
UserItem user = null;
for (int i = 0; i < this.Level1Users.Count; i++)
{
if (this.Level1Users[i].ID.Trim() == id.Trim())
{
user = new UserItem();
user.ID = this.Level1Users[i].ID.Trim();
user.Password = this.Level1Users[i].Password;
user.Group = this.Level1Users[i].Group;
return user;
}
}
return user;
}
public bool Level1SearchID(string id)
{
bool ret = false;
for (int i = 0; i < this.Level1Users.Count; i++)
{
if (this.Level1Users[i].ID.Trim() == id.Trim())
return ret = true;
}
return ret;
}
public bool Level1DeleteLevel1User(UserItem user)
{
bool ret = false;
return ret;
}
public bool Level1AddUser(UserItem user)
{
bool ret = false;
return ret;
}
public bool Level1ModifyUser(UserItem user)
{
bool ret = false;
return ret;
}
#endregion
#region Level2
public UserItem Level2FindUser(string id)
{
UserItem user = null;
for (int i = 0; i < this.Level2Users.Count; i++)
{
if (this.Level2Users[i].ID.Trim() == id.Trim())
{
user = new UserItem();
user.ID = this.Level2Users[i].ID.Trim();
user.Password = this.Level2Users[i].Password;
user.Group = this.Level2Users[i].Group;
return user;
}
}
return user;
}
public bool Level2DeleteLevel1User(UserItem user)
{
bool ret = false;
return ret;
}
public bool Level2AddUser(UserItem user)
{
bool ret = false;
return ret;
}
public bool Level2ModifyUser(UserItem user)
{
bool ret = false;
return ret;
}
#endregion
#region Level3
public UserItem Level3FindUser(string id)
{
UserItem user = null;
for (int i = 0; i < this.Level3Users.Count; i++)
{
if (this.Level3Users[i].ID.Trim() == id.Trim())
{
user = new UserItem();
user.ID = this.Level3Users[i].ID.Trim();
user.Password = this.Level3Users[i].Password;
user.Group = this.Level3Users[i].Group;
return user;
}
}
return user;
}
public bool Level3DeleteLevel1User(UserItem user)
{
bool ret = false;
return ret;
}
public bool Level3AddUser(UserItem user)
{
bool ret = false;
return ret;
}
public bool Level3ModifyUser(UserItem user)
{
bool ret = false;
return ret;
}
#endregion
#endregion
}
#endregion
#region UserItem
public class UserItem
{
#region Field
private string m_ID;
private string m_Password;
private DataStore.UserGroup m_Group;
#endregion
#region Constructor
public UserItem()
{
this.Initialize();
}
#endregion
#region Property
public string ID
{
get { return this.m_ID; }
set { this.m_ID = value; }
}
public string Password
{
get { return this.m_Password; }
set { this.m_Password = value; }
}
public DataStore.UserGroup Group
{
get { return this.m_Group; }
set { this.m_Group = value; }
}
#endregion
#region Method
private void Initialize()
{
this.ID = "-";
this.Password = "-";
this.Group = DataStore.UserGroup.None;
}
#endregion
}
#endregion
#region StructUserItem
[StructLayout(LayoutKind.Sequential)]
public struct StructUserItem
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string ID;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Password;
public DataStore.UserGroup Group;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Dummy1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Dummy2;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Dummy3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Dummy4;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string Dummy5;
}
#endregion
#region UserGroup
public class UserGroup
{
#region Field
private UserGroupItem m_Level1;
private UserGroupItem m_Level2;
private UserGroupItem m_Level3;
private UserGroupItem m_NotLogin;
#endregion
#region Constructor
public UserGroup()
{
this.Initialize();
}
#endregion
#region Property
public UserGroupItem Level1
{
get { return this.m_Level1; }
set { this.m_Level1 = value; }
}
public UserGroupItem Level2
{
get { return this.m_Level2; }
set { this.m_Level2 = value; }
}
public UserGroupItem Level3
{
get { return this.m_Level3; }
set { this.m_Level3 = value; }
}
public UserGroupItem NotLogin
{
get { return this.m_NotLogin; }
set { this.m_NotLogin = value; }
}
#endregion
#region Method
private void Initialize()
{
this.Level1 = new UserGroupItem();
this.Level2 = new UserGroupItem();
this.Level3 = new UserGroupItem();
this.NotLogin = new UserGroupItem();
}
public bool GetLevel1AccessRight(DataStore.DisplayStore display)
{
bool ret = false;
return ret;
}
public bool GetLevel2AccessRight(DataStore.DisplayStore display)
{
bool ret = false;
return ret;
}
public bool GetLevel3AccessRight(DataStore.DisplayStore display)
{
bool ret = false;
return ret;
}
#endregion
}
#endregion
#region UserGroupItem
public class UserGroupItem
{
#region Field
private bool m_IsMainDisplayProductNo;
private bool m_IsMainDisplayWeightSetting;
private bool m_IsMainDisplayClear;
private bool m_IsMainDisplaySubMenu;
private bool m_IsBasicTime;
private bool m_IsBasicProduct;
private bool m_IsBasicDataBackup;
private bool m_IsBasicDataStatistics;
private bool m_IsConfiSerial;
private bool m_IsConfiEthernet;
private bool m_IsConfiCountingOutput;
private bool m_IsConfiOptionBoard;
private bool m_IsSystemCalibration;
private bool m_IsSystemJudgmentSetting;
private bool m_IsSystemSorterSetting;
private bool m_IsSystemAutoZero;
private bool m_IsSystemIOTest;
private bool m_IsSystemExternalOutput;
private bool m_IsSystemExternalInput;
private bool m_IsEquipUpdate;
private bool m_IsEquipInitialize;
private bool m_IsEquipFunctionSetting;
private bool m_IsEquipUserSetting;
private bool m_IsEquipEngineerSetting;
private bool m_IsEquipSystemLog;
private bool m_IsInforSystem;
private bool m_IsInforAS;
#endregion
#region Constructor
public UserGroupItem()
{
this.Initialize();
}
#endregion
#region Property
public bool IsMainDisplayProductNo
{
get { return this.m_IsMainDisplayProductNo; }
set { this.m_IsMainDisplayProductNo = value; }
}
public bool IsMainDisplayWeightSetting
{
get { return this.m_IsMainDisplayWeightSetting; }
set { this.m_IsMainDisplayWeightSetting = value; }
}
public bool IsMainDisplayClear
{
get { return this.m_IsMainDisplayClear; }
set { this.m_IsMainDisplayClear = value; }
}
public bool IsMainDisplaySubMenu
{
get { return this.m_IsMainDisplaySubMenu; }
set { this.m_IsMainDisplaySubMenu = value; }
}
public bool IsMainEnable
{
get
{
bool ret = false;
if (this.IsMainDisplayProductNo == true || this.IsMainDisplayWeightSetting == true
|| this.IsMainDisplayClear == true || this.IsMainDisplaySubMenu == true)
ret = true;
return ret;
}
}
public bool IsBasicTime
{
get { return this.m_IsBasicTime; }
set { this.m_IsBasicTime = value; }
}
public bool IsBasicProduct
{
get { return this.m_IsBasicProduct; }
set { this.m_IsBasicProduct = value; }
}
public bool IsBasicDataBackup
{
get { return this.m_IsBasicDataBackup; }
set { this.m_IsBasicDataBackup = value; }
}
public bool IsBasicDataStatistics
{
get { return this.m_IsBasicDataStatistics; }
set { this.m_IsBasicDataStatistics = value; }
}
public bool IsBasicEnable
{
get
{
bool ret = false;
if (this.IsBasicTime == true || this.IsBasicProduct == true
|| this.IsBasicDataBackup == true || this.IsBasicDataStatistics == true)
ret = true;
return ret;
}
}
public bool IsConfiSerial
{
get { return this.m_IsConfiSerial; }
set { this.m_IsConfiSerial = value; }
}
public bool IsConfiEthernet
{
get { return this.m_IsConfiEthernet; }
set { this.m_IsConfiEthernet = value; }
}
public bool IsConfiCountingOutput
{
get { return this.m_IsConfiCountingOutput; }
set { this.m_IsConfiCountingOutput = value; }
}
public bool IsConfiOptionBoard
{
get { return this.m_IsConfiOptionBoard; }
set { this.m_IsConfiOptionBoard = value; }
}
public bool IsConfiEnable
{
get
{
bool ret = false;
if (this.IsConfiSerial == true || this.IsConfiEthernet == true
|| this.IsConfiCountingOutput == true || this.IsConfiOptionBoard == true)
ret = true;
return ret;
}
}
public bool IsSystemCalibration
{
get { return this.m_IsSystemCalibration; }
set { this.m_IsSystemCalibration = value; }
}
public bool IsSystemJudgmentSetting
{
get { return this.m_IsSystemJudgmentSetting; }
set { this.m_IsSystemJudgmentSetting = value; }
}
public bool IsSystemSorterSetting
{
get { return this.m_IsSystemSorterSetting; }
set { this.m_IsSystemSorterSetting = value; }
}
public bool IsSystemAutoZero
{
get { return this.m_IsSystemAutoZero; }
set { this.m_IsSystemAutoZero = value; }
}
public bool IsSystemIOTest
{
get { return this.m_IsSystemIOTest; }
set { this.m_IsSystemIOTest = value; }
}
public bool IsSystemExternalOutput
{
get { return this.m_IsSystemExternalOutput; }
set { this.m_IsSystemExternalOutput = value; }
}
public bool IsSystemExternalInput
{
get { return this.m_IsSystemExternalInput; }
set { this.m_IsSystemExternalInput = value; }
}
public bool IsSystemEnable
{
get
{
bool ret = false;
if (this.IsSystemCalibration == true || this.IsSystemJudgmentSetting == true
|| this.IsSystemSorterSetting == true || this.IsSystemAutoZero == true
|| this.IsSystemIOTest == true || this.IsSystemExternalOutput == true || this.IsSystemExternalInput == true)
ret = true;
return ret;
}
}
public bool IsEquipUpdate
{
get { return this.m_IsEquipUpdate; }
set { this.m_IsEquipUpdate = value; }
}
public bool IsEquipInitialize
{
get { return this.m_IsEquipInitialize; }
set { this.m_IsEquipInitialize = value; }
}
public bool IsEquipFunctionSetting
{
get { return this.m_IsEquipFunctionSetting; }
set { this.m_IsEquipFunctionSetting = value; }
}
public bool IsEquipUserSetting
{
get { return this.m_IsEquipUserSetting; }
set { this.m_IsEquipUserSetting = value; }
}
public bool IsEquipSystemLog
{
get { return this.m_IsEquipSystemLog; }
set { this.m_IsEquipSystemLog = value; }
}
public bool IsEquipEngineerSetting
{
get { return this.m_IsEquipEngineerSetting; }
set { this.m_IsEquipEngineerSetting = value; }
}
public bool IsEquipEnable
{
get
{
bool ret = false;
if (this.IsEquipUpdate == true || this.IsEquipInitialize == true || this.IsEquipSystemLog == true
|| this.IsEquipFunctionSetting == true || this.IsEquipUserSetting == true || this.IsEquipEngineerSetting == true)
ret = true;
return ret;
}
}
public bool IsInforSystem
{
get { return this.m_IsInforSystem; }
set { this.m_IsInforSystem = value; }
}
public bool IsInforAS
{
get { return this.m_IsInforAS; }
set { this.m_IsInforAS = value; }
}
public bool IsInforEnable
{
get
{
bool ret = false;
if (this.IsInforSystem == true || this.IsInforAS == true)
ret = true;
return ret;
}
}
#endregion
#region Method
private void Initialize()
{
this.IsMainDisplayProductNo = false;
this.IsMainDisplayWeightSetting = false;
this.IsMainDisplayClear = false;
this.IsMainDisplaySubMenu = false;
this.IsBasicTime = false;
this.IsBasicProduct = false;
this.IsBasicDataBackup = false;
this.IsBasicDataStatistics = false;
this.IsConfiSerial = false;
this.IsConfiEthernet = false;
this.IsConfiCountingOutput = false;
this.IsConfiOptionBoard = false;
this.IsSystemCalibration = false;
this.IsSystemJudgmentSetting = false;
this.IsSystemSorterSetting = false;
this.IsSystemAutoZero = false;
this.IsSystemIOTest = false;
this.IsSystemExternalOutput = false;
this.IsSystemExternalInput = false;
this.IsEquipUpdate = false;
this.IsEquipInitialize = false;
this.IsEquipFunctionSetting = false;
this.IsEquipUserSetting = false;
this.IsEquipEngineerSetting = false;
this.IsEquipSystemLog = false;
this.IsInforSystem = true;
this.IsInforAS = true;
}
#endregion
}
#endregion
#region StructUserGroupItem
[StructLayout(LayoutKind.Sequential)]
public struct StructUserGroupItem
{
public bool IsEquipSystemLog;
public bool IsMainDisplayProductNo;
public bool IsMainDisplayWeightSetting;
public bool IsMainDisplayClear;
public bool IsMainDisplaySubMenu;
public bool IsBasicTime;
public bool IsBasicProduct;
public bool IsBasicDataBackup;
public bool IsBasicDataStatistics;
public bool IsConfiSerial;
public bool IsConfiOptionBoard;
public bool IsSystemCalibration;
public bool IsSystemJudgmentSetting;
public bool IsSystemSorterSetting;
public bool IsSystemAutoZero;
public bool IsSystemIOTest;
public bool IsSystemExternalOutput;
public bool IsEquipUpdate;
public bool IsEquipInitialize;
public bool IsEquipFunctionSetting;
public bool IsEquipUserSetting;
public bool IsInforSystem;
public bool IsInforAS;
public bool IsConfiEthernet;
public bool IsConfiCountingOutput;
public bool IsSystemExternalInput;
public bool IsEquipEngineerSetting;
public bool Dummy1;
public bool Dummy2;
public bool Dummy3;
public bool Dummy4;
public bool Dummy5;
public bool Dummy6;
public bool Dummy7;
public bool Dummy8;
public bool Dummy9;
public bool Dummy10;
public bool Dummy11;
public bool Dummy12;
public bool Dummy13;
public bool Dummy14;
public bool Dummy15;
public bool Dummy16;
}
#endregion
}