Beispiel #1
0
        /// <summary>
        /// 初始化 Mirle.WinPLCCommu.clsPLC2PCBuffer 類別的新執行個體
        /// </summary>
        public clsPLC2PCBuffer()
        {
            LeftCmdSno  = string.Empty;
            RightCmdSno = string.Empty;
            //FunNotice = 0;
            //CmdMode = 0;
            //StnMode = 0;
            //ReadNotice = 0;
            //Ready = 0;
            Error = 0;

            AlarmSignal = new clsAlarmData[32];
            for (int intCount = 0; intCount < 32; intCount++)
            {
                AlarmSignal[intCount] = new clsAlarmData();
            }

            StnModeCode_Auto       = false;
            StnModeCode_Finish     = false;
            StnModeCode_In         = false;
            StnModeCode_Error      = false;
            StnModeCode_PalletLoad = false;
            StnModeCode_Manual     = false;
            StnModeCode_None       = false;
            StnModeCode_Out        = false;
            StnModeCode_Position   = false;
            StnModeCode_CargoLoad  = false;
            StnModeCode_Stop       = false;
        }
Beispiel #2
0
        /// <summary>
        /// 初始化 Mirle.WinPLCCommu.clsBufferData 類別的新執行個體
        /// </summary>
        public clsBufferData()
        {
            for (int intLength = 0; intLength < 32; intLength++)
            {
                objarSystemErrorCode[intLength] = new clsAlarmData();
            }

            objarPC2PLCBuffer = new clsPC2PLCBuffer[clsSystem.gintBufferQty_1 + clsSystem.gintStnQty];
            for (int intLength = 0; intLength < objarPC2PLCBuffer.Length; intLength++)
            {
                objarPC2PLCBuffer[intLength] = new clsPC2PLCBuffer();
            }

            objarPLC2PCBuffer = new clsPLC2PCBuffer[clsSystem.gintBufferQty_1 + clsSystem.gintStnQty];
            for (int intLength = 0; intLength < objarPLC2PCBuffer.Length; intLength++)
            {
                objarPLC2PCBuffer[intLength] = new clsPLC2PCBuffer();
            }


            #region PLC1
            intarPC2PLCResultData_PLC1 = new int[clsSystem.gintPC2PLCTotalWord_1];
            for (int intLength = 0; intLength < intarPC2PLCResultData_PLC1.Length; intLength++)
            {
                intarPC2PLCResultData_PLC1[intLength] = 0;
            }

            intarPLC2PCResultData_PLC1 = new int[clsSystem.gintPLC2PCTotalWord_1];
            for (int intLength = 0; intLength < intarPLC2PCResultData_PLC1.Length; intLength++)
            {
                intarPLC2PCResultData_PLC1[intLength] = 0;
            }
            #endregion

            #region PLC2
            intarPC2PLCResultData_PLC2 = new int[clsSystem.gintPC2PLCTotalWord_2];
            for (int intLength = 0; intLength < intarPC2PLCResultData_PLC2.Length; intLength++)
            {
                intarPC2PLCResultData_PLC2[intLength] = 0;
            }

            intarPLC2PCResultData_PLC2 = new int[clsSystem.gintPLC2PCTotalWord_2];
            for (int intLength = 0; intLength < intarPLC2PCResultData_PLC2.Length; intLength++)
            {
                intarPLC2PCResultData_PLC2[intLength] = 0;
            }
            #endregion

            #region PLC3
            intarPC2PLCResultData_PLC3 = new int[clsSystem.gintPC2PLCTotalWord_3];
            for (int intLength = 0; intLength < intarPC2PLCResultData_PLC3.Length; intLength++)
            {
                intarPC2PLCResultData_PLC3[intLength] = 0;
            }

            intarPLC2PCResultData_PLC3 = new int[clsSystem.gintPLC2PCTotalWord_3];
            for (int intLength = 0; intLength < intarPLC2PCResultData_PLC3.Length; intLength++)
            {
                intarPLC2PCResultData_PLC3[intLength] = 0;
            }
            #endregion
        }