*SetFMU()
Sets simulation parameters for an FMU entity.
Syntax
*SetFMU(varname, static_hold, [error_tolerance_factor], [fmu_communication_interval], [use_address, ip_address] )
Note: [] optional arguments
{} choose any one argument among the list
Arguments
- varname
- The variable name of the FMU entity.
- static_hold
- Flag to hold the value of the FMU’s dynamic states constant during a static or quasi-static simulation. Valid values are NONE | STATIC_HOLD.
- error_tolerance_factor
- A scale factor that is multiplied to the displacement integration error tolerance define the integration error tolerance for the continuous states of the FMU.
- fmu_communication_interval
- Time interval of communication between the FMU and the solver.
- use_address
- Flag to run the FMU on a different machine. Valid values are true | false.
- ip_address
- The IP address of the machine where the FMU would be run. Applicable only when use_address is true.
Example
*BeginMDL( the_model, "Model", "2019.1" )
*Point( p_0, "Point 0" )
*Body( b_0, "Body 0", p_0, , , , )
*Graphic( gbox_0, "Box 0", BOX, b_0, CENTER, p_0, ZX, POINT, P_Global_Origin, VECTOR, V_Global_X, 1, 1, 1, 3 )
*TransJoint( j_0, "Joint 0", b_0, B_Ground, p_1, VECTOR, V_Global_X )
*Point( p_1, "Point 1" )
*ActionOnlyForce( frc_0, "Force 0", TRANS, b_0, p_4, Global_Frame )
*Point( p_2, "Point 2" )
*CoilSpring( sd_0, "SpringDamper 0", b_0, B_Ground, p_2, p_3 )
*Point( p_3, "Point 3" )
*Point( p_4, "Point 4" )
*ActionOnlyForce( frc_pid, "PID", TRANS, b_0, p_2, Global_Frame )
*Marker( m_0, "Marker 0", B_Ground, p_0 )
*SetPoint( p_0, , , 1.5 )
*SetPoint( p_1, , , 1 )
*SetPoint( p_2, -0.5, , 1.5 )
*SetPoint( p_3, -1, , 1.5 )
*SetBodyInertia( b_0, 1, 1e4, 1e4, 1e4 )
*SetCoilSpring( sd_0, LIN, 20, LIN, 10 )
*SetPoint( p_4, 0.5, , 1.5 )
*SetForce( frc_0, LIN, 1, LIN, , LIN )
*FMU( fmu_0, "FMU 0", "C:/PID/sb_PID.fmu", ModelExchange, {"1-DX({b_0.cm.idstring},{m_0.idstring})", “DY({b_0.cm.idstring},{m_0.idstring})”, “DZ({b_0.cm.idstring},{m_0.idstring})” }, {“0.5”, “true”, “1”} )
*SetForce( frc_pid, EXPR, `ARYVAL({fmu_0.y_array.idstring},1)`, LIN, , LIN )
*SetFMU( fmu_0, STATIC_HOLD, 1.0, 0.001, true, "234.5.43.194" )
*EndMDL()
Context
Comments
Use the *FMU() statement to create a functional mock-up unit (FMU).