Control Objects

Introduction

A Control object manages a motion controller device. The device is typically a single board residing in a PC or an embedded system. A control object can read and write device memory through one of a variety of methods: I/O port, memory mapped or device driver.

For the case where the application and the motion controller device exist on two physically separate platforms connected by a LAN or serial line, the application creates a client control object which communicates via remote procedure calls with a server.

Unlike the methods of all other objects in the MPI, Control object methods are not thread-safe.

Are you using TCP/IP and Sockets? If yes, click here.

| Error Messages |

Methods

Create, Delete, Validate, Access, and Allocate Methods
mpiControlAccess Access Control object
mpiControlAllocUpdate Allocate Control object
mpiControlCreate Create Control object
mpiControlDelete Delete Control object
mpiControlValidate Validate Control object

Configuration and Information Methods
mpiControlAddress Get original address of Control object (when it was created)
mpiControlConfigGet Get Control config
mpiControlConfigSet Set Control config
mpiControlDefaultFile Reports the default file for special controller files
mpiControlDigitalIn Read the current input state
mpiControlDigitalOutGet Read the current output state
mpiControlDigitalOutSet Change the state of output bit
mpiControlFlashLoadFromFile Reads the firmware image files
mpiControlFlashSaveToFile Saves firmware images to a binary file
mpiControlFlashVerify Verifies the controller’s firmware against an input file
mpiControlFlashSaveAll The firmware configuration data on the controller to flash
mpiControlGateStateGet Get the closed state (TRUE or FALSE)
mpiControlGateStateSet Set the closed state (TRUE or FALSE)
mpiControlInfo Retrieve information about an MPI motion controller
mpiControlMemAvail Gets the amount of external memory available
mpiControlNearestValidSampleRate  
mpiControlNotifyAdd  
mpiControlNotifyCreate  
mpiControlNotifyDelete  
mpiControlNotifyRemove  
mpiControlObjectCount  
mpiControlObjectPtr  
mpiControlResetToDefault Resets the controller
mpiControlSampleCounter Write the number of servo cycles (samples)
mpiControlSampleRate Write current sample rate (Hz) of the controller’s processor
mpiControlSamplestoSeconds Converts samples to seconds
mpiControlSampleWait Wait for count samples
mpiControlSecondstoSamples Converts seconds to samples
mpiControlStatistics Read the Controller statistics
mpiControlStatisticsReset Resets the Controller statistics
mpiControlStatus  
mpiControlTimingConfigGet  
mpiControlTimingConfigSet  
mpiControlType Get type of Control object (used to create Command object)
mpiControlValidSampleRate  
mpiControlVersionText  
mpiControlVersionTextFree  

I/O Methods
  mpiControlDigitalIn Reads the current input state
  mpiControlDigitalOutGet Read the current output state
  mpiControlDigitalOutSet Change the state of output bit

Event Methods. For an overview of Event Service methods, see Event Service .
mpiControlEventCallbackAdd  
mpiControlEventCallbackRemove  
mpiControlEventNotifyGet Set the control event that will cause the firmware to generate an interrupt
mpiControlEventNotifySet Configure firmware to generate an interrupt
mpiControlEventReset Reset the events
mpiControlEventServiceErrorCountReset  
mpiControlEventServiceStart  
mpiControlEventServiceStatus  
mpiControlProcessEvents  

Memory Methods
mpiControlMemory Get address of Control memory
mpiControlMemoryGet Copy count bytes of Control memory to application memory
mpiControlMemorySet Copy count bytes of application memory to Control memory
mpiControlMemoryGet64
mpiControlMemorySet64
mpiControlMemoryToFile

Relational Methods
mpiControlPlatform Return a handle to the Platform object

Action Methods
mpiControlCycleWait Wait for Control to execute count cycles
mpiControlInterruptEnable Enable interrupts to Control object
mpiControlInterruptWait Wait for controller interrupt
mpiControlInterruptWake Wake all threads waiting for controller interrupt
mpiControlRecorderCancel Cancel the reservation for an abandoned recorder.
mpiControlRecorderStatus Read the recorder's status.
mpiControlReset Reset controller hardware
mpiControlSampleWait Specify how many samples the host waits for, while the controller executes.
mpiControlStatisticsReset Resets the controller's maxBackgroundTime and maxForegroundTime values, and recalculates the controller's statistics.
mpiControlVersionMismatchOveride

Data Types

MPIControlAddress
MPIControlConfig
MPIControlConfigDynamicMemAlloc
MPIControlConfigEnabled
MPIControlEventCallback
MPIControlEventServiceErrorConfig
MPIControlEventServiceErrorHandler
MPIControlEventServiceErrorParams
MPIControlEventServiceStatus
MPIControlFanStatusFlag
MPIControlFanStatusMask
MPIControlFlashFiles
MPIControlFlashFileStatus
MPIControlFlashFilesStatus
MPIControlFlashFileType
MPIControlFlashLoadProgressFn
MPIControlFlashSaveProgressFn
MPIControlFileType
MPIControlGateState
MPIControlImageFileType
MPIControlInfo
MPIControlInfoDriver
MPIControlInfoFirmware
MPIControlInfoFirmwareZMP
MPIControlInfoIo
MPIControlInfoIoDigitalIn
MPIControlInfoIoDigitalOut
MPIControlInfoHardware
MPIControlInfoMpi
MPIControlInfoPld
MPIControlInfoRincon
MPIControlInput
MPIControlIoBit
MPIControlObjectEvalOrder
MPIControlObjectType
MPIControlOutput
MPIControlProcessMap
MPIControlStatus
MPIControlStatistics
MPIControlSubSampleMap
MPIControlSubSampleMapObject
MPIControlTimingConfig
MPIControlTrace
MPIControlType
MPIControlUserBuffer
MPIControlUserBufferDataSize
MPIControlValidSampleRates

Constants

MPIControlInMAX
MPIControlMAX_COMPENSATORS
MPIControlMAX_OBJECTS
MPIControlMIN_AXIS_FRAME_COUNT
MPIControlMAX_SAMPLE_RATE
MPIControlMAX_VALID_SAMPLE_RATES
MPIControlMIN_SAMPLE_RATE
MPIControlOutMAX
MPIControlRECORD_COUNT_DEFAULT
MPIControlSTRING_MAX

Macros

mpiControlFanStatusMaskBIT