Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-12.png_Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚 - 閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛

閰峰痉缃

HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鎼滅储闄勪欢  
閰峰痉缃 闄勪欢涓績 CODESYS璧勬簮涓嬭浇鍖 CODESYS鏁欑▼鏂囨。 Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-12.png

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

 

Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚:
1.姝e鸡鍑芥暟SIN銆佸弽姝e鸡鍑芥暟ASIN

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



1.2缁撴灉



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

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



2.2缁撴灉



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

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



3.2缁撴灉



4.atan2鍑芥暟

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


1.娣诲姞鍑芥暟


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


  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.绋嬪簭涓皟鐢


4.缁撴灉



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爜
绋嬪簭绀轰緥锛


绋嬪簭杩愯缁撴灉涓猴細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爜
绋嬪簭绀轰緥锛


绋嬪簭杩愯缁撴灉涓猴細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爜
绋嬪簭绀轰緥锛


绋嬪簭杩愯缁撴灉涓猴細2.49762
浼氭寔缁洿鏂帮紝鏈夐渶瑕佺ず渚嬬殑鍑芥暟娆㈣繋璇勮鍖虹暀瑷銆
Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-12.png
         鍚屼竴涓婚闄勪欢:
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-1.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-2.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-3.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-4.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-5.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-6.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-7.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-8.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-9.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-10.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-11.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-12.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-13.png
    Codesys-涓夎鍑芥暟绛夊簲鐢ㄥ疄渚-14.png
椤堕儴qrcode搴曢儴
鍏虫敞閰峰痉缃戣闃呭彿锛岃幏鍙栨洿澶氳祫璁紒

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

GMT+8, 2024-12-21 23:43 , Processed in 0.087668 second(s), 21 queries .

閰峰痉缃

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

杩斿洖椤堕儴