TIA Hersteller AWL Schweißanlage ,Handling Reihenfolge ändern

Mike_2210

Level-1
Beiträge
2
Reaktionspunkte
0
Zuviel Werbung?
-> Hier kostenlos registrieren
Hallo zusammen,
Hat einer SPS Erfahrung mit der Anlagen Software des Herstellers " AWL Schweißanlagen "?
Ich muss / soll die Entnahmereihenfolge des Handling Roboters ändern .
Von Rohteilentnahme => Fertigteilentnahme.
Muss ich dafür den Variablen Bereich #iStatusRangeUnload ändern ?

Code:
    IF (#MachineStatus.bDelayedAuto OR
        (#MachineStatus.bDelayedReset AND
        (
        (#iStepCounter >= #stResetBegin AND #iStepCounter <= #stResetDone)
        OR ((#iStepCounter >= #stSubStart AND #iStepCounter <= #stSubEnd) AND (#iReturnStep >= #stResetBegin AND #iReturnStep <= #stResetDone))
        ))) THEN
        CASE #iStepCounter OF
                
            #stIdle: // 0
                // This is the idle state.
                IF #MachineStatus.bDelayedAuto AND NOT #MachineStatus.bCycleStopActive AND (#iReadWriteArmNr = #LogisticsIn.iActualArmNr) THEN
                    // What can we do next? (in order of priority:)
                    // NOTE: actions that need the arm/jig may ONLY be started if (bReleaseForActions and not bPosDone and ReadJigData.bValidDataAvailable)!!!
                    
                    IF #LogisticsIn.bReleaseForActions AND NOT #bPosDone AND #ReadJigData.bValidDataAvailable THEN
                        // test for invalid data:
                        IF NOT #LogPosSettingsInt.bJigAvailable
                            OR NOT #LogPosSettingsInt.bJigActive THEN
                            // jig is unavailable or switched off, no actions:
                           #iStepCounter := #stStationFinished;
                            ;
                        ELSIF #PartStatusInt.PartData.iProcessStatus < #iStatusRangeUnload + "psPreviousStationDone" THEN
                            // previous station is still busy, we just have to wait... standby for action..
                            IF #PartStatusInt.PartData.bVirtStationNotFinished THEN
                               #bPosDone := true; // the virtual station is not working on this data position anymore, so we could wait forever.
                                ;
                            END_IF;
                            
                            // fully completed:
                        ELSIF (#PartStatusInt.PartData.iProcessStatus >= #iStatusRangeUnload + "psThisStationDone")
                            AND (#PartStatusInt.PartData.iProcessStatus < "psBeginAtOperatorSide") THEN
                            // this station is already finished, let's handshake again:
                            #iStepCounter := #stStationFinished;
                             ;
                            
                            // process status allows us to start the takeout:
                        ELSIF #PartStatusInt.PartData.iProcessStatus >= #iStatusRangeUnload + "psPreviousStationDone"
                            AND (#PartStatusInt.PartData.iProcessStatus < "psBeginAtOperatorSide") THEN
                            //check if jig is correct and if jig has correct part to unload
                            
                            IF NOT #PartStatusInt.PartData.bDataValid OR (#PartStatusInt.PartData.iProcessStatus = 0) THEN
                                // data not initialized, skip this jig
                                #PartStatusInt.PartData.iProcessStatus := #iStatusRangeUnload + "psThisStationDone";
                                #bPosDone := true;
                                
                             ELSIF (#iJigForGripper = "iGripperNotUsed") OR NOT #bGripperEmpty THEN
                                //not correct jig for gripper 'iJigForGripper'
                                #PartStatusInt.PartData.iProcessStatus := #iStatusRangeUnload + "psThisStationDone";
                                #bPosDone := true;
                      
                            ELSIF (#bRbInHomePosition OR #bRobotCtrl2InSafeBox1_TT) AND NOT #PartStatusInt.PartData.Product[2].bDataValid THEN
                                //not a valid part in jig to unload (part2).
                                #PartStatusInt.PartData.iProcessStatus := #iStatusRangeUnload + "psThisStationDone";
                                #bPosDone := true;
                                
                            ELSIF (#OtherRobotPartStatus.PartData.iProcessStatus <> 0)
                                AND ((#OtherRobotPartStatus.PartData.iProcessStatus < #iStatusRangeRobot + "psPreviousStationDone")
                                OR ((#OtherRobotPartStatus.PartData.iProcessStatus >= #iStatusRangeRobot + "psPreviousStationDone") AND #OtherRobotPartStatus.PartData.bProcessError)) THEN
                                // last check at other robot gripper side to see if handling robot is ready to load/unload at operator
                                ; //wait until other side is ready
                                
                            ELSE
                                //we can start unloading
                                #PartStatusInt.PartData.iProcessStatus := #iStatusRangeUnload + "psThisStationStarted";
                                #iStepCounter := #stPrepUnloadingBegin;
                            END_IF;
                        
                        END_IF;
                        
                    ELSIF #LogisticsIn.bReleaseForActions AND NOT #bPosDone AND NOT #ReadJigData.bValidDataAvailable THEN
                        // no valid data, skip the station:
                        #bPosDone := true;
                    END_IF;
                END_IF;



MFG
 
Zuletzt bearbeitet:
Hallo zusammen,
Hat einer SPS Erfahrung mit der Anlagen Software des Herstellers " AWL Schweißanlagen "?
Ich muss / soll die Entnahmereihenfolge des Handling Roboters ändern .
Von Rohteilentnahme => Fertigteilentnahme.
Muss ich dafür den Variablen Bereich #iStatusRangeUnload ändern ?
Nach einem ersten Blick auf den Code würde ich sagen, ja.
Die Variable/Konstante definiert (vermutlich), was der Roboter meldet, wenn er in der Entladepostiion ist. Da Ihr eine Position am Roboter hinzufügt, wird sich der Index um 1 erhöhen.
 
Zuletzt bearbeitet:
Zurück
Oben