Hello,
I am doing my first job with Kuka robots
I want to see error messages from my plc, on the teach-pendent. So, I created a program named messages()
As I want to be monitoring it constantly, I though about the possibility to make an interrupt (calling this program), on the SPS. So, I did as you can see bellow
SPS (área de USER PLC)
INTERRUPT DECL 23 WHEN $IN [4] == TRUE DO messages()
messages()
DECL KrlMsg_T mymessage
DECL KrlMsgPar_T mypar[3]
DECL KrlMsgOpt_T myoptions
int nHandle
bool STATE_OK, result
DECL int CONT
STATE_OK=$IN[3]
IF STATE_OK==TRUE THEN
mymessage={modul[] "Error", Nr 1, msg_txt[] "Check clamps"}
nHandle=Set_KrlMsg (#notify, mymessage, mypar[], myoptions)
ENDIF
END
When I run program messages() individualy, I can get the desired result (message "Check clamps" is shown when $IN[3] is on)
However, when I am out of the program messages(), e.g. when I am at my main program, nothing happens when I have the same conditions
Do I need to be in the window of the program messages() to see what I pretend? If so, I will never be able to see these messages when I am running my main program
Or am I doing something wrong with interrupt function?
Can you help me or give me some idea?
Thanks and best regards