xPC Target    

Scope Object Properties

When using the target PC command-line interface, scope object properties are limited to those shown in the following table. Notice the difference between a scope index (0, 1, . . .) and the MATLAB variable name for the scope object on the host PC. The scope index is indicated in the top left corner of a scope window (SC0, SC1, . . .).

If a scope is running, you need to stop the scope before you can change a scope property.

The following table lists the syntax for the target commands that you can use on the target PC. The equivalent MATLAB syntax is shown in the right column, and the scope object name sc is used as an example for the MATLAB methods.

Target PC
MATLAB
numsamples scope_index = number
sc.NumSamples = number
decimation scope_index = number
sc.Decimation = number
scopemode scope_index = 0 or numerical, 1 or redraw, 2 or sliding, 3 or rolling
sc.Mode = 'numerical', 'redraw', 'sliding', 'rolling'
triggermode scope_index = 0, freerun, 1 software, 2, signal, 3, scope
sc.TriggerMode = 'freerun', 'software', 'signal', 'scope'
numprepostsamples scope_index = number
sc.NumPrePostSamples = number
triggersignal scope_index = signal_index
sc.TriggerSignal = signal_index
triggersample scope_index = number
sc.TriggerSample = number
triggerlevel scope_index = number
sc.TriggerLevel = number
triggerslope scope_index = 0, either, 1, rising, 2, falling
sc.TriggerSlope = 'Either', 'Rising', 'Falling'
triggerscope scope_index2 = scope_index1
sc.TriggerScope = scope_index1
triggerscopesample scope_index= integer
sc.TriggerSample = integer
Press function key for scope, and then press S or move mouse into the scope window.
sc.trigger


  Scope Object Methods Using Variables on the Target PC