rt_starttrace (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: rt

Requires: Real-Time Module and Real-Time Execution Trace Toolkit and MathScript RT Module




rt_starttrace(detail, buffer)

rt_starttrace(detail, buffer, threads)

rt_starttrace(detail, buffer, threads, vis)

bufSize = rt_starttrace

bufSize = rt_starttrace(detail)

bufSize = rt_starttrace(detail, buffer)

bufSize = rt_starttrace(detail, buffer, threads)

bufSize = rt_starttrace(detail, buffer, threads, vis)


Starts a trace session and optionally logs VI, thread, and user events that occur after this function executes. When you use this function to enable tracing on the RT target, the target continues tracing execution until you restart the target. Although the rt_stopsend and rt_stopsave functions stop logging the trace data, they do not stop tracing execution.




Name Description
detail Specifies whether to enable logging of analysis and custom events in the trace session. detail is a Boolean. The default is false.
buffer Specifies the size, in bytes, of the buffer used to store the trace session. buffer is a 32-bit signed integer. The default is 250000. When you first call this function, the buffer size you specify remains in effect and subsequent calls to this function cannot resize the buffer until you restart the RT target.
threads Specifies whether to enable thread event logging. threads is a Boolean. The default is 1.
vis Specifies whether to enable VI event logging. vis is a Boolean. The default is 1.


Name Description
bufSize Returns the actual size of the buffer allocated to store the trace session. The actual size can be smaller than the size you specify for the buffer input if the RT target is low on memory.


(Real-Time Execution Trace Toolkit) This function is equivalent to the TraceTool Start Trace VI. You can use this function in conjunction with the Execution Trace Tool VIs. For example, you can use the rt_starttrace function to start a trace session and then use the TraceTool Stop Trace and Send VI to end the trace session after exiting the MathScript Node. However, you must have the Real-Time Execution Trace Toolkit installed and activated to use this function.

When you call this function in a MathScript Node with debugging disabled, LabVIEW operates with slightly reduced run-time performance for the node. This behavior causes tracing results to differ from the timing and execution characteristics of the VI when you are not tracing it with this function. To avoid this behavior, you can use the Execution Trace Tool VIs outside of the MathScript Node.

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized


rt_starttrace(true, 400000);
A = rand;
B = rand;
C = A*B;
A = B*C;
B = A*C;
C = A*B;

Related Topics



Not Helpful