銆怌odesys銆-鍙彉鏁扮粍闀垮害澶勭悊-CODESYS璧勬簮涓嬭浇鍖-閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛
HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鏌ョ湅: 105|鍥炲: 0

銆怌odesys銆-鍙彉鏁扮粍闀垮害澶勭悊

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

    [LV.1]鍒濇潵涔嶅埌

    鍙戣〃浜 2024-11-6 20:03:01 | 鏄剧ず鍏ㄩ儴妤煎眰 |闃呰妯″紡
    鎺у埗浼犲叆鍊间负闀垮害鍙彉鏁扮粍
    寰楀埌鏁扮粍闀垮害鍦ㄧ▼搴忓鐞嗐傛帶鍒跺嚫杞甅C_CAM_REF鐐逛綅缁撴潫涓婇檺銆
    //CAM鏁版嵁鏁扮粍涓婇檺澶勭悊
    FUNCTION CamDataLength : DINT
    VAR_INPUT
    END_VAR
    VAR_IN_OUT
         ArrayData:ARRAYOF _sMC_CAM_REF;   //瀹氫箟鍙彉鏁扮粍
    END_VAR
    VAR
          diCounter                : DINT;  //鏁扮粍闀垮害璁℃暟
          diResult1,diResult2     : LREAL; //鏁扮粍鍐呭彉閲忓唴瀹圭疮鍔
    END_VAR

    diResult1:=0;
    diResult2:=0;
    FOR diCounter := LOWER_BOUND(ArrayData, 1) TO UPPER_BOUND(ArrayData, 1) DO // Calculates the length of the current array
          diResult1 := diResult1 + ArrayData[diCounter].Distance;
           diResult2 := diResult1 + ArrayData[diCounter].Phase;
    END_FOR;
    CamDataLength := diCounter;
    瀹炰緥娴嬭瘯
    銆怌odesys銆-鍙彉鏁扮粍闀垮害澶勭悊-1.png
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鍥炲

    浣跨敤閬撳叿 涓炬姤

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

    鏈増绉垎瑙勫垯

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

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

    GMT+8, 2024-11-23 16:31 , Processed in 0.148027 second(s), 60 queries .

    閰峰痉缃

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

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