.

Recorder.BufferAdd

Creates a buffer of Recorder.TraceCount points and of seconds duration that the recorder object will fill and return to the OnRecorderBufferDone event once it is full.

NOTE: The property Recorder.TraceCount cannot be changed while a recorder object still has buffers that need to be filled. To remove buffers from a recorder, use the Recorder.RemoveBuffers method.

Version History

Introduced in MPX 2.0.

Arguments

 
Argument Type Description
 seconds
Double
The duration of the data that the new buffer is set to hold.

Visual Basic

Syntax

Sub AddBuffer(seconds As Double)

Sample Code

 
Dim recorder As Mpx.Recorder = controller.Recorder(3)

' Acquire ownership of the Recorder
recorder.Acquire()

 ' Configure Recorder
recorder.ConfigurationBegin()
recorder.TraceCount = 2
recorder.SetTrace(0, Mpx.Map.SampleCounter)
recorder.SetTrace(1, Mpx.Map.CommandPosition, 2)
recorder.Period = 0.01 ' 10 milliseconds
recorder.ConfigurationEnd()

' Add two buffers
recorder.BufferAdd(1.0) ' 1 second = 100 samples
recorder.BufferAdd(1.0)

' Start Recorder
recorder.Start()


Sample Application

 

C#

Syntax

void BufferAdd(double seconds);

Sample Code

 
Mpx.Recorder recorder = controller.Recorder[3];

// Acquire ownership of the Recorder
recorder.Acquire();

 // Configure Recorder
recorder.ConfigurationBegin();
recorder.TraceCount = 2;
recorder.SetTrace(0, Mpx.Map.SampleCounter);
recorder.SetTrace(1, Mpx.Map.CommandPosition, 2);
recorder.Period = 0.01; // 10 milliseconds
recorder.ConfigurationEnd();

 // Add two buffers
recorder.BufferAdd(1.0); // 1 second = 100 samples
recorder.BufferAdd(1.0);

// Start Recorder
recorder.Start();

 

See Also

Start
BuffersRemove

Controller Object:
RecorderBufferEvent

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering