Chapter 5 Generated Code Architecture
© National Instruments Corporation 5-17 AutoCode Reference
The parameter arrays RP (real parameters) and IP (integer parameters) in
structure _
procedure name
_i are used for storing parameter values used
by algorithms of blocks in the procedure. During initialization (that is, INIT
mode is 1), the procedure initializes the IP and RP arrays in the structure
with the necessary values entered in the model.
If Xmath variables are used as %variables in the model as a value in a
block dialog form, or if Variable block variables are used in the model,
thevariables used in the procedure are passed through the
_
procedure name
_info structure as pointers to global variables named
after the Xmath variables used. You need to initialize these pointers.
Table 5-1. Description of Element iinfo in Structure _procedure name_info
Array Element Description
iinfo[0] Error flag.
iinfo[1]=1 INIT mode. Initialize.
iinfo[2]=1 STATE mode. Compute state derivatives.
iinfo[3]=1 OUTPUT mode. Compute outputs in Y.
Note: iinfo is an array of RT_INTEGER containing status and control flags.
Table 5-2. Description of Element rinfo in Structure _procedure name_info
Array Element Description
rinfo[0] Current time in seconds.
rinfo[1] Sample interval in seconds (1.0 if procedure is
invoked from triggered task).
rinfo[2] Initial time skew in seconds (0.0 if procedure is
invoked from triggered task).
rinfo[3] Timing requirement, in seconds, if procedure
invoked from triggered task (0.0 if procedure
invoked from discrete task).
rinfo[4] Start time in seconds.
Note: rinfo is an array of RT_FLOAT containing time-related information.