日本特级淫片免费看-日本特级黄色-日本特级黄录像片-日本视频中文字幕-成年偏黄网站站免费-成年人福利

柳絮飛花
無產工程師
級別: 論壇先鋒
精華主題: 0
發帖數量: 500 個
工控威望: 1212 點
下載積分: 7865 分
在線時間: 102(小時)
注冊時間: 2017-06-27
最后登錄: 2024-12-17
查看柳絮飛花的 主題 / 回貼
樓主  發表于: 2020-08-17 14:00
(*****************************************************************************
<FB NAME>       MC_Power_JEC                                                                        
<Description>   運転可 / Operation possible                                                                                        
                                                                                                                          
COPYRIGHT (C) 2016 MITSUBISHI ELECTRIC CORPORATION ALL RIGHT RESERVED  
*****************************************************************************)

PLS(Enable, bEnablePls);
PLF(Enable, bEnablePlf);
(*========================================================================*
* 有効ON
* Enable ON
*========================================================================*)
IF Enable THEN
    (*------------------------------------------------------------------*
    * 初期化処理
    * Initial processing
    *------------------------------------------------------------------*)
    IF bEnablePls THEN
        Status := FALSE;
        Error := FALSE;
        ErrorID := 0;
        
        bBusy := FALSE;
        bLinkReady := FALSE;
        wAxisStatus := 0;
        
        (* 入力ラベル取込 / Input labels transfer *)
        wAxisNo := Axis.AxisNo;
        MOV(((wAxisNo < 1) OR (16 < wAxisNo)), H1100, ErrorID);
        wPosTrqLimit := REAL_TO_INT(Axis.PosTrqLimit *10.0);
        MOV((ErrorID = 0) AND ((wPosTrqLimit < 0) OR (10000 < wPosTrqLimit)), H110E, ErrorID);
        wNegTrqLimit := REAL_TO_INT(Axis.NegTrqLimit *10.0);            
        MOV((ErrorID = 0) AND ((wNegTrqLimit < 0) OR (10000 < wNegTrqLimit)), H110E, ErrorID);
        
        (* リンクデバイスのオフセット計算 / Link device offset calculation *)
        IF (ErrorID = 0) THEN
            wRX3F  := ((wAxisNo - 1) * 64) + H003F;    (* サイクリック通信準備完了 / Cyclic communication ready command *)
            wRWw01 := ((wAxisNo - 1) * 32) + H0001;    (* 制御指令 / Control command *)
            wRWw14 := ((wAxisNo - 1) * 32) + H0014;    (* トルク制限値(正) / Torque limit value(positive) *)
            wRWw15 := ((wAxisNo - 1) * 32) + H0015;    (* トルク制限値(逆) / Torque limit value(negative) *)
            wRWr00 := ((wAxisNo - 1) * 32) + H0000;    (* 制御モード表示 / Control mode display *)
            wRWr02 := ((wAxisNo - 1) * 32) + H0002;    (* 制御ステータス / Control status *)
            wRWr0B := ((wAxisNo - 1) * 32) + H000B;    (* 制御出力2 / Control output 2 *)
            bBusy := TRUE;
        END_IF;
    END_IF;
    
    (*------------------------------------------------------------------*
    * 軸狀態取得 & 実行條件確認
    * Axis status acquisition & execution condition check
    *------------------------------------------------------------------*)    
    IF bBusy THEN
        (* サイクリック通信狀態確認 / Cyclic communication status check *)
        bLinkReady := G_stLinkBasic.bnRX[wRX3F];
        IF bLinkReady THEN
            uModeDisp := G_stLinkBasic.unRWr[wRWr00];
            bZeroVelocity:= ((G_stLinkBasic.unRWr[wRWr0B] AND H0008) = H0008);
            (* 軸狀態取得 / Axis status acquisition *)
            IF ((G_stLinkBasic.unRWr[wRWr02] AND H0008) = H0008) THEN
                wAxisStatus := 1;        (* Errorstop *)
                ErrorID := H1202;    
                ELSIF ((G_stLinkBasic.unRWw[wRWw01] AND H0086) = H0002) THEN
                wAxisStatus := 2;        (* Stopping *)
                ELSIF (((G_stLinkBasic.unRWr[wRWr02] AND H000F) = H0000) OR
                ((G_stLinkBasic.unRWr[wRWr02] AND H000F) = H0001) OR
                ((G_stLinkBasic.unRWr[wRWr02] AND H000F) = H0003)) THEN
                wAxisStatus := 0;        (* Disabled *)
                ELSE
                wAxisStatus := 4;        (* Standstill *)
                IF ((G_stLinkBasic.unRWw[wRWw01] AND H0100)= H0100) THEN
                    CASE WORD_TO_INT(uModeDisp) OF
                        1,    (* Profile position mode *)
                        6:    (* Homing mode *)
                        IF ((G_stLinkBasic.unRWr[wRWr02] AND H0400) = H0000) THEN
                            wAxisStatus := 5;    (* DiscreteMotion *)        
                        END_IF;
                        3,    (* Profile Velocity mode *)
                        4:    (* Profile Torque mode *)
                        IF NOT bZeroVelocity THEN
                            wAxisStatus := 5;    (* DiscreteMotion *)        
                        END_IF;
                        ELSE
                        ;
                    END_CASE;                                
                    ELSE
                    CASE (WORD_TO_INT(uModeDisp)) OF
                        1:
                        IF ((G_stLinkBasic.unRWr[wRWr02] AND H0400) = H0000) THEN
                            wAxisStatus := 5;    (* DiscreteMotion *)
                        END_IF;
                        3,
                        4:
                        wAxisStatus := 6;    (* ContinuousMotion *)
                        6:
                        IF ((G_stLinkBasic.unRWr[wRWr02] AND H0400) = H0000) THEN
                            wAxisStatus := 3;    (* Homing *)
                        END_IF;
                        ELSE
                        ;
                    END_CASE;
                END_IF;        
            END_IF;
              
            (* 実行條件確認 / execution condition check *)
            IF bEnablePls THEN
                CASE wAxisStatus OF
                    2:    (* Stopping *)
                    ErrorID := H1204;
                    ELSE
                    ;    
                END_CASE;
            END_IF;

            (*------------------------------------------------------------------*
            * サーボON実行
            * Servo ON execution
            *------------------------------------------------------------------*)    
            IF (ErrorID =0) AND bEnablePls AND (wAxisStatus = 0) THEN
                G_stLinkBasic.unRWw[wRWw14] := INT_TO_WORD(wPosTrqLimit);    (* トルク制限値(正) / Torque limit value(positive) *)
                G_stLinkBasic.unRWw[wRWw15] := INT_TO_WORD(wNegTrqLimit);    (* トルク制限値(逆) / Torque limit value(negative) *)
                G_stLinkBasic.unRWw[wRWw01] := (G_stLinkBasic.unRWw[wRWw01] AND HFF70) OR H000F;
            END_IF;        
            IF ((G_stLinkBasic.unRWr[wRWr02] AND H006F) = H0027) THEN    (* OperationEnabled *)
                Status := TRUE;
                Error := FALSE;
                ErrorID := 0;
                ELSE
                Status := FALSE;        
            END_IF;
            ELSE
            wAxisStatus := 1;
            ErrorID := H1202;
        END_IF;
    END_IF;
    (*========================================================================*
    * エラー出力
    * Output for [Error]
    *========================================================================*)
    IF (ErrorID <> 0) THEN
        Error := TRUE;
        Status := FALSE;
        bBusy := FALSE;
    END_IF;


    (*========================================================================*
    * 有効OFF
    * Enable OFF
    *========================================================================*)    
    ELSE
    IF bEnablePlf THEN
        G_stLinkBasic.unRWw[wRWw01] := (G_stLinkBasic.unRWw[wRWw01] AND HFF70);    (* DisableOperation *)
    END_IF;
    Status := FALSE;
    Error := FALSE;
END_IF;
工控普通人,學習在路上
焦劉吉
緊跟時代發展,努力做好時代青年
級別: 工控俠客
精華主題: 0
發帖數量: 1459 個
工控威望: 4682 點
下載積分: 14975 分
在線時間: 429(小時)
注冊時間: 2015-05-19
最后登錄: 2024-12-11
查看焦劉吉的 主題 / 回貼
1樓  發表于: 2020-08-20 21:00
來個Case語句,不如來個枚舉,又能當注釋,還能隨意添加
Rules are always made by the strong, and history is always written by the winners.

主站蜘蛛池模板: 国产精品久久久一区二区三区| 久久综合九色欧美综合狠狠| 四虎影视www四虎免费| 黄色毛片免费在线观看| 国产亚洲欧美一区| 2021国内精品久久久久影院| 国产精品免费久久久免费| 亚洲综合a| 草草影院禁18在线观看| 一级片a| 欧美色亚洲图| 在线视频观看你懂的我的| 你懂的视频在线观看资源| 成人信息集中地| 在线高清美女视频免费看| 欧美成人一区二区三区不卡视频| 在线激情视频| 四虎影视在线看免费 720p| 成年美女黄网站色大| 免费欧洲毛片a级视频老妇女 | 亚洲啪在线| 老子影院午夜伦不卡手机| 国产精品xxxxbbbb18| 成人免费视频在线播放| 欧美激情在线精品一区二区| 图片区小说欧洲区| 国产日| 成人看的午夜免费毛片| 一级毛片免费完整视频| 精品亚洲欧美中文字幕在线看| 亚洲欧美中文日韩综合| 亚洲欧美一区二区久久香蕉| 免费视频在线播放| chinese精品男同志movies| 色综合久久久久久久久久久| 国产精品亚洲一区二区三区久久| 日韩欧美中| 中文字幕欧美亚洲| 亚洲一区二区三区视频| 四虎国产在线观看| 好爽好黄的视频|