コード例 #1
0
        private void menuItem_Apply_Click(object sender, EventArgs e)
        {
            try
            {
                ABB.Robotics.Controllers.RapidDomain.RapidData boolBlocksiFr1ArcStable = rwSystem.Controller.Rapid.GetRapidData("T_ROB1", "GlobalDataModule", "boolBlocksiFr1ArcStable");
                ABB.Robotics.Controllers.RapidDomain.Bool      bBlocksiFr1ArcStable    = new ABB.Robotics.Controllers.RapidDomain.Bool(this.checkBox_boolBlocksiFr1ArcStable.Checked);
                boolBlocksiFr1ArcStable.Value = bBlocksiFr1ArcStable;
                boolBlocksiFr1ArcStable.Dispose();

                ABB.Robotics.Controllers.RapidDomain.RapidData numBlocksiArcStableLength = rwSystem.Controller.Rapid.GetRapidData("T_ROB1", "GlobalDataModule", "numBlocksiArcStableLength");
                ABB.Robotics.Controllers.RapidDomain.Num       nBlocksiArcStableLength   = new ABB.Robotics.Controllers.RapidDomain.Num(Convert.ToDouble(this.numEditor_numBlocksiArcStableLength.Value));
                numBlocksiArcStableLength.Value = nBlocksiArcStableLength;
                numBlocksiArcStableLength.Dispose();

                this.rwSystem.ApplyTpsControl("T_ROB1", "GlobalDataModule", "numIsometricalSaddleCoefficient", this.numEditor_numIsometricalSaddleCoefficient);
                this.rwSystem.ApplyTpsControl("T_ROB1", "GlobalDataModule", "numShoulderGrooveCoefficient", this.numEditor_numShoulderGrooveCoefficient);
                this.rwSystem.ApplyTpsControl("T_ROB1", "GlobalDataModule", "numTorchCleanIntervalCount", this.numEditor_numTorchCleanIntervalCount);

                this.menuItem_Apply.Enabled = false;
            }
            catch (Exception ex)
            {
                GTPUMessageBox.Show(this.Parent.Parent, null
                                    , string.Format("An unexpected error occurred when applying RAPID data 'rPipeGrooveModel'. Message {0}", ex.ToString())
                                    , "System Error"
                                    , System.Windows.Forms.MessageBoxIcon.Hand
                                    , System.Windows.Forms.MessageBoxButtons.OK);
            }
        }
コード例 #2
0
 public void ApplyTpsControl(string strTaskName, string strModuleName, string strDataName, TpsControl tpsControl)
 {
     if (tpsControl is NumEditor)
     {
         ABB.Robotics.Controllers.RapidDomain.RapidData rapidData = this.controller.Rapid.GetRapidData(strTaskName, strModuleName, strDataName);
         ABB.Robotics.Controllers.RapidDomain.Num       number    = new ABB.Robotics.Controllers.RapidDomain.Num(Convert.ToDouble(((NumEditor)tpsControl).Value));
         rapidData.Value = number;
         rapidData.Dispose();
     }
 }
コード例 #3
0
 public void RefreshTpsControl(string strTaskName, string strModuleName, string strDataName, TpsControl tpsControl)
 {
     if (tpsControl is NumEditor)
     {
         ABB.Robotics.Controllers.RapidDomain.RapidData rapidData = this.controller.Rapid.GetRapidData(strTaskName, strModuleName, strDataName);
         ABB.Robotics.Controllers.RapidDomain.Num       number    = new ABB.Robotics.Controllers.RapidDomain.Num();
         number.FillFromString(rapidData.Value.ToString());
         ((NumEditor)tpsControl).Value = Convert.ToDecimal(number);
         rapidData.Dispose();
     }
 }