You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>ICAM</strong> <strong>Virtual</strong> <strong>Machine</strong> ® <strong>Virtual</strong> <strong>Machine</strong> Reference, Model Customization<br />
The Macro Language, Other Macro Commands<br />
4.4.1.5 Other Macro Commands<br />
Outputting Error Messages (ERROR)<br />
The ERROR command outputs a diagnostic message to the listing file. Two forms of ERROR<br />
command syntax are available, to output user defined and standard error messages, as follows:<br />
0:<br />
n<br />
ERROR/ severity ', message ' ,<br />
0:<br />
n<br />
� �<br />
ERROR/ errnum , value<br />
� value �<br />
The “severity” form of the ERROR command is used to output a user defined error. The diagnostic<br />
message severity must be a whole number in the range 0-99, where by standard convention:<br />
0 is a message, 4 a warning, 8 an error and 16 a severe error.<br />
The diagnostic message text follows the severity. See “Output String Format Specifications” on<br />
page 139 for a description of how the string to be written is constructed using the format_string<br />
argument.<br />
For example:<br />
ERROR/0,'Pallet change'<br />
ERROR/4,'Cannot determine diameter of tool !(*)',$T<br />
The “errnum” form of the ERROR command is used to output standard error diagnostics. The<br />
diagnostic error number must be a whole number greater than 99, matching one of the standard<br />
diagnostics found in the pos190.err or err190.err diagnostic file. Because a model could be used<br />
with either a post-processor or a control emulator, this form of the ERROR command is not<br />
recommended for use in model macros.<br />
Calling other programs (SYSTEM)<br />
The SYSTEM command is used to spawn processes while simulating. The SYSTEM command<br />
allows the model to run another program or issue an operating system command from within a<br />
macro. The command takes the form:<br />
SYSTEM/'command '<br />
The command defined within the string is sent to the Windows or UNIX shell from the current<br />
working directory. If the command name and/or file name specifications contain embedded<br />
blanks, you will likely have to enclose them in quotes as you would if you typed the command<br />
from the shell prompt.<br />
The $ERRNO system variable contains the status code returned by the operating system when<br />
control was returned to the macro processor.<br />
138 <strong>ICAM</strong> Technologies Corporation – Proprietary