Recorder Objects


A Recorder object provides a mechanism to collect and buffer any data in the controller's memory. After a recorder is configured and started, the controller copies the data from the specified addresses to a local buffer every "N" samples. Later, the host can collect the data by polling or via interrupt-based events.

The controller supports up to 64 data recorders, which can collect data from up to a total of 64 addresses. The buffers can be dynamically allocated. A larger data recorder buffer may be required for higher sample rates, slow host computers, when running via client/server, or when a large number of data fields are being recorded.

A recorder can be started or stopped from the host application or from the controller by configuring a data recorder trigger. When the trigger conditions are met, the controller will automatically start or stop a data recorder. This is very useful for logging relevant variables during the period preceding a fault or error. Normally, the recorder stops collecting data when the buffer is full. It can also be configured to continuously collect data, overwriting the previous data until it is commanded to stop. This is useful for trapping a recent history of controller data.

When using data recorders, make sure to enable enough recorder objects and buffer memory with mpiControlConfigSet. Then, configure the recorders with mpiRecorderRecordConfig or mpiRecorderConfigSet, and start recording with mpiRecorderStart. Data can then be collected with mpiRecorderRecordGet.

It is possible to create a recorder object and not delete it, leaving the resources for the recorder occupied, but forgotten about (abandoned). It is most common to run into this situation when using an index of -1 for the recorder. When developing a program and running it in the debugger, it is common for the developer to exit the program without letting the program clean up its recorder resources. To see how to handle this situation programmatically, please see recorderinuse.c.

See Also:
Buffer Size

| Error Messages |


Create, Delete, Validate Methods
mpiRecorderCreate Create Recorder object
mpiRecorderDelete Delete Recorder object
mpiRecorderValidate Validate Recorder object

Configuration and Information Methods
mpiRecorderConfigGet Get Recorder's configuration
mpiRecorderConfigSet Set Recorder's configuration
mpiRecorderRecordConfig Configure type of data record that Recorder will capture
mpiRecorderStatus Get status of Recorder

Event Methods
mpiRecorderEventNotifyGet Get event mask of events for which host notification has been requested
mpiRecorderEventNotifySet Set event mask of events for which host notification will be requested
mpiRecorderEventReset Reset the events specified in event mask that are generated by Recorder

Action Methods
mpiRecorderRecordGet Get data records from Recorder
mpiRecorderStart Start recording data records using Recorder
mpiRecorderStop Stop recording data records using Recorder

Memory Methods
mpiRecorderMemory Get address to Recorder's memory
mpiRecorderMemoryGet Copy data from Recorder memory to application memory
mpiRecorderMemorySet Copy data from application memory to Recorder memory

Relational Methods
mpiRecorderControl Return handle of Control object associated with Recorder

Data Types