SYSFNC subroutine returns a single value when it is invoked by
Langunage type |
SubRoutine |
FORTRAN |
call sysfnc(what, mkid, nid, result, errflg) |
C/C++ |
sysfnc(what, mkid, nid, & result , &errflg) |
Where FX is the type for SYSFNC subroutine, mkid and nid must be defined as an integer array and integer. The force_x must be defined as the double precision. The errflg must be defined as a logical variable in FORTRAN language or an integer in C/C++ language.
Parameter information
Variable Name |
Size |
Description |
what |
char [30] |
The type name. Tpye needs quotation marks such as ‘FX’ in fortran code, and double quotation marks such as “FX”. |
mkid |
int * |
The ID array of marker. |
nid |
int |
The number of marker in mkid array. |
result |
double |
The Result value. Check the TYPE FOR SYSFNC. |
errflg |
logical |
If an error is encountered in invoking Predefined subroutine, this variable becomes true. This variable must be declared as a logical variable. |
The available types are tabulated in SYSFNC as follows.
TYPES FOR SYSFNC
• DISPLACEMENT ELEMENTS
TYPE |
DISPLACEMENT ELEMENTS |
FUNCTION NAME |
DM, DX, DY, DZ, AX, AY, AZ, PSI, THETA, PHI, YAW, PITCH, ROLL |
• VELOCITY ELEMENTS
TYPE |
VELOCITY ELEMENTS |
FUNCTION NAME |
• ACCELERATION ELEMENTS
TYPE |
ACCELERATION ELEMENTS |
FUNCTION NAME |
• FORCE ELEMENTS
TYPE |
FORCE ELEMENTS |
FUNCTION NAME |
• SUB ELEMENTS
TYPE |
SUB ELEMENTS |
FUNCTION NAME |
Note
The SYSFNC function should be called every time in the user subroutine. Because the mkid used in the SYSFNC function is registered only one time initially. Using SYSFNC within if statement is highly unrecommended.
Note
A floating marker cannot be used in following expression functions
DM, DX, DY, DZ, AM, AX, AY, AZ, PSI, THETA, PHI, YAW, PITCH, ROLL
VM, VR, VX, VY, VZ, WM, WX, WY, WZ,
ACCM, ACCX, ACCY, ACCZ, WDTM, WDTX, WDTY, WDTZ
Note
In case of DIF, DIF1, VARVAL, below is the parameters and meaning.
"DIF" [C/C++] sysfnc("DIF",id,1,&returnvalue, &errflg)
"DIF1" [C/C++] sysfnc("DIF1",id,1,&returnvalue, &errflg)
"VARVAL" [C/C++] sysfnc("VARVAL",id,1,&returnvalue, &errflg)
id: UPAR: Variable Expression Name
returnvalue:
DIF = Value of The State Variable
DIF1 = The Time Derivative of The State Variable
VARVAL = Return Value of The State Variable
errflg: 1 success, 0 fail.