Buffered Operations
Buffered operations allow you to create and manage memory buffers on the NI motion controller. You can create buffers that can hold up to 16,364 points, read and write data to and from these buffers, and check the status of a buffer. Buffers can even be stored in ROM for later use.
Onboard buffers allow you to store much more data than the 120 onboard variables. Data can be moved back and forth between buffers and onboard variables by using input and return vectors.
For example, an onboard buffer can be created to hold a series of target positions to move to, one after another. An onboard program is written to read a position from the buffer to an onboard variable, then use that value to load a target position, start a move, and wait for the move to complete. The same process is repeated for each target position until the entire buffer of positions is consumed. This approach allows for a large number of moves to execute independent of the host computer.
Besides single-shot applications where the buffer holds all of the data or is filled with all of the data only once, it is possible to use an onboard buffer in a continuous fashion, allowing for very large amounts of data to be transferred to or from the motion controller. Use the Check Buffer function to determine the number of points that can be safely written to or read from the onboard buffer at any point in time.
The 7350 and 7340 controllers have the following onboard memory:
Controller | RAM | ROM |
---|---|---|
7340 | 1 64k sector | 2 64k sectors |
7350 | 2 64k sectors | 4 64k sectors |
You can access a buffer from either RAM or ROM, but you cannot split buffers between the two, and you cannot split buffers between the 64 KB ROM sectors.
Contouring is a special movement mode implemented on top of the buffered operations. Contouring allows you to specify a series of positions n milliseconds apart for the motion controller to spline through.
You can use the Buffered Operations Functions to perform buffered high-speed captures and buffered breakpoints. These allow you to achieve faster rates than would otherwise be possible by automatically storing captures positions or automatically loading breakpoints. Refer to High-Speed Capture Overview and Breakpoint Overview for more information.
Note Configuring and clearing buffers is a processor-intensive operation on the NI motion controller that requires the allocation and de-allocation of memory. Configure and clear buffers only when motors are not moving and onboard programs are not running. |