麻豆一区区三三四区产品麻豆-麻豆影视国产TV在线观看-麻豆影视国产在线观看-麻豆影视在线-麻豆影视在线观看av-麻豆影院

supermanxm
級別: 略有小成
精華主題: 0
發帖數量: 261 個
工控威望: 425 點
下載積分: 3926 分
在線時間: 88(小時)
注冊時間: 2022-01-29
最后登錄: 2024-12-10
查看supermanxm的 主題 / 回貼
樓主  發表于: 2023-06-26 23:13
trd(SM412,D6000);
IF D6010<>D6002 THEN     D6010:=D6002;
    FOR ii:=0 TO 49 DO
        Chanliang(ii,8):=Chanliang(ii,7);
        Chanliang(ii,7):=Chanliang(ii,6);
        Chanliang(ii,6):=Chanliang(ii,5);
        Chanliang(ii,5):=Chanliang(ii,4);
        Chanliang(ii,4):=Chanliang(ii,3);
        Chanliang(ii,3):=Chanliang(ii,2);
    END_FOR ii;
END_IF;
IF M6007:=TRUE THEN
    Chengxuhao(D800,0):=D800;
    Chengxuhao(D800,1):=D801;
    Chengxuhao(D800,2):=Chengxuhao(D800,1)+1;
END_IF;
//*求和
FOR ii:=0 TO 49 DO
    FOR jj=2 TO 8 DO
        chanliang(ii,9):=chanliang(ii,9)+chanliang(ii,jj)
    END_FOR jj;
END_FOR ii;    
    
IF M401 THEN
    Z0:=Z0+1
    
    IF Z0>5 THEN    
        Z0:=4
    END_IF;    
END_IF;
IF M400 THEN
    Z0:=Z0-1;
    IF Z0<=0 THEN    
        Z0=0;
    
    END_IF;    
END_IF;    
D6008:=Z0*K10;
qq240559043
干就完了
級別: 略有小成
精華主題: 0
發帖數量: 192 個
工控威望: 332 點
下載積分: 4111 分
在線時間: 144(小時)
注冊時間: 2012-06-06
最后登錄: 2024-12-14
查看qq240559043的 主題 / 回貼
1樓  發表于: 2023-07-16 15:58
bool AddOK,AddNG,ON=true
short AddDatOK,AddDatNG
short Month,Day,DateStamp
short hour

short zero = 0
int int_zero = 0

int DayShift_ProductOKCount                //白班OK總計數
int DayShift_ProductNGCount                //白班NG總計數
int NightShift_ProductOKCount            //夜班OK總計數
int NightShift_ProductNGCount            //夜班NG總計數
float DayPassRate                        //白班良率
float NightPassRate                        //白班良率

int Recipe_OK,Recipe_NG//配方內的NG/OK數量
short Current_Recipe

char date[6]            //date of string
char str_zero[1] = "0"   //字符'0'
int str_len                 //字符長度

//*******************************************配方系統變量的定義**********************
short Recipe_Selection       //選中配方的編號
short Recipe_Count           //配方大小


short Recipe_Creat = 1  //新增配方記錄
short Recipe_Update = 2 //更新所選配方記錄
short Recipe_Delete = 3 //刪除所選配方記錄
//*******************************************配方系統變量的定義**********************

//*******************************************獲取HMI時間日期**********************
GetData(Month, "Local HMI", LW, 9021, 1)    //HMI_月
GetData(Day, "Local HMI", LW, 9020, 1)    //HMI_日
GetData(hour, "Local HMI", LW, 9019, 1)    //HMI_時
//*******************************************獲取HMI時間日期**********************


GetData(DateStamp, "Local HMI", RW, 1000, 1)    //時間戳
GetData(Recipe_Count, "Local HMI", RECIPE, "ProduceCount.Count")
if Recipe_Count > 0 then
    Current_Recipe =  Recipe_Count - 1
else
    Current_Recipe = Recipe_Count
end if


GetData(AddOK, "CODESYS V3 (Ethernet)", "Application.Important_GVL.AddOK", 1)
GetData(AddNG, "CODESYS V3 (Ethernet)", "Application.Important_GVL.AddNG", 1)

GetData(AddDatOK, "CODESYS V3 (Ethernet)", "Application.Important_GVL.AddDatOK", 1)
//********************************************************OK開始累加****************************************
if AddOK and AddDatOK >= 0 then

    //*****************************數據 到達上限后刪除第一組數據*************************
    if DateStamp <> Day and Recipe_Count >= 31 then
        SetData(zero, "Local HMI", RECIPE, "ProduceCount.Selection")                 //選中第一個數據
         SetData(Recipe_Delete, "Local HMI", RECIPE, "ProduceCount.Command")     //刪除選中數據
         DELAY(100)
    end if
    //GetData(AddDatOK, "CODESYS V3 (Ethernet)", "Application.Important_GVL.AddDatOK", 1)
    //*****************************根據時間修改當前數據*************************
    if DateStamp == Day and Recipe_Count > 0 then
    SetData(Current_Recipe, "Local HMI", RECIPE, "ProduceCount.Selection")
    select case hour
        case 0
            GetData(Recipe_OK, "Local HMI", RECIPE, "ProduceCount.OK1")
            Recipe_OK = Recipe_OK + AddDatOK
            SetData(Recipe_OK, "Local HMI", RECIPE, "ProduceCount.OK1")
        break
        case 1
            GetData(Recipe_OK, "Local HMI", RECIPE, "ProduceCount.OK2")
            Recipe_OK = Recipe_OK + AddDatOK
            SetData(Recipe_OK, "Local HMI", RECIPE, "ProduceCount.OK2")    
        break
        case 2
            GetData(Recipe_OK, "Local HMI", RECIPE, "ProduceCount.OK3")    
            Recipe_OK = Recipe_OK + AddDatOK
            SetData(Recipe_OK, "Local HMI", RECIPE, "ProduceCount.OK3")
        break
        case 3
            GetData(Recipe_OK, "Local HMI", RECIPE, "ProduceCount.OK4")    
            Recipe_OK = Recipe_OK + AddDatOK
            SetData(Recipe_OK, "Local HMI", RECIPE, "ProduceCount.OK4")
        break
        case 4
            GetData(Recipe_OK, "Local HMI", RECIPE, "ProduceCount.OK5")    
            Recipe_OK = Recipe_OK + AddDatOK
            SetData(Recipe_OK, "Local HMI", RECIPE, "ProduceCount.OK5")
        break

主站蜘蛛池模板: 亚洲av怡红院影院| 亚洲欧美久久久久久久久久爽 | 揄拍自拍| 国产又粗又猛又爽又黄A片| 精品无码亚洲最大无码网站国产精品| 人人撸狠狠碰| 97精品人妻酒店综合大胆无码| 伊人久久大香线蕉免费视频| 国产精品自在线拍国产电| 欧洲VIDEOS重口变态深| 久久久亚洲av无码精品一区| 日韩在线卡2卡3卡4卡5卡免费 | av无码人妻一区二区三区在| 真人做爰片免费视频毛片中文| 国产精品一区理论片| 伦理片秋霞免费影院| 久久精品中文字幕大胸| 久久久久久久99久久久毒国产| 日产乱码一区二区三区在线| 99久久无码精品国产免费| 亚洲欧美一区二区三区电影| 国产成人福利院免费观看| 在线看免费不卡av| 国精品无码一区二区三区左线 | 亚洲欧美无人区乱码| 青青青国产在线手机免费观看| 91天堂在线观看| 亚洲国产av无码精品无广告| 二区三区人| 亚洲一区在线视频| 国产精品秘片多多| WWW国产亚洲精品久久久日本| 护士交换做爰4| 无码激情全黄做爰片| 久久久久久久久久久福利| 亚洲欧美一区二区三区久本道| 欧美内射深喉| 亚洲欧美一区二区三区蜜芽| 日本中文字幕在线观看| 51精品视频在线一区二区| 无码专区人妻丝袜久久|