Recorder.SetTrace
Configure a recorder’s trace source to a region of memory defined by a Map enumeration value.
Note: Calling SetTrace will set the TraceSource, TraceDataType and TraceMask properties.
Version History
Introduced in MPX 2.0.
Result
Void
Arguments
Overload 1
|
Argument |
Type |
Description |
index |
Int32 |
The index of the trace whose trace mask is to be accessed. Valid values are 0 to (TraceCount-1) inclusive. |
location |
Mpx.Map |
The data location family to be used as the source of data for the trace. |
|
Overload 2
|
Argument |
Type |
Description |
index |
Int32 |
The index of the trace whose trace mask is to be accessed. Valid values are 0 to (TraceCount-1) inclusive. |
location |
Mpx.Map |
The data location family to be used as the source of data for the trace. |
mapIndex1 |
Int32 |
The first index data location index to be used as the source of the data for the trace. |
|
Overload 3
|
Argument |
Type |
Description |
index |
Int32 |
The index of the trace whose trace mask is to be accessed. Valid values are 0 to (TraceCount-1) inclusive.
|
location |
Mpx.Map |
The data location family to be used as the source of data for the trace.
|
mapIndex1 |
Int32 |
The first index data location index to be used as the source of the data for the trace. |
mapIndex2 |
Int32 |
The second index data location index to be used as the source of the data for the trace.
|
|
Common Exceptions
|
Error |
Occurs when... |
Argument |
When the specified index exceeds (TraceCount-1). |
|
Visual Basic
Syntax
Sub SetTrace(index As UInt32, location As Mpx.Map)
Sub SetTrace(index As UInt32, location As Mpx.Map, mapIndex1 As Int32)
Sub SetTrace(index As UInt32, location As Mpx.Map, mapIndex1 As Int32, mapIndex2 As Int32)
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
Recorder1
C#
Syntax
void SetTrace(uint index, Mpx.Map location);
void SetTrace(uint index, Mpx.Map location, int mapIndex1);
void SetTrace(uint index, Mpx.Map location, int mapIndex1, int mapIndex2);
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
TraceCount
TraceSource
TraceDataType
TraceMask
Enumerations
Map
|