readMeasurement
从直接内存读取和缩放指定的测量变量值
说明
通过 XCP 通道对象 value
= readMeasurement(chanObj
,measurement
)chanObj
读取并缩放指定 measurement
的值。此操作直接从服务器模块的内存中读取。
示例
从 XCP 通道测量变量读取值
从 XCP 通道测量变量读取值,按名称标识。
a2lObj = xcpA2L('myA2Lfile.a2l'); chanObj = xcpChannel(a2lObj,'CAN','Vector','Virtual 1',1); connect(chanObj); value = readMeasurement(chanObj,'limit')
100
或者,创建一个测量变量对象并读取其值。
measObj = a2lObj.MeasurementInfo('limit');
value = readMeasurement(chanObj,measObj)
100
输入参数
chanObj
— XCP 通道
通道对象
XCP 通道,指定为 XCP 通道对象。
示例: xcpChannel()
measurement
— XCP 通道测量变量
测量变量对象 | 字符
XCP 通道测量变量,指定为字符向量或测量变量对象。
示例: 'limit'
数据类型: char
输出参量
value
— 从测量变量读取的值
测量变量值
从测量变量读取的值,以测量变量支持的类型形式返回。
版本历史记录
在 R2018a 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
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)