2. Opening up Matlab:
As noted above, close ADAMS unless you have 2 or more licenses available for View and Solver.
Change to the working directory where the files from your plant export exist. Typing the name of the file (Mymodel) will run the Mymodel.m file in the working directory. This sets up Matlab variables that contain all of the info from step 1.) above.
Type 'adams_sys' - this is built into Matlab and it reads in the variable values, creating a Simulink block diagram named 'adams_sys_'. It is from this window that you drag the 'adams_sub' to another, new or existing Simulink block diagram window. To create a new block diagram window do a File -> New in the 'adams_sys_' window. Opening a saved block diagram is a File -> Open.
==========================================
3. Simulating:
Double clicking the adams_sub block to see it's internals. There should be a box named 'Mechanical Dynamics' in the middle - double click this to set interaction parameters that Matlab uses when it instantiates ADAMS View or Solver. The interactive animation mode uses View, the batch uses Solver and is much faster. The simulation mode should be set to discrete to use the Controls package integrators on the Controls side and the ADAMS integrators on the ADAMS side. This is the most robust method at this time.
Close all of the block diagram windows except for the one that has your control system and the adams_sub block. From this window you set the Simulation parameters (on the Matlab side) and start the simulation. Simulation results are dumped to the working directory having the file prefixes as specified in the 'output files prefix' box when you double-clicked on the Mechanical Dynamics block in the above paragraph. If 'Myoutput' was the prefix entered, you should see files named Myoutput.res, Myoutput.req, Myoutput.out, Myoutput.gra in this directory.
|