RobotStudio event

System keeps exiting on a WaitTime command, err code 10125

Howdy,

We are using an IRC5 compact controller and the system is exiting on a waitTime 3; command at random. It only lists 10125 which infers something to do with one of the stop commands, but we don't use any and none of the Signal In/Out for quickstop are engaged at the time this happens. We used to have a stop routine trap triggered by a cyclic bool ,but we removed the cyclic bool. I only bring this up because I remember a year or so ago certain aspects of cyclic bools remained despite removing them and the removecyclicbool command wasn't cutting it so we had to just delete the whole task and start over.

Any idea what is going on? Code is pasted below, with the WaitTime it ends the task on in bold. It seems very strange for the program to stop there at random. Has this happened before and do you guys think it may have to do with CPU or heat?

 PROC StartMachineCycle()
        VAR num count := 0;
        Initialize_1208;
        GSDRequest_Homing:=FALSE;
        SetInternalDoorRequest:=FALSE;
        GraceShutdownCompleted:=TRUE;
        ISleep PauseCycleSignal;
        
        IF bBufferWheelReplaced=TRUE THEN
            bDiameterFault:=FALSE;      !Reset Fault Bools when buffer wheel is replaced
            bDiameterSensorFault:=FALSE;
            
            AutoCal_RunningSum:=0;
            AutoCal_RunningAverage:=0;

            FOR i FROM 1 TO 5 DO
                RecordDiameterSensor;
                AutoCal_RunningSum:=AutoCal_RunningSum+nCurrentBufferDiameter;
                AutoCal_RunningAverage:=AutoCal_RunningSum/i;
            ENDFOR
            BufferOn;
            for i from 1 to 5 DO
                count := count + 1;
                IF count = 4 PulseDO\PLength:=.5, DO_34_Polish_Spray_Nozzle;
                WaitTime 3;
            ENDFOR
            BufferOff;
            nLastBufferDiameter:=AutoCal_RunningAverage;
            KnifeSharpened:=0;
            bBufferWheelReplaced:=FALSE;
            DiameterRunningAverage:=0;
            DiameterRunningSum:=0;
        ENDIF
        
        IF (nLastBufferDiameter > nMaxBuffDist) OR (nLastBufferDiameter < nMinBuffDist ) THEN !If there sensor shows a distance that shows less than 2" radius left on buffer wheel, we know the data is false and throw a fault
            ErrWrite "Buffer Error", "Bad sensor reading or small buffer: " \RL2:= "Check buffer enclosure for buildup", \RL3:= "Possible issue WITH DAQ", \RL4:=GetTaskName();
            bDiameterFault := TRUE;
        ENDIF

    ENDPROC





Thanks,
-K

Answers

  • lemster68
    lemster68 ✭✭✭
    This seems unnecessary:
     count := count + 1;
       IF count = 4 PulseDO\PLength:=.5, DO_34_Polish_Spray_Nozzle;
         WaitTime 3;

    Why not:
    delete Count:= count +1;
    IF i = 4....
       WaitTime 3;

    BTW Incr is better that count + 1
    Lee Justice
  • We have had one that would kick out of its program on random WaitTime commands and it turned out to be a broken solder on the CMOS battery terminal in the CPU. Check hardware log for a CMOS battery low voltage warning.