writeMeasurement
缩放指定的测量变量值并将其写入直接内存
说明
writeMeasurement(
通过 XCP 通道对象 chanObj
,measurement
,value
)chanObj
缩放并写入指定 measurement
的值。此操作直接写入服务器模块上的内存。
示例
将值写入 XCP 通道测量变量
将一个值写入 XCP 测量变量并验证该值。
读取原始值。
a2lObj = xcpA2L('myA2Lfile.a2l'); chanObj = xcpChannel(a2lObj,'CAN','Vector','Virtual 1',1); connect(chanObj); measObj = a2lObj.MeasurementInfo('limit'); value = readMeasurement(chanObj,measObj)
100
写入一个新值。
newValue = 120; writeMeasurement(chanObj,measObj,newValue);
再次读取该值以验证更改。
readMeasurement(chanObj,measObj)
120
输入参数
chanObj
— XCP 通道
通道对象
XCP 通道,指定为 XCP 通道对象。
示例: xcpChannel()
measurement
— XCP 通道测量变量
测量变量对象 | 字符
XCP 通道测量变量,指定为字符向量或测量变量对象。
示例: 'curve1_8_uc'
数据类型: 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)