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 Methods
  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)
  mpiControlClientCountGet Reads the number of client connections used by the MPIControl object
  mpiControlClientCountSet Sets the number of client connections to be used by the MPIControl object
  mpiControlConfigGet Get Control config
  mpiControlConfigSet Set Control config
  mpiControlDigitalIn Read the current input state
  mpiControlDigitalOutGet Read the current output state
  mpiControlDigitalOutSet Change the state of output bit
  meiControlExtMemAvail Gets the amount of external memory available
  mpiControlFlashConfigGet Get Control flash config
  mpiControlFlashConfigSet Set Control flash config
  meiControlFPGADefaultGet Creates a default FPGA filename
  meiControlFPGAFileOverride Replace the default FPGA file
  meiControlGateGet Get the closed state (TRUE or FALSE)
  meiControlGateSet Set the closed state (TRUE or FALSE)
  meiControlInfo Retrieve information about an MEI motion controller
  meiControlSampleCounter Write the number of servo cycles (samples)
  meiControlSampleRate Write current sample rate (Hz) of the controller’s processor
  meiControlSamplestoSeconds Converts samples to seconds
  meiControlSampleWait Wait for count samples
  meiControlSecondstoSamples Converts seconds to samples
  meiControlStatistics Read the Controller statistics
  meiControlStatisticsReset Resets the Controller statistics
  mpiControlStatusCacheIntervalGet Returns the current cache refresh interval in milliseconds
  mpiControlStatusCacheIntervalSet Sets current cache refresh interval in milliseconds
  mpiControlStatusCacheRefresh Refreshes of the cached data if caching is enabled
  mpiControlStatusCacheStatistics Retrieves the cache refresh statistics
  mpiControlStatusCacheStatisticsReset Resets the cache refresh statistics
  mpiControlType Get type of Control object (used to create Command object)

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

Event Methods
  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

Memory Methods
  mpiControlMemory Get address of Control memory
  mpiControlMemoryAlloc Allocate bytes of firmware memory
  mpiControlMemoryCount Get number of bytes available in firmware
  mpiControlMemoryFree Free bytes of firmware memory
  mpiControlMemoryGet Copy count bytes of Control memory to application memory
  mpiControlMemorySet Copy count bytes of application memory to Control memory
  meiControlMemoryToFile  

Relational Methods
  meiControlPlatform Return a handle to the Platform object

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


Data Types

  MPIControlAddress  
  MPIControlConfig / MEIControlConfig  
  MPIControlFanStatusFlag  
  MPIControlFanStatusMask  
  MEIControlFPGA  
  MEIControlInfo  
  MEIControlInfoDriver  
  MEIControlInfoFirmware  
  MEIControlInfoFirmwareZMP  
  MEIControlInfoIo  
  MEIControlInfoIoDigitalIn  
  MEIControlInfoIoDigitalOut  
  MEIControlInfoHardware  
  MEIControlInfoMpi  
  MEIControlInfoPld  
  MEIControlInfoRincon  
  MEIControlInput  
  MEIControlIoBit  
  MPIControlMessage / MEIControlMessage  
  MPIControlMemoryType  
  MEIControlOutput  
  MPIControlStatus  
  MEIControlStatistics  
  MEIControlTrace  
  MPIControlType  

 

Constants

  MPIControlInMAX  
  MPIControlOutMAX  
  MPIControlMAX_AXES  
  MPIControlMAX_COMPENSATORS  
  MPIControlMAX_RECORDERS  
  MPIControlMIN_AXIS_FRAME_COUNT  
  MPIControlMAX_SAMPLE_RATE  
  MPIControlMIN_SAMPLE_RATE  
  MPIControlRECORD_COUNT_DEFAULT  
  MEIControlSTRING_MAX  

 

Macros

  mpiControlFanStatusMaskBIT