コード例 #1
0
        private void DM_Datastn1txt_TextChanged(object sender, EventArgs e)
        {
            if (DM_Datastn1txt.Text.Length > 10)
            {
                DM_Datastn1txt.Text = DM_Datastn1txt.Text.ToUpper();
                if (check_appref())
                {
                    if (check_previousstation_result(DM_Datastn1txt.Text))
                    {
                        libnoInstance.write_bit_value(address, 61, 0, 4, true);   //ok to flush the component in station 1
                        libnoInstance.write_bit_value(address, 61, 0, 6, true);   //cycle in progress set to false

                        opmsglbl.Text      = "PREVIOUS STATION RESULT OK !& LOAD THE COMPONENT";
                        opmsglbl.ForeColor = Color.Yellow;
                        Cyltimer_1.Enabled = true;
                    }
                    else
                    {
                        libnoInstance.write_bit_value(address, 61, 0, 4, false);   //nok to flush the component in station 1
                        opmsglbl.Text      = "CYCLE ABORTED DUE TO PREVIOUS STATION RESULT FAIL";
                        opmsglbl.ForeColor = Color.Red;
                        Cyltimer_1.Enabled = false;
                        readdata           = "";
                        DM_Datastn1txt.Focus();
                        DM_Datastn1txt.Text = "";
                    }
                }
                else
                {
                    opmsglbl.Text      = "APPLICATION REFERENCE MISMATCH !";
                    opmsglbl.ForeColor = Color.Red;
                }
            }
        }
コード例 #2
0
 private void cmbapp1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cmbapp1.SelectedIndex > 0)
     {
         string getapcode = "SELECT APP_CODE FROM APP_MASTER_LANCE3 WHERE APP_NAME = '" + cmbapp1.Text + "'";
         barref1 = objora.GetSingleValue(getapcode);
         DM_Datastn1txt.ReadOnly = false;
         DM_Datastn1txt.Focus();
     }
 }
コード例 #3
0
        private void Cyltimer_1_Tick(object sender, EventArgs e)
        {
            if (libnoInstance.read_bit_value(address, 101, 0, 0).ToString().ToUpper() == "TRUE") //trigger message of closing guard in station 2
            {
                opmsglbl.Text      = "CYCLE IN PROGRESS IN STATION 1 ";
                opmsglbl.ForeColor = Color.Yellow;
            }

            if (libnoInstance.read_bit_value(address, 61, 0, 6).ToString().ToUpper() == "FALSE") //flushing in progress in station 1
            {
                dataType    = LibnoDaveClass.PLCDataType.Integer;
                readIntList = null;
                if (libnoInstance.read_integer_values(address, 61, 8, 9, out readIntList, dataType, true))
                {
                    if (readIntList[0].ToString() == "0")
                    {
                        save_results("PASS", 1);
                        libnoInstance.write_bit_value(address, 61, 1, 0, true); //release componnet after datalogging
                        filldatagrid(1);
                        Cyltimer_1.Enabled = false;
                        libnoInstance.write_bit_value(address, 61, 0, 4, false);
                        readdata            = "";
                        DM_Datastn1txt.Text = "";
                        DM_Datastn1txt.Focus();
                    }
                    else
                    {
                        save_results("FAIL", 1);
                        libnoInstance.write_bit_value(address, 61, 1, 0, true); //release componnet after datalogging
                        filldatagrid(1);
                        Cyltimer_1.Enabled = false;
                        libnoInstance.write_bit_value(address, 61, 0, 4, false);
                        readdata = "";
                        DM_Datastn1txt.Focus();
                        DM_Datastn1txt.Text = "";
                    }
                }
            }
            else
            {
                return;
            }
        }