openmodelicainterest  

problem regarding writing the value into a text file using open modelica

Roshna
Sat, 10 Oct 2009 06:39:53 -0700

 

 

 

Hai all,

 

I want to write the value of one variable into a external text file using
external function interface while running the .mo file. So I tried to modify
the example program, which is given in users guide to get the value
printed.(please see the attachment).I am not getting any errors, but the
value is not getting printed even a single time. I did the following way.

 

loadFile("C:/OpenModelica1.5.0/tmp/ExternalLibraries.mo")

true

>> system("gcc -c -o libExternalFunc1_ext.o ExternalFunc1.c");

>> system("gcc -c -o libExternalFunc2.a ExternalFunc2.c");

>> simulate(ExternalLibraries)

record SimulationResult

resultFile = "ExternalLibraries_res.plt"

end SimulationResult;

>> plot({x,y})

true

 

 

Can anybody help me?

Thanks n Regards,

 

Roshna C P

Control & Instrumentation Group,

Centre for Development of Advanced Computing,

Trivandrum, India.

 

 

 

Attachment: ExternalLibraries.log
Description: Binary data

Attachment: ExternalLibraries.mo
Description: Binary data

Attachment: ExternalFunc1.c
Description: Binary data

Attachment: ExternalFunc1_ext.h
Description: Binary data

Attachment: ExternalFunc2.c
Description: Binary data

Attachment: ExternalFunc2.h
Description: Binary data