• 大小: 0.29M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-04-23
  • 语言: C#
  • 标签: SICK  LMS511  

资源简介

SICKLMS51 数据解析

资源截图

代码片段和文件信息

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.Net.NetworkInformation;
using SICK_LMS5xx_PRO_Library;
using SICK_Work;

// ip adress of sensor 169.254.156.174

namespace SICKLMS511_reader
{
    public partial class Form1 : Form
    {
        public bool CheckIPValidation = true;
        private System.Net.IPAddress IPtest;
        public SICK_Communication.Ethernet.TCP_client LMS_connection = new SICK_Communication.Ethernet.TCP_client();
        public SICK_LMS5xx_PRO_Library.DataProcessing LMS_DataProcess = new SICK_LMS5xx_PRO_Library.DataProcessing();
        public string LMS_Data;
        public SICK_Work.SICK_Laserdevices.Scandata LMS_MEasurementStructure = new SICK_Work.SICK_Laserdevices.Scandata();

        public Form1()
        {
            InitializeComponent();
        }
        // function to check if device is online
        public Boolean pingAddress(string ipadd)
        {
            try
            {
                Ping ping = new Ping();
                PingReply pingresult = ping.Send(ipadd);
                if (pingresult.Status.ToString() == “Success“)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            catch (Exception e)
            {
                return false;
            }

        }

        private void butConnect_Click(object sender EventArgs e)
        {
            if (butConnect.Text == “Connect“)
            {

                // check if  IPaddress is valid and the device is online
                if (CheckIPValidation == true & pingAddress(textIPAddress.Text) == true)
                {
                    Int32 portNum = Convert.ToInt32(textPort.Text);
                    LMS_connection.Client_Connect(textIPAddress.Text portNum); // connect the LMS511

                    // enable the buttons
                    butGetData.Enabled = true;
                    textIPAddress.Enabled = false;

                    butConnect.Text = “Disconnect“;
                }
                else
                {
                    textData.Text = “Device not avaiable confirm device ip address and port \n“;
                }
            }
            else
            {
                // Disconnect
                LMS_connection.Client_Disconnect();
                butGetData.Enabled = false;
                textIPAddress.Enabled = true;
                butConnect.Text = “Connect“;
            }
        }

        private void textIPAddress_TextChanged(object sender EventArgs e)
        {
            if (System.Net.IPAddress.TryParse(textIPAddress.Text out IPtest) == true) // check if input text is an ip address
           

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-10-08 22:45  SICKLMS511-master\
     文件          60  2018-10-08 22:45  SICKLMS511-master\README.md
     目录           0  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\
     目录           0  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\Reference library\
     文件       59392  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\Reference library\SICK_Communication.dll
     文件       32256  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\Reference library\SICK_FileManagement.dll
     文件       43520  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\Reference library\SICK_LMS5xx-PRO_Library.dll
     文件       33792  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\Reference library\SICKwork.dll
     目录           0  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\
     目录           0  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\Reference library\
     文件       59392  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\Reference library\SICK_Communication.dll
     文件       32256  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\Reference library\SICK_FileManagement.dll
     文件       43520  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\Reference library\SICK_LMS5xx-PRO_Library.dll
     文件       33792  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\Reference library\SICKwork.dll
     文件        1018  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader.sln
     文件       22528  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader.v12.suo
     目录           0  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\
     文件         184  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\App.config
     文件       10212  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\Form1.Designer.cs
     文件        7495  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\Form1.cs
     文件        5817  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\Form1.resx
     文件         540  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\Program.cs
     目录           0  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\Properties\
     文件        1446  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\Properties\AssemblyInfo.cs
     文件        2862  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\Properties\Resources.Designer.cs
     文件        5612  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\Properties\Resources.resx
     文件        1100  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\Properties\Settings.Designer.cs
     文件         249  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\Properties\Settings.settings
     文件        4609  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader.csproj
     目录           0  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\bin\
     目录           0  2018-10-08 22:45  SICKLMS511-master\SICKLMS511 reader\SICKLMS511 reader\SICKLMS511 reader\bin\Debug\
............此处省略26个文件信息

评论

共有 条评论

相关资源