Using the Error Handler in LabVIEW Real-Time
However, if you are using custom errors, there are a few steps you must take to place the files in the correct location. You can create your custom error file by using the Error Code File Editor dialog box located in LabVIEW by selecting Tools»Advanced»Edit Error Codes.
Alternatively, you can create the file directly using a text editor like notepad. The file should have the following format:
<?XML Version="1.0">
<nidocument>
<nicomment>
This file describes errors for the
LabVIEW 6.1 application.
</nicomment>
<nierror code="2">
I am error 2.
</nierror>
<nierror code="3">
I am error 3.
</nierror>
</nidocument>
The files should be placed in C:\NI-RT\SYSTEM\USER.LIB\ERRORS\ on the RT Engine. You will need to create this directory first. To do this, start an ftp session to the engine and use the mkdir command to create the directory.
The error files should be named with a .err extension rather than -errors.txt convention used in regular LabVIEW applications to conform to the 8.3 filename structure. This is a limitation of the RT engine file system.
There are two configuration tokens available for error files. Setting RTDownloadErrors=TRUE in the embedded system's NI-RT.INI file will cause the RT Engine to request a list of available errors the first time it is targeted. This request will only occur if the RT Engine can not find any error files locally, such as an RT Engine that does not have disk I/O (the 7030 target is an example of such an engine). The host machine will search for all available error files, then transfer the parsed error data back to the RT target. If you wish to specify the actual filenames that should be parsed by the host system, you can create a list using the RTDownloadErrorList token in the RT Engine's NI-RT.INI file. The following is an example of an ni-rt.ini file:
[lvrt]
...
RTDownloadErrors=TRUE
RTDownloadErrorList="LabVIEW-errors.txt;Analysis-errors.txt;Measure-errors.txt;NI-DAQ LV-errors.txt"
...
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).


