• 大小: 1.44MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-28
  • 语言: 其他
  • 标签: ABB机器人  C#  PC  SDK  

资源简介

ABB机器人PC SDK二次开发,语音控制机器人运动

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Speech.Recognition;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.Discovery;
using ABB.Robotics.Controllers.RapidDomain;
using ABB.Robotics.Controllers.IOSystemDomain;
using ABB.Robotics.Controllers.MotionDomain;
namespace WindowsFormsApplication2

{using System.Speech.Recognition;
    public partial class Form1 : Form
    {
        delegate void SetTextCallback(string text);

        private SpeechRecognitionEngine SRE = new SpeechRecognitionEngine();
     
        private NetworkScanner scanner = null;
        private Controller controller = null;
        // private Task[] tasks = null;
        private NetworkWatcher networkwatcher = null;
        // Controller acontroller = new Controller();
        Mastership master = null;

        void HandleFoundEvent(object sender NetworkWatcherEventArgs e)
        {
            this.Invoke(new EventHandler(AddControllerToListView) new object[] { this e });
        }

        private void AddControllerToListView(object sender NetworkWatcherEventArgs e)
        {
            ControllerInfo controllerInfo = e.Controller; ListViewItem item
             = new ListViewItem(controllerInfo.IPAddress.ToString());
            item.SubItems.Add(controllerInfo.Id); item.SubItems.Add(controllerInfo.Availability.ToString()); item.SubItems.Add(controllerInfo.IsVirtual.ToString()); item.SubItems.Add(controllerInfo.SystemName); item.SubItems.Add(controllerInfo.Version.ToString()); item.SubItems.Add(controllerInfo.ControllerName); this.listView1.Items.Add(item); item.Tag
                   = controllerInfo;
        }

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender EventArgs e)
        {
            RapidData rd = controller.Rapid.GetRapidData(“T_ROB1“ “user“ “reg6“);
            ABB.Robotics.Controllers.RapidDomain.Num rdreg1 = (ABB.Robotics.Controllers.RapidDomain.Num)rd.Value;
            textBox1.Text = rdreg1.ToString();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            this.scanner = new NetworkScanner();
            this.scanner.Scan();
            ControllerInfoCollection controllers = scanner.Controllers;
            ListViewItem item = null;
            foreach (ControllerInfo controllerInfo in controllers)
            {
                item = new ListViewItem(controllerInfo.IPAddress.ToString());
                item.SubItems.Add(controllerInfo.Id);
                item.SubItems.Add(controllerInfo.Availability.ToString());
                item.SubItems.Add(controllerInfo.IsVirtual.ToString());
                item.SubItems.Add(controllerInfo.SystemName)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-04-30 15:02  语音控制机器人\
     文件      335038  2019-04-19 12:24  语音控制机器人\1600_606.rspag
     目录           0  2019-04-30 14:59  语音控制机器人\WindowsFormsApplication2\
     目录           0  2019-04-30 14:59  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\
     文件         187  2017-10-29 14:46  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\App.config
     文件       11352  2018-06-05 12:37  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\Form1.Designer.cs
     文件       15599  2018-06-05 13:45  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\Form1.cs
     文件        5817  2018-06-05 12:37  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\Form1.resx
     文件         536  2017-10-29 14:46  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\Program.cs
     目录           0  2019-04-30 14:59  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\Properties\
     文件        1372  2017-10-29 14:46  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\Properties\AssemblyInfo.cs
     文件        2900  2017-10-29 14:46  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\Properties\Resources.Designer.cs
     文件        5612  2017-10-29 14:46  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\Properties\Resources.resx
     文件        1111  2017-10-29 14:46  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\Properties\Settings.Designer.cs
     文件         249  2017-10-29 14:46  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\Properties\Settings.settings
     文件        4071  2018-06-04 12:41  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\WindowsFormsApplication2.csproj
     目录           0  2019-04-30 14:59  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\
     目录           0  2019-04-30 14:59  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\
     文件      548864  2014-11-27 10:14  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\ABB.Robotics.Controllers.PC.dll
     文件     1099546  2014-11-27 10:14  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\ABB.Robotics.Controllers.PC.xml
     文件      238592  2014-11-27 10:09  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\RobotStudio.Services.RobApi.Desktop.dll
     文件      306688  2014-11-27 10:09  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\RobotStudio.Services.RobApi.dll
     文件       18944  2018-06-05 12:37  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.exe
     文件         187  2017-10-29 14:46  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.exe.config
     文件       48640  2018-06-05 12:37  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.pdb
     文件       24224  2018-06-05 13:49  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe
     文件         187  2017-10-29 14:46  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe.config
     文件         490  2015-06-05 04:48  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe.manifest
     目录           0  2019-04-30 14:59  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\obj\
     目录           0  2019-04-30 14:59  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\
     文件        1453  2017-10-29 16:29  语音控制机器人\WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\DesignTimeResolveAssemblyReferences.cache
............此处省略16个文件信息

评论

共有 条评论