private void btnON_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show(this, "Do you want Charge on?", "Conform", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
     {
         MELSEC.SetPulse("M550");
     }
 }
예제 #2
0
        private void btnMdmsSave_Click(object sender, RoutedEventArgs e)
        {
            MELSEC.SetText("D4000", txtCstID1.Text, 8);
            MELSEC.SetText("D4008", txtCstID2.Text, 8);
            MELSEC.SetText("D4010", txtCstID3.Text, 8);
            MELSEC.SetText("D4018", txtCstID4.Text, 8);
            MELSEC.SetText("D4020", txtCstID5.Text, 8);
            GBL.cstID[0] = txtCstID1.Text;
            GBL.cstID[1] = txtCstID2.Text;
            GBL.cstID[2] = txtCstID3.Text;
            GBL.cstID[3] = txtCstID4.Text;
            GBL.cstID[4] = txtCstID5.Text;
            blockRead.DataRead();
            txtCstID1a.Text = blockRead.GetText("D4000", 8);
            txtCstID2a.Text = blockRead.GetText("D4008", 8);
            txtCstID3a.Text = blockRead.GetText("D4010", 8);
            txtCstID4a.Text = blockRead.GetText("D4018", 8);
            txtCstID5a.Text = blockRead.GetText("D4020", 8);
            IniFile inifile = new IniFile();

            inifile.WriteStr("M-DMS", "CSTID1", GBL.cstID[0]);
            inifile.WriteStr("M-DMS", "CSTID2", GBL.cstID[1]);
            inifile.WriteStr("M-DMS", "CSTID3", GBL.cstID[2]);
            inifile.WriteStr("M-DMS", "CSTID4", GBL.cstID[3]);
            inifile.WriteStr("M-DMS", "CSTID5", GBL.cstID[4]);
            MessageBox.Show("Saved CST-ID.");
        }
예제 #3
0
 private void chkReset_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show(this, "Do you want Reset?", "Conform", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
     {
         MELSEC.SetPulse("M3104");
     }
 }
예제 #4
0
 private void btnOperator_Checked(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("L2000");
     if (pageOperator == null)
     {
         return;
     }
     frame1.Navigate(pageOperator);
 }
예제 #5
0
 private void btnMain_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("L2000");
     if (pageOperator == null)
     {
         return;
     }
     rbOperator.IsChecked = true;
     frame1.Navigate(pageOperator);
 }
예제 #6
0
        private void btnLockOn_Click(object sender, RoutedEventArgs e)
        {
            DlgPassword dlg = new DlgPassword();

            dlg.Owner = Application.Current.MainWindow;
            if (dlg.ShowDialog() == true)
            {
                MELSEC.SetDevice("M003150", 0);     // Open
                MELSEC.SetDevice("M003151", 1);     // Close
            }
        }
예제 #7
0
        private void btnLockOff_Click(object sender, RoutedEventArgs e)
        {
            if (randomRead.GetData("L3109") != 1)
            {
                MessageBox.Show("Not mantance mode, please change mode.");
                return;
            }

            DlgPassword dlg = new DlgPassword();

            dlg.Owner = Application.Current.MainWindow;
            if (dlg.ShowDialog() == true)
            {
                MELSEC.SetDevice("M003150", 1);     // Open
                MELSEC.SetDevice("M003151", 0);     // Close
                DlgMaintrance dlg2 = new DlgMaintrance();
                dlg2.Owner = Application.Current.MainWindow;
                dlg2.ShowDialog();
            }
        }
예제 #8
0
 private void chkManualMode_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M3109");
     GBL.operatorScreenActive = 2;
     frame1.Navigate(pageOperator);
 }
예제 #9
0
 private void btnTriger_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M004040");
 }
예제 #10
0
 private void btnSkip_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetDevice("M004043", 0);
     MELSEC.SetDevice("M004043", 1);
     MELSEC.SetDevice("M004043", 0);
 }
예제 #11
0
 private void chkBuzzerStop_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetInvert("L3106");
 }
예제 #12
0
 private void btnResetNG_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M004042");
 }
예제 #13
0
 private void chkCycleStop_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M3101");
 }
예제 #14
0
 private void btnModeChange_MouseUp(object sender, MouseButtonEventArgs e)
 {
     MELSEC.SetDevice("M003149", 0);
 }
예제 #15
0
 private void btnLight_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetInvert("M3010");
 }
예제 #16
0
 private void btnFWD_MouseUp(object sender, MouseButtonEventArgs e)
 {
     MELSEC.SetDevice("M003145", 0);
 }
예제 #17
0
 private void btnKeyIn_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M004017", 0);
 }
예제 #18
0
 public static void Close()
 {
     LocalDB.Dispose();
     MELSEC.Close();
 }
예제 #19
0
 private void btnChargeBarDown_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M1557");
 }
예제 #20
0
 private void btnCenterOff_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M1551");
 }
예제 #21
0
 private void btnFloatOff_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M1555");
 }
예제 #22
0
 private void btnComplete_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M004017", 0);
     MELSEC.SetInvert("M004019");
 }
예제 #23
0
 private void chkStart_MouseUp(object sender, MouseButtonEventArgs e)
 {
     MELSEC.SetDevice("M3100", 0);
 }
예제 #24
0
 private void btnOFF_Click(object sender, RoutedEventArgs e)
 {
     MELSEC.SetPulse("M551");
 }
예제 #25
0
 private void btnBWD_MouseDown(object sender, MouseButtonEventArgs e)
 {
     MELSEC.SetDevice("M003146", 1);
 }