MPIMapSymbol
Declaration
typedef struct MPIMapSymbol { MPIMapSymbolType type; int32_t index[MPIMapSymbolMAX_INDICES]; } MPIMapSymbol;
Required Header: map.h
Change History: Added in 04.00.
Description
MPIMapSymbol is a structure that represents commonly referenced memory locations on the controller in a version independent manner.
type | The type of controller memory. |
---|---|
index | Additional indices for determining the specific controller memory location. For more information, see MPIMapSymbolType. |
Sample Code
MPIMap mpiMap; MPIMapSymbol data; MPIMapPtr info; MPI_RESULT returnValue;
/* ... */
/* Obtain information about axis 3's actual position. */ data.location = MPIMapSymbolTypeACTUAL_POSITION; data.index[0] = 3;
returnValue = mpiMapSymbolToPtr(mpiMap, &data, &info);
/* info.dataType holds axis 3's data type. */
/* info.ptr holds a host pointer to axis 3's memory on the controller */ /* info.ptr.v may be used to configure a data recorder trace */
/* info.mask should be 0xFFFFFFFFFFFFFFFF (as actual positions are not bitmasks) */ /* info.mask will only have one bit set for digital i/o though, and */ /* info.mask will likely only have 16 bits set for analog i/o. */
See Also
mpiMapSymbolToPtr | mpiMapPtrToSymbol | MPIMapSymbolMAX_INDICES | MPIMapSymbolType