Read Object Registry

NI-Motion VI

Read Object Registry

Reads a data record for a memory object from the Object Registry.

Details

Device Compatibility

DeviceCompatibility
7330
N
7340
Y
7344
Y
7350
Y
7390
N
NI SoftMotion Controller for CANopen—Accelnet
N
NI SoftMotion Controller for CANopen—Xenus
N
Index is the registry record number. The range for index is 0 to 31.
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.
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:
status is TRUE if an error occurred before this VI was called, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.
Registry Record is the data record containing object information. Object Type tells you the type of object stored, program or buffer. The start address and object size are returned in hex. Size is in number or 16-bit words. For buffers, the size value is twice the size of the buffer when you configure it using the Configure Buffer VI.
Device Id is the object number.
Object Type is the type of object. If 1, then program. If 2, then buffer.
PStart is the Start address in RAM or ROM.

If PStart < 0x100000, then the object is in Flash (ROM), otherwise, the object is in RAM.

Size is the size of the object in words.
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.
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.
status is TRUE if an error occurred, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.

Using This VI

The Read Object Registry VI returns a registry record for an object from the Object Registry. The Object Registry contains information about all objects stored in memory. You can store up to 32 objects in RAM and/or ROM. Each time an object is stored, a new record is created to keep track of it.

Note  If an object exists both in RAM and ROM, this VI reports the object as existing in RAM. To see the object in ROM, you must first free the object from RAM.

On 7330 and 7340 motion controllers, objects are in RAM if PStart  0x100000, and in ROM if PStart < 0x100000. On the 7350 controller, objects are in RAM if PStart  0x200000, and in ROM if PStart < 0x200000.

Registry records are referenced by index and each call to this VI returns information about the referenced object. The index is not the same as the object number. You can use up to 255 unique object numbers (0x01 through 0xFF) but only 32 objects can be stored in memory at one time.