Problem with ErrLog command
egor
✭
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:
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
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!
0
Best Answer
-
Hi,yes you are right there is no information in the manual how the xml files should be handled.First of all you have to create the folder "Language" in the "Home" directory.This folder name is used as "-prepath" during registration of the elog messages.The xml files will be used depending on the current language of the FlexPedant, so that the language folder contains the several sub folders for the required language.The means, the system defines internally the path to the xml files as follows:
<prepath> <Language> <postpath><br><br><b>Example:</b><br>"Home:Language/en/Your_ElogText.xml"<br>
Only folders for the available xml files must be added.See example from the RobotWare folder:In these subfolder you have to copy your localized xml files.best regardsMicky6
Answers
-
Edit install.cmd file?
0 -
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./BRMicky
1 -
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 regardsMicky
0 -
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>
0 -
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,
Joost0 -
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
Micky0 -
Thank you Micky, it works perfectly.
Best regards,
Joost0 -
Hello together, has something changend since 2019, I tried it like Micky said.But my Event Log Messages allways empty.I copied the files to the home folder and restart the controller, but nothing changend.
0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings