ST璇█杩愮畻绗︿粙缁-CODESYS璧勬簮涓嬭浇鍖-閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛
HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鏌ョ湅: 209|鍥炲: 1

ST璇█杩愮畻绗︿粙缁

[澶嶅埗閾炬帴]
  • TA鐨勬瘡鏃ュ績鎯
    寮蹇
    2017-11-20 22:07
  • 绛惧埌澶╂暟: 2 澶

    [LV.1]鍒濇潵涔嶅埌

    鍙戣〃浜 2024-11-5 21:04:56 | 鏄剧ず鍏ㄩ儴妤煎眰 |闃呰妯″紡
    1.ST璇█涓殑璧嬪艰繍绠楃锛
    璧嬪艰鍙ョ殑鎰忚瘑鏄皢涓涓父閲忔垨鑰呭彉閲忕殑鍊艰祴鍊肩粰鍙︿竴涓彉閲忋
    142159b2az25b97a1bw12b.jpg
    ST璇█涓殑鍐欐硶涓  鍙橀噺1  := 鍙橀噺2
    ST鏂囨湰涓娇鐢ㄢ:=鈥濅綔涓鸿祴鍊艰繍绠楃锛岀浉褰撲簬姊舰鍥句腑鐨MOVC璇█涓殑鈥=
    142332qzola2rylfrihof2.jpg
    2. 绠楁暟杩愮畻绗
    绠楁暟杩愮畻绗︿负鏁板涓殑鍔犲噺涔橀櫎
    142839uj3hzkllkpq35lal.jpg
    鍔犳硶鈥+
    var1 := 10;
    Var2 :=20;
    Var10 :=  var1 + var2;
    杈撳嚭var10鐨勫间负30
    鍑忔硶鈥-
    var1 := 10;
    Var2 :=20;
    Var11 :=  var1 -var2;
    杈撳嚭var11鐨勫间负20
    涔樻硶鈥*
    var1 := 10;
    Var2 :=20;
    Var12 :=  var1 * var2;
    杈撳嚭var12鐨勫间负200
    闄ゆ硶鈥/
    var1 := 10;
    Var2 :=20;
    Var13 :=  var2/var1;
    杈撳嚭var13鐨勫间负2
    绋嬪簭杩愯缁撴灉涓猴細
    142839iysbakoqi6oq3o7z.jpg
    杩樻湁涓涓彇浣欒繍绠楃MOD 鐩稿綋浜c璇█涓殑鈥%
    var10 := var1 MOD var2,var1闄や互var2鐨勪綑鏁拌祴鍊肩粰var10.
    142902rrbg09z7d4e79v9d.jpg
    3.姣旇緝杩愮畻绗﹀熀鏈敤娉
    142932rpzeeyk3ekbbzxt7.jpg
    ST璇█涓瘮杈冭繍绠楃涓鑸湁涓ょ鐢ㄦ硶锛
    1. 閰嶅悎if璇彞锛屼綔涓if璇彞鐨勫垽鏂潯浠朵娇鐢ㄣ
    2. 鍦ㄨ祴鍊艰鍙ョ殑鍙充晶锛屼綔涓轰竴涓〃杈炬槸锛岃繑鍥炰竴涓TRUE鎴栬FLASE缁欒〃杈惧紡宸﹁竟鐨勫彉閲忋
    澶т簬>
    Num1 := 200;
    Num2 := 1000;
    Test1 := (Num1 > Num2);
    杈撳嚭缁撴灉锛Test1瀹為檯涓 false锛屽洜涓篘um1(200)骞朵笉澶т簬Num2(1000);杩愯缁撴灉涓哄亣銆
    Num3 := 888;
    Num4 := 666;
    Test2 := (Num3 > Num4);
    杩愯缁撴灉锛Test2瀹為檯杈撳嚭缁撴灉涓true锛屽洜涓888纭疄鏄ぇ浜666銆傛墍浠ヨ繍琛岀粨鏋滀负鐪燂紒
    灏忎簬鈥<鈥
    Num5 := 888;
    Num6 := 666;
    Test3 := (Num5 < Num6);
    Test3杩愮畻缁撴灉涓篺alse锛屽洜涓888涓嶅皬浜666.鎵浠ヨ繍绠楃粨鏋滀负鍋
    Num7 := 233;
    Num8 := 2333;
    Test4 := (Num7 < Num8);
    Test4杩愯缁撴灉涓簍rue锛屽洜涓233<2333,鎵浠ヨ繍绠楃粨鏋滀负鐪熴
    绛変簬鈥=鈥
    绛変簬鍙蜂袱杈圭殑鍊肩浉绛夊垯杩愯缁撴灉涓TRUE锛屼笉鐩哥瓑鍒欎负FLASE
    Num9 := 100;
    Num10:= 100;
    Test5 := (Num9 = Num10);
    Test5鐨勮繍琛岀粨鏋滀负true 锛屽洜涓100=100锛屾墍浠ヨ繍绠楃粨鏋滀负鐪熴
    涓嶇瓑浜鈥<>鈥濆ぇ浜庣瓑浜庘>=鈥濆皬浜庣瓑浜庘<=鈥濆悓鐞
    4.閫昏緫杩愮畻绗
    142932gbf9v510vzbs15v0.jpg
    閫昏緫杩愮畻鐩稿綋浜庢暟鐢典腑鐨鈥滀笌鈥濃滄垨鈥濃滈潪鈥濊繖3涓昏緫闂ㄣ
    涓鑸敤浜if璇彞涓綔涓哄閲嶆潯浠剁殑鍒ゆ柇锛屾垨鑰呰祴鍊艰鍙ュ彸杈归儴鍒嗚〃杈惧紡鐨勮繛鎺ョ銆傝繕鏈変竴涓紓鎴栵紙XOR锛夌浉鍚屼负0鐩稿紓涓1
    142932uscw5a05b4blf00c.jpg
    A := NOT (B); B鐨勫煎彇鍙嶅啀璧嬪肩粰A
    5.缃綅鍜屽浣嶈繍绠楃锛
    142932kxsxsfbkffzs7xxd.jpg
    142932p9elilt96clwl3a6.jpg

    娓稿锛屽鏋滄偍瑕佹煡鐪嬫湰甯栭殣钘忓唴瀹硅鍥炲
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鍥炲

    浣跨敤閬撳叿 涓炬姤

  • TA鐨勬瘡鏃ュ績鎯
    鏃犺亰
    2025-1-10 08:20
  • 绛惧埌澶╂暟: 37 澶

    [LV.5]甯镐綇灞呮皯I

    鍙戣〃浜 2024-11-22 11:06:13 | 鏄剧ず鍏ㄩ儴妤煎眰
    66666666666666666666666666666
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鎮ㄩ渶瑕佺櫥褰曞悗鎵嶅彲浠ュ洖甯 鐧诲綍 | 绔嬪嵆娉ㄥ唽 鏂版氮寰崥鐧婚檰

    鏈増绉垎瑙勫垯

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

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

    GMT+8, 2025-1-23 06:09 , Processed in 0.236578 second(s), 64 queries .

    閰峰痉缃

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

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