Cancel
Showing results for 
Search instead for 
Did you mean: 

User Lib (AMESet component gives weird result with new compilation )

Valued Contributor
Valued Contributor

Hello I experienced yesterday something weird with an AMESet component.
I created one AMESet component a few month ago.
Few weeks ago I had a crash on my hd, and I had a clean install on a ssd. The AmeSim Lib (User Lib) is still on the same "intern" HD (not the one where os is installed), but the letter of the drive has changed.
In category pathlist, the path from the AMESet Lib points to the good Lib

If I take a project which has been compiled on the "crashed" hd, I can run with good results. (no need compilation)

If I force the compilation on this project, it gives me error, since AMESim cannt access the *.o file from the AMESet component.
AMESim asks me to run a check submodels.

If I do that, then no problem.
If I ignore it, I have the possibility to delete the AMESet component, and pick it new from the lib.
I can then compile, and run.

But The results are not the same, and I can notice that the component works not fine.

Any idea what's going on?

Thanks for any tip
Regards
Maxime

 

9 REPLIES

Re: User Lib (AMESet component gives weird result with new compilation )

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi mAx,

 

indeed that sounds weird.

To summarize, it seems that:

1. if you run a "Check submodels", all the paths to your user components are updated and everything is fine

2. if you "Ignore" the updates and put back the components from the user library on your sketch, results are different.

 

In case 2. after you have updated all the components from the user library, have you tried to launch another "Check submodels..." to make sure the rest of the circuit is ok?

Re: User Lib (AMESet component gives weird result with new compilation )

Valued Contributor
Valued Contributor

hello Emmanuel_D;

Yes I tried to run a check submodels, once I picked the component from the lib.

But I get no error

Re: User Lib (AMESet component gives weird result with new compilation )

Siemens Phenom Siemens Phenom
Siemens Phenom

Puzzling....

 

When it compiles., can you copy the content of the Details tab of the compilation window for both cases?

If we compare which object files are used in both cases we may see a differences.

For that you will have to un-check the option which closes the compilation window automatically.

 

Another possible explanation would be different parameters for your user components:

- when you keep them as they are and run the check submodels they will keep any parameter value that were set

- when you pick them up from the library they will come with default parameters values

Re: User Lib (AMESet component gives weird result with new compilation )

Valued Contributor
Valued Contributor

Of course I checked, that parameters are the same as previous model

 

Regarding compilation>

 

*First cas with Check Submodel:

C:\AMESim\v1330\AMEcompile.bat initiates a 64 bit compilation
ERROR: The system was unable to find the specified registry key or value.
Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.1\.
Targeting Windows 7 x64 Debug
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\AMESim\v1330\interfaces\user_cosim\win32\ame_user_cosim_dyncompile" cl.exe -c -DAMEUSERCOSIM -DSTANDALONESIMULATOR -I"C:\AMESim\v1330\interfaces\user_cosim" -I"C:\AMESim\v1330\interfaces\standalonesimulator" -I"C:\AMESim\v1330\interfaces" -I"C:\AMESim\v1330\lib" -nologo -DWIN32 -MT -W3 -Od -D "_MBCS" -EHsc -wd4996 -bigobj -o Cindy16B_S050_L_U6_.obj Cindy16B_S050_L_U6_.c
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
Cindy16B_S050_L_U6_.c
Cindy16B_S050_L_U6_.c(2782) : warning C4101: 'dummy' : unreferenced local variable
Cindy16B_S050_L_U6_.c(11394) : warning C4101: 'dummy' : unreferenced local variable
C:\AMESim\v1330\interfaces\standalonesimulator\ame_standalone_simulator.c(284) : warning C4013: 'ChangeResultFileName' undefined; assuming extern returning int
Executing cl.exe "-c" "-DAMEUSERCOSIM" "-DSTANDALONESIMULATOR" "-IC:\AMESim\v1330\interfaces\user_cosim" "-IC:\AMESim\v1330\interfaces\standalonesimulator" "-IC:\AMESim\v1330\interfaces" "-IC:\AMESim\v1330\lib" "-nologo" "-DWIN32" "-MT" "-W3" "-Od" "-D" "_MBCS" "-EHsc" "-wd4996" "-bigobj" "-o" "Cindy16B_S050_L_U6_.obj" "Cindy16B_S050_L_U6_.c"
Cindy16B_S050_L_U6_.make.link_args =
"c:/amesim/v1330/libmec/submodels/win64/GRAV0.obj" "c:/amesim/v1330/libhydr/submodels/win64/Q000.obj" "c:/amesim/v1330/libhydr/submodels/win64/FPROP.obj" "c:/amesim/v1330/libhydr/submodels/win64/HC00.obj" "c:/amesim/v1330/libhydr/submodels/win64/FP04.obj" "c:/amesim/v1330/libmec/submodels/win64/MAS30.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRSEN01.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRP025.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRP17.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRO012.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRP12.obj" "c:/amesim/v1330/libmec/submodels/win64/V001.obj" "c:/amesim/v1330/libmec/submodels/win64/SPR000A.obj" "c:/amesim/v1330/libmec/submodels/win64/F000.obj" "c:/amesim/v1330/libmec/submodels/win64/LSTP00A.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAP025.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAP12.obj" "c:/amesim/v1330/libhydr/submodels/win64/H3NODE1.obj" "c:/amesim/v1330/libhydr/submodels/win64/OR0000.obj" "c:/amesim/v1330/libhydr/submodels/win64/HN222B.obj" "c:/amesim/v1330/libhydr/submodels/win64/HN221B.obj" "c:/amesim/v1330/libhydr/submodels/win64/H3NODE2.obj" "c:/amesim/v1330/libhcd/submodels/win64/BHC11.obj" "c:/amesim/v1330/libhydr/submodels/win64/CV000.obj" "c:/amesim/v1330/libhydr/submodels/win64/H3NODE3.obj" "c:/amesim/v1330/libmec/submodels/win64/LCON13.obj" "c:/amesim/v1330/libmec/submodels/win64/MAS005.obj" "c:/amesim/v1330/libhydr/submodels/win64/HV01.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAP11.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAF02.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRF02.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAFS01.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAF01.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAFS02.obj" "c:/amesim/v1330/libhydr/submodels/win64/H4NODE1.obj" "c:/amesim/v1330/libhydr/submodels/win64/H4NODE2.obj" "c:/amesim/v1330/libhydr/submodels/win64/H4NODE4.obj" "c:/amesim/v1330/libhydr/submodels/win64/TK000.obj" "c:/amesim/v1330/libhydr/submodels/win64/H4NODE3.obj" "c:/amesim/v1330/libsig/submodels/win64/SPLT0.obj" "F:/AMESIM/AMESet/temp_AMESet/submodels/win64/OR005_BHNH.obj" "c:/amesim/v1330/libmec/submodels/win64/MECDS0B.obj" "c:/amesim/v1330/libsig/submodels/win64/FX00.obj" "c:/amesim/v1330/libhydr/submodels/win64/PS00.obj" "c:/amesim/v1330/libhcd/submodels/win64/BASEN01.obj" "C:/AMESim/v1330/libsig/lib/win64/SIG.lib" "C:/AMESim/v1330/libmec/lib/win64/MEC.lib" "C:/AMESim/v1330/libhcd/lib/win64/HCD.lib" "C:/AMESim/v1330/libhydr/lib/win64/HYDR.lib" "C:/AMESim/v1330/libhr/lib/win64/HR.lib" "C:/AMESim/v1330/libplm/lib/win64/PLM.lib" "C:/AMESim/v1330/libmotion/lib/win64/AMEMOTION.lib"
"C:\AMESim\v1330\interfaces\standalonesimulator\win32\stdsim_dynlink" win64 cl.exe -o Cindy16B_S050_L_U6_.dll Cindy16B_S050_L_U6_.obj @"Cindy16B_S050_L_U6_.make.link_args" "C:\AMESim\v1330\lib\win64\AME.lib" -link -nologo -NODEFAULTLIB:LIBCD.LIB -NODEFAULTLIB:LIBC.LIB -NODEFAULTLIB:LIBCMTD.LIB -NODEFAULTLIB:LIBCP.LIB -NODEFAULTLIB:LIBCPD.LIB
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
Creating library Cindy16B_S050_L_U6_.lib and object Cindy16B_S050_L_U6_.exp
1 file(s) copied.
Executing cl.exe -LD "-o" "Cindy16B_S050_L_U6_.dll" "Cindy16B_S050_L_U6_.obj" "@Cindy16B_S050_L_U6_.make.link_args" "C:/AMESim/v1330/lib/win64/AME.lib" "-link" "-nologo" "-NODEFAULTLIB:LIBCD.LIB" "-NODEFAULTLIB:LIBC.LIB" "-NODEFAULTLIB:LIBCMTD.LIB" "-NODEFAULTLIB:LIBCP.LIB" "-NODEFAULTLIB:LIBCPD.LIB"
Executing copy "%AME%\win64\STDSIMRunner.exe" Cindy16B_S050_L_U6_.exe
System build completed!

 

 

 

 

 

 

 

 

*Second case (with copy/paste from User Lib):

C:\AMESim\v1330\AMEcompile.bat initiates a 64 bit compilation
ERROR: The system was unable to find the specified registry key or value.
Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.1\.
Targeting Windows 7 x64 Debug
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\AMESim\v1330\interfaces\user_cosim\win32\ame_user_cosim_dyncompile" cl.exe -c -DAMEUSERCOSIM -DSTANDALONESIMULATOR -I"C:\AMESim\v1330\interfaces\user_cosim" -I"C:\AMESim\v1330\interfaces\standalonesimulator" -I"C:\AMESim\v1330\interfaces" -I"C:\AMESim\v1330\lib" -nologo -DWIN32 -MT -W3 -Od -D "_MBCS" -EHsc -wd4996 -bigobj -o Cindy16B_S050_L_U6_.obj Cindy16B_S050_L_U6_.c
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
Cindy16B_S050_L_U6_.c
Cindy16B_S050_L_U6_.c(2782) : warning C4101: 'dummy' : unreferenced local variable
Cindy16B_S050_L_U6_.c(11391) : warning C4101: 'dummy' : unreferenced local variable
C:\AMESim\v1330\interfaces\standalonesimulator\ame_standalone_simulator.c(284) : warning C4013: 'ChangeResultFileName' undefined; assuming extern returning int
Executing cl.exe "-c" "-DAMEUSERCOSIM" "-DSTANDALONESIMULATOR" "-IC:\AMESim\v1330\interfaces\user_cosim" "-IC:\AMESim\v1330\interfaces\standalonesimulator" "-IC:\AMESim\v1330\interfaces" "-IC:\AMESim\v1330\lib" "-nologo" "-DWIN32" "-MT" "-W3" "-Od" "-D" "_MBCS" "-EHsc" "-wd4996" "-bigobj" "-o" "Cindy16B_S050_L_U6_.obj" "Cindy16B_S050_L_U6_.c"
Cindy16B_S050_L_U6_.make.link_args =
"c:/amesim/v1330/libmec/submodels/win64/GRAV0.obj" "c:/amesim/v1330/libhydr/submodels/win64/Q000.obj" "c:/amesim/v1330/libhydr/submodels/win64/FPROP.obj" "c:/amesim/v1330/libhydr/submodels/win64/HC00.obj" "c:/amesim/v1330/libhydr/submodels/win64/FP04.obj" "c:/amesim/v1330/libmec/submodels/win64/MAS30.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRSEN01.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRP025.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRP17.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRO012.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRP12.obj" "c:/amesim/v1330/libmec/submodels/win64/V001.obj" "c:/amesim/v1330/libmec/submodels/win64/SPR000A.obj" "c:/amesim/v1330/libmec/submodels/win64/F000.obj" "c:/amesim/v1330/libmec/submodels/win64/LSTP00A.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAP025.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAP12.obj" "c:/amesim/v1330/libhydr/submodels/win64/H3NODE1.obj" "c:/amesim/v1330/libhydr/submodels/win64/OR0000.obj" "c:/amesim/v1330/libhydr/submodels/win64/HN222B.obj" "c:/amesim/v1330/libhydr/submodels/win64/HN221B.obj" "c:/amesim/v1330/libhydr/submodels/win64/H3NODE2.obj" "c:/amesim/v1330/libhcd/submodels/win64/BHC11.obj" "c:/amesim/v1330/libhydr/submodels/win64/CV000.obj" "c:/amesim/v1330/libhydr/submodels/win64/H3NODE3.obj" "c:/amesim/v1330/libmec/submodels/win64/LCON13.obj" "c:/amesim/v1330/libmec/submodels/win64/MAS005.obj" "c:/amesim/v1330/libhydr/submodels/win64/HV01.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAP11.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAF02.obj" "c:/amesim/v1330/libhcd/submodels/win64/BRF02.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAFS01.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAF01.obj" "c:/amesim/v1330/libhcd/submodels/win64/BAFS02.obj" "c:/amesim/v1330/libhydr/submodels/win64/H4NODE1.obj" "c:/amesim/v1330/libhydr/submodels/win64/H4NODE2.obj" "c:/amesim/v1330/libhydr/submodels/win64/H4NODE4.obj" "c:/amesim/v1330/libhydr/submodels/win64/TK000.obj" "c:/amesim/v1330/libhydr/submodels/win64/H4NODE3.obj" "c:/amesim/v1330/libsig/submodels/win64/SPLT0.obj" "c:/amesim/v1330/libmec/submodels/win64/MECDS0B.obj" "c:/amesim/v1330/libsig/submodels/win64/FX00.obj" "c:/amesim/v1330/libhydr/submodels/win64/PS00.obj" "c:/amesim/v1330/libhcd/submodels/win64/BASEN01.obj" "f:/amesim/ameset/temp_ameset/submodels/win64/OR005_BHNH.obj" "C:/AMESim/v1330/libsig/lib/win64/SIG.lib" "C:/AMESim/v1330/libmec/lib/win64/MEC.lib" "C:/AMESim/v1330/libhcd/lib/win64/HCD.lib" "C:/AMESim/v1330/libhydr/lib/win64/HYDR.lib" "C:/AMESim/v1330/libhr/lib/win64/HR.lib" "C:/AMESim/v1330/libplm/lib/win64/PLM.lib" "C:/AMESim/v1330/libmotion/lib/win64/AMEMOTION.lib"
"C:\AMESim\v1330\interfaces\standalonesimulator\win32\stdsim_dynlink" win64 cl.exe -o Cindy16B_S050_L_U6_.dll Cindy16B_S050_L_U6_.obj @"Cindy16B_S050_L_U6_.make.link_args" "C:\AMESim\v1330\lib\win64\AME.lib" -link -nologo -NODEFAULTLIB:LIBCD.LIB -NODEFAULTLIB:LIBC.LIB -NODEFAULTLIB:LIBCMTD.LIB -NODEFAULTLIB:LIBCP.LIB -NODEFAULTLIB:LIBCPD.LIB
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
Creating library Cindy16B_S050_L_U6_.lib and object Cindy16B_S050_L_U6_.exp
1 file(s) copied.
Executing cl.exe -LD "-o" "Cindy16B_S050_L_U6_.dll" "Cindy16B_S050_L_U6_.obj" "@Cindy16B_S050_L_U6_.make.link_args" "C:/AMESim/v1330/lib/win64/AME.lib" "-link" "-nologo" "-NODEFAULTLIB:LIBCD.LIB" "-NODEFAULTLIB:LIBC.LIB" "-NODEFAULTLIB:LIBCMTD.LIB" "-NODEFAULTLIB:LIBCP.LIB" "-NODEFAULTLIB:LIBCPD.LIB"
Executing copy "%AME%\win64\STDSIMRunner.exe" Cindy16B_S050_L_U6_.exe
System build completed!

Re: User Lib (AMESet component gives weird result with new compilation )

Siemens Phenom Siemens Phenom
Siemens Phenom

As far as I can see the compilation messages are the same and they're both picking the same object file for your user component: F:/AMESIM/AMESet/temp_AMESet/submodels/win64/OR005_BHNH.obj

 

 

Have you tried having both models opened in Parameters mode and launching a Tools/Compare systems... ?

Explore the options of the compare tool. See if it highlights any difference.

 

Note that "Compare systems" works well when the same models have been used to change parameters or add some components. Since you removed some compoennts and added them back it may not show all the differences.

As a remedy you should also be able to reproduce the second case as follow: starting from the model where you have performed Check submodels, in Submodel mode, re-set the submodel. This is equivalent to picking it up from the library again - except that it will keep your current parameter values.

If you perform the compare on both these circuits it will hopefully show some difference.

 

If this fails I advise you contact your technical support and share the models if possible.

 

 

 

Re: User Lib (AMESet component gives weird result with new compilation )

Siemens Genius Siemens Genius
Siemens Genius

Hi,

 

well in fact the compilation lines are slightly different. The order of the submodels between both compilations are different. This might mean that the compnents are sorted differently between both compilations, then at the end we have different models.

 

This might explain why you get different results. But in fact normally the different sorting should not have such an influence on the results.

 

If the difference is big, then you should check which run parameters you use (Is the tolerance the default one? Did you chose dangerous options?)

If from this side this is OK, then we can not exclude there are programming issues (like memory corruption or off-by-one errors) in your LMS Ameset submodels. Such issues might sometimes not have any influence on some systems (or this is unseen), but when components are sorted differently then you might get different or wrong results.

In this case you should double check the C code of your LMS Ameset submodel or contact your local support team to have a look into it.

 

Kind regards

Re: User Lib (AMESet component gives weird result with new compilation )

Valued Contributor
Valued Contributor

Just for information:

The AMESet component is quite simple: it is just the laminar orifice OR005 with a variable length.

I use it with flat configuration.

With it I modelize a small channel on a piston. As the piston open,the length of the channel gets down.

But I have to prevent the value of 0 for this length.

For that I have a condition, which works fine (case 1); but doesn't work on case 2 (and I get fatal error because length takes very small value)

Re: User Lib (AMESet component gives weird result with new compilation )

Siemens Phenom Siemens Phenom
Siemens Phenom

If you want to share this submodel code (c and spe files) we can have a look see if anything stands out...

Re: User Lib (AMESet component gives weird result with new compilation )

Valued Contributor
Valued Contributor

Ok I got it.
It was a mistake in the code. I was using a wrong parameter, which was set from my side for case1 (in eccentric panel). And as soon as I picked the component from the lib, this parameter has its default value 0, which makes the run crash in case 2.
Thank you @Domi & @Emmanuel_D