OSCAT搴撴枃浠舵簮浠g爜_ST璇█-CODESYS璧勬簮涓嬭浇鍖-閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛
HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鏌ョ湅: 16933|鍥炲: 79

OSCAT搴撴枃浠舵簮浠g爜_ST璇█

  [澶嶅埗閾炬帴]
  • TA鐨勬瘡鏃ュ績鎯
    寮蹇
    2020-3-5 08:48
  • 绛惧埌澶╂暟: 2 澶

    [LV.1]鍒濇潵涔嶅埌

    鍙戣〃浜 2020-3-5 09:11:56 | 鏄剧ず鍏ㄩ儴妤煎眰 |闃呰妯″紡
    OSCAT搴撴枃浠舵簮浠g爜_ST璇█锛岀紪鍐欑殑寰堢簿鑷达紝寰堜紭绉锛屽叡鍚屽涔犱竴涓嬶紝鍝堛
    (* @NESTEDCOMMENTS := 'Yes' *)
    (* @PATH := '\/Buffer Management' *)
    (* @OBJECTFLAGS := '0, 8' *)
    (* @SYMFILEFLAGS := '2048' *)
    FUNCTION _BUFFER_CLEAR : BOOL
    VAR_INPUT
            PT: POINTER TO BYTE;
            SIZE: UINT;
    END_VAR
    VAR
            ptw: POINTER TO DWORD;
            tempWORD;
            end,end32 : DWORD;
    END_VAR
    (*
    version 1.2    31.oct. 2008
    programmer     hugo
    tested by      oscat
    this function will initialize a given arrayof byte with 0.
    the function needs to be called:      _buffer_clear(adr("array"),sizeof("array"));
    this function will manipulate a given array.
    the function manipulates the original array,it rerturnes true when finished.
    because this function works with pointers itsvery time efficient and it needs no extra memory.
    *)
    (* @END_DECLARATION := '0' *)
    (* this routine uses 32 bit access to gainspeed *)
    (* first access bytes till pointer is alignedfor 32 bit access *)
    temp := pt;
    end := temp + UINT_TO_DWORD(size);
    end32 := end - 3;
    WHILE (pt < end) AND ((temp AND16#00000003) > 0) DO
            pt^:= 0;
            pt:= pt + 1;
            temp:= temp + 1;
    END_WHILE;
    (* pointer is aligned, now copy 32 bits at atime *)
    ptw := pt;
    WHILE ptw < end32 DO (* *)
            ptw^:= 0;
            ptw:= ptw + 4;
    END_WHILE;
    (* copy the remaining bytes in byte mode *)
    pt := ptw;
    WHILE pt < end DO
            pt^:= 0;
            pt:= pt + 1;
    END_WHILE;
    _BUFFER_CLEAR := TRUE;
    (* revision History
    hm      5.mar. 2008   rev 1.0
            originalversion
    hm      16.mar. 2008  rev 1.1
            addedtype conversion to avoid warnings under codesys 30
            chagedtype of input size to uint
            deletedunused variable i
    hm      31.oct. 2008  rev 1.2
            correctedan error while routine would write outside of arrays
    *)
    END_FUNCTION


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

    浣跨敤閬撳叿 涓炬姤

  • TA鐨勬瘡鏃ュ績鎯
    寮蹇
    2023-7-1 19:37
  • 绛惧埌澶╂暟: 169 澶

    [LV.7]甯镐綇灞呮皯III

    鍙戣〃浜 2020-3-5 17:39:07 | 鏄剧ず鍏ㄩ儴妤煎眰
    hhhhhhhhhhhhhhhh
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
  • TA鐨勬瘡鏃ュ績鎯
    鎱垫噿
    2024-9-23 17:24
  • 绛惧埌澶╂暟: 86 澶

    [LV.6]甯镐綇灞呮皯II

    鍙戣〃浜 2020-3-8 00:06:51 | 鏄剧ず鍏ㄩ儴妤煎眰
    妤间富鏄釜濂戒汉
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鏉ヨ嚜瀹夊崜瀹㈡埛绔鏉ヨ嚜瀹夊崜瀹㈡埛绔

    璇ョ敤鎴蜂粠鏈鍒

    鍙戣〃浜 2020-3-18 09:53:27 | 鏄剧ず鍏ㄩ儴妤煎眰
    kankan鏄粈涔
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
  • TA鐨勬瘡鏃ュ績鎯
    鎱垫噿
    2022-7-7 09:08
  • 绛惧埌澶╂暟: 10 澶

    [LV.3]鍋跺皵鐪嬬湅II

    鍙戣〃浜 2020-3-20 14:41:22 | 鏄剧ず鍏ㄩ儴妤煎眰
    濂藉ソ濂藉ソ濂藉ソ濂藉ソ
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒

    璇ョ敤鎴蜂粠鏈鍒

    鍙戣〃浜 2020-3-21 08:18:47 | 鏄剧ず鍏ㄩ儴妤煎眰
    鎴戜滑涓庢ゼ涓诲叡鍚岃繘姝
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
  • TA鐨勬瘡鏃ュ績鎯
    閮侀椃
    2020-4-4 16:06
  • 绛惧埌澶╂暟: 4 澶

    [LV.2]鍋跺皵鐪嬬湅I

    鍙戣〃浜 2020-3-23 21:38:06 | 鏄剧ず鍏ㄩ儴妤煎眰
    姝eソ闇瑕佽繖涓簱锛屽涔犱簡
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
  • TA鐨勬瘡鏃ュ績鎯
    寮蹇
    2020-3-27 10:24
  • 绛惧埌澶╂暟: 4 澶

    [LV.2]鍋跺皵鐪嬬湅I

    鍙戣〃浜 2020-3-27 10:25:12 | 鏄剧ず鍏ㄩ儴妤煎眰
    xuexiyixia
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
  • TA鐨勬瘡鏃ュ績鎯
    寮蹇
    2020-2-13 08:45
  • 绛惧埌澶╂暟: 1 澶

    [LV.1]鍒濇潵涔嶅埌

    鍙戣〃浜 2020-3-29 20:00:43 | 鏄剧ず鍏ㄩ儴妤煎眰
    璋㈣阿鍒嗕韩鈥
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鎮ㄩ渶瑕佺櫥褰曞悗鎵嶅彲浠ュ洖甯 鐧诲綍 | 绔嬪嵆娉ㄥ唽 鏂版氮寰崥鐧婚檰

    鏈増绉垎瑙勫垯

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

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

    GMT+8, 2024-11-23 17:02 , Processed in 0.162397 second(s), 99 queries .

    閰峰痉缃

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

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