Documentation

getSignal

Signal mapped to signal name

Syntax

MAPPEDSIGNAL = getSignal(OBJ, SIGNALNAME)

Description

MAPPEDSIGNAL = getSignal(OBJ, SIGNALNAME) Gets the signal object currently mapped to the SIGNALNAME in this TestCase OBJ.

If SIGNALNAME is not an existing name an error will be thrown.

Examples

Get a signal using getSignal().

 testCase = systest.TestCase('Test Case 1');
 testCase.In1 = systest.signals.Signal('Step');
 getSignal(testCase, 'In1')

Get a signal using getSignal() to get all signals.

testCase1 = systest.TestCase('Test Case 1');
testCase1.In1 = systest.signals.Signal('Step');

testCase2 = systest.TestCase('Test Case 2');
testCase2.In1 = systest.signals.Signal('Ramp');

testCases = [testCase1 testCase2];

getSignal(testCases, 'In1')

Get a signal by referencing its name space using '.' syntax.

 testCase = systest.TestCase('Test Case 1');
 testCase.In1 = systest.signals.Signal('Step');
 testCase.In1
Was this topic helpful?