v10.50 v10.55 Alpha v10.54 Alpha v10.53 Alpha v10.52 Alpha v10.51 Alpha
v10.50 v10.55 Alpha v10.54 Alpha v10.53 Alpha v10.52 Alpha v10.51 Alpha

Analyzer Control Instructions

You can control the USBTracer™ from the script.

StartRecording Instruction

You can instruct the application to start recording on USBTracer.

StartRecording ([ recording_options, trace_file, keep_old_trace ] )

Parameters

RecOpt

Optional parameter specifying the path to the file containing the recording options. If omitted, the current USBTracer recording options are used.

TraceName

Optional parameter specifying a file name for the recorded trace. If omitted, the file name provided in the recording options is used.

KeepOldTrace

Optional parameter specifying that the application does not overwrite a trace with the same file name but uses a similar but different new file name. If omitted, the old trace file is overwritten.

Example

Main
{
StartRecording( "C:\\my_rec.rec", "C:\\USB\Test1.usb" )

Send TX_PACKET
Send TX_PACKET

StartRecording( RecOpt = "C:\\my_rec.rec" )
}

StopRecording Instruction

You can instruct the application to stop recording on USBTracer.

StopRecording ( [ wait_for_trace, force_stop_recording ] )

Parameters

WaitForTrace

Optional parameter specifying that the Voyager USB 3.2 Exerciser does not proceed until the application uploads the recorded trace. If omitted, the application stops recording and starts the uploading process, and Voyager USB 3.2 Exerciser proceeds without waiting until the trace file is fully uploaded.

ForceStopRec

Optional parameter specifying that the application stops recording and starts the uploading process even if the recording was not started by the script. If omitted, the application stops recording and starts the uploading process only if the script started the recording.

Examples

Main
{
# Stop recording and wait for trace even if the script 
  # did not start it.
StopRecording( 1, 1 )
  
StartRecording( "C:\\my_rec.rec", "C:\\Test1.usb" )
Send TX_PACKET
Send TX_PACKET
  StopRecording( 1 )# Stop recording and wait for trace.
  
StartRecording( TraceName = "C:\\Test2.usb" )
Send TX_PACKET
Send TX_PACKET
  StopRecording( 1 ) # Stop recording and wait for trace.
}

TriggerAnalyzer instruction

You can instruct the application to trigger USBTracer.

TriggerAnalyzer

Example

Main
{
StartRecording( "C:\\my_rec.rec", "C:\\Test1.usb" )
Send TX_PACKET
Send TX_PACKET
  TriggerAnalyzer# Send a trigger signal to the analyzer.
Send TX_PACKET
Send TX_PACKET
}

Trace Instruction

You can instruct the application to display a trace message in the application output window.

Trace( trace_message )

trace_message: Trace message to display.

Note: This instruction does not block script execution. If many trace messages are sent in a short period of time, some of them may be dropped and not displayed. Use the Trace_B instruction to guarantee trace message display.

Examples

Main
{
Send TX_PACKET
Send TX_PACKET

    Trace( "2 packets were sent." ) # Does not block script execution.
    
Send TX_PACKET
Send TX_PACKET

    Trace( "4 packets were sent." ) # Does not block script execution.
}

Trace_B Instruction

You can instruct the application to display a trace message in the application output window. The script stops and does not proceed until the application displays the trace message.

Trace_B( trace_message )

trace_message: Trace message to display.

Note: This instruction blocks script execution to guarantee trace message display. However, this can break precise timing sequences. Use the Trace instruction if you do not want to block script execution.

Examples

Main
{
Send TX_PACKET
Send TX_PACKET

    Trace_B( "2 packets were sent." ) # Blocks script execution.
    
Send TX_PACKET
Send TX_PACKET

    Trace_B( "4 packets were sent." ) # Blocks script execution.
}