Export a custom variant characteristic object, export a custom variant criterion object, and generate variant coding section in the A2L file.
A model ECU description object has default variant coding section. Exporting a variant characteristic object is mandatory for the variant coding section to appear in the A2L file. You can modify the properties of variant coding section by using the set
function.
Open and Build Example Model
Open the example model ASAP2Demo
.
Build the model.
Create the ECU description object for the model.
Verify that there are no variant characteristics or variant criterion available in the description object.
Create and Add Custom Variant Characteristic
To add variant characteristic object to the ASAP2 file, create a custom variant characteristic.
Add the custom variant characteristic to the ECU description object.
Add one more custom variant characteristic to the ECU description object.
View Variant Characteristic Properties
Get the properties of the newly added variant characteristic by using this command.
Find and Filter Variant Characteristic
Find the variant characteristic objects present in the ECU description object.
Find variant characteristic objects by a property name.
Update Custom Variant Characteristic Object
Modify the existing variant characteristic VehicleSpeedMaxThd
and view the updated properties.
Create and Add Custom Variant Criterion
To add variant criterion object to the ASAP2 file, create a custom variant criterion.
Add the custom variant criterion to the ECU description object.
Add one more custom variant criterion to the ECU description object.
View Variant Criterion Properties
Get the properties of the newly added variant criterion by using this command.
Find and Filter Variant Criterion
Find the variant criterion objects present in the ECU description object.
Find variant criterion objects by a property name.
Update Custom Variant Criterion Object
Modify the existing variant criterion Fuel
and view the updated properties.
Delete Existing Variant Characteristic and Variant Criterion
Remove the newly added variant characteristic and variant criterion from the description object.
Update Variant Coding Properties
View the properties of default variant coding section.
Add variant forbidden condition to variant coding object by using the custom data property.
Export the ASAP2 file and verify that the variant coding section is present.