◆ StreamingOutputsClear()

virtual void StreamingOutputsClear ( )
pure virtual

Clear the contents of the Streaming Output List.

ℹ This function is avaliable in RapidCode and RapidSequencer

Part of the Streaming Motion method group.

This method will clear the contents of the Streaming Output List – to be used when finished with Streaming Outputs or when preparing to append motion points with new Streaming Outputs
Sample Code:
// Constants
const int TOTAL_POINTS = 4; // total number of points
const int EMPTY_CT = -1; // Number of points that remains in the buffer before an e-stop
const int OUTPUT_INDEX = 0; // This is the index of the digital output that will go active when the user limit triggers.
const int NODE_INDEX = 0; // The EtherCAT Node we will be communicating with
double[] positions = { 1.0, 2.0, 3.0, 4.0 }; // These will be the streaming motion 5 positions.
double[] times = { 0.5, 0.1, 0.2, 0.4 }; // These will be the streaming motion 5 positions' time.
int outputEnableID = 2; // The motion element ID at which to set the output
int outputDisableID = 3; // The motion element ID at which to set the output
// Set up the inputs
//IOPoint output0 = IOPoint.CreateDigitalOutput(axis, RSIMotorGeneralIo.RSIMotorGeneralIo16); // Retrieve DOUT 1, Method 1: requires you know the io adress in memory, slightly faster
IOPoint output0 = IOPoint.CreateDigitalOutput(controller.IOGet(NODE_INDEX), OUTPUT_INDEX); // Retrieve DOUT 1 Method 2: only need to know node index
output0.Set(false); // Set the output low
// Set up Sync Outputs
axis.StreamingOutputsEnableSet(true); // Enable streaming output.
// ENABLE the Sync Output(s)
axis.StreamingOutputAdd(output0, true, outputEnableID); // This will turn DOUT1 High when the streaming motion reaches its 3rd motion point.
axis.StreamingOutputAdd(output0, false, outputDisableID); // This will turn DOUT1 Low when the streaming motion reaches its 4th motion point.
// DISABLE the Sync Output(s)
//axis.StreamingOutputAdd(output0, false, outPutEnableID);
axis.MovePT(RSIMotionType.RSIMotionTypePT, positions, times, TOTAL_POINTS, EMPTY_CT, false, true); // Start Streaming Motion
while (!axis.MotionDoneGet())
if (axis.MotionIdExecutingGet()>outputEnableID && axis.CommandPositionGet()<outputEnableID)
Assert.AreEqual(output0.Get(), true, "The output should be triggered");
Assert.AreEqual(output0.Get(), false, "The output should NOT be triggered");
axis.StreamingOutputsEnableSet(false); // Disable Sync Outputs.
axis.AmpEnableSet(false); // Disable the motor.
See also
StreamingOutputsEnableSet, StreamingOutputAdd