鍦╟odesys v3涓皢鏃ユ湡鍜屾椂闂翠粠瀛楃涓蹭腑鎷嗗垎-CODESYS璧勬簮涓嬭浇鍖-閰峰痉缃 - CoDeSys杞欢鏁欑▼涓嬭浇,CoDeSys宸ユ帶璧勮闂ㄦ埛
HSC6490-cn涓浗鍒堕狅紝涓浗鑺瘇
鏌ョ湅: 164|鍥炲: 0

鍦╟odesys v3涓皢鏃ユ湡鍜屾椂闂翠粠瀛楃涓蹭腑鎷嗗垎

[澶嶅埗閾炬帴]
  • TA鐨勬瘡鏃ュ績鎯
    寮蹇
    2017-11-20 22:07
  • 绛惧埌澶╂暟: 2 澶

    [LV.1]鍒濇潵涔嶅埌

    鍙戣〃浜 2024-8-5 10:59:27 | 鏄剧ず鍏ㄩ儴妤煎眰 |闃呰妯″紡
    鍦–odesys V3涓紝鍙互浣跨敤瀛楃涓插鐞嗗嚱鏁板皢鏃ユ湡鍜屾椂闂翠粠瀛楃涓蹭腑鎷嗗垎銆備互涓嬫槸涓涓ず渚嬩唬鐮侊紝婕旂ず浜嗗浣曞皢鏃ユ湡鍜屾椂闂翠粠瀛楃涓蹭腑鎻愬彇鍑烘潵锛

    [AppleScript] 绾枃鏈煡鐪 澶嶅埗浠g爜
    PROGRAM Main
    VAR
        dateTimeString: STRING := '2022-12-31 23:59:59';
        dateString: STRING(10);
        timeString: STRING(8);
        year: INT;
        month: INT;
        day: INT;
        hour: INT;
        minute: INT;
        second: INT;
    END_VAR
    
    dateTimeString := '2022-12-31 23:59:59';
    
    // 鎻愬彇鏃ユ湡閮ㄥ垎
    dateString := LEFT(dateTimeString, 10);
    year := TO_INT(LEFT(dateString, 4));
    month := TO_INT(MID(dateString, 6, 2));
    day := TO_INT(RIGHT(dateString, 2));
    
    // 鎻愬彇鏃堕棿閮ㄥ垎
    timeString := RIGHT(dateTimeString, 8);
    hour := TO_INT(LEFT(timeString, 2));
    minute := TO_INT(MID(timeString, 4, 2));
    second := TO_INT(RIGHT(timeString, 2));
    
    // 杈撳嚭缁撴灉
    PRINT('Year: ', year);
    PRINT('Month: ', month);
    PRINT('Day: ', day);
    PRINT('Hour: ', hour);
    PRINT('Minute: ', minute);
    PRINT('Second: ', second);
    
    END_PROGRAM



    鍦ㄤ笂杩颁唬鐮佷腑锛屾垜浠鍏堝畾涔変簡涓涓瓧绗︿覆鍙橀噺dateTimeString锛屽畠鍖呭惈浜嗘棩鏈熷拰鏃堕棿淇℃伅銆傜劧鍚庯紝鎴戜滑浣跨敤瀛楃涓插鐞嗗嚱鏁癓EFT銆丷IGHT鍜孧ID鏉ユ彁鍙栨棩鏈熷拰鏃堕棿閮ㄥ垎銆傞氳繃灏嗘彁鍙栧嚭鐨勫瓧绗︿覆杞崲涓烘暣鏁扮被鍨嬶紝鎴戜滑鍙互寰楀埌骞淬佹湀銆佹棩銆佹椂銆佸垎鍜岀鐨勫叿浣撴暟鍊笺傛渶鍚庯紝鎴戜滑浣跨敤PRINT鍑芥暟灏嗙粨鏋滆緭鍑哄埌鎺у埗鍙般
    璇锋敞鎰忥紝浠ヤ笂绀轰緥浠g爜浠呮紨绀轰簡濡備綍鍦–odesys V3涓皢鏃ユ湡鍜屾椂闂翠粠瀛楃涓蹭腑鎷嗗垎锛屽苟涓嶆秹鍙婂叿浣撶殑浜戣绠楁垨鍏朵粬鐩稿叧鎶鏈傚鏋滄偍闇瑕佷簡瑙f洿澶氬叧浜嶤odesys V3鎴栧叾浠栦簯璁$畻鐩稿叧鐨勭煡璇嗭紝璇锋彁渚涘叿浣撶殑闂鎴栭渶姹傦紝鎴戝皢灏藉姏鎻愪緵鏇磋缁嗗拰鍏ㄩ潰鐨勭瓟妗堛

    +10
    涓嶈禐涓涓紵
    鎵撹祻榧撳姳涓涓嬶紒
    鍥炲

    浣跨敤閬撳叿 涓炬姤

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

    鏈増绉垎瑙勫垯

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

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

    GMT+8, 2024-11-23 20:30 , Processed in 0.143678 second(s), 54 queries .

    閰峰痉缃

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

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