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

  • soupsoup USA ✭✭✭
    Edit install.cmd file?
  • MickyMicky Germany ✭✭
    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


  • egoregor Moscow
    soup said:
    Edit install.cmd file?
    Where can I find this file?
  • MickyMicky Germany ✭✭
    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 5200-max 5220 -prepath $HOME/Language/ -postpath /Your_elogtext.xml
    register -type elogtitle -prepath $HOME/Language/ -postpath /Your_elogtitles.xml

    Best regards
    Micky

  • egoregor Moscow
    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 5200-max 5220 -prepath $HOME/Language/ -postpath /Your_elogtext.xml
    register -type elogtitle -prepath $HOME/Language/ -postpath /Your_elogtitles.xml
    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!
Sign In or Register to comment.