Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-CODESYS璧勬簮涓嬭浇鍖-閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛
HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鏌ョ湅: 508|鍥炲: 1

Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚

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

    [LV.1]鍒濇潵涔嶅埌

    鍙戣〃浜 2024-9-10 08:23:27 | 鏄剧ず鍏ㄩ儴妤煎眰 |闃呰妯″紡
    1.姝e鸡鍑芥暟SIN銆佸弽姝e鸡鍑芥暟ASIN

    璇硶锛 杈撳叆鍙橀噺 IN 鍙互鏄 BYTE銆 WORD銆 DWORD銆 SINT銆 USINT銆 INT銆 UINT銆 DINT銆乁DINT銆 REAL銆 LREAL 鍜屽父鏁帮紝浣嗚緭鍑哄繀椤绘槸 REAL 鎴 LREAL 绫诲瀷銆
    1.1绋嬪簭

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-1.png


    1.2缁撴灉

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-2.png


    2.浣欏鸡鍑芥暟COS銆佸弽浣欏鸡鍑芥暟ACOS

    璇硶锛 杈撳叆鍙橀噺 IN 鍙互鏄 BYTE銆 WORD銆 DWORD銆 SINT銆 USINT銆 INT銆 UINT銆 DINT銆乁DINT銆 REAL銆 LREAL 鍜屽父鏁帮紝浣嗚緭鍑哄繀椤绘槸 REAL 鎴 LREAL 绫诲瀷銆
    2.1绋嬪簭

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-3.png


    2.2缁撴灉

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-4.png


    3.姝e垏鍑芥暟TAN銆佸弽姝e垏鍑芥暟ATAN

    璇硶锛 杈撳叆鍙橀噺 IN 鍙互鏄 BYTE銆 WORD銆 DWORD銆 SINT銆 USINT銆 INT銆 UINT銆 DINT銆乁DINT銆 REAL銆 LREAL 鍜屽父鏁帮紝浣嗚緭鍑哄繀椤绘槸 REAL 鎴 LREAL 绫诲瀷銆
    3.1绋嬪簭

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-5.png


    3.2缁撴灉

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-6.png


    4.atan2鍑芥暟

    Codesys娌℃湁atan2鍑芥暟鍙緵鐩存帴璋冪敤锛堟湰浜烘湭鍙戠幇锛屾杩庤瘎璁哄尯鎵撹劯锛夛紝鏁呮彁渚涗竴绉嶆濊矾鍒╃敤ATAN鍑芥暟鏉ヨ嚜宸卞啓atan2鍑芥暟锛屼袱鑰呭搴斿叧绯诲涓嬪浘鎵绀猴細

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-7.png

    1.娣诲姞鍑芥暟

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-8.png

    2.鏍规嵁ATAN涓巃tan2鍏崇郴锛岀紪鍐檃tan2鍑芥暟锛

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-9.png

    1. FUNCTION atan2 : LREAL
    2. VAR_INPUT
    3.         x:LREAL;
    4.         y:LREAL;
    5.        
    6. END_VAR
    7. VAR
    8.         lrSinus:LREAL;
    9.         lrCosinus:LREAL;
    10. END_VAR
    11. lrSinus:=x;
    12. lrCosinus:=y;
    13. IF lrSinus>0 THEN
    14.         atan2:=ATAN(lrSinus/lrCosinus);ELSIF(lrCosinus>=0 AND lrSinus<0) THEN
    15.         atan2:=ATAN(lrSinus/lrCosinus)+3.1415926;ELSIF(lrCosinus<0 AND lrSinus<0) THEN
    16.         atan2:=ATAN(lrSinus/lrCosinus)-3.1415926;ELSIF(lrCosinus>0 AND lrSinus=0) THEN
    17.         atan2:=3.1415926/2;ELSIF(lrCosinus<0 AND lrSinus=0) THEN
    18.         atan2:=-3.1415926/2;
    19. ELSE
    20.         atan2:=0;
    21. END_IF
    澶嶅埗浠g爜
    3.绋嬪簭涓皟鐢

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-10.png

    4.缁撴灉

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-11.png


    5.鎸囨暟鍑芥暟EXP

    鍔熻兘锛 杩斿洖 e锛堣嚜鐒跺鏁扮殑搴曪級鐨勫箓娆℃柟锛 e 鏄竴涓父鏁颁负 2.71828 鐨勬暟銆
    璇硶锛 杈撳叆鍙橀噺 IN 鍙互鏄 BYTE銆 WORD銆 DWORD銆 SINT銆 USINT銆 INT銆 UINT銆 DINT銆乁DINT銆 REAL銆 LREAL 鍜屽父鏁帮紝浣嗚緭鍑哄繀椤绘槸 REAL 鎴 LREAL 绫诲瀷銆
    鍩烘湰璇硶锛
    1. OUT:=EXP(IN);
    澶嶅埗浠g爜
    绋嬪簭绀轰緥锛

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-12.png

    绋嬪簭杩愯缁撴灉涓猴細7.389056
    6.鑷劧瀵规暟LN

    鍔熻兘锛 杩斿洖涓涓暟鐨勮嚜鐒跺鏁般傝嚜鐒跺鏁颁互甯告暟椤 e (2.71828182845904) 涓哄簳銆
    璇硶锛 杈撳叆鍙橀噺 IN 鍙互鏄 BYTE銆 WORD銆 DWORD銆 SINT銆 USINT銆 INT銆 UINT銆 DINT銆乁DINT銆 REAL銆 LREAL 鍜屽父鏁帮紝浣嗚緭鍑哄繀椤绘槸 REAL 鎴 LREAL 绫诲瀷銆
    鍩烘湰璇硶锛
    1. OUT:=LN(IN);
    澶嶅埗浠g爜
    绋嬪簭绀轰緥锛

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-13.png

    绋嬪簭杩愯缁撴灉涓猴細3.80666
    7.浠 10 涓哄簳鐨勫鏁 LOG

    鍔熻兘锛 杩斿洖搴曚负 10 鏁扮殑瀵规暟銆
    璇硶锛 杈撳叆鍙橀噺 IN 鍙互鏄 BYTE銆 WORD銆 DWORD銆 SINT銆 USINT銆 INT銆 UINT銆 DINT銆乁DINT銆 REAL銆 LREAL 鍜屽父鏁帮紝浣嗚緭鍑哄繀椤绘槸 REAL 鎴 LREAL 绫诲瀷銆
    鍩烘湰璇硶锛
    1. OUT:=LOG(IN);
    澶嶅埗浠g爜
    绋嬪簭绀轰緥锛

    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-14.png

    绋嬪簭杩愯缁撴灉涓猴細2.49762
    浼氭寔缁洿鏂帮紝鏈夐渶瑕佺ず渚嬬殑鍑芥暟娆㈣繋璇勮鍖虹暀瑷銆
    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鍥炲

    浣跨敤閬撳叿 涓炬姤

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

    鏈増绉垎瑙勫垯

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

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

    GMT+8, 2024-11-23 20:07 , Processed in 0.157704 second(s), 63 queries .

    閰峰痉缃

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

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