Step III (In MATLAB)

 

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 the name of M file.

4.  In the MATLAB command window, enter “makerd’.

5.  A new Simulink window with RecurDyn Plant Block appears.

6.  Open a new Simulink model window.

7.  Drag and drop RecurDyn Plant Block on the new Simulink model window.

8.  Design the control system with the pasted plant.

9.  Terminate MATLAB program.

 

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