codesys Runtime涓庢搷浣滅郴缁熷鎺-CODESYS璧勬簮涓嬭浇鍖-閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛
HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鏌ョ湅: 1814|鍥炲: 0

codesys Runtime涓庢搷浣滅郴缁熷鎺

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

    [LV.1]鍒濇潵涔嶅埌

    鍙戣〃浜 2023-4-20 12:45:56 | 鏄剧ず鍏ㄩ儴妤煎眰 |闃呰妯″紡
    codesys Runtime涓庢搷浣滅郴缁熷鎺

    鍓嶆彁鏉′欢锛
    杞‖浠讹細瑁呮湁codesys3.5.16杞欢鍙妏ython3.0锛坧ython闇瑕佸皢exe璺緞娣诲姞鍒扮幆澧冨彉閲忥級浠ヤ笂鐗堟湰鐢佃剳
    涓銆佸垱寤哄簱
    1.鏂板缓搴撳伐绋

    codesys Runtime涓庢搷浣滅郴缁熷鎺-1.png


    2.榛樿搴撳伐绋嬩粙缁嶏紝閲岄潰鏂囦欢鍙互鍏ㄩ儴鍒犻櫎鑷畾涔夊嵆鍙紝涔熷彲鍒╃敤鏍囧噯搴撶粨鏋

    codesys Runtime涓庢搷浣滅郴缁熷鎺-2.png


    3.娣诲姞鏁版嵁缁撴瀯鍙婂疄鐜帮紱鑻ユ槸鍐呴儴锛圛EC锛夊疄鐜扮洿鎺ュ湪涓嬮潰瀹炵幇鍗冲彲锛涘閮ㄤ娇鐢–鎴栬匔++瀹炵幇闇瑕佸彸鍑婚夋嫨灞炴ч変腑鈥滃閮ㄥ疄鐜扳

    codesys Runtime涓庢搷浣滅郴缁熷鎺-3.jpg

    codesys Runtime涓庢搷浣滅郴缁熷鎺-4.png


    4.鍙屽嚮鈥滃伐绋嬩俊鎭濊繘琛岃缃
    4.1榛樿淇℃伅濡備笅锛


    codesys Runtime涓庢搷浣滅郴缁熷鎺-5.png


    4.2搴撶被鍒矾寰勪负瀹夎codesys璺緞涓嬬殑Templates;鏈満涓猴細D:\Program Files\CODESYS 3.5.16.20\CODESYS\Templates\Library_Template

    codesys Runtime涓庢搷浣滅郴缁熷鎺-6.png

    codesys Runtime涓庢搷浣滅郴缁熷鎺-7.png


    4.3 姝ゅ閫夋嫨target锛屾澶勯夋嫨涓哄鍏ュ簱鏃剁殑绫诲埆锛涙柟渚挎煡鎵撅紱宸ョ▼淇℃伅缂栬緫璇存槑濡備笅锛

    codesys Runtime涓庢搷浣滅郴缁熷鎺-8.png

    codesys Runtime涓庢搷浣滅郴缁熷鎺-9.png


    5.璁剧疆瀹屾垚宸ョ▼瀵煎嚭鏂瑰紡鏈3绉嶏紝濡備笅锛

    codesys Runtime涓庢搷浣滅郴缁熷鎺-10.jpg

    1. 娉ㄦ剰锛氬鏋滈夋嫨淇濆瓨宸ョ▼骞惰鍏ュ簱灏卞彲浠ュ湪tool涓嬫壘鍒版柊寤虹殑搴揇IOLib锛岃嚜宸辨柊寤虹殑鍏朵粬宸ョ▼涓嶉渶瑕佸鍏ョ洿鎺ュ氨鍙互浣跨敤搴擄紱淇濆瓨涓虹紪璇戠殑搴撳氨鍙互鎻愪緵缁欏叾浠栧紑鍙戣呬娇鐢ㄣ
    澶嶅埗浠g爜
    6.鍒╃敤搴撶敓鎴恗4鏂囦欢
    codesys Runtime涓庢搷浣滅郴缁熷鎺-11.png

    codesys Runtime涓庢搷浣滅郴缁熷鎺-12.png

    codesys Runtime涓庢搷浣滅郴缁熷鎺-13.jpg


    浜屻佸埄鐢ㄦā鏉垮強m4宸ュ叿鐢熸垚.c鍙.h鏂囦欢
    1.杩涘叆妯℃澘璺緞涓嬫牴鎹剼鏈枃浠跺埄鐢╬ython杈撳叆瀵瑰簲鍙傛暟锛涙澶勪负python.exe gen_cmp_from_temp.py -t CmpTemplateEmpty -c myLibTempate
    1. 娉ㄦ剰锛氶夋嫨鐨勬ā鏉挎枃浠朵负鐩墠闇瑕佷娇鐢ㄧ殑妯℃澘
    澶嶅埗浠g爜
    codesys Runtime涓庢搷浣滅郴缁熷鎺-14.jpg

    codesys Runtime涓庢搷浣滅郴缁熷鎺-15.png

    2.灏嗗埄鐢ㄥ簱鐢熸垚鐨.m4鏂囦欢鎷疯礉鍒拌嚜瀹氫箟鏂囦欢澶逛笅骞堕噸鍛藉悕涓簃yLibTempateItf.m4(涓庢枃浠跺す涓嬮潰鍚嶅瓧涓鑷村嵆鍙)骞跺垹闄ゆ枃浠跺す涓墍鏈.cpp鍙.h鏂囦欢鍚庝緷娆$偣鍑.bat鎵瑰鐞嗘枃浠讹紱姝ゆ壒澶勭悊鏂囦欢浣滅敤锛氬埄鐢╩4宸ュ叿鐢熸垚瀵瑰簲姝4瀵规帴鎵鏈夊钩鍙扮殑.h鏂囦欢锛堜富瑕佹槸閲岄潰鐨勫鎺ュ悇绉嶅钩鍙扮殑瀹忥級
    3.鎵撳紑鐢熸垚鐨.h鍙婃璺緞涓嬬殑.c鏂囦欢锛堟ā鍧桟鏂囦欢锛;灏.h涓殑鍑芥暟鍏ㄩ儴鍔犲叆鍒.c涓;
    1. 娉ㄦ剰锛氳嫢鏄娇鐢–PP瀹炵幇锛屾姝ラ.c鎹负.cpp鍗冲彲
    澶嶅埗浠g爜
    codesys Runtime涓庢搷浣滅郴缁熷鎺-16.png


    4.鎷疯礉姝ゅ鐨.c鍙.h鏂囦欢鍒拌嚜宸辩殑寮鍙戠幆澧僆DE涓紙浠ヤ笅鎿嶄綔瀵瑰簲Vxworks7锛
    4.1 Vxworks7璁剧疆锛
    1. 缂栬瘧涓姞鍏-DMIXED_LINK锛涜矾寰勪腑鍔犲叆Components鍜孭latforms\VxWorks璺緞     
    澶嶅埗浠g爜
    codesys Runtime涓庢搷浣滅郴缁熷鎺-17.jpg

    codesys Runtime涓庢搷浣滅郴缁熷鎺-18.png

    codesys Runtime涓庢搷浣滅郴缁熷鎺-19.png

    鑻ョ紪璇戝嚭鐜板ぇ灏忕闂闇瑕佷慨鏀瑰涓嬫枃浠舵坊鍔犲搴旂殑CPU鏋舵瀯

    codesys Runtime涓庢搷浣滅郴缁熷鎺-20.png

    涓夈佸簱浣跨敤
    1.鏂板缓宸ョ▼


    codesys Runtime涓庢搷浣滅郴缁熷鎺-21.png


    2.鍦ㄨ彍鍗曟爮涓滃伐鍏凤細涓嬮夋嫨搴撶鐞嗗櫒->娣诲姞搴擄紝鑻ユ澶勬病鏈塼arget闇瑕佺偣鍑婚珮绾

    codesys Runtime涓庢搷浣滅郴缁熷鎺-22.png

    codesys Runtime涓庢搷浣滅郴缁熷鎺-23.png


    鎻掑叆鍚庢晥鏋滃涓嬶細

    codesys Runtime涓庢搷浣滅郴缁熷鎺-24.jpg

    3.搴撲腑鍑芥暟浣跨敤

    codesys Runtime涓庢搷浣滅郴缁熷鎺-25.png

    灏哣XWORKS宸ョ▼涓紪璇戠敓鎴愮殑鍙墽琛屾枃浠舵敼鍚嶄负搴撳悕锛岀劧鍚庝慨鏀筩odeesys閰嶇疆鏂囦欢濡備笅锛

    codesys Runtime涓庢搷浣滅郴缁熷鎺-26.png

    灏哻odesys搴撶殑閰嶇疆鏂囦欢锛屽彲鎵ц绋嬪簭锛屽伐绋嬬敓鎴愮殑鍙墽琛岀▼搴忔斁鍦ㄦ澘瀛愬悓涓璺緞涓嬶細

    codesys Runtime涓庢搷浣滅郴缁熷鎺-27.png

    浣跨敤鍛戒护锛
    1. ld 0,1,"codesyscontrol.out"   //鍔犺浇杩涘唴瀛
    2. PlcStart            //璋冪敤鍑芥暟
    澶嶅埗浠g爜
    codesys Runtime涓庢搷浣滅郴缁熷鎺-28.png


    闄勫綍锛
    python鐜鍙橀噺娣诲姞
    python榛樿瀹夎璺緞锛欳:\Users\Administrator\AppData\Local\Programs\Python\Python39
    娣诲姞瀹岀幆澧冨彉閲忛渶瑕侀噸鍚疌MD绐楀彛鎵嶅彲鏈夋晥楠岃瘉锛堝湪涓嶅悓璺緞涓嬫祴璇曢獙璇佹槸鍚︾敓鏁堬級

    codesys Runtime涓庢搷浣滅郴缁熷鎺-29.png


    codesys Runtime涓庢搷浣滅郴缁熷鎺-30.png
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鍥炲

    浣跨敤閬撳叿 涓炬姤

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

    鏈増绉垎瑙勫垯

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

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

    GMT+8, 2024-11-27 12:02 , Processed in 0.143914 second(s), 59 queries .

    閰峰痉缃

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

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