RobotStudio event

Problem with ErrLog command

Hi, I need to show custom error message on FP using ErrLog command. I create my own xml files as specified at Additional options application manual (see 2.2.1 About event log messages) and put them to the HOME directory.

This is my test routine:

    PROC ErrLogTest()
        VAR num errorid:=5210;
        VAR errstr arg:="Test";

        ErrLog errorid,ERRSTR_TASK,arg,ERRSTR_CONTEXT,ERRSTR_UNUSED,ERRSTR_UNUSED;
        ErrLog errorid\W,ERRSTR_TASK,arg,ERRSTR_CONTEXT,ERRSTR_UNUSED,ERRSTR_UNUSED;
    ENDPROC

But when I run this routine, I get empty error message. 



XML files are valid (attached below, change .txt to .xml). 

template_elogtext.txt

<?xml version="1.0" encoding="utf-8"?>
<!--*********************************************-->
<!--The text description file for Elog Messages -->
<!-- -->
<Domain elogDomain="" domainNo="11" lang="en" elogTextVersion="1.0"
	xmlns="urn:abb-robotics-elog-text" min="4999" max="9000">
	<Message number="5210" eDefine="ERR_INPAR_RDONLY">
		<Title>Parameter error</Title>
		<Description>Task:
			<arg format="%s" ordinal="1" />
			<p />Symbol 
			<arg format="%s" ordinal="2" />is read-only
			<p />Context:
			<arg format="%s" ordinal="3" />
			<p />
		</Description>
	</Message>
</Domain>
template_elogtitles.txt

<?xml version="1.0" encoding="utf-8"?>
<ExtractTitles>
    <Title domain="11" number="5210">Too small value on argument</Title>
</ExtractTitles>
Please, help!

Best Answer

Answers

  • soup
    soup ✭✭✭
    Edit install.cmd file?
  • Micky
    Micky ✭✭✭
    Hi,
    i think you should create the folder "Language" in your Addin folder. In this folder you are create subfolder for each language, e.g. ("en" ,"de", "fr" )

    In your install.cm file you have to add the following:

    # echo -text "Register elog messages ..."
    # register -type elogmes -domain_no 11 -min 5200-max 5220-prepath $BOOTPATH/Language/ -postpath /Your_elogtext.xml
    # register -type elogtitle -prepath $BOOTPATH/Language/ -postpath /Your_elogtitles.xml
    # echo -text "...registered"

    Add your own file names and define the min and max error number.

    /BR
    Micky


  • soup said:
    Edit install.cmd file?
    Where can I find this file?
  • Micky
    Micky ✭✭✭
    Hello,

    in case you are creating an RobotWare AddIn you have to add the file "install.cmd" to your Addin folder .
    The install.cmd file is an installation script that for example define which configuration files and event log messages files to load. One of the configuration files (sys.cfg) defines which RAPID program files (.sys) to load (see RobotWare Addin manual, chapter 2.3).

    In case of you do not use an AddIn you can create the file "ext_install.cmd" in the "HOME" directory for registration of the error message with the following commands:

    register -type elogmes -domain_no 11 -min <b>5200</b>-max <b>5220 </b>-prepath $HOME/Language/ -postpath /<b>Your_elogtext.xml</b><br>register -type elogtitle -prepath $HOME/Language/ -postpath /<b>Your_elogtitles.xml</b>

    Best regards
    Micky

  • Micky said:
    In case of you do not use an AddIn you can create the file "ext_install.cmd" in the "HOME" directory for registration of the error message with the following commands:
    register -type elogmes -domain_no 11 -min <b>5200</b>-max <b>5220 </b>-prepath $HOME/Language/ -postpath /<b>Your_elogtext.xml</b><br>register -type elogtitle -prepath $HOME/Language/ -postpath /<b>Your_elogtitles.xml</b>
    Thanks for your reply, but as far as I know, "ErrLog" command should work without any executable files like "install.cmd" or Language folder in HOME directory. In any case, the manual did not say anything about it. I have no idea even what should be in this folder. I think there must be another solution. Anyway, thanks for your help!
  • I tried the approach that @Micky described above, but I can't get it to work on a virtual controller.

    I put "ext_install.cmd" with the two register calls in the $HOME folder.
    I put the two xml files in the $HOME/Language/en folder.
    Then I restarted controller, but the ext_install.cmd doesn't seem to be called (because the controller also starts normally if I put nonsense in ext_install.cmd).

    Am I missing something? Does anybody have a working virtual controller with custom error log messages?

    Thanks,
    Joost
  • Micky
    Micky ✭✭✭
    Hello Joost,

    in the attached zip folder you will find the required files to use your own ELOG messages.

    Copy the files into your home directory and execute an "I-Start".
    As soon as the robot is ready you can use the following instructions to show your own E-LOG messages

    <div>ErrLog 9901,ERRSTR_TASK,ERRSTR_CONTEXT,ERRSTR_UNUSED,ERRSTR_UNUSED,ERRSTR_UNUSED;<br><br></div><div>ErrLog 9902,ERRSTR_TASK,ERRSTR_CONTEXT,ERRSTR_UNUSED,ERRSTR_UNUSED,ERRSTR_UNUSED;</div>
    Best regards
    Micky
  • Thank you Micky, it works perfectly.

    Best regards,
    Joost