주요 콘텐츠

Block State and Work Vector Functions

LibBlockAssignDWork(dwork, ucv, lcv, sigIdx, rhs)

Based on the dwork index of the block or record (dwork), the user control variable (ucv), the loop control variable (lcv), and the signal index (sigIdx), LibBlockAssignDWork assigns a block’s dwork to a specified right hand side value (rhs).

Call LibBlockAssignDWork only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See LibBlockAssignDWork in customstoragelib.tlc.

LibBlockContinuousState(ucv, lcv, idx)

Returns a string corresponding to the specified block continuous state (CSTATE) element.

Call LibBlockContinuousState only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See LibBlockContinuousState in blocklib.tlc.

LibBlockContinuousStateDerivative(ucv, lcv, idx)

Returns a string corresponding to the specified block continuous state (CSTATE) element.

Call LibBlockContinuousStateDerivative only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See also LibBlockDiscreteState.

See LibBlockContinuousStateDerivative in blocklib.tlc.

LibBlockContStateDisabled(ucv, lcv, idx)

Returns a string corresponding to the specified block continuous state (CSTATE) element.

Call LibBlockContStateDisabled only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See also LibBlockDiscreteState.

See LibBlockContStateDisabled in blocklib.tlc.

LibBlockDWork(dwork, ucv, lcv, idx)

Returns a string corresponding to the specified block dwork element. The last input argument is overloaded to handle complex dworks.

idx = "re3" — Returns the real part of element 3 if dwork is complex, otherwise returns element 3.

idx = "im3" — Returns the imaginary part of element 3 if dwork is complex, otherwise returns "".

idx = "3" — Returns the complex container of element 3 if dwork is complex, otherwise returns element 3.

If either ucv or lcv is specified (i.e., it is not equal to "") then the index part of the last input argument (sigIdx) is ignored.

Call LibBlockDWork only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See LibBlockDWork in blocklib.tlc.

LibBlockDWorkAddr(dwork, ucv, lcv, idx)

Returns a string corresponding to the address of the specified block dwork element.

Call LibBlockDWorkAddr only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See LibBlockDWorkAddr in blocklib.tlc.

LibBlockDWorkDataTypeId(dwork)

Returns the data type ID of the specified block dwork.

See LibBlockDWorkDataTypeId in blocklib.tlc.

LibBlockDWorkDataTypeName(dwork, reim)

Returns the data type name of the specified block dwork.

See LibBlockDWorkDataTypeName in blocklib.tlc.

LibBlockDWorkIsComplex(dwork)

Returns 1 if the specified block dworkis complex. Returns 0 otherwise.

See LibBlockDWorkIsComplex in blocklib.tlc.

LibBlockDWorkName(dwork)

Returns the name of the specified block dwork.

See LibBlockDWorkName in blocklib.tlc.

LibBlockDWorkStorageClass(dwork)

Returns the storage class of the specified block dwork.

See LibBlockDWorkStorageClass in blocklib.tlc.

LibBlockDWorkStorageTypeQualifier(dwork)

Returns the storage type qualifier of the specified block dwork.

See LibBlockDWorkStorageTypeQualifier in blocklib.tlc.

LibBlockDWorkUsedAsDiscreteState(dwork)

Returns 1 if the specified block dwork is used as a discrete state, returns 0 otherwise.

See LibBlockDWorkUsedAsDiscreteState in blocklib.tlc.

LibBlockDWorkWidth(dwork)

Returns the width of the specified block dwork.

See LibBlockDWorkWidth in blocklib.tlc.

LibBlockDiscreteState(ucv, lcv, idx)

Returns a string corresponding to the specified block discrete state (DSTATE) element.

Call LibBlockDiscreteState only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See LibBlockDiscreteState in blocklib.tlc.

LibBlockIWork(definediwork, ucv, lcv, idx)

Returns a string corresponding to the specified block IWORK element.

Call LibBlockIWork only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See LibBlockRWork.

See LibBlockIWork in blocklib.tlc.

LibBlockMode(ucv, lcv, idx)

Returns a string corresponding to the specified block MODE element.

Call LibBlockMode only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See LibBlockMode in blocklib.tlc.

LibBlockNonSampledZC(ucv, lcv, NSZCIdx)

Returns a string corresponding to the specified block NSZC.

LibBlockNonSampledZC returns an element for the nonsampled zero-crossing state based on ucv, lcv, and NSZCIdx.

Arguments

ucv — User control variable string

lcv — Loop control variable string

NSZCIdx — Nonsampled zero-crossing index

See LibBlockNonSampledZC in blocklib.tlc.

LibBlockPWork(definedpwork, ucv, lcv, idx)

Returns a string corresponding to the specified block PWORK element.

Call LibBlockPWork only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See LibBlockRWork.

See LibBlockPWork in blocklib.tlc.

LibBlockRWork(definedrwork, ucv, lcv, idx)

Returns a string corresponding to the specified block RWORK element. The first argument, definedrwork, is a symbol defined in the mdlRTW routine of the C MEX file with code like:

ssWriteRTWWorkVect([...], "RWork", [...], "MyRWorkName", [...])

Alternatively, if RWork defines have not been made, definedrwork is ignored and the raw RWork vector is accessed. In this case, uses in a loop rolling context are disallowed.

Call LibBlockRWork only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See LibBlockRWork in blocklib.tlc.

LibBlockZCSignalValue(ucv, lcv, zcsIdx, zcElIdx)

Purpose

Returns a string corresponding to the specified block ZCSignalValue

Arguments

ucv

User control variable string.

lcv

Loop control variable string.

zcsIdx

zc signal Idx

zcElIdx

Idx of zc signal element in the zc signal

Description

LibBlockZCSignalValue returns an element for the zero crossing state based on ucv, lcv, and zcsIdx.

Call LibBlockZCSignalValue only within TLC block target file methods that generate executable code (for example, Outputs, Update, and Start).

See LibBlockZCSignalValue in blocklib.tlc.

See Also

Topics