Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Adams-Matlab/Simulink Co-Simulation Problem

Adams-Matlab/Simulink Co-Simulation Problem

Adams-Matlab/Simulink Co-Simulation Problem


i run the Co-Simulation properly in adams View and it is a really simple transaction ... only a sphere that its acceleration or its velocity is the input and defined by a constant in simulink and the displacement defined as the output as measures then state variables.

problem is that when I attach the constant block to the adams_sys block in Simulink and get a run , the co-simulation runs perfectly but there are no interactions and the matlab input does not take its effect on the adams block or simulation , nor does it appear in the results in the postprocessing .

is it a problem with my firewall ??? maybe blocking my matlab ? because the adams block appears after giving the adams_sys command to the MATLAB but the co-simulation isn't interactive and does not effect the simulation in adams …

would you please help


RE: Adams-Matlab/Simulink Co-Simulation Problem

Try in the settings adams_sys (red block "msc software") change the animation mode from "batch" to "interactive". So you’ll see visually that the model does not respond to signals from Matlab. If this is true, then the connection is incorrectly created or input / output is incorrectly spelled out. Send a screenshot of the Controls Plant block and the text of the line that you prescribe for variables in Aview.

RE: Adams-Matlab/Simulink Co-Simulation Problem

hi newbie user thanks a lot for answering

first of all when I insert measures in my state variables this error pops up :

ERROR: The function expression indicated contains at least one error.
ERROR: Description : The identifier '._MSC_TRUCK_DOUBLE_WISHBONE_SUSPENSION.MEA_ANGLE_20' was found instead of one of the following:
ERROR: integer, real, constant, TIME, function call,
ERROR: IF, left parenthesis or Adams View variable.
ERROR: Function text : "[[._msc_truck_double_wishbone_suspension.MEA_ANGLE_20]]"
ERROR: (The element at or immediately after the error is
ERROR: enclosed in double brackets '[[' and ']]'.)

i define my measure as a joint and and angle and define it for a state variable in adams view interface ....

this thing happens with all of the models when i know for a fact that this doesn't happne in another pc ????

would you please help

RE: Adams-Matlab/Simulink Co-Simulation Problem

sorry newbie that I got back to you pretty late

would you answer me this time pleaaaaaaaase ???

FYI : I have been doing this in Adams/Car … and I want the model to interact with matlab while doing a test …

actually the batch is locked … I can't change it to interactive … and when I do this whith batch ( as the youtube instructs ) and take the results back to adams from matlab and in other words when I import the results , the model doesn't move ...

I intend to use Adams/Car - MATLAB Co-Simulation to work on the suspension of a vehicle … I want to insert external suspension Forces on the mounts of the vehicle suspension …

thank you very much for getting back so soon …

first I define the motion and the measure and then the state variables from adams/car when toggling to adams/view then I toggle back to adams/car and run the test … without the control plant as the youtube says and then i insert variables in adams controls but the adams doesn't make adm. files for the control plant only it creates the m. file for matlab ...

what am i not doing ???????????????? is it because I maybe defining variables or measures wrong ??? I have done it a dozen times and it's getting frustrating
please help

RE: Adams-Matlab/Simulink Co-Simulation Problem

Actually feeding the adams block to adams itself has been done in many control feedbacks .

my actual question is why is this adams block doesn't have the batch/interactive option activated ???

what am I doing wrong so my adm file in adams car doesn't appear so I can have a co-simulation …

is working with adams-controls and defining state variables for the co-simulation different in adams/car than in adams/view ? what are the differences ?

RE: Adams-Matlab/Simulink Co-Simulation Problem

I reviewed again from 15 minutes the video to which I referred in one of the parallel topics.
(https://www.youtube.com/watch?time_continue=1323&a...). Initially, like you, either there was an error with the mention of the firewall, or the simulation was still going on, but the output parameters did not react to the input values. After careful study, I noticed that the file "abs_brake_controls", to which the m-file subsequently refers, does not occur immediately after the ACAR test (I suppose, therefore, there is no correlation). Therefore, try to do the following:
1. Open the assembly with variables and first create Controls_Plant. IMPORTANT: the name will vary depending on the test. If this is inhibition, then “name_brake”, if the movement in ISO-03888 is “name_ilc”. However, if you don’t know what postfix will be (the last letter after “_”), you can run one simulation.
2. After the Controls_Plant is created and the m-file appears, perform the required ACAR test, and as a prefix (the first word before “_”), specify the same word that was in the place of “name” during the export.
3. Re-export the already created Controls_Plant.
My problem was solved in this way. I hope that helps you too.
Regarding the interactive / batch mode, adm-files only work with batch. This I knew, but forgot, sorry. Visualization will be possible due to res-files and postprocessor.

RE: Adams-Matlab/Simulink Co-Simulation Problem

thanks newbie user

I will try this as soon as possible and get back to you .

you are a life saver every time I get stuck somewhere …

god bless you ...

RE: Adams-Matlab/Simulink Co-Simulation Problem

hi newbie user

I have done what you have told me and still nothing .

I have no firewall issue …

but I've got the problem of having no effect of the inputs and outputs … and more importantly , the animation in postprocessing that the you tube runs , isn't responding , I mean the frame changes but the time stays at 0 seconds

I don't know why this happens …

I have almost tried everything and have done exactly what you and youtube said ….

don't know what to do anymore

RE: Adams-Matlab/Simulink Co-Simulation Problem

When importing res-files, did you remember to specify your working ACAR assembly? Did a window appear asking about their replacement "the analysis named .... already contain a results file ” or similar error? Try re-logging into Acar and importing it again (if for some reason it doesn’t want to update the res-file). Another way is to try renaming the res-file and importing it. So far I can offer only this.

RE: Adams-Matlab/Simulink Co-Simulation Problem

yes I specified the model that I had previously got a test from as the place for the results import …

for the second part of your answer , actually I got that message that said already contain results file , but I think that was because I had once imported the results file twice , because I wanted to try other ways for defining the Simulink model … just then …

i'll try renaming the res-file


RE: Adams-Matlab/Simulink Co-Simulation Problem

Hello all,

I'm facing with same kind of issue, I'm working with Adaptive Control Design of a Non-linear plant made in MSC_Admas view. Now, I want to build a controller for it in Simulink. So, I've exported the model(non-linear) into m-file & I've set-up everything in Simulink & model is working fine (showing interactive & batch responses with respect to input applied from Simulink) But when I try to linearize the model in order to tune the controller using Simulink Control Tunner toolbox then It stops sending data from Adams to Simulink Control tunner & the output is always blank in Control Tunner. Although I've exported a Non-Linear model from Adams but still it's output has to appear in Linearization process so that we can estimate a Controller for it. It seems that there is some communication error b/w both software when I run the tunner app. Simulink shows the compiling message but It doesn't actually run the simulation to get the output results. Anyone can help me fix this issue?

Thanks in advance for your attention to my request.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close