PLC鐨勯珮浣庡瓧鑺傝浆鎹-3.png_PLC鐨勯珮浣庡瓧鑺傝浆鎹 - 閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛

閰峰痉缃

HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鎼滅储闄勪欢  
閰峰痉缃 闄勪欢涓績 CODESYS璧勬簮涓嬭浇鍖 CODESYS鏁欑▼鏂囨。 PLC鐨勯珮浣庡瓧鑺傝浆鎹-3.png

PLC鐨勯珮浣庡瓧鑺傝浆鎹-3.png

 

PLC鐨勯珮浣庡瓧鑺傝浆鎹:
PLC鐨勫瘎瀛樺櫒鍒嗕负鍗曞瓧锛圵ord锛夊拰鍙屽瓧(Dword)锛學ord鍗犵敤2涓瓧鑺侭yte锛孌word鍗犵敤4涓瓧鑺侭yte;
鍦≒LC鍜屽叾浠栬澶囬氳寰寰浠ュ瓧鑺備负鍗曚綅杩涜浼犻佺殑锛屾牴鎹笉鍚岀殑閫氳鍗忚锛屼紶閫佹墍鍙戠殑鍐呭涓嶄竴鑷达紝鍏朵腑鏈変簺鍗忚闇瑕佽繘琛屽墠鍚庡瓧鑺備氦鎹,鍚戝父瑙佺殑PLC锛屼笁鑿憋紝姹囧窛绛夋棩绯籔LC鏈変笓闂ㄧ殑鎸囦护SWAP鏉ヨ繘琛岃浆鎹紱渚嬪瀵勫瓨鍣 A:=16#AABB,缁忚繃SWAP鎸囦护鍚庯紝A=16#BBAA






Codesys缂栫▼鍜屼紶缁熺殑PLC缂栫▼涓嶄竴鏍凤紝Codesys缂栫▼鏄睘浜庝竴绉嶉潰鍚戝璞$殑缂栫▼鏂瑰紡锛屼娇鐢ㄨ捣鏉ユ瘮杈冨叿鏈夌伒娲绘э紝鍙互鏍规嵁鑷繁鐨勭紪绋嬩範鎯鏍兼潵杩涜缂栫▼绋嬪簭锛涗笅闈妇渚嬪浣曚娇鐢–odesys鏉ヨ繘琛岀紪鍐橲WAP鎸囦护锛




鏂板缓Codesys鏂囦欢锛岃澶囬夋嫨V3-X64锛岀紪绋嬭瑷鏀寔6绉嶏紝杩欓噷涓句緥浠呬娇鐢ㄧ粨鏋勫寲鏂囨湰ST锛



鍦ㄥ彉閲忓0鏄庡尯鍏堝畾涔夌▼搴忎腑瑕佸嚭鐜扮殑鍙橀噺锛岀劧鍚庡湪绋嬪簭鎵ц鍖虹紪鍐欒繍琛岀殑绋嬪簭锛
浠g爜濡備笅锛
---------------------------------------鍙橀噺澹版槑鍖--------------------------------------------------------------------------
[AppleScript] 绾枃鏈煡鐪 澶嶅埗浠g爜
PROGRAM PLC_PRG//绋嬪簭鍚嶅瓧
VAR
    //
    IN           :WORD;//IN鏄彉閲忓悕绉帮紝   WORD鏄彉閲忓彉閲忕被鍨
    OUT          :WORD;
END_VAR
---------------------------------------绋嬪簭鎵ц鍖-------------------------------------------------------------
OUT :=IN/256+(IN MOD 256)*256;
(*
16浣嶆暟鎹櫎浠256锛屽嵆灏16浣嶆暟鎹殑楂樹綆8浣嶈嚜鍔ㄥ垎寮銆
渚嬪鍘熸暟鍊兼槸锛2#1111111100000000锛岃浆鎹㈡垚10杩涘埗灏辨槸  65280,杞崲鍑16杩涘埗灏辨槸FF00.
灏嗚鏁板奸櫎浠256鍜屽彇浣256锛岀粨鏋滃垎鍒槸  鏁板肩殑楂8浣嶏紙鏁存暟锛夛紝鍜屾暟鍊肩殑浣8浣嶏紙浣欐暟锛
鍐嶅皢浣欐暟涔樹互256+鏁存暟寰楀嚭鐨勬柊鏁版嵁灏辨槸楂樹綆瀛楄妭杞崲鍚庣殑鏁板硷紱

*)


------------------------------------------------浠跨湡----------------------------------------------------------------




鍦ㄥ湪绾块夐」鎵鹃偅涓夋嫨浠跨湡妯″紡锛屽綋杞欢鏈浣庝笅鍑虹嚎浠跨湡鐨勬椂鍊欙紝鐐瑰嚮鐧诲綍锛岀劧鍚庡湪寮瑰嚭鐨勭晫闈㈤夋嫨纭锛




鐐瑰嚮绋嬪簭澹版槑鍖虹殑鍑嗗鍊硷紝鍙抽敭灏嗘樉绀烘ā寮忔洿鏀规垚16杩涘埗锛岀劧鍚庤緭鍏ュ綋鍓嶅16#AABB锛岀劧鍚庣偣鍑昏皟璇曞啓鍏ュ煎嵆鍙繘琛屼豢鐪燂紱


PLC鐨勯珮浣庡瓧鑺傝浆鎹-3.png
         鍚屼竴涓婚闄勪欢:
    PLC鐨勯珮浣庡瓧鑺傝浆鎹-1.png
    PLC鐨勯珮浣庡瓧鑺傝浆鎹-2.png
    PLC鐨勯珮浣庡瓧鑺傝浆鎹-3.png
    PLC鐨勯珮浣庡瓧鑺傝浆鎹-4.png
    PLC鐨勯珮浣庡瓧鑺傝浆鎹-5.png
    PLC鐨勯珮浣庡瓧鑺傝浆鎹-6.png
椤堕儴qrcode搴曢儴
鍏虫敞閰峰痉缃戣闃呭彿锛岃幏鍙栨洿澶氳祫璁紒

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

GMT+8, 2025-8-31 23:55 , Processed in 0.107291 second(s), 21 queries .

閰峰痉缃

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

杩斿洖椤堕儴