matlab test bench,Test Bench Verification

Test Bench Verification

The Simulink®

PLC Coder™ software simulates your model and captures the input and output signals

for a subsystem. The captured input and output signal data is the test bench data. You

can generate a test bench or test harness by using the test bench data. See Generate Testbench for Subsystem.

You can verify that the output of the generated code is numerically and functionally

equivalent to the output of the Simulink model by using the generated test bench. This

table shows the error tolerance for the different data types. The comparison is between

the outputs of the generated code (expected values) and outputs of the model (actual

values).

Data TypeComparisonError Toleranceintegerabsolute0

booleanabsolute0

singlerelative0.0001

doublerelative0.00001

The relative tolerance comparison for single or double data types uses

this

logic:

IF ABS(actual_value - expected_value) > (ERROR_TOLERANCE * expected_value) THEN

testVerify := FALSE;

END_IF;

To verify the generated code by using the test bench, import the generated structured

text and the test bench data into your target IDE. You can import test bench code either

manually or automatically. See Import and Verify Structured Text Code.

Related Topics

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值