Flash Objects


A Flash object manages nonvolatile flash memory on the XMP/ZMP motion controllers. To optimize flash memory, a host-resident flash memory cache is used to provide faster writing performance.

After your application creates a Flash object (using meiFlashCreate), the Flash object then creates a host-resident flash memory cache. meiFlashCreate will create the flash object and initialize an internal (host-resident) cache with a copy of the flash on the board. All Flash functions (with the exception of meiFlashMemoryFromFile) will modify the host resident cache. When you have finished modifying the host resident cache, use meiFlasheMemoriyFromFile(fileName=NULL) to write the host cache data to the board's flash memory. meiFlashMemoryToFile can be used to copy the board's flash to a user specified file. (If the filename is NULL, the data is copied to the host resident cache.) Host resident cache is deleted when meiFlashDelete is called.

Use the meiFlashDataGet/Set methods to move data between your application and the flash cache. Use the meiFlashMemoryToFile and meiFlashMemoryFromFile methods to move data between the flash cache (or file) and the actual flash memory. Typically, your application would:

  1. Create a Flash object [using meiFlashCreate(...)].

  2. Pass the MEIFlash handle to the FlashConfig[Get/Set](...) methods of the objects to be configured (which in turn call the meiFlashData[Get/Set](...) methods).

  3. Write the flash cache to actual flash memory [using meiFlashMemoryFromFile(...)].

  4. Delete the Flash object.

| Error Messages |


Create, Delete, Validate Methods
  meiFlashCreate Create Flash object
  meiFlashDelete Delete Flash object
  meiFlashValidate Validate Flash object

Configuration and Information Methods
  meiFlashConfigGet Copy flash config from cache to application memory
  meiFlashConfigSet Copy flash config from application memory to cache
  meiFlashDataGet Get count bytes of flash data memory and write them in application memory
  meiFlashDataSet Set count bytes of flash data memory using application memory

Memory Methods
  meiFlashMemoryFromFileType Write actual flash memory using the binary image contained in filename
  meiFlashMemoryGet Copy count bytes of flash memory to application memory
  meiFlashMemoryModified Determine if flash cache has been modified
  meiFlashMemorySet Copy count bytes of application memory to flash memory
  meiFlashMemoryFromFile Write actual flash memory to cache or to file
  meiFlashMemoryToFile Save actual flash memory to cache or to file

Relational Methods
  meiFlashControl Return handle of Control that is associated with Flash


Data Types