Elmo DSP 402 manual Sub-index, Buffer strategies, Fifo, Ring buffer

Models: DSP 402

1 116
Download 116 pages 36.42 Kb
Page 96
Image 96
Buffer strategies

CANopen DSP 402 Implementation Guide

MAN-CAN402IG (Ver. 1.2)

90

Sub-index

6

Description

Buffer clear

Entry category

Mandatory

Access

Write only

PDO mapping

No

Value range

UNSIGNED8 (described below)

Default value

0

Notes:

The maximum and actual buffer size are the number of interpolated data records that may be sent to the drive to fill the input buffer. They are not the size in bytes. The actual buffer size may be between max buffer size to.

The buffer position has an effect when the ring buffer is selected.

The buffer organization may change only when interpolated mode is not active. Reorganization of the buffer clears the input buffer.

Buffer can be clear by sub-index 6 only if interpolation is not active.

Buffer strategies

The contents of the buffer items can only be accessed via the interpolation data record. The maximum buffer size is given in object 0x60C4 is used by the host to determine the actual buffer size.

Commonly, first-in-first-out (FIFO) structures or ring buffers are used as input buffers.

FIFO:

If the buffer is organized as FIFO, every new received interpolation data record is placed at the end of the queue, and the drive takes the next data record from the top of the queue. When the last item of a data record is stored, the buffer pointer is incremented in order to point to the next buffer position. With this buffer principle, the object buffer position has no affect. The FIFO buffer is organized as a cyclic buffer so that after the last buffer entry is updated (entry of max buffer size), the first entry may be available again depending on actual buffer size. When the buffer is full, an emergency is transmitted and the last message is discarded.

If buffer is empty interpolation is disabled and emergency may be transmitted if defined so by object 0x2F21 (refer to the Elmo CANopen Implementation Guide).

Ring buffer:

If the buffer is structured as a ring, the host can place an interpolation data record into any valid position in the ring by changing the pointer defined in buffer position. Without changing the buffer position, all data records are written at the same location. The drive reads the next entry out of the buffer by an internal ring pointer. It is set to the first data record with buffer clear, after the reorganization of the input buffer. The user cannot exceed the max buffer

Page 96
Image 96
Elmo DSP 402 manual Sub-index, Buffer strategies, Fifo, Ring buffer