Subroutine Type |
Utility/Data Access |
|||||||||||||||||||||||||||||||||
Definition |
The USRMES utility subroutine allows you to output custom messages during MotionSolve execution. |
|||||||||||||||||||||||||||||||||
Use |
This function can be called by any user-defined subroutine. |
|||||||||||||||||||||||||||||||||
Calling Syntax |
FortranCALL USRMES (MSGFLG, MESAGE, ID, MSGTYP) Cc_usermes (msgflg, message, id, msgtyp)Pythonpy_usermes (msgflg, message, id, msgtyp)Matlabm_usermes (msgflg, message, id, msgtyp) |
|||||||||||||||||||||||||||||||||
Input Arguments |
[integer] ID |
The identifier of the corresponding user-defined element that is invoking USRMES. |
||||||||||||||||||||||||||||||||
[logical] MSGFLG |
A value that when true (or nonzero for C/C++), causes MotionSolve to call the USRMES utility subroutine. |
|||||||||||||||||||||||||||||||||
[character*(*)] MESSAGE |
A character string or a string variable that contains the message printed to the output files when MSGFLG is true/non-zero. |
|||||||||||||||||||||||||||||||||
[character*(*)] MSGTYPE |
A character string or a string variable that contains the type of message that is being output. There are eight message types supported. INFO - information. INFO_NOPAD – information without the USERMES: USER [id] padding. INFO_LOG – information written only to the LOG file and not to screen. WARN - warning. WARN_NOPAD – warning without the USERMES: USER [id] padding. WARN_LOG – warning written only to the LOG file and not to screen. ERROR – error. FAULT – fatal error. For any other type of MSGTYPE that is not supported, an information message with MSGTYP = “INFO” is issued. FAULT - fatal errors. For other types of MSGTYPE, information message is issued. |
|||||||||||||||||||||||||||||||||
Output Values |
No values are returned to the calling subroutine. |
|||||||||||||||||||||||||||||||||
Example |
The following Python script illustrates the use of the USRMES sub routine to output customized messages. def VARSUB(id, time, par, npar, dflag, iflag):
#The user message is specified below |
|||||||||||||||||||||||||||||||||
Using the above script, the table below illustrates the format of the user message that is written out to the log file and on-screen during the simulation.
|