| xPC Target™ | ![]() |
MATLAB® command line
addsignal(scope_object_vector, signal_index_vector) scope_object_vector.addsignal(signal_index_vector)
Target command line
addsignal scope_index = signal_index, signal_index, . . .
scope_object_vector | Name of a single scope object or the name of a vector of scope objects. |
signal_index_vector | For one signal, use a single number. For two or more signals, enclose numbers in brackets and separate with commas. |
scope_index | Single scope index. |
addsignal adds signals to a scope object. The signals must be specified by their indices, which you can 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.
Note You must stop the scope before you can add a signal to it. |
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, as shown below.
sc1.Signals
Signals = 1 : Signal Generator
0 : Integrator1Another way 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]
The xPC Target™ scope object methods remsignal and set (scope object).
The target object methods addscope and getsignalid
![]() | addscope | cd | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |