Atlas® Digital Amplifier Complete Technical Reference
148
6
SetTraceMode
B0
h
GetTraceMode
B1
h
Syntax
SetTraceMode
mode
GetTraceMode
Motor Types
Arguments
Name
Instance
Encoding
roll mode
One Time
0
Rolling Buffer
1
Trigger
Internal Trigger
0
External Trigger
1
Packet
Structure
Description
SetTraceMode
sets the buffer usage for the next trace. In
One Time
mode, the trace continues until the
trace buffer is filled, then stops. In
Rolling Buffer
mode, the trace continues from the beginning of the
trace buffer after the end is reached. When in the rolling mode, values stored at the beginning of the
trace buffer are lost if they are not read before being overwritten by the wrapped data.
The Roll Mode controls buffer usage. In One Time mode, the trace continues until the trace buffer is
filled, then stops. In Rolling Buffer mode, the trace continues writing at the beginning of the buffer after
the end is reached. When in the rolling mode, values stored at the beginning of the trace buffer are lost
if they are not read before being overwritten by the wrapped data.
The Trigger bit controls the timing of trace samples. In Internal Trigger mode the trace timing is
controlled by the TracePeriod register and Atlas internal clock; a trace capture is done every TracePeriod.
In External Trigger mode the trace timing is controlled by the trace bit in the SPI torque command;
exactly one trace capture is done immediately after a set trace bit is received, so that trace timing is
controlled externally. Internal trigger mode gives lower jitter and a higher possible trace sampling rate,
but external trigger mode allows approximate synchronization with an external clock.
GetTraceMode
returns the value for the trace mode.
Restrictions
see
GetTraceStatus
,
Set/GetTracePeriod
,
Set/GetTraceStart
DC Brush
Brushless DC
Microstepping
SetTraceMode
write
checksum
B0
h
15
8 7
0
Data
write
0
Trigger
0
roll
mode
15
8
7
6
1
0
GetTraceMode
write
checksum
B1
h
15
8 7
0
Data
read
0
Trigger
0
roll
mode
15
8
7
6
1
0