If the user wants to open and use MATLAB Program and RecurDyn at the same time, RecurDyn recommends that the user uses the following step.
Build Simulink model with RecurDyn Plant Block
1. Run the MATLAB program.
2. Change the working directory to the directory that has the M file and the RecurDyn model.
3. In the MATLAB command window, enter M file name.
4. In the MATLAB command window, enter “rdblock” for building RecurDyn Plane Block. (Recommend)
• Only one RecurDyn GUI must be used.
• The user can open several models in RecurDyn because RecurDyn does not need to be terminated. But it is impossible to simulate several models at the same time.
• The “rdblock” command is supported since MATLAB R2012b.
5. Open a new Simulink model window.
6. Drag and drop RecurDyn Plant Block on the new Simulink model window.
7. Design the control system with the pasted plant.
Reserved variables
Variables |
Description |
RecurDyn_model |
RecurDyn plant file name |
RecurDyn_model_n |
Size of RecurDyn plant file name |
RecurDyn |
Installed directory of RecurDyn |
Plant_inputs |
Strings of plant input names |
Plant_outputs |
Strings of plant outputs names |
RecurDyn_inputs |
Values of plant inputs |
RecurDyn_outputs |
Strings of plant outputs names |
RecurDyn_io_ids |
Sequential number of plant inputs and plant outputs |
r_temp___ |
Temp variable |
Plant_inputs_num |
Number of plant inputs |
Plant_outputs_num |
Number of plant outputs |
Matlab_version |
MATLAB Version |