mpiControlObjectCount

Declaration

MPI_RESULT
   mpiControlObjectCount(MPIControl             control,
                         MPIControlObjectType   objectType,
                         int32_t                   *objectCount);

 

Required Header: control.h

Change History: Added in 04.00.

Description

mpiControlObjectCount reads the number of allocated objects from the controller’s memory and writes the value into the address pointed to by objectCount. This low-level function is useful for determining the objectCount and accessing the controller’s memory directly by using mpiControlObjectPtr.

To read or modify the controller’s allocated and enabled objects, use mpiControlConfigGet/Set

control A handle to a control object.
objectType The type of object.
*objectCount the quantity of objects allocated in the controller’s memory
Return Values
MPIMessageOK
MPIControlMessageOBJECT_INVALID

Sample Code

int32_t axisCount;

returnValue = 
mpiControlObjectCount(control,
                      MPIControlObjectTypeAXIS,
                      &axisCount);

See Also

mpiControlConfigGet | mpiControlConfig/Set | mpiControlObjectPtr