Step III_2 (In MATLAB)

 

If using this step, the user has to close RecurDyn model before starting the simulation.

 

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 “rdlib” for building RecurDyn Plant Block.

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