Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » yojimbo87
  • » Profile

Posts

Posts

Hi,

when I'm trying to simulate my model (in OMEdit) I receive the following error:

Code:

Translation    09:56:40        0:0-0:0    Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed!

It uses external C libraries. Any ideas what might be wrong?

If needed I can provide more information about the model. Thanks for your time and help.

I was able to link my udaq library, however now the problem is that the udaq is using another library and now I'm getting these errors:

Code:

c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x18): undefined reference to `libusb_init@4'

c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x49): undefined reference to `libusb_get_device_list@8'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x9a): undefined reference to `libusb_get_device_descriptor@8'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x100): undefined reference to `libusb_open@8'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x140): undefined reference to `libusb_kernel_driver_active@8'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x169): undefined reference to `libusb_detach_kernel_driver@8'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x191): undefined reference to `libusb_set_configuration@8'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x1c8): undefined reference to `libusb_claim_interface@8'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x22f): undefined reference to `libusb_control_transfer@32'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x458): undefined reference to `libusb_bulk_transfer@24'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x4cb): undefined reference to `libusb_bulk_transfer@24'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x678): undefined reference to `__chkstk_ms'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x731): undefined reference to `libusb_release_interface@8'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x741): undefined reference to `libusb_close@4'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x759): undefined reference to `libusb_free_device_list@8'
c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libudaq.a(udaq.o):udaq.c:(.text+0x768): undefined reference to `libusb_exit@4'

Should I link the libusb in a same way as I did udaq and do not change anything in OM function files or something else is needed?

The problem is that I don't know where and how to link this library. Error I'm getting is

Code:

c:/openmodelica1.9.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -ludaq

Should I go to c:/openmodelia1.9.0/mingw/bin and then run

Code:

ar rcs libudaq.a d:\path\to\folder\udaq.o

or do something else?

Hi,

I'm trying to build a model which uses external C functions (OM 1.9.0 on Win7 64bit), however the problem is that those functions are using another library for communicating with USB devices. So far I have something like this

function udaq_command
  input Real lamp;
  input Real fan;
  input Real led;
  output String result;
external 
  result = command_ext(lamp,fan,led)   annotation(Library = "udaq.o", Include = "#include \"udaq.h\"");
end udaq_command;

What is the correct syntax to include also external libraries when defining functions? Thanks for your time and help.

Mar-17-13 19:03:01
Retrieve data from running simulation

I found a way how to do this in user guide chapter 5  which is about interactive simulation, however the example which is written there doesn't work with OM 1.9.0beta4 under windows. When I try to run BouncingBall model (TwoTanks model doesn't exist where it should be according to the guide) which was built as .exe file with -interactive parameter from command line, program just terminates without any output or waiting for the client to connect. Furthermore I can't even find the OMI client anywhere in the OM folder. Any ideas how to get the example from the guide working?

Mar-16-13 19:28:58
Retrieve data from running simulation

Hi folks, I'm new to open modelica and I want to ask if it's possible to get data from a running simulation through OMC interface or OMPython so that I can process/collect these data continuously. Thanks for your help and time.

  • Index
  • » Users
  • » yojimbo87
  • » Profile
You are here: