Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

adams/simulink cosimulation error 1

Status
Not open for further replies.

behnam jafari

Automotive
Apr 24, 2019
47
hello everyone

i'm getting this error while running a co-simulation in Simulink / Adams/car

the error says :

Error reported by S-function 'adams_plant' in 'untitled/adams_sub/ADAMS Plant/S-Function':
Adams model file Controls_Plant_1.adm does not exist! Check working directory. AEI_Initialize: Error in initialization.

1- I have set the matlab directory path on the adams directory path where it produces the m.file of my model as one suggested in a matlab forum ... but still this error persists

i'm sending you a picture of the MSC Software block in simulink and when i double click on it to chnage the animation mode , it is set on batch and can't be changed ...


thanks for the help
1_erja6n.png
 
Replies continue below

Recommended for you

The problem is that there is insufficient time for Simulink to connect to the ADAMS server, so obviously what needs to happen to fix this is to somehow increase that time. The way to do this is to create a new Windows environment variable to override the default value (which is 5 seconds) to a bigger value, like 10 or 20 seconds. To be more specific, here's a step by step on a Windows XP machine:

1.) Go "My Computer", right click and open "Properties" 2.) Go to the "Advanced" tab and click "Environment Variables" 3.) Create a new system variable, and call it ADAMS_CONTROLS_WTIME 4.) Set the value to something greater than the default, which is 5 (unit of time is seconds). The greater the value, the more likely it is that you will get a connection and not get an error, but the longer of a time you will have to wait for each and every simulation to run. 10 seconds seems to work best for me. 5.) Click "OK" a bunch of times, then restart MATLAB. You may need to reboot your whole machine.

- From Mathworks Forum.
 
I did exactly what you said but nothing happened …

exact same error popped up ...

hope you can come up with another solution ...

thank you very much for replying ...

I changed the value in step 4 to 10 and 20 seconds and exact same thing happened again also I changed the simulation time to the integers that you mentioned and still nothing and the same old exact problem comes up ...
 
I must admit my first reaction was that your adams model had failed to build, judging from this message, or that it was in the wrong directory.

"Adams model file Controls_Plant_1.adm does not exist! Check working directory. AEI_Initialize: Error in initialization."

so does this model exist?



Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376
 
actually yes it does

and I have set MATLAB directory path on the Adams default directory path and the odd thing is that I can see the file ( m.file built by adams ) at the left hand side of my MATLAB window …

but when i run the Simulink model , although a simple one , this error pops up .


2_cmswxh.png
 
Greetings. Both the error text and the screenshot confirm that an adm-file is not created for your model. In order for it to appear, you must first conduct any of the standard analyzes of the Simulate tab (I don’t know which one you personally need). And after that problems should arise. I'm not sure what resources are allowed to link to, but try looking at this video (
 
thanks newbie_user for the reply

standard huh ?

this looks more sensible . i'll try it and keep you apprised . thanks alot for the effort and good responses .
 
Dear Bahnam,

I have the same problem.
Planet Export does not generate .adm file

Have you found a solution?
 
No SiNa Dehbari

Not yet .I've been busy with something else but newbie user said something worthwhile …

you should take a look at it and you might even get to the solution before me …

i'll put a post here as soon as I get results but I expect the same from you as well …[smile]

thanks
 
Dear Behnam,

I read newbie post completely and followed its instruct and get a result.
I ran a simulation with a specific name (for example "abs")
after that in planet export in prefix name, I put "abs_barke" (the name which generates by Adams solver at .adm file).

I would like to know if my work is correct or not.
it seems this is the best way since know!

yours sincerely

Sina
 
Good Job

Were you able to run the co-simulation ?

Did you get the results of the Co-simulation along with postprocessing ?

what version of MATLAB and Adams are you using ?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor