valueTableText
Look up value of table text for signal
Description
Examples
View Table Text for Signal
Create a CAN database object, and select a message and signal to retrieve their table text.
Identify a message.
db = canDatabase('J1939DB.dbc');
m = db.MessageInfo(1)
m = Name: 'A1' Comment: 'This is A1 message' ID: 419364350 Extended: 1 J1939: [1x1 struct] Length: 8 Signals: {2x1 cell} SignalInfo: [2x1 struct] TxNodes: {'AerodynamicControl'} Attributes: {4x1 cell} AttributeInfo: [4x1 struct]
Select one of the message signals.
s = m.SignalInfo(2)
s = Name: 'EngGasSupplyPress' Comment: 'Gage pressure of gas supply to fuel metering device.' StartBit: 8 SignalSize: 16 ByteOrder: 'LittleEndian' Signed: 0 ValueType: 'Integer' Class: 'uint16' Factor: 0.5000 Offset: 0 Minimum: 0 Maximum: 3.2128e+04 Units: 'kPa' ValueTable: [4x1 struct] Multiplexor: 0 Multiplexed: 0 MultiplexMode: 0 RxNodes: {'Aftertreatment_1_GasIntake'} Attributes: {3x1 cell} AttributeInfo: [3x1 struct]
Retrieve second table text for a specified signal.
vtt = valueTableText(db,m.Name,s.Name,2)
vtt = 'pump error'
Input Arguments
db
— CAN database
CAN database object
CAN database, specified as a CAN database object.
Example: db = canDatabase(_____)
MsgName
— Message name
char vector | string
Message name, specified as a character vector or string. You can view available message names
from the db.Messages
property.
Example: 'A1'
Data Types: char
| string
SignalName
— Signal name
char vector | string
Signal name, specified as a character vector or string. You can view available signal names
from the db.MessageInfo(n).Signals
property.
Example: 'EngGasSupplyPress'
Data Types: char
| string
TableVal
— Table value
numeric value
Table value, specified as a numeric value.
Example: 2
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Output Arguments
vtt
— Table text
table text
Table text, returned as a character vector.
Version History
Introduced in R2015b
See Also
Functions
Properties
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)