.

Recorder.TraceSource

The string representing the data source for the record at a specified index.

NOTE: Setting TraceSource will set TraceDataType and TraceMask to the default data type of specified data.

Version History

Introduced in MPX 2.0.

Type

String (read only)

Index

 
Index Type Description
UInt32 The index of the trace whose source string is to be accessed.
Valid values are 0 to (TraceCount-1) inclusive.

Common Exceptions

 
Error Occurs when...
Argument When the specified index exceeds (TraceCount-1).
Argument When setting TraceSource and the specified source string could not be interpreted.

Visual Basic

Syntax

Property TraceSource As String(index As UInt32)

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.TraceSource(1) = "MEIXmpBufferData.UserBuffer.Data[5]"
recorder.TraceDataType(1) = Mpx.DatatType.UInt32
recorder.TraceMask(1) = &H7FFFFF
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

Recorder1

C#

Syntax

string[] TraceSource;

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.TraceSource[1] = "MEIXmpBufferData.UserBuffer.Data[5]";
recorder.TraceDataType[1] = Mpx.DatatType.UInt32;
recorder.TraceMask[1] = 0x7FFFFF;
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

SetTrace
TraceCount
TraceDataType
TraceMask

 

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