Object Memory ManagementSaves, deletes, or frees programs or buffers in RAM and ROM.
| Device Compatibility
|
Operation
is the operation to perform on the memory object, as follows:
|
|||||||||
Board ID is a unique number assigned by Measurement & Automation Explorer (MAX) used to send and receive commands and data to or from a specific NI motion controller. | |||||||||
Object (1) is a program or buffer stored in onboard RAM. | |||||||||
error in (no error) describes error conditions that occur before this VI runs. The default input of this cluster is no error. If an error already occurred, this VI returns the value of error in in error out. The VI runs normally only if no incoming error exists. Otherwise, the VI passes the error in value to error out. The error in cluster contains the following parameters:
|
|||||||||
Bd ID Out is provided for flow control. You can string together NI-Motion VIs by wiring the Bd ID Out terminal of one VI to the Board ID terminal of the next VI. | |||||||||
Resource Out is the Axis, Vector Space, ADC, or Encoder you wired into the VI. Use Resource Output to pass the resource to another VI and/or to display information about the device. | |||||||||
error out contains error information. If error in indicates an error, error out contains the same error information. Otherwise, it describes the error status that this VI produces.
|
Using This VI
The Object Memory Management VI is used to save to ROM, delete from ROM, or free from RAM, a program or buffer object. Objects saved to non-volatile Flash ROM are available for use at any future time, even after power cycles.
To save an object to ROM, call this VI with Operation = Save. The object is copied to ROM and exists in both RAM and ROM until the next power cycle, when the RAM image is erased.
To remove an object from ROM, call this VI with Operation = Delete. The object is deleted from both ROM and RAM (if it still exists in RAM).
After you have saved an object to ROM, you can free up its space in RAM by calling this VI with Operation = Free. This has no effect on the copy in ROM but deletes the image in RAM, making more memory available for storing additional programs or other objects.
Note You cannot save or delete an object while any program is running or any buffer is in use. Also, you cannot free a program or buffer while it is running. In addition, you cannot save or delete an object when any motor is moving. Attempting to execute this VI in these cases generates an error.
You can delete a buffer that is active, such as a high-speed capture buffer that is waiting for a trigger, but NI-Motion returns an error in this case. |
Tip Saving or deleting an object takes 2 to 4 seconds. |
The 7340 controller has 64 KB of RAM plus 128 KB of ROM (divided into two 64 KB sectors) for program and buffer storage. You can run programs from either RAM or ROM, but you cannot split programs between the two, and you cannot split programs between the two 64 KB ROM sectors. With an average command size of 10 bytes, a single program can be as large as 6,400 commands. As another example, the 7340 controller can simultaneously execute 10 programs, five from RAM and five from ROM, with each program up to 1,280 commands long.
Like programs, buffers can be stored in RAM or ROM. The maximum buffer size is somewhat less than 64 KB (16,000 samples) because some of each sector is used for record keeping.
This VI may take longer than 62 ms to process, so it is not guaranteed to be compatible with real-time execution.