Main Content

modifyDisplayChannel

Modify properties of Logic Analyzer display channel

Description

example

modifyDisplayChannel(scope,tag,Name,Value)modifies the properties oftagusing properties specified by one or more name-value pairs. Enclose each property name in single quotes.

Examples

collapse all

创建一个dsp.LogicAnalyzerobject with four channels. CallmodifyDisplayChannelto set the radix of each of the channels. Run the scope in a loop to display the waves.

scope = dsp.LogicAnalyzer('NumInputPorts',4,'DisplayChannelFormat','Digital'); scope.TimeSpan = 12; modifyDisplayChannel(scope,1,'Name','Index','Radix','Unsigned decimal'); modifyDisplayChannel(scope,2,'Name','Fi_hex','Radix','Hexadecimal'); modifyDisplayChannel(scope,3,'Name','Fi_bin','Radix','Binary'); modifyDisplayChannel(scope,4,'Name','Fi_actual','Radix','Signed decimal');forii = 1:20 fival = fi((ii-1)/16,0,4,4); scope(ii,fival,fival,fival);end

Use functions to construct and manipulate a dsp.LogicAnalyzer System object.

Display Waves on Logic Analyzer scope.

scope = dsp.LogicAnalyzer('NumInputPorts',2); stop = 30;forcount = 1:stop sinValVec = sin(count/stop*2*pi); cosValVec = cos(count/stop*2*pi); cosValVecOffset = cos((count+10)/stop*2*pi); scope([count (count-(stop/2))],[sinValVec cosValVec cosValVecOffset])end

Reorganize Display

hide(scope) digitalDividerTag = addDivider(scope,'Name','Digital','Height',20); analogDividerTag = addDivider(scope,'Name','Analog','Height',40); tags = getDisplayChannelTags(scope); modifyDisplayChannel(scope,tags{1},'InputChannel',1,...'Name','Ramp Digital','Height',40); modifyDisplayChannel(scope,tags{2},'InputChannel',2,...'Name','Waves Analog','Format','Analog','Height',80); moveDisplayChannel(scope,digitalDividerTag,'DisplayChannel',1) moveDisplayChannel(scope,tags{2},'DisplayChannel',length(tags)) show(scope)

Duplicate Wave and Check Information

hide(scope) addWave(scope,'InputChannel',2,'Name','Waves Digital','Format','Digital',...'Height',30,'DisplayChannel',3); show(scope)

Remove Dividers

hide(scope) deleteDisplayChannel(scope,digitalDividerTag) deleteDisplayChannel(scope,analogDividerTag) show(scope)

Clear variables

clearanalogDividerTagcosValVeccosValVecOffsetcountdigitalDividerTagduplicateWavescopesinValVecstoptags

Input Arguments

collapse all

The Logic Analyzer object for which you want to modify a display channel, specified as a handle to thedsp.LogicAnalyzerobject.

The tag identifying which display channel to modify.

Example:modifyDisplayChannel(scope,tag)

Example:modifyDisplayChannel(scope,'W4')

Data Types:char|string

The first section on Name-Value Pair Arguments shows the properties you can set if the display channel contains a wave. The second section on Name-Value Pair Arguments shows the properties you can set if the display channel contains a divider.

Name-Value Arguments

Specify optional comma-separated pairs ofName,Valuearguments.Nameis the argument name andValueis the corresponding value.Namemust appear inside quotes. You can specify several name and value pair arguments in any order asName1,Value1,...,NameN,ValueN.

Example:'InputChannel',2,'Color','Blue'指定一波应该添加到输入查nnel 1 and colored blue.

Color of the wave, specified as an[R G B]value or one of the following:

  • 'Black'

  • 'Blue'

  • 'Cyan'

  • 'Default'

  • 'Green'

  • 'Magenta'

  • 'Red'

  • 'White'

  • 'Yellow'

When you choose'Default', the value of theDisplayChannelColorproperty in the Logic Analyzer is used.

Example:'Color','Blue'

Example:'Color',[0,0,1]

Data Types:char|string|double|single|uint8|uint16|uint32|uint64|int8|int16|int32|int64

Specify as a scalar numeric value the display channel that shows this wave. By default, the wave is added to the end of the display.

Example:'DisplayChannel',2

Data Types:double|single|uint8|uint16|uint32|uint64|int8|int16|int32|int64

Specify as a scalar nonnegative integer the font size in points. When you choose 0, the value of theDisplayChannelFontSizeproperty in the Logic Analyzer is used.

Example:'FontSize',8

Data Types:double

When you choose'Default', the value of theDisplayChannelFormatproperty in the Logic Analyzer is used.

Example:'Format','Digital'

Data Types:char|string

Specify as a scalar integer the height of the wave in the display in units of 16 pixels. When you choose 0, the value of theDisplayChannelHeightproperty in the Logic Analyzer is used.

Example:'Height',2

Data Types:double

This property specifies the input channel whose data is used for this wave. By default, it will connect the first input to this wave.

Example:'InputChannel',2

Data Types:double|single|uint8|uint16|uint32|uint64|int8|int16|int32|int64

Specify the name that you would like to set for the new wave.

Example:'Name','MyWave'

Data Types:char|string

When the input signals are of class double, single, or logical, you should not set this property. When you choose'Default', the value of theDisplayChannelRadixproperty in the Logic Analyzer is used.

Data Types:char|string

Name-Value Arguments

Specify optional comma-separated pairs ofName,Valuearguments.Nameis the argument name andValueis the corresponding value.Namemust appear inside quotes. You can specify several name and value pair arguments in any order asName1,Value1,...,NameN,ValueN.

Example:'DisplayChannel',2,'Name','MyDivider'specifies that a divider should be added to display channel 2 and named “MyDivider”.

Specify as a scalar numeric value the display channel that shows this divider. By default, the divider is added to the end of the display.

Example:'DisplayChannel',2

Data Types:double|single|uint8|uint16|uint32|uint64|int8|int16|int32|int64

Specify, in pixels, the height of the divider as a scalar integer in the range 8-200. If you choose 0, the value of theDisplayChannelHeightproperty in the Logic Analyzer is used.

Example:'Height',2

Data Types:double

Specify the name that you would like to set for the new divider.

Example:'Name','MyDivider'

Data Types:char|string

Introduced in R2013a