Codesys涓叧浜庡瓧绗︿覆鐨勫鐞-CODESYS璧勬簮涓嬭浇鍖-閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛
HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鏌ョ湅: 114|鍥炲: 0

Codesys涓叧浜庡瓧绗︿覆鐨勫鐞

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

    [LV.1]鍒濇潵涔嶅埌

    鍙戣〃浜 7 澶╁墠 | 鏄剧ず鍏ㄩ儴妤煎眰 |闃呰妯″紡
    鏈杩戝湪Codesys涓紪绋嬩腑閬囧埌浜嗗瓧绗︿覆鐨勫鐞嗛棶棰橈紝瀛︿範浜嗕竴浜涘墠杈堟柟娉曪紝椤轰究璁板綍涓涓嬶細
    readdataMid锛="[shake:A1;]"锛
    1.鏌ユ壘瀛楃涓叉槸鍚﹀瓨鍦ㄥ搴旂殑瀛楃涓诧紙鍗曠嫭浣跨敤闇瑕佹寚瀹氬瓧绗︿覆浣嶇疆锛屽嵆鍗忚瀹氭锛
    verifyStr: STRING(5);
    verifyStr:=(MID(readdataMid,5,1));
    bverifyStrOk:=(verifyStr='shake');
    PS锛氳幏鍙栧瓧绗︿覆涓1鐨勭殑浣嶇疆鍚庨潰5涓瓧绗︾殑浣嶇疆锛屽舰鎴愬瓧绗︿覆锛岃祴鍊肩粰verifystr 锛屽悓鏃堕氳繃涓涓竷灏斿煎垽鏂槸鍚︿负鎸囧畾瀛楃涓
    MID鏂规硶锛歁ID锛圫TR锛坰tring锛夛紝LEN锛坕nt锛夛紝POS锛坕nt锛夛級鐨勬剰鎬濇槸锛氫粠STR瀛楃涓蹭腑浠ヤ綅缃甈OS澶勭殑瀛楃寮濮嬫绱㈤暱搴︿负LEN瀛楃銆
    2.鏌ユ壘鎸囧畾瀛楃浣嶇疆浣嶇疆
    find1,find2锛歩nt;
    find1:=FIND(readdataMid,'[');
    PS锛氭煡璇eaddatamid瀛楃涓蹭腑锛"["鐨勪綅缃紝杩斿洖缁檉ind1
    FIND鏂规硶锛欶IND锛圫TR1(string)锛孲TR2(string)锛夌殑鎰忔濇槸锛氭煡鎵維TR2棣栨鍑虹幇鍦⊿TR1涓殑绗竴涓瓧绗︾殑浣嶇疆銆傚鏋滃湪STR1涓壘涓嶅埌STR2锛屽垯杩斿洖0銆
    3.鎷兼帴瀛楃涓
    readdataMid2:string锛99锛夛紱
    readdataMid2:=INSERT(STR1:= readdataMid, STR2:= 'B0;C1;', POS:=find2-1 );
    PS:鍦╮eaddataMid瀛楃涓蹭腑鎻掑叆 'B0;C1;'锛屼綅缃负' ] ' 鐨勪綅缃箣鍓嶃傚嵆褰㈡垚鏂扮殑瀛楃涓"[shake:A1;B0;C1;]"锛涘舰鎴愭牎楠
    INSERT鏂规硶锛欼NSERT锛圫TR1锛坰tring锛夛紝STR2锛坰tring锛夛紝POS锛坕nt锛夛級鐨勬剰鎬濇槸锛氬湪浣嶇疆POS涔嬪悗灏哠TR2鎻掑叆STR1銆
    浠ヤ笂灏辨槸Codesy涓娇鐢ㄥ瓧绗︿覆鐨勬柟娉曪紝鍋囪鏄竴绉嶆湭鐭ュ瓧绗︿覆锛屽氨闇瑕佷娇鐢1鍜2鏂规硶鏉ュ悓鏃舵牎楠岋紝鍏堣幏鍙栨寚瀹氫綅缃紝鍦ㄦ兂鍔炴硶鎷兼帴銆備笉杩囨垜鐩墠鍦ㄥ伐涓氳涓氾紝鍗忚鍩烘湰涓婂畾涔夊ソ鐨勶紝鍑虹幇杩欑鎯呭喌杈冨皯
    绗竴娆″啓鎶鏈被鍒嗕韩锛屾杩庝竴璧疯璁 銆傛墸鎵o細491072135
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鍥炲

    浣跨敤閬撳叿 涓炬姤

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

    鏈増绉垎瑙勫垯

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

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

    GMT+8, 2024-11-13 14:22 , Processed in 0.151925 second(s), 53 queries .

    閰峰痉缃

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

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