flex_flush_rdb

NI-Motion Functions

flex_flush_rdb

Device Compatibility

Device Compatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Xenus
N
NI SoftMotion Controller for CANopen—Accelnet
N

Flush Return Data Buffer

Usage

status = flex_flush_rdb(u8 boardID);

Purpose

Clears the Return Data Buffer by deleting all of the buffered data.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)

Using This Function

This function clears the Return Data Buffer by repeatedly reading the RDB until the buffer is empty. All return data packets in the RDB are deleted and nothing is returned by this function.

You typically use the Flush Return Data Buffer function after an error condition when the data in the Return Data Buffer is no longer valid or relevant. This function is also useful for flushing the RDB after a programming error has caused the buffer to become skewed. Buffer skew is when the data returned by a read function using the _rtn calling convention (such as Read Position) does not return the expected data but rather returns data requested by a previous function.

Refer to the motion controller documentation for more information about low-level communications protocols and return data packets.