The user can set co-simulation environment for MATLAB/Simulink.
Figure 1-a Simulink dialog box [Simulink Host]
Figure 1-b Simulink dialog box [RecurDyn Host]
• Interface Version: Changes the Matlab communication method.
• 1.0: Preexistence user communication method. This version is supported for old version Matlab(~7.7).
Figure 3 Function Block Parameter RecurDyn Plant dialog box for 1.0 version
• 2.0: New expansion communication method. This version is for more new version Matlab (7.4~latest version)(This option is default).
o In the case of Simulink Host Mode, Output File Name can be defined when exporting M-file to create Plant block.
o In the case of Simulink Host Mode, Create Output Folder option can be controlled at RecurDyn Plant Block in a Simulink model. (This function is able to control if Create Output Folder option in RecurDyn is unchecked.)
Figure 4 Function Block Parameter RecurDyn Plant dialog box for 2.0 version
• 3.0: This version is supported from Matlab 2015a version. The number of Plant Input and Plant Output can be defined until 10,000 with this version.
• Host Program: Allows the user to select the host program. A host program means a program that run the other program with batch job for co-simulation.
• Plant File Name: Shows the RecurDyn model file name.
• Plant Input: Allows to access the Plant Input List dialog box. For more information, click here.
• Plant Output: Allows to access the Plant Output List dialog box. For more information, click here.
• Sampling Period (Control Time Step): Defines the interface sample time for the co-simulation. If this value is less than the value of maximum step size, the value of maximum step size is changed to this value.
• Waiting Time (Seconds): Waits the first communication with Simulink as inputted time. (Unit: Second). The default value is 10. The inputted value of Waiting Time is 1≤ Waiting Time ≤600. This option is activated in case that Host Program is RecurDyn.
• Create a Plane Block
• Output file name: Defines a name of output files created after simulation.
• M-File to create Plant Block: Allows the user to enter the M-File name to use in Simulink.
• Run Simulink Model: Defines information about Matlab program and Simulink model. This option is activated in case that Host Program is RecurDyn.
• Matlab Program: Defines the executable file name and the installation directory of Matlab program. This option is activated in case that the Interface Program is Simulink and Host Program is RecurDyn.
• M-File to run Simulink Model: Defines M-File name to be used for the batch job of Simulink Model. This option is activated in case that the Interface Program is Simulink and Host Program is RecurDyn.
• Simulink Model: Defines the name of Simulink model that is built for the co-simulation with RecurDyn. This model must include RecurDyn Plant Block. This option is activated in case that the Interface Program is Simulink and Host Program is RecurDyn.
• Use Identical Solution of RDHost: If this option is used, the user can output the same result as the RecurDyn Host mode in the Simulink Host mode. This option is activated in case that Host Program is RecurDyn.
• Delete CoSim Information: If this option is used, the user can delete co-simulation information.
Note
The command to load RecurDyn Block in matlab is as follows.
In the case of Matlab host, first load m file and enter ‘rdlib’ or ‘rdblock’ command.
In the case of RecurDyn host, first load m-file and enter ‘makerd’ command.