Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

rt_loguserevent (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

Syntax

rt_loguserevent(eventid)

Description

Logs a user-defined event during a trace session. This function can be particularly helpful when tracing through a MathScript Node. You can log user events to determine which point in the trace session corresponds to which line of the MathScript Node. For example, you can log a user event before and after a certain section of the MathScript Node. Then, you can tell if the problem lies between the two user event flags shown in the Real-Time Execution Trace Tool.

Details

Examples

Inputs

Name Description
eventid Specifies the event code used to identify the custom event flag. eventid is a 32-bit unsigned integer. However, this function returns an error if you specify a number outside the range of valid event codes, 0–255.

Details

(Real-Time Execution Trace Toolkit) This function is equivalent to the TraceTool Log User Event VI. You can use this function in conjunction with the Execution Trace Tool VIs. For example, you can use the TraceTool Start Trace VI to start a trace session before entering the MathScript Node, then use the rt_loguserevent function to log a user event in the trace session. 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 divide your script among multiple MathScript Nodes and use the TraceTool Log User Event VI between the MathScript Nodes.

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

Examples

rt_starttrace(true, 400000);
A = rand;
B = rand;
C = A*B;
rt_loguserevent(1);
A = B*C;
B = A*C;
C = A*B;
rt_loguserevent(2);
rt_stopsend('MyHostPC');

Related Topics

rt_loadsend
rt_starttrace
rt_stopsave
rt_stopsend


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit