Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

Lamp

ランプでの信号値を反映した色の表示

  • Lamp block

ライブラリ:
Simulink / Dashboard

説明

Lamp ブロックは、接続している信号の値を示す色を表示します。シミュレーション中に必要な情報を示すように Lamp ブロックを設定するには、信号値と Lamp ブロックが表示する色を組み合わせた 1 つ以上の状態を指定します。Lamp ブロックをその他の Dashboard ブロックと共に使用し、モデル用にコントロールおよびインジケーターの対話型のダッシュボードを作成できます。

ランプ アイコン

いずれか 1 つの組み込みアイコンを選択するか、独自のカスタム アイコンをアップロードすることで、Lamp ブロックの外観を変更できます。組み込みアイコンには、基本的な形状、自動車関連のインジケーター ランプ、ワイヤレスのアイコンが含まれます。[アイコン] パラメーターを使用するか、ツールストリップ内のブロック タブを使用することで、Lamp ブロックのアイコンを変更できます。Dashboard ライブラリには、各アイコンに対してあらかじめ構成されたバージョンの Lamp ブロックをもつライブラリも含まれています。詳細については、アイコンを参照してください。

Lamp Icon drop-down menu showing basic shape icons, automotive indicator lamps, wireless icons, and the option to choose a custom icon

アイコンを選択するだけでなく Lamp ブロックの外観をカスタマイズする場合は、Customizable Blocks ライブラリの Lamp ブロックを使用して独自のインジケーター ランプを設計することを検討してください。

Dashboard ブロックの接続

Dashboard ブロックはモデル要素への接続に端子を使用しません。Dashboard ブロックをモデル内の信号に接続するには、接続モードを使用します。接続モードを使用すると、モデル内で Dashboard ブロックを接続するプロセスが簡単になり、特に複数のブロックを一度に接続する場合に便利です。Dashboard ブロックを 1 つ接続するには、ブロック ダイアログ ボックスの [接続] テーブルを使用することもできます。

ヒント

ノーマル モードとアクセラレータ モードのシミュレーション中に Dashboard ブロックの接続を変更できます。

接続モードに切り替えるには、接続する Dashboard ブロックをキャンバスで選択します。Simulink® ツールストリップに、選択したブロックのタイプの名前が付いたタブが表示されます。ブロックのタブで [接続] をクリックします。接続モードでは、信号やブロックを 1 つ以上選択すると、接続に使用できる信号のリストが表示されます。選択した Dashboard ブロックに接続する信号をリストから選択します。別の Dashboard ブロックを接続するには、接続するブロックで一時停止し、その上に表示される [接続] ボタンをクリックします。その後、モデルで 1 つ以上の信号およびブロックを選択し、接続する信号を選択します。

A Gauge block is in connect mode. To the right of the Gauge block is a Sine Wave block that connects to a Gain block that connects to an Outport block. To the right of the Outport block is the list of signals available for connection.

モデルで Dashboard ブロックの接続が完了したら、[ブロック] タブで [接続完了] をクリックします。

ヒント

ShowInitialText ブロック パラメーターをもつ関数 set_param を使用して、接続されていないブロックに表示されるメッセージを非表示にできます。ブロックを接続すると、メッセージも表示されなくなります。

制限

  • Dashboard Scope ブロックおよび Display ブロックを除き、Dashboard ブロックは実数のスカラー信号にのみ接続できます。

  • ツールストリップは、パネル内にあるブロックをサポートしません。

  • コメントアウトされたブロックには、ブロック ダイアログの [接続] テーブルを使用して Dashboard ブロックを接続することはできません。コメント化されたブロックに接続モードを使用して Dashboard ブロックを接続した場合、ブロックのコメントを解除するまでは Dashboard ブロックに接続された値が表示されません。

  • Dashboard ブロックは参照モデル内のモデル要素には接続できません。

  • モデルの階層構造をシミュレーションすると、参照モデル内の Dashboard ブロックで更新は実行されません。

  • Dashboard ブロックは、ラピッド アクセラレータ シミュレーションをサポートしていません。

  • シミュレーション中に Stateflow® 内のステート アクティビティまたはチャート データには Dashboard ブロックを接続できません。

  • Stateflow 内のステート アクティビティまたはチャート データには Dashboard ブロックをプログラムで接続できません。

  • アクセラレータ モード シミュレーションのためのブロックの削減または最適化により、一部の信号にはシミュレーションで使用できるデータが含まれないことがあります。Dashboard ブロックを使用してこのような信号を表示するには、信号をログ記録用にマークします。

パラメーター

すべて展開する

接続テーブルを使用してブロックに接続する信号を選択します。ブロックを信号に接続するには、次のようにします。

  1. 1 つ以上の信号を含むモデルで選択を行います。

  2. テーブルで接続する信号を選択します。

  3. [適用] をクリックします。

ヒント

シミュレーション中にモデルで Dashboard ブロックを信号に接続できます。

プログラムでの使用

ブロック パラメーター: Binding
型: Simulink.HMI.SignalSpecification
既定の設定: []

状態によって、表示色と接続している信号の値が一致します。各状態は、[状態] および [色] から構成されます。

  • 状態Lamp ブロックに指定した色を表示させる、接続している信号の値。

  • — 接続している信号の値が対応する [状態] の値に一致する場合のランプの色。標準色のパレットから選択するか、RGB 値でカスタムの色を指定できます。

[undefined] の状態は、接続している信号の値が [状態] テーブルで指定されたどの値にも一致しない場合の Lamp ブロックの色を指定します。[+] ボタンをクリックして、別の状態を追加します。

プログラムでの使用

Lamp ブロックの StateColor のパラメーターの値をプログラムで指定するには、次のフィールドを含む構造体の配列を使用します。

  • ValueLamp ブロックに指定した色を表示させる、スカラー double 信号値。

  • ColorLamp ブロックが表示する色を指定する 01 の間の値をもつ 13 列の [r g b] ベクトル。

lampState1.Value = 1;
lampState1.Color = [0 0 1];
lampState2.Value = 2;
lampState2.Color = [1 0 0];
lampStates = [lampState1 lampState2];
ブロック パラメーター: StateColors
型: 構造体配列
既定の設定: 構造体

ColorDefault パラメーターは、接続している信号の値が指定された状態のどの値にも一致しない場合の Lamp ブロックの色を指定します。ColorDefault パラメーターを値が 0 から 1 の間の、13 列の [r g b] ベクトルとして指定します。

ブロック パラメーター: ColorDefault
型: [r g b] ベクトル
既定の設定: [0.7529 0.7529 0.7529]

アイコンを使用して、モデル内での Lamp ブロックの外観を設定します。形状、自動車関連、ワイヤレスの組み込みアイコンから選択できます。または、独自のカスタム SVG ファイルをアイコンとしてアップロードできます。

アイコン オプションを表示するには、[アイコン] タブで [Icon Type] を選択します。独自の SVG ファイルをブロック アイコンとして使用するには、[カスタム][Icon Type] として選択し、SVG ファイルをアップロードします。Lamp ブロックの状態を示す色は次の SVG 要素に適用できます。

  • altGlyph

  • circle

  • ellipse

  • path

  • polygon

  • rect

  • text

  • textPath

  • tref

  • tspan

形状アイコン

アイコン基本形状のライブラリ ブロック名プログラムで使用する値

Lamp icon: a solid gray circle

LampDefault

Check1 icon: a check mark

Check1Check1

Check2 icon: a check mark with slightly curved lines

Check2Check2

Check3 icon: the outline of a check mark

Check3Check3

Check4 icon: a check mark with a divot along its outline

Check4Check4

Circle icon: a solid black circle

CircleCircle

Ex1 icon: a cross mark

Ex1Ex1

Ex2 icon: a cross mark with one curved line

Ex2Ex2

Ex3 icon: the outline of a cross mark

Ex3Ex3

Ex4 icon: a cross mark with a divot along the outline

Ex4Ex4

Face icon: the outline of a face with a closed mouth in a straight line

FaceFace

Frown1 icon: the outline of a face with an open downturned mouth

Frown1Frown1

Frown2 icon: the outline of a face with a closed downturned mouth

Frown2Frown2

Hexagon icon: a solid hexagon

HexagonHexagon

Pentagon icon: a solid pentagon

PentagonPentagon

Rectangle icon: a solid rectangle

RectangleRectangle

Smile1 icon: the outline of a face with an open upturned mouth

Smile1Smile1

Smile2 icon: the outline of a face with a closed upturned mouth

Smile2Smile2

Solid Face icon: a solid face with a closed mouth in a straight line

Solid FaceSolidFace

Solid Frown1 icon: a solid face with an open downturned mouth

Solid Frown1SolidFrown1

Solid Frown2 icon: a closed downturned mouth

Solid Frown2SolidFrown2

Solid Smile1 icon: a solid face with an open upturned mouth

Solid Smile1SolidSmile1

Solid Smile2 icon: a solid face with a closed upturned mouth

Solid Smile2SolidSmile2

Square icon: a solid square

SquareSquare

Triangle icon: a solid triangle

TriangleTriangle

自動車関連アイコン

アイコン自動車関連のインジケーター ランプのライブラリ ブロック名プログラムで使用する値

Adaptive Cruise Control icon: a speedometer with an arrow pointing to a tickmark and the silhouette of a car in the background

Adaptive Cruise ControlAdaptiveCruiseControl

Adaptive Cruise Control Failure icon: a speedometer with an exclamation mark next to it and the silhouette of a car in the background

Adaptive Cruise Control FailureAdaptiveCruiseControlFailure

Antilock Brake System icon: a circle labeled "ABS" in a set of parentheses

Antilock Brake SystemAntilockBrakeSystem

Battery icon: the outline of a battery with a plus symbol on the positive pole, and a negative symbol on the negative pole

BatteryBattery

Check Engine icon: the outline of an engine labeled "Check Engine"

Check EngineCheckEngine

Check Engine2 icon: the outline of an engine with the silhouette of a lightning rod on it and the word "CHECK" underneath it

Check Engine2CheckEngine2

Cruise Control icon: a speedometer with an arrow pointing to one of the tickmarks

Cruise ControlCruiseControl

Eco Mode icon: a solid leaf shape labeled "ECO"

Eco ModeEcoMode

Electronic Stability icon: a circle labeled "ESP" in a set of parentheses

Electronic StabilityElectronicStability

Engine icon: the silhouette of an engine

EngineEngine

Engine Coolant Temp icon: a thermometer with waves in the background

Engine Coolant TempEngineCoolantTemp

Engine Failure icon: the silhouette of an engine with an exclamation mark on it

Engine FailureEngineFailure

Engine Heating icon: the silhouette of an engine with three wavy arrows pointing upwards on it

Engine HeatingEngineHeating

Engine Oil icon: the silhouette of an oil can

Engine OilEngineOil

Exterior Bulb Failure icon: the silhouette of a glowing light bulb with an exclamation mark on it

Exterior Bulb FailureExteriorBulbFailure

Front Fog Light icon: the outline of a fog light lamp emitting rays of light to the left that are depicted as diagonal lines on top of a wavy vertical line that represents the fog

Front Fog LightFrontFogLight

Fuel icon: the silhouette of a gas pump with an arrow pointing left on it

FuelFuel

Hazards icon: the outline of a warning triangle

HazardsHazards

Headlamp Leveling icon: the outline of a lamp emitting rays of light with an arrow pointing clockwise above them and an arrow pointing counterclockwise below them

Headlamp LevelingHeadlampLeveling

High Beams icon: the outline of a lamp emitting horizontal rays of light

High BeamsHighBeams

Hill Descent Control icon: the outline of a car driving down a slope

Hill Descent ControlHillDescentControl

Lighting Switch icon: the silhouette of a glowing light bulb

Lighting SwitchLightingSwitch

High Beams icon: the outline of a lamp emitting rays of light that run diagonally downward

Low BeamsLowBeams

Parking Assistance icon: the letter "P" next to a solid triangle, and the "P" emits a detection signal represented as three curved lines aimed at the triangle

Parking AssistanceParkingAssistance

Rear Fog Light icon: the outline of a fog light lamp emitting rays of light to the right that are depicted as horizontal lines on top of a wavy vertical line that represents the fog

Rear Fog LightRearFogLight

Side Lights icon: the outline two lamps emitting rays of light to the left and right

Side LightsSideLights

Stability Control icon: the silhouette of a car with wavy lines behind it

Stability ControlStabilityControl

Stability Control Off icon: the silhouette of a car with wavy lines behind it and the word "OFF" underneath

Stability Control OffStabilityControlOff

Tire Monitor icon: the outline of the cross-section of a tire with an exclamation mark on it

Tire MonitorTireMonitor

Traction Control icon: the outline of the cross-section of a tire with the label "TC"

Traction ControlTractionControl

Traction Control Off icon: the outline of the cross-section of a tire with the label "TC" and a diagonal slash through the whole image

Traction Control OffTractionControlOff

Traction Control Failure icon: the outline of the cross-section of a tire with the label "TC" and an exclamation mark next to it

Traction Control FailureTractionControlFailure

Turn Signal Left icon: a solid arrow pointing left

Turn Signal LeftTurnSignalLeft

Turn Signal Right icon: a solid arrow pointing right

Turn Signal RightTurnSignalRight

ワイヤレス アイコン

アイコンアイコン名プログラムで使用する値

Network icon: the wireless internet connection icon

NetworkNetwork

Network No Signal icon: the wireless internet connection icon grayed out,with a crossed-out circle next to it

Network No SignalNetworkNoSignal

Network Transmission icon: a wireless internet tower

Network TransmissionNetworkTransmission

Network3G icon: the wireless internet connection icon with "3G" next to it

Network3GNetwork3G

Network4G icon: the wireless internet connection icon with "4G" next to it

Network4GNetwork4G

Network5G icon: the wireless internet connection icon with "4G" next to it

Network5GNetwork5G

ヒント

  • ツールストリップ内のブロック タブを使用して、Lamp ブロックのアイコンを変更できます。

  • Dashboard ライブラリには、各アイコンに対してあらかじめ構成された Lamp ブロックをもつライブラリがあります。

  • アイコンを選択するだけでなく Lamp ブロックの外観をカスタマイズする場合は、Customizable Blocks ライブラリの Lamp ブロックを使用して独自のインジケーター ランプを設計することを検討してください。

プログラムでの使用

ブロック パラメーター: Icon
型: string | 文字ベクトル
既定の設定: 'Default'

ブロック ラベルの位置。ブロックがモデル内の要素に接続されている場合、ラベルは接続された要素の名前です。

プログラムでの使用

ブロック パラメーター: LabelPosition
型: 文字ベクトル
値: 'Top' | 'Bottom' | 'Hide'
既定の設定: 'Top'

ブロックの不透明度。0 ~ 1 のスカラー値として指定します。

例: 0.5

プログラムでの使用

ブロック パラメーター: Opacity
タイプ: スカラー
既定の設定: 1

ブロックの特性

データ型

Boolean | double | enumerated | fixed point | half | integer | single

直達

いいえ

多次元信号

いいえ

可変サイズの信号

いいえ

ゼロクロッシング検出

いいえ

拡張機能

バージョン履歴

R2015a で導入