xPC Target | ![]() ![]() |
Adds signals to a scope represented by a scope object
Syntax
addsignal(scope_object_vector, signal_index_vector)
scope_object_vector.addsignal(signal_index_vector)
addsignal scope_index = signal_index, signal_index, . . .
Arguments
Description
Method of a scope object. The signals must be specified by their index, which may be retrieve using the target object method getsignalid
. If the scope_object_vector has two or more scope objects, the same signals are assigned to each scope.
Examples
Add signals 0
and 1
from the target object tg
to the scope object sc1. The signals are added to the scope, and the scope object property Signals is updated to include the added signals.
sc1 = getscope(tg,1) addsignal(sc1,[0,1]) or sc1.addsignal([0,1])
Display a list of properties and values for the scope object sc1
with the property Signals shown below.
sc1.Signals Signals = 1 : Signal Generator 0 : Integrator1
Other ways to add signals without using the method addsignal is to use the scope object method set
.
set(sc1,'Signals', [0,1]) or sc1.set('signals',[0,1],
Or to directly assign signal values to the scope object property Signals.
sc1.signals = [0,1].
See Also
The xPC Target scope object methods remsignal
and
set
. The target object method addscope and
getsignalid
.
![]() | Using the Method Syntax with Scope Objects | get | ![]() |