Fault-reset from TP-program

  • Hi.

    Is it possible to create a TP program that is looking for a specific Error code to apear, and then do a FAULT RESET command, if this error code is active?

    I have a line tracking setup with a CRX-10iA/L.

    Sometimes i get the error code MOTN-370 "Unreachable Track destination".

    This error occures if the target has gone too far downstream, when robot should start the tracking motion.

    Ofcourse the Discard line can be used to avoid the error to appear.

    But i would like to create a small program that are looking for MOTN-370 to appear.

    If this error is active, and DI[115] is ON, i would like to set a FAULT-RESET-command, to clear the robot error.

    I was thinking to create a TP-program with no Group Mask, and "Ignore pause" set to ON.

    In this TP-program i would simply create a loop, and then RUN the program from my Main-prgram.

    I was thinking to use $ALM_IF.$LAST_ERCODE, to read the last error that has occured (MOTN-370 has error code 638517618).

    But i can't figure out how to do a FAULT RESET instruction - if this is even possible from a TP-program?

    UI[5] "Fault reset", is currently mapped to DI[103], where a physical reset button is connected.

    Best regards

    Morten Fuglsang

  • Place your Ad here!
  • Lemster68

    Approved the thread.
  • Yes resetting a fault from TP is possible, you just have to map UI[5] to a flag, and create a falling-edge on that flag.

    If you want the reset to respond to both the physical reset button (DI[103]) and a software trigger, you could OR both reset inputs:

    * Map UI[5] to any flag F[n]

    * Select another flag as manual software reset trigger, F[m]

    * Run a background logic program to combine both inputs: F[n] = DI[103] OR F[m]

    If you pulse either input, it will result in the fault to be reset.

  • Thanks for your reply.

    I was starting to look into Karel, for a solution.

    But as i have never created a Karel program, i really would like to solve it by TP-programming. 🙂

    I will try what you suggested.👍

    Do you think I will be able to use $ALM_IF.$LAST_ERCODE, for reading out actual Error-code, and form that execute a FAULT RESET command, if a specific error code appears?


    • Helpful

    I think it will be possible in TP. If you enabled the error/alarm history variable ($ALM_IF.$ENABLE=TRUE), the current (user) alarms are displayed in the variables. $ALM_IF.$LAST_ERCODE seems to be only on the newer controller versions, but it looks like it works well to identify specific errors. Definitely more useful than $ALM_IF.$LAST_ALM which would require string manipulations.

    If the 'ignore pause' indeed works is something you'll have to test yourself. If not, look into using KAREL with a %NOPAUSE or %NOABORT directive.

  • You could also set up a condition monitor to look for this condition.

    in your main program, MONITOR condition_monitor_program

    your condition_monitor_program should look like this:

    WHEN ERR_NUM = 15370, CALL alarm_reset_program

    at the end of your alarm_reset_program, MONITOR condition_monitor_program

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners