This Function gathers all the faults in the model modelName, sets the values of the faults and saves it into the modelica script scriptName. The Integer maxSearchSize is needed to preallocate the number of searched elements.
This function creates a package with name packageName. In this package a hiarchial bus is build to which all faults can be easily coupled in the model ConnectBusToFaults.
function createFaultPackage extends FaultTriggering.Utilities.Icons.FaultFunction; input String modelName = "FaultTriggering.Examples.ActuatorExample.Actuator" "Model name"; input String scriptName = "SetFaults.mos" "Name of output script"; input String packageName = "Faults.mo" "Name of the Fault package created by the function"; input Boolean overWriteScripts = true "Replaces existing models without propmpting" annotation( choices(checkBox = true)); output FaultTriggering.Utilities.Records.Faults faults; end createFaultPackage;
Copyright
© 2012-2015, DLR Institute of System Dynamics and Control |