標題: 臺達PLC DVP AS300 AH500 Modbus 地址查詢軟件C# 原創(chuàng)源碼 [打印本頁]

作者: zhuyikang    時間: 2021-6-23 10:02
標題: 臺達PLC DVP AS300 AH500 Modbus 地址查詢軟件C# 原創(chuàng)源碼
臺達PLC DVP AS300 AH500 Modbus 地址查詢軟件 C# 原創(chuàng)源碼

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;

  9. namespace DetalModbus
  10. {
  11.     public partial class Frm_Main : Form
  12.     {
  13.         

  14.         public Frm_Main()
  15.         {
  16.            


  17.             InitializeComponent();

  18.         }
  19.         Point m_MBRpt;//鼠標右鍵點擊時Point

  20.          



  21.         private void cbox_Tpe_TextChanged(object sender, EventArgs e)
  22.         {
  23.             if (cbox_Tpe.SelectedItem.ToString() == "DVP系列")
  24.             {


  25.                 cb_soft.Items.Clear();
  26.                 cb_soft.Items.Add("S");
  27.                 cb_soft.Items.Add("X");
  28.                 cb_soft.Items.Add("Y");
  29.                 cb_soft.Items.Add("T");
  30.                 cb_soft.Items.Add("M");
  31.                 cb_soft.Items.Add("C");
  32.                 cb_soft.Items.Add("D");
  33.                 cb_soft.SelectedIndex = 0;
  34.             }
  35.             else if (cbox_Tpe.SelectedItem.ToString() == "AS300系列")
  36.             {
  37.                 cb_soft.Items.Clear();
  38.                 cb_soft.Items.Add("X");
  39.                 cb_soft.Items.Add("Y");
  40.                 cb_soft.Items.Add("M");
  41.                 cb_soft.Items.Add("SM");
  42.                 cb_soft.Items.Add("SR");
  43.                 cb_soft.Items.Add("D");
  44.                 cb_soft.Items.Add("S");
  45.                 cb_soft.Items.Add("T");
  46.                 cb_soft.Items.Add("C");
  47.                 cb_soft.Items.Add("HC");
  48.                 cb_soft.Items.Add("E");
  49.                 cb_soft.SelectedIndex = 0;
  50.             }

  51.             else if (cbox_Tpe.SelectedItem.ToString() == "AH500系列")
  52.             {
  53.                 cb_soft.Items.Clear();
  54.                 cb_soft.Items.Add("X");
  55.                 cb_soft.Items.Add("Y");
  56.                 cb_soft.Items.Add("M");
  57.                 cb_soft.Items.Add("SM");
  58.                 cb_soft.Items.Add("SR");
  59.                 cb_soft.Items.Add("D");
  60.                 cb_soft.Items.Add("S");
  61.                 cb_soft.Items.Add("T");
  62.                 cb_soft.Items.Add("C");
  63.                 cb_soft.Items.Add("HC");
  64.                 cb_soft.Items.Add("E");
  65.                 cb_soft.SelectedIndex = 0;
  66.             }
  67.             else
  68.             {

  69.             }
  70.         }

  71.         private void Frm_Main_Load(object sender, EventArgs e)
  72.         {
  73.             cb_Type.Visible = false;
  74.             lb_softType.Visible = false;
  75.             lb_info.Visible = false;
  76.         }

  77.         private void btn_serch_Click(object sender, EventArgs e)
  78.         {
  79.             if ((!((cbox_Tpe.Text == "DVP系列" || cbox_Tpe.Text == "AS300系列" || cbox_Tpe.Text == "AH500系列") ||     cb_soft.Text != "")))
  80.             {
  81.                 MessageBox.Show("PLC類型或軟元件類型不能為空!", "提示", MessageBoxButtons.OK);
  82.                 return;

  83.             }

  84.             if (tb_Address.Text == "")
  85.             {
  86.                 BatchSearch();
  87.             }
  88.             else
  89.             {

  90.                 SingleSearch();
復制代碼


全部資料51hei下載地址:
DetalModbus.rar (157.64 KB, 下載次數(shù): 35)






歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1