Rivet Page

mail@pastecode.io avatar
unknown
pascal
a year ago
2.0 kB
1
Indexable
Never
REGION Show rivet position nests block data
    //show rivet position nests block data
    "DB_05HMICom".stHMIData.udtRivetData.archRivetStateTurnTable := "DB_08PartProcessData".ArudtPaDaBlockTurnTable["DB_01FGCom".stFG.udtFG24.ariNestNoAtPos["CiNo02StatOnTT_FG10_StationRivertCB"]].udtPDTInternalDataRivetBlock.archRivetState;
    "DB_05HMICom".stHMIData.udtRivetData.archRivetStateTempStorage := "DB_08PartProcessData".UdtPaDaBlockTempStor.udtPDTInternalDataRivetTemp.archRivetState;
END_REGION

REGION HMI button actions
    //write altered data, store eks number
    IF "DB_05HMICom".stHMIData.udtRivetData.xButtonPressed
        AND NOT "DB_05HMICom".stHMIData.udtRivetData.xfpButtonPressed
    THEN
        REGION Store EKS number 
            "FC_EKSIDToStringOEM"(iqstrEKSID := #tstrEKSID, iudtHmiProInterface := "DB_LTLP_HMIProInterfaceData");
            Strg_TO_Chars(Strg := #tstrEKSID, pChars := 0, Cnt => #tdiCnt, Chars := "DB_02InterPersi".archEKSNumbers[0]);
        END_REGION ;
        "DB_08PartProcessData".ArudtPaDaBlockTurnTable["DB_01FGCom".stFG.udtFG24.ariNestNoAtPos["CiNo02StatOnTT_FG10_StationRivertCB"]].udtPDTInternalDataRivetBlock.archRivetState := "DB_05HMICom".stHMIData.udtRivetData.archRivetStateTurnTable;
        "DB_08PartProcessData".UdtPaDaBlockTempStor.udtPDTInternalDataRivetTemp.archRivetState := "DB_05HMICom".stHMIData.udtRivetData.archRivetStateTempStorage;
        REGION Shift EKS numbers in tabelle
            FOR #tiI := "CiMaxStoredEKSNo" TO 0 BY -1 DO
                IF (#tiI) > 0 THEN
                    "DB_02InterPersi".archEKSNumbers[#tiI] := "DB_02InterPersi".archEKSNumbers[#tiI - 1];
                ELSE
                    EXIT;
                END_IF;
            END_FOR;
        END_REGION ;
        "DB_05HMICom".stHMIData.udtRivetData.xfpButtonPressed := TRUE;
    END_IF;
END_REGION 

"DB_05HMICom".stHMIData.udtRivetData.xfpButtonPressed := "DB_05HMICom".stHMIData.udtRivetData.xButtonPressed;