Gents.
I'd like to read robot present alarm code using Karel, and then basing on it, make some actions, eg. witing some messages, setting bits, flags, etc.
Could you please advise me how to read the alarm code?
Thanks a lot for help.
Gents.
I'd like to read robot present alarm code using Karel, and then basing on it, make some actions, eg. witing some messages, setting bits, flags, etc.
Could you please advise me how to read the alarm code?
Thanks a lot for help.
neighbour,
I don't know how to read into the alarm history. However, I have triggered actions when an alarm occurs.
estp_err_cd1 = 11001 --Operator panel E-Stop. This error code will be monitored in a condition.
estp_err_cd2 = 11002 --Teach pendant E-Stop Refer to the Condition Handlers section OF the Karel reference AND the ERROR Code reference
estp_err_cd3 = 11004 --Fence Open
CONDITION[2]:
WHEN ERROR[estp_err_cd1] OR ERROR[estp_err_cd2] OR ERROR[estp_err_cd3] DO
--Trigger your action here
ENABLE CONDITION[2]
ENDCONDITION
ENABLE CONDITION[2]
The Karel program will only detect the error when it occurs so you will need to have the Karel programming running when the error occurs.
You will need to read the "System and Program Event Conditions" section in the Karel manual to figure out the code for your errors.
Thanks, that helps me a bit, I'll try to test it.
Hi There,
I use "ERR_DATA" in KAREL. Check KAREL docs. It resturns latest error or alarm in controller if you write MAXINT to seq_num etc. You can interpret the returned code using Alarm list doc.
An example it returns 11004.
Last three (004 here) digit is always related to error part, rest beginning digits (11 here) if its SRVO(11), MOTN, or other. This error would be SRVO-004 FENCE open.
ERR_DATA Built-In Procedure Purpose: Reads the requested error from the error history and returns the error Syntax :
ERR_DATA(seq_num, error_code, error_string, cause_code, cause_string, time_int, severity, prog_nam)