CODESYS 涓ゅ彴PLC Socket鍗忚閫氳-CODESYS璧勬簮涓嬭浇鍖-閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛
HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鏌ョ湅: 440|鍥炲: 0

CODESYS 涓ゅ彴PLC Socket鍗忚閫氳

[澶嶅埗閾炬帴]
  • TA鐨勬瘡鏃ュ績鎯
    鎱垫噿
    2017-11-9 20:49
  • 绛惧埌澶╂暟: 2 澶

    [LV.1]鍒濇潵涔嶅埌

    鍙戣〃浜 2024-8-9 23:49:07 | 鏄剧ず鍏ㄩ儴妤煎眰 |闃呰妯″紡
    鏈杩戞湁娴嬭瘯PLC鐨勯氳鏈澶фц兘锛屽叿浣撴搷浣滄槸璁╀袱鍙癙LC鍒嗗埆鍋氬鎴风鍜屾湇鍔$杩涜閫氳锛岃繛鎺ヤ笂鍚庤繘琛屼簰鍙戞暟鎹搷浣溿
    涓.TCP 鑷敱鍗忚閫氳

    CODESYS瀹樼綉鎻愪緵浜員CP鍗忚閫氳鐨勭浉鍏虫寚浠ゃ
    CODESYS 涓ゅ彴PLC Socket鍗忚閫氳-1.png


    1.鏈嶅姟绔

            鏈嶅姟绔殑娴佺▼锛歍cp_Server寤虹珛鏈嶅姟鍣->Tcp_Connect寤虹珛杩炴帴->Tcp_Read鎺ユ敹鏁版嵁->Tcp->
    Write鎺ユ敹鏁版嵁銆傚緢绠鍗曪紝涓婁唬鐮侊紒
    //Define:
    CODESYS 涓ゅ彴PLC Socket鍗忚閫氳-2.png


    CODESYS 涓ゅ彴PLC Socket鍗忚閫氳-3.png


    //code:
    CODESYS 涓ゅ彴PLC Socket鍗忚閫氳-4.png


    2.瀹㈡埛绔
    鏈嶅姟绔殑娴佺▼锛TCP_Client鍒涘缓瀹㈡埛绔繛鎺>Tcp_Read鎺ユ敹鏁版嵁->Tcp->Write鎺ユ敹鏁版嵁銆
    //Define锛
    CODESYS 涓ゅ彴PLC Socket鍗忚閫氳-5.png


    //code:
    CODESYS 涓ゅ彴PLC Socket鍗忚閫氳-6.png


    鏈鍚庤皟鐢ㄤ咯涓姛鑳藉潡浜掔浉閫氳銆
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鍥炲

    浣跨敤閬撳叿 涓炬姤

    鎮ㄩ渶瑕佺櫥褰曞悗鎵嶅彲浠ュ洖甯 鐧诲綍 | 绔嬪嵆娉ㄥ唽 鏂版氮寰崥鐧婚檰

    鏈増绉垎瑙勫垯

    椤堕儴qrcode搴曢儴
    鍏虫敞閰峰痉缃戣闃呭彿锛岃幏鍙栨洿澶氳祫璁紒

    QQ|灏忛粦灞|鎵嬫満鐗|Archiver|閰峰痉璁哄潧 ( 鑻廔CP澶16065247鍙-1 )|缃戠珯鍦板浘

    GMT+8, 2024-11-23 19:41 , Processed in 0.148435 second(s), 59 queries .

    閰峰痉缃

    © 2001-2013 Hicodesys. 鎶鏈敮鎸 by 閰峰痉缃

    蹇熷洖澶 杩斿洖椤堕儴 杩斿洖鍒楄〃