Esempio n. 1
0
        public FormDeviceSet(Panel _pnBase)
        {
            InitializeComponent();
            this.Width  = 1272;
            this.Height = 866;

            this.TopLevel = false;
            this.Parent   = _pnBase;

            tbUserUnit.Text = 0.01.ToString();
            PstnDisp();

            OM.LoadLastInfo();
            PM.Load(OM.GetCrntDev().ToString());

            PM.UpdatePstn(true);
            UpdateDevInfo(true);
            UpdateDevOptn(true);

            DM.ARAY[ri.MASK].SetParent(pnTrayMask); DM.ARAY[ri.MASK].Name = "MASK";
            LoadTrayMask(OM.GetCrntDev().ToString());
            DM.ARAY[ri.MASK].SetDisp(cs.Empty, "Empty", Color.Silver);
            DM.ARAY[ri.MASK].SetDisp(cs.None, "None", Color.White);

            FraMotr     = new FraMotr    [(int)mi.MAX_MOTR];
            FraCylinder = new FraCylOneBt[(int)ci.MAX_ACTR];

            //모터 축 수에 맞춰 FrameMotr 생성
            for (int m = 0; m < (int)mi.MAX_MOTR; m++)
            {
                Control[] Ctrl = tcDeviceSet.Controls.Find("pnMotrJog" + m.ToString(), true);

                MOTION_DIR eDir = SM.MT_GetDirType((mi)m);
                FraMotr[m] = new FraMotr();
                FraMotr[m].SetIdType((mi)m, eDir);
                FraMotr[m].TopLevel = false;
                FraMotr[m].Parent   = Ctrl[0];
                FraMotr[m].Show();
                FraMotr[m].SetUnit(EN_UNIT_TYPE.utJog, 0);
            }

            for (int i = 0; i < (int)mi.MAX_MOTR; i++)
            {
                Control[] Ctrl = tcDeviceSet.Controls.Find("pnMotrPos" + i.ToString(), true);

                switch (i)
                {
                default: break;

                case (int)mi.LODR_ZLift: SetMotrPanel((int)pv.MAX_PSTN_MOTR0, Ctrl[0]); break;

                case (int)mi.TOOL_XRjct: SetMotrPanel((int)pv.MAX_PSTN_MOTR1, Ctrl[0]); break;

                case (int)mi.IDXR_XRear: SetMotrPanel((int)pv.MAX_PSTN_MOTR2, Ctrl[0]); break;

                case (int)mi.IDXF_XFrnt: SetMotrPanel((int)pv.MAX_PSTN_MOTR3, Ctrl[0]); break;

                case (int)mi.TOOL_YTool: SetMotrPanel((int)pv.MAX_PSTN_MOTR4, Ctrl[0]); break;

                case (int)mi.TOOL_ZPckr: SetMotrPanel((int)pv.MAX_PSTN_MOTR5, Ctrl[0]); break;

                case (int)mi.BARZ_XPckr: SetMotrPanel((int)pv.MAX_PSTN_MOTR6, Ctrl[0]); break;

                case (int)mi.BARZ_ZPckr: SetMotrPanel((int)pv.MAX_PSTN_MOTR7, Ctrl[0]); break;

                case (int)mi.STCK_ZStck: SetMotrPanel((int)pv.MAX_PSTN_MOTR8, Ctrl[0]); break;

                case (int)mi.TOOL_ZVisn: SetMotrPanel((int)pv.MAX_PSTN_MOTR9, Ctrl[0]); break;
                }
            }

            //여기 AP텍에서만 쓰는거


            FraCylAPT = new FrameCylinderAPT[(int)ci.MAX_ACTR];
            //실린더 버튼 AP텍꺼
            for (int i = 0; i < (int)ci.MAX_ACTR; i++)
            {
                Control[] CtrlAP = tcDeviceSet.Controls.Find("pnActrAP" + i.ToString(), true);

                FraCylAPT[i]          = new FrameCylinderAPT();
                FraCylAPT[i].TopLevel = false;



                switch (i)
                {
                default: break;

                case (int)ci.LODR_ClampClOp: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.LODR_SperatorUpDn: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.STCK_RailClOp: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.IDXR_ClampUpDn: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.IDXF_ClampUpDn: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.IDXR_ClampClOp: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.IDXF_ClampClOp: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.STCK_RailTrayUpDn: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.STCK_StackStprUpDn: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.STCK_StackOpCl: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.BARZ_BrcdStprUpDn: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.BARZ_BrcdTrayUpDn: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;

                case (int)ci.BARZ_YPckrFwBw: FraCylAPT[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), CtrlAP[0]); break;
                }

                FraCylAPT[i].Show();
            }

            //Input Status 생성 AP텍꺼
            const int iInputBtnCnt = 11;

            FraInputAPT = new FrameInputAPT[iInputBtnCnt];
            for (int i = 0; i < iInputBtnCnt; i++)
            {
                Control[] Ctrl = tcDeviceSet.Controls.Find("pnInput" + i.ToString(), true);

                int iIOCtrl = Convert.ToInt32(Ctrl[0].Tag);

                FraInputAPT[i]          = new FrameInputAPT();
                FraInputAPT[i].TopLevel = false;

                switch (iIOCtrl)
                {
                default: break;

                case (int)xi.LODR_TrayDtct: FraInputAPT[i].SetConfig(xi.LODR_TrayDtct, SML.IO.GetXName((int)xi.LODR_TrayDtct), Ctrl[0]); break;

                case (int)xi.RAIL_TrayDtct1: FraInputAPT[i].SetConfig(xi.RAIL_TrayDtct1, SML.IO.GetXName((int)xi.RAIL_TrayDtct1), Ctrl[0]); break;

                case (int)xi.IDXR_TrayDtct: FraInputAPT[i].SetConfig(xi.IDXR_TrayDtct, SML.IO.GetXName((int)xi.IDXR_TrayDtct), Ctrl[0]); break;

                case (int)xi.IDXF_TrayDtct: FraInputAPT[i].SetConfig(xi.IDXF_TrayDtct, SML.IO.GetXName((int)xi.IDXF_TrayDtct), Ctrl[0]); break;

                case (int)xi.TOOL_PckrVac: FraInputAPT[i].SetConfig(xi.TOOL_PckrVac, SML.IO.GetXName((int)xi.TOOL_PckrVac), Ctrl[0]); break;

                case (int)xi.STCK_StackTrayDtct: FraInputAPT[i].SetConfig(xi.STCK_StackTrayDtct, SML.IO.GetXName((int)xi.STCK_StackTrayDtct), Ctrl[0]); break;

                case (int)xi.STCK_StackUpDtct: FraInputAPT[i].SetConfig(xi.STCK_StackUpDtct, SML.IO.GetXName((int)xi.STCK_StackUpDtct), Ctrl[0]); break;

                case (int)xi.BARZ_BrcdTrayDtct: FraInputAPT[i].SetConfig(xi.BARZ_BrcdTrayDtct, SML.IO.GetXName((int)xi.BARZ_BrcdTrayDtct), Ctrl[0]); break;

                case (int)xi.BARZ_PckrBrcdDtct: FraInputAPT[i].SetConfig(xi.BARZ_PckrBrcdDtct, SML.IO.GetXName((int)xi.BARZ_PckrBrcdDtct), Ctrl[0]); break;

                case (int)xi.BARZ_TrayOutDtct: FraInputAPT[i].SetConfig(xi.BARZ_TrayOutDtct, SML.IO.GetXName((int)xi.BARZ_TrayOutDtct), Ctrl[0]); break;

                case (int)xi.BARZ_PckrVac: FraInputAPT[i].SetConfig(xi.BARZ_PckrVac, SML.IO.GetXName((int)xi.BARZ_PckrVac), Ctrl[0]); break;
                }

                FraInputAPT[i].Show();
            }

            //Output Status 생성 AP텍꺼
            const int iOutputBtnCnt = 4;

            FraOutputAPT = new FrameOutputAPT[iOutputBtnCnt];
            for (int i = 0; i < iOutputBtnCnt; i++)
            {
                Control[] Ctrl = tcDeviceSet.Controls.Find("pnOutput" + i.ToString(), true);

                int iIOCtrl = Convert.ToInt32(Ctrl[0].Tag);

                FraOutputAPT[i]          = new FrameOutputAPT();
                FraOutputAPT[i].TopLevel = false;

                switch (iIOCtrl)
                {
                default: break;

                case (int)yi.TOOL_PckrVac: FraOutputAPT[i].SetConfig(yi.TOOL_PckrVac, SML.IO.GetYName((int)yi.TOOL_PckrVac), Ctrl[0]); break;

                case (int)yi.STCK_StackAC: FraOutputAPT[i].SetConfig(yi.STCK_StackAC, SML.IO.GetYName((int)yi.STCK_StackAC), Ctrl[0]); break;

                case (int)yi.BARZ_PckrVac: FraOutputAPT[i].SetConfig(yi.BARZ_PckrVac, SML.IO.GetYName((int)yi.BARZ_PckrVac), Ctrl[0]); break;

                case (int)yi.BARZ_BrcdAC: FraOutputAPT[i].SetConfig(yi.BARZ_BrcdAC, SML.IO.GetYName((int)yi.BARZ_BrcdAC), Ctrl[0]); break;
                }

                FraOutputAPT[i].Show();
            }

            //모터 포지션 AP텍꺼
            FraMotrPosAPT = new FrameMotrPosAPT[(int)mi.MAX_MOTR];
            for (int i = 0; i < (int)mi.MAX_MOTR; i++)
            {
                Control[] Ctrl = tcDeviceSet.Controls.Find("pnMotrPos" + i.ToString(), true);

                FraMotrPosAPT[i]          = new FrameMotrPosAPT();
                FraMotrPosAPT[i].TopLevel = false;
                switch (i)
                {
                default: break;

                case (int)mi.LODR_ZLift: FraMotrPosAPT[i].SetWindow((int)mi.LODR_ZLift, Ctrl[0]); break;

                case (int)mi.TOOL_XRjct: FraMotrPosAPT[i].SetWindow((int)mi.TOOL_XRjct, Ctrl[0]); break;

                case (int)mi.IDXR_XRear: FraMotrPosAPT[i].SetWindow((int)mi.IDXR_XRear, Ctrl[0]); break;

                case (int)mi.IDXF_XFrnt: FraMotrPosAPT[i].SetWindow((int)mi.IDXF_XFrnt, Ctrl[0]); break;

                case (int)mi.TOOL_YTool: FraMotrPosAPT[i].SetWindow((int)mi.TOOL_YTool, Ctrl[0]); break;

                case (int)mi.TOOL_ZPckr: FraMotrPosAPT[i].SetWindow((int)mi.TOOL_ZPckr, Ctrl[0]); break;

                case (int)mi.BARZ_XPckr: FraMotrPosAPT[i].SetWindow((int)mi.BARZ_XPckr, Ctrl[0]); break;

                case (int)mi.BARZ_ZPckr: FraMotrPosAPT[i].SetWindow((int)mi.BARZ_ZPckr, Ctrl[0]); break;

                case (int)mi.STCK_ZStck: FraMotrPosAPT[i].SetWindow((int)mi.STCK_ZStck, Ctrl[0]); break;

                case (int)mi.TOOL_ZVisn: FraMotrPosAPT[i].SetWindow((int)mi.TOOL_ZVisn, Ctrl[0]); break;
                }
                FraMotrPosAPT[i].Show();
            }
        }
Esempio n. 2
0
        public FormDeviceSet(Panel _pnBase)
        {
            InitializeComponent();
            this.Width  = 1272;
            this.Height = 866;

            this.TopLevel = false;
            this.Parent   = _pnBase;

            tbUserUnit.Text = 0.01.ToString();
            PstnDisp();

            OM.LoadLastInfo();
            PM.Load(OM.GetCrntDev().ToString());

            PM.UpdatePstn(true);
            UpdateDevInfo(true);

            //모터 축 수에 맞춰 FrameMotr 생성
            FraMotr = new FraMotr[(int)mi.MAX_MOTR];
            for (int m = 0; m < (int)mi.MAX_MOTR; m++)
            {
                Control[] Ctrl = tcDeviceSet.Controls.Find("pnMotrJog" + m.ToString(), true);

                MOTION_DIR eDir = ML.MT_GetDirType((mi)m);
                FraMotr[m] = new FraMotr();
                FraMotr[m].SetIdType((mi)m, eDir);
                FraMotr[m].TopLevel = false;
                FraMotr[m].Parent   = Ctrl[0];
                FraMotr[m].Show();
                FraMotr[m].SetUnit(EN_UNIT_TYPE.utJog, 0);
            }

            FraCylAPT = new FrameCylinderAPT[(int)ci.MAX_ACTR];
            for (int i = 0; i < (int)ci.MAX_ACTR; i++)
            {
                Control[] CtrlAP = tcDeviceSet.Controls.Find("C" + i.ToString(), true);

                //int iCylCtrl = Convert.ToInt32(CtrlAP[0].Tag);
                int iCylCtrl = Convert.ToInt32(i);
                FraCylAPT[i]          = new FrameCylinderAPT();
                FraCylAPT[i].TopLevel = false;
                FraCylAPT[i].SetConfig((ci)iCylCtrl, ML.CL_GetName(iCylCtrl).ToString(), ML.CL_GetDirType((ci)iCylCtrl), CtrlAP[0]);
                FraCylAPT[i].Show();
            }

            //모터 포지션 AP텍꺼
            FraMotrPosAPT = new FrameMotrPosAPT[(int)mi.MAX_MOTR];
            for (int i = 0; i < (int)mi.MAX_MOTR; i++)
            {
                Control[] Ctrl = tcDeviceSet.Controls.Find("pnMotrPos" + i.ToString(), true);

                FraMotrPosAPT[i]          = new FrameMotrPosAPT();
                FraMotrPosAPT[i].TopLevel = false;
                FraMotrPosAPT[i].SetWindow(i, Ctrl[0]);
                FraMotrPosAPT[i].Show();
            }

            //Input Status 생성 AP텍꺼
            const int iInputBtnCnt = 17;

            FraInputAPT = new FrameInputAPT[iInputBtnCnt];
            for (int i = 0; i < iInputBtnCnt; i++)
            {
                Control[] Ctrl = tcDeviceSet.Controls.Find("X" + i.ToString(), true);

                int iIOCtrl = Convert.ToInt32(Ctrl[0].Tag);

                FraInputAPT[i]          = new FrameInputAPT();
                FraInputAPT[i].TopLevel = false;
                FraInputAPT[i].SetConfig((xi)iIOCtrl, ML.IO_GetXName((xi)iIOCtrl), Ctrl[0]);
                FraInputAPT[i].Show();
            }

            //Output Status 생성 AP텍꺼
            const int iOutputBtnCnt = 8;

            FraOutputAPT = new FrameOutputAPT[iOutputBtnCnt];
            for (int i = 0; i < iOutputBtnCnt; i++)
            {
                Control[] Ctrl = tcDeviceSet.Controls.Find("Y" + i.ToString(), true);

                int iIOCtrl = Convert.ToInt32(Ctrl[0].Tag);

                FraOutputAPT[i]          = new FrameOutputAPT();
                FraOutputAPT[i].TopLevel = false;
                FraOutputAPT[i].SetConfig((yi)iIOCtrl, ML.IO_GetYName((yi)iIOCtrl), Ctrl[0]);
                FraOutputAPT[i].Show();

                // FraOutputAPT[i].Show();
            }
        }
Esempio n. 3
0
        //CPstnMan PstnCnt;

        public FormDeviceSet(Panel _pnBase)
        {
            InitializeComponent();

            InitNodePosView(pnLvBase);

            this.Width  = 1272;
            this.Height = 866;

            this.TopLevel = false;
            this.Parent   = _pnBase;

            tbUserUnit.Text = 0.01.ToString();
            PstnDisp();



            //모터 축에 대한 포지션 디스플레이
            PM.SetWindow(pnMotrPos0, (int)mi.IDX_XCUT);
            PM.SetWindow(pnMotrPos1, (int)mi.IDX_XOUT);
            PM.SetWindow(pnMotrPos2, (int)mi.IDX_TTRN);


            PM.SetGetCmdPos((int)mi.IDX_XCUT, SML.MT.GetCmdPos);
            PM.SetGetCmdPos((int)mi.IDX_XOUT, SML.MT.GetCmdPos);
            PM.SetGetCmdPos((int)mi.IDX_TTRN, SML.MT.GetCmdPos);


            OM.LoadLastInfo();
            PM.Load(OM.GetCrntDev().ToString());

            PM.UpdatePstn(true);
            UpdateDevInfo(true);
            UpdateDevOptn(true);

            FraMotr     = new FraMotr    [(int)mi.MAX_MOTR];
            FraCylinder = new FraCylOneBt[(int)ci.MAX_ACTR];
            //FraOutput   = new FraOutput  [SM.IO._iMaxOut     ];

            //모터 축 수에 맞춰 FrameMotr 생성

            for (int m = 0; m < (int)mi.MAX_MOTR; m++)
            {
                Control[] Ctrl = tcDeviceSet.Controls.Find("pnMotrJog" + m.ToString(), true);

                MOTION_DIR eDir = SM.MT_GetDirType((mi)m);
                FraMotr[m] = new FraMotr();
                FraMotr[m].SetIdType((mi)m, eDir);
                FraMotr[m].TopLevel = false;
                FraMotr[m].Parent   = Ctrl[0];
                FraMotr[m].Show();
                FraMotr[m].SetUnit(EN_UNIT_TYPE.utJog, 0);
            }

            //실린더 수에 맞춰 FrameCylinder 생성
            for (int i = 0; i < (int)ci.MAX_ACTR; i++)
            {
                Control[] Ctrl = tcDeviceSet.Controls.Find("pnAtcr" + i.ToString(), true);

                FraCylinder[i]          = new FraCylOneBt();
                FraCylinder[i].TopLevel = false;

                switch (i)
                {
                default:                                                                                               break;

                case (int)ci.IDX_Hold1UpDn: FraCylinder[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), Ctrl[0]); break;

                case (int)ci.IDX_CutLtFwBw: FraCylinder[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), Ctrl[0]); break;

                case (int)ci.IDX_CutRtFwBw: FraCylinder[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), Ctrl[0]); break;

                case (int)ci.IDX_TwstLtDnUp: FraCylinder[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), Ctrl[0]); break;

                case (int)ci.IDX_TwstRtDnUp: FraCylinder[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), Ctrl[0]); break;

                case (int)ci.IDX_Hold2UpDn: FraCylinder[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), Ctrl[0]); break;

                case (int)ci.IDX_CutBaseUpDn: FraCylinder[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), Ctrl[0]); break;

                case (int)ci.IDX_OutDnUp: FraCylinder[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), Ctrl[0]); break;

                case (int)ci.IDX_CutterDnUp: FraCylinder[i].SetConfig((ci)i, SML.CL.GetName(i).ToString(), SML.CL.GetDirType(i), Ctrl[0]); break;
                }
                FraCylinder[i].Show();
            }

            //Output 버튼 생성
            const int iOutputBtnCnt = 3;

            FraOutput = new FraOutput[iOutputBtnCnt];
            for (int i = 0; i < iOutputBtnCnt; i++)
            {
                FraOutput[i]          = new FraOutput();
                FraOutput[i].TopLevel = false;

                switch (i)
                {
                default: break;
//                    case (int)yi.ySLD_Soldering    : FraOutput[i].SetConfig(yi.ySLD_Soldering    , SM.IO.GetYName((int)yi.ySLD_Soldering    )  , pnIO0); break;
//                    case (int)yi.ySLD_AirCleanOnOff: FraOutput[i].SetConfig(yi.ySLD_AirCleanOnOff, SM.IO.GetYName((int)yi.ySLD_AirCleanOnOff), pnIO1); break;
                }

                FraOutput[i].Show();
            }
            UpdateNodePos(true);

            pbLine.Refresh();
        }