中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

網(wǎng)站建設(shè)目錄結(jié)構(gòu)doc站長(zhǎng)工具官網(wǎng)查詢

網(wǎng)站建設(shè)目錄結(jié)構(gòu)doc,站長(zhǎng)工具官網(wǎng)查詢,百度聯(lián)盟網(wǎng)站有哪些,文化館網(wǎng)站建設(shè)的意義安裝 MX Component 。 我的安裝地址在: 打開 utl 文件夾下的 Communication Settings Utility 執(zhí)行。 配置PLC 添加當(dāng)前需要配置的PLC 注意 logical station Namber 就是程序里需要對(duì)接的邏輯站點(diǎn)編號(hào) 5.配置選擇對(duì)應(yīng)的COM操作選擇對(duì)應(yīng)的cpu型型號(hào),…
  1. 安裝 MX Component 。

  2. 我的安裝地址在:

  3. 在這里插入圖片描述

  4. 打開 utl 文件夾下的 Communication Settings Utility 執(zhí)行。
    配置PLC 添加當(dāng)前需要配置的PLC 注意 logical station Namber 就是程序里需要對(duì)接的邏輯站點(diǎn)編號(hào)
    在這里插入圖片描述
    5.配置選擇對(duì)應(yīng)的COM操作選擇對(duì)應(yīng)的cpu型型號(hào),然后測(cè)試程序是否可以聯(lián)通,如果聯(lián)通則可以繼續(xù)進(jìn)行。
    5.程序編輯。
    5.1 選擇 對(duì)應(yīng)的SDK
    在這里插入圖片描述
    在此demo下有眾多可以適用的功能。
    在這里插入圖片描述
    其中已經(jīng)包含了數(shù)據(jù)各種誰操作,連接關(guān)閉等操作。程序引用相關(guān)文件。 修改嵌入方式改成否,選擇保存本地。
    在這里插入圖片描述
    以下就是我簡(jiǎn)單寫了一個(gè)操作類:

 public static  class MXCommonGet
{public static bool IsConnect;public static ActUtlType64Lib.ActUtlType64Class axActUtlType1 = new ActUtlType64Lib.ActUtlType64Class();//public   MXCommonGet()//{//    解決因?yàn)榈谌娇丶?bào)錯(cuò),將實(shí)例化的對(duì)象添加到控件合集中//    //((ISupportInitialize)(this.axActUtlType1)).BeginInit();//    //this.Controls.Add(axActUtlType1);//    //((ISupportInitialize)(this.axActUtlType1)).EndInit();//    }public static  bool ConnectM(){axActUtlType1.ActLogicalStationNumber = 2;//填設(shè)置的邏輯站號(hào),站號(hào)是在MXcomponent軟件里設(shè)置的axActUtlType1.ActPassword = "";//密碼int iReturnCode = axActUtlType1.Open();//嘗試連接PLC,如果連接成功則返回值為0if (iReturnCode == 0){OPCommon.LogWrite.WriteLog("PLC連接成功!");IsConnect = true;return true;}else{OPCommon.LogWrite.WriteLog("PLC連接失敗!");IsConnect = false;return false;}}/// <summary>/// 獲取前節(jié)點(diǎn)數(shù)據(jù)/// </summary>/// <param name="PointId"></param>/// <returns></returns>public static ResultMsg GetValueInPoint(string PointId){ResultMsg msg = new ResultMsg();try{if ( IsConnect){int relust;int iReturnCode = axActUtlType1.GetDevice(PointId, out relust);if (iReturnCode == 0){msg.ReturnInt = relust;msg.Success = true;}else{msg.Success = false;}}else{ConnectM();msg.Success = true;msg.ReturnInt = 0;}}catch (Exception ex){msg.Success = false;msg.ReturnInt = 0;msg.ErrMsg = "連接出錯(cuò)";} return msg; }/// <summary>/// 設(shè)置當(dāng)前節(jié)點(diǎn)數(shù)據(jù)/// </summary>/// <param name="PointId">節(jié)點(diǎn)編號(hào)</param>/// <param name="Result"></param>/// <returns></returns>public static ResultMsg SetValueInPoint(string PointId,int  Result){ResultMsg msg = new ResultMsg();try{if ( IsConnect){ int iReturnCode = axActUtlType1.SetDevice(PointId, Result);if (iReturnCode == 0){msg.ReturnInt = Result;msg.Success = true;}else{msg.Success = false;}}else{ConnectM();msg.Success = true;msg.ReturnInt = 0;}}catch (Exception ex){msg.Success = false;msg.ReturnInt = 0;msg.ErrMsg = $"連接出錯(cuò) {ex.Message}";}return msg;}/// <summary>/// 關(guān)閉當(dāng)前連接/// </summary>/// <returns></returns>public static ResultMsg   CloseThisMX(){ResultMsg msg = new ResultMsg();if (axActUtlType1 != null){int iReturnCode = axActUtlType1.Close();if (iReturnCode == 0){msg.Success = true;msg.ReturnInt = 0;}else{msg.Success = false ;msg.ReturnInt = iReturnCode;}}else{msg.Success = false;msg.ErrMsg = "數(shù)據(jù)不存在";}return msg;}
}
http://www.risenshineclean.com/news/5866.html

相關(guān)文章:

  • wordpress twenty fourteen主題做的演示網(wǎng)站新網(wǎng)店怎么免費(fèi)推廣
  • 專門做推廣的網(wǎng)站網(wǎng)絡(luò)營(yíng)銷平臺(tái)的主要功能
  • 網(wǎng)站建設(shè)中心ping站長(zhǎng)工具
  • synology做網(wǎng)站廣州發(fā)布緊急通知
  • python做的網(wǎng)站公司seo
  • 自己做網(wǎng)站自己做SEO百度市場(chǎng)應(yīng)用官方app
  • 國(guó)內(nèi)做網(wǎng)站建設(shè)知名的公司品牌推廣的步驟和技巧
  • 云南建設(shè)網(wǎng)站sem培訓(xùn)班培訓(xùn)多少錢
  • 上海網(wǎng)站建設(shè)開發(fā)哪家澤成杭州seo網(wǎng)站推廣排名
  • 在什么網(wǎng)站做公務(wù)員題目中國(guó)新聞今日頭條
  • 酒泉市建設(shè)局網(wǎng)站招標(biāo)辦店鋪推廣平臺(tái)有哪些
  • 屬于網(wǎng)站建設(shè)過程規(guī)劃和準(zhǔn)備階段的是seo外鏈軟件
  • 做網(wǎng)站委托書seo官網(wǎng)
  • 更好的網(wǎng)站制作濟(jì)南seo怎么優(yōu)化
  • 網(wǎng)站專業(yè)代做哪家好滄州網(wǎng)站seo
  • 優(yōu)秀的手機(jī)網(wǎng)站2345手機(jī)瀏覽器
  • 房產(chǎn)信息查詢系統(tǒng)官方網(wǎng)站一鍵建站
  • 遼寧做網(wǎng)站的公司網(wǎng)站外包公司有哪些
  • 如何做webgis網(wǎng)站優(yōu)化關(guān)鍵詞是什么意思
  • 網(wǎng)站排名優(yōu)化服務(wù)商全網(wǎng)營(yíng)銷平臺(tái)
  • 網(wǎng)站默認(rèn)樣式表愛站網(wǎng)seo
  • 做招商網(wǎng)站百度關(guān)鍵詞seo
  • 做視頻網(wǎng)站視頻文件都存放在哪里網(wǎng)絡(luò)優(yōu)化工程師工作內(nèi)容
  • wordpress 頁面全屏優(yōu)化設(shè)計(jì)
  • 用vb做網(wǎng)站seo挖關(guān)鍵詞
  • 科技資訊網(wǎng)站有哪些seo優(yōu)化的內(nèi)容有哪些
  • 做淘寶推廣開網(wǎng)站合適近期的新聞消息
  • 北京市工程建設(shè)信息網(wǎng)官網(wǎng)寧波網(wǎng)站推廣優(yōu)化哪家正規(guī)
  • 江蘇網(wǎng)站建設(shè)網(wǎng)絡(luò)公司百度愛采購(gòu)官網(wǎng)
  • 一個(gè)外貿(mào)網(wǎng)站要多大的空間比較好建網(wǎng)站要多少錢