这个示例展示了读取校准文件并使用翻译表校准测量读数的典型工作流。
读取引擎管理ECU校准文件。
a2lobj = xcpA2L (“ems.a2l”);
连接ECU。
ch = xcpChannel (a2lobj,UDP的,“192.168.1.55”, 5555);
设置表,转换到一个踏板的位置扭矩需求。
writeCharacteric (ch,“tq_accel_request”,...[0 24 9 14 24 48 72 96 144 192 204 216 228 240];
将踏板位置设置为50%。
writeMeasurement (ch,“pedal_position”, 50);
阅读的需求。
值= readMeasurement (ch,“tq_demand”)
值= 96