codesys寮婧愬簱OSCATBasic.package+浣跨敤璇存槑pdf+ST璇█婧愮爜鏂囦欢-CODESYS璧勬簮涓嬭浇鍖-閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛
HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鏌ョ湅: 2958|鍥炲: 5

codesys寮婧愬簱OSCATBasic.package+浣跨敤璇存槑pdf+ST璇█婧愮爜鏂囦欢

[澶嶅埗閾炬帴]

璇ョ敤鎴蜂粠鏈鍒

鍙戣〃浜 2023-4-12 21:56:19 | 鏄剧ず鍏ㄩ儴妤煎眰 |闃呰妯″紡
涓銆丱SCATBasic浠嬬粛

    OSCATBasic鏄竴涓紑婧愬簱锛屽寘鍚赴瀵岀殑绠楁硶鍑芥暟锛涘湪CODESYS璧勬簮搴撻噷鎵撳紑鍚庯紝鍦ㄥ簱绠$悊鍣ㄩ噷瀹夎鍚庯紝鍗冲彲鍦ㄧ▼搴忎腑浣跨敤銆傛湁瀵瑰簲鐨勬簮鐮佹枃浠讹紝鍙互瀛︿範鍏朵紭绉鐨凷T绠楁硶缂栫▼锛屾彁鍗囪兘鍔涳紱渚嬪鏂囦腑澶ч噺閲囩敤浜嗘寚閽堟搷浣滐紝鍙互鍔犳繁瀵规寚閽堢殑鐞嗚В锛
浜屻 鍐呭浠嬬粛

鍖呮嫭涓涓嬩笁涓枃浠讹細
    搴撴枃浠跺簱婧愮爜鏂囦欢浣跨敤鏁欑▼鏂囨。

    codesys寮婧愬簱OSCATBasic.package+浣跨敤璇存槑pdf+ST璇█婧愮爜鏂囦欢-1.png

銆婃暀绋嬫枃妗.pdf銆

codesys寮婧愬簱OSCATBasic.package+浣跨敤璇存槑pdf+ST璇█婧愮爜鏂囦欢-2.jpg

codesys寮婧愬簱OSCATBasic.package+浣跨敤璇存槑pdf+ST璇█婧愮爜鏂囦欢-3.jpg


銆奜SCATBasic搴撴簮鐮併

渚嬪鍑芥暟 _BUFFER_CLEAR锛屽叾浠g爜濡備笅
  1. (* @NESTEDCOMMENTS :='Yes'*)(* @PATH :='\/Buffer Management'*)(* @OBJECTFLAGS :='0, 8'*)(* @SYMFILEFLAGS :='2048'*)
  2. FUNCTION _BUFFER_CLEAR : BOOL
  3. VAR_INPUT
  4.         PT : POINTER TO BYTE;
  5.         SIZE : UINT;
  6. END_VAR
  7. VAR
  8.         ptw : POINTER TO DWORD;
  9.         temp: DWORD;
  10.         end, end32 : DWORD;
  11. END_VAR
  12. (*
  13. version 1.231. oct.2008
  14. programmer         hugo
  15. tested by        oscat
  16. this function will initialize a given array of byte with 0.
  17. the function needs to be called:_buffer_clear(adr("array"),sizeof("array"));
  18. this function will manipulate a given array.
  19. the function manipulates the original array, it rerturnes true when finished.
  20. because this function works with pointers its very time efficient and it needs no extra memory.*)(* @END_DECLARATION :='0'*)(* this routine uses 32 bit access to gain speed *)(* first access bytes till pointer is aligned for32 bit access *)
  21. temp := pt;
  22. end := temp +UINT_TO_DWORD(size);
  23. end32 := end -3;
  24. WHILE (pt < end) AND ((temp AND 16#00000003)>0) DO
  25.         pt^:=0;
  26.         pt := pt +1;
  27.         temp := temp +1;
  28. END_WHILE;(* pointer is aligned, now copy 32 bits at a time *)
  29. ptw := pt;
  30. WHILE ptw < end32 DO (**)
  31.         ptw^:=0;
  32.         ptw := ptw +4;
  33. END_WHILE;(* copy the remaining bytes in byte mode *)
  34. pt := ptw;
  35. WHILE pt < end DO
  36.         pt^:=0;
  37.         pt := pt +1;
  38. END_WHILE;
  39. _BUFFER_CLEAR := TRUE;
澶嶅埗浠g爜
codesys寮婧愬簱OSCATBasic.package+浣跨敤璇存槑pdf+ST璇█婧愮爜鏂囦欢-4.jpg
+10
涓嶈禐涓涓紵
鎵撹祻榧撳姳涓涓嬶紒
鍥炲

浣跨敤閬撳叿 涓炬姤

  • TA鐨勬瘡鏃ュ績鎯
    寮蹇
    2023-4-13 09:32
  • 绛惧埌澶╂暟: 2 澶

    [LV.1]鍒濇潵涔嶅埌

    鍙戣〃浜 2023-4-13 13:46:02 | 鏄剧ず鍏ㄩ儴妤煎眰
    鐪嬬湅鏈変粈涔堥噸瑕佹枃浠
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
  • TA鐨勬瘡鏃ュ績鎯
    濂嬫枟
    2024-5-11 09:14
  • 绛惧埌澶╂暟: 1507 澶

    [LV.Master]浼村潧缁堣

    鍙戣〃浜 2023-4-23 16:36:00 | 鏄剧ず鍏ㄩ儴妤煎眰
    鏂囦欢鍦ㄥ摢閲屼簡鍛紵
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
  • TA鐨勬瘡鏃ュ績鎯
    鏃犺亰
    2021-6-16 20:48
  • 绛惧埌澶╂暟: 1 澶

    [LV.1]鍒濇潵涔嶅埌

    鍙戣〃浜 2023-5-5 10:55:06 | 鏄剧ず鍏ㄩ儴妤煎眰
    鐪嬬湅锛屾槸涓嶆槸鐪熺殑
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
  • TA鐨勬瘡鏃ュ績鎯
    寮蹇
    2024-5-30 14:55
  • 绛惧埌澶╂暟: 28 澶

    [LV.4]鍋跺皵鐪嬬湅III

    鍙戣〃浜 2023-5-9 11:04:01 | 鏄剧ず鍏ㄩ儴妤煎眰
    鏂囦欢鍦ㄥ摢鐪嬩笉鍒
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
  • TA鐨勬瘡鏃ュ績鎯
    鎿︽睏
    2021-6-8 15:34
  • 绛惧埌澶╂暟: 7 澶

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

    鍙戣〃浜 2023-9-15 09:17:36 | 鏄剧ず鍏ㄩ儴妤煎眰
    鍘嬫牴灏辨病涓婁紶鏂囦欢鍚э紒
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鎮ㄩ渶瑕佺櫥褰曞悗鎵嶅彲浠ュ洖甯 鐧诲綍 | 绔嬪嵆娉ㄥ唽 鏂版氮寰崥鐧婚檰

    鏈増绉垎瑙勫垯

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

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

    GMT+8, 2024-11-23 19:49 , Processed in 0.153684 second(s), 80 queries .

    閰峰痉缃

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

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