LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SIT - Simulation Interface Toolkit - build DLL

Moin, Moin, (-> HELLO) ....
 
I want to build a .DLL from a Simulink model. The goal is to great a stand-alone tool, with a User Interface from LabView and a Numerical is based on a SIMULINK-model.
I used the Real Time Workshop to build a DLL from the SIMULINK with "nidll.tlc". But it doesn't work. I try it at two different computers (Systems).
Do anyone know, why it doesn't work?
 
System 1:
        Matlab Simulink 7.1 (R14) SP3
        Simulation Tool Kit 2.02
        LabView 7.1
        Microsoft Visual C/C++ version 5.0 in C:\Programme\DevStudio
 
System 2:
        Matlab Simulink 7.0 (R14) SP2
        Simulation Tool Kit 2.02
        LabView 7.1
        Microsoft Visual C/C++ 7.1
 
 
Replay System 1:
*********************
...................
Error: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 117 Column: 7 Undefined identifier ReleaseVersion Error: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 117 Column: 25 The == and != operators can only be used to compare values of the same type Error: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 256 Column: 5 Undefined identifier ReleaseVersion Error: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 256 Column: 23 The == and != operators can only be used to compare values of the same type
 
Replay System 2:
 
Error: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 388 Column: 45 Attempt to call a non-function value: SLibGetBlockPath Error: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 388 Column: 37 Values of NULL type cannot be expanded Error: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 388 Column: 45 Attempt to call a non-function value: SLibGetBlockPath Error: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 388 Column: 37 Values of NULL type cannot be expanded
0 Kudos
Message 1 of 10
(6,352 Views)
Mehlsack, try downloading the SIT upgrade 2.0.3 patch because some bugs have been fixed and your error may be one of them. Also, have a look at this thread to see if any other of those suggestions might help you: https://forums.ni.com/t5/LabVIEW/Why-can-t-Real-Time-Workshop-create-a-model-DLL/m-p/163797
 
0 Kudos
Message 2 of 10
(6,317 Views)
Which parameter settings did you have in Simulink?

regards,
ThSa
0 Kudos
Message 3 of 10
(6,306 Views)

Thanks for the help...

With SIT 2.0.3 the error-messages are the same (Until know I tested only system 1). My Simulink settings are:

Solver: ode3 or ode4, "fixed-step"

System target file: nidll.tlc

Language

0 Kudos
Message 4 of 10
(6,293 Views)

Thanks for the help...

With SIT 2.0.3 the error-messages are the same (Until know I tested only system 1). My Simulink settings are:

Solver: ode3 or ode4, "fixed-step"

System target file: nidll.tlc

Language:

0 Kudos
Message 5 of 10
(6,296 Views)

Ups - I send the message by mistake, here are the rest of my simulink parameters

Solver: ode3 or ode4, "fixed-step"

System target file: nidll.tlc

Language: C

TLC options: none

Make command: make_rtw

Template makefile: nidll_vc.tmf

Build process: Verbose build

TLC process: none

Below are the messages from the building process

### Invoking Target Language Compiler on sinewave.rtw
 tlc
 -r
 C:\Daten\Projekte\Fette\Air Management\Simulation\test\sinewave_nidll_rtw\sinewave.rtw
 C:\SimulationInterfaceToolkit\ModelInterface\nidll.tlc
 -OC:\Daten\Projekte\Fette\Air Management\Simulation\test\sinewave_nidll_rtw
 -IC:\SimulationInterfaceToolkit\ModelInterface
 -IC:\SimulationInterfaceToolkit\UserInterface\tlc_c
 -IC:\Daten\Projekte\Fette\Air Management\Simulation\test\sinewave_nidll_rtw\tlc
 -IC:\Programme\Matlab\MATLAB7p1\rtw\c\tlc\mw
 -IC:\Programme\Matlab\MATLAB7p1\rtw\c\tlc\lib
 -IC:\Programme\Matlab\MATLAB7p1\rtw\c\tlc\blocks
 -IC:\Programme\Matlab\MATLAB7p1\rtw\c\tlc\fixpt
 -IC:\Programme\Matlab\MATLAB7p1\stateflow\c\tlc
 -aEnforceIntegerDowncast=1
 -aFoldNonRolledExpr=1
 -aInlineInvariantSignals=0
 -aInlineParameters=0
 -aLocalBlockOutputs=1
 -aRollThreshold=5
 -aGenerateReport=0
 -aGenCodeOnly=0
 -aRTWVerbose=1
 -aIncludeHyperlinkInReport=0
 -aLaunchReport=0
 -aForceParamTrailComments=0
 -aGenerateComments=1
 -aIgnoreCustomStorageClasses=1
 -aIncHierarchyInIds=0
 -aMaxRTWIdLen=31
 -aShowEliminatedStatements=1
 -aPrefixModelToSubsysFcnNames=1
 -aIncDataTypeInIds=0
 -aInsertBlockDesc=0
 -aSimulinkBlockComments=1
 -aInlinedPrmAccess="Literals"
 -aTargetFcnLib="ansi_tfl_tmw.mat"
 -aIsPILTarget=0
 -aLogVarNameModifier="rt_"
 -aGenerateFullHeader=1
 -p10000

0 Kudos
Message 6 of 10
(6,290 Views)
Hi,
check the environment variable settings (right click on "My Computer" - Advanced Tab - Environment Variables):
MSDevDir=<path to compiler>\Common\MSDev98 for Visual C/C++ 6.0 or something like that...

I'm not very familiar with Matlab R14 and SIT 2.0.x (my combination was Matlab R13 / SIT 2.0.x and Matlab R14/ SIT3), but check the settings within the simulation parameters one more time. For this, i've attached a screenshot!

Good luck!
ThSa


0 Kudos
Message 7 of 10
(6,296 Views)
The system 1 with Visual C++ 5.0 doesn't work, BUT with the new version of the SIT 2.0.3 the system 2 (Visual .net 2003) building some .lib files but it stopped before building any DLL. Now some linkage are wrong. The  path of MSDevDir is: C:\Programme\DevStudio\SharedIDE (both systems are equal).
System 1:
        Matlab Simulink 7.1 (R14) SP3
        Simulation Tool Kit 2.03
        LabView 7.1
        Microsoft Visual C/C++ version 5.0
System 2:
        Matlab Simulink 7.0 (R14) SP2
        Simulation Tool Kit 2.03
        LabView 7.1
        Microsoft Visual C/C++ 7.1
The error message of the system 2 is now:
 
## SIT 2.0 Generated Ports Readme file

The following make variables are used in the template make file, but they are not defined.
You may have a mismatch between the system target file and the template make file.

= nmake
= PC
= yes
= nidll
= sinewave
= rt_nonfinite
= sinewave
..     
 link /RELEASE  /INCREMENTAL:NO /NOLOGO -subsystem:console,4.0 msvcrt.lib kernel32.lib  ws2_32.lib mswsock.lib advapi32.lib  C:\Progr..lib\win32\rtwlib_vc.lib    @sinewave.lnk /dll -out:sinewave.dll
LIBC.lib(ieeemisc.obj) : error LNK2005: __isnan bereits in msvcrt.lib(MSVCR71.dll) definiert
LIBC.lib(crt0dat.obj) : error LNK2005: _exit bereits in msvcrt.lib(MSVCR71.dll) definiert
LIBC.lib(crt0init.obj) : error LNK2005: ___xc_z bereits in msvcrt.lib(cinitexe.obj) definiert
LIBC.lib(crt0init.obj) : error LNK2005: ___xc_a bereits in msvcrt.lib(cinitexe.obj) definiert
LIBC.lib(crt0init.obj) : error LNK2005: ___xi_z bereits in msvcrt.lib(cinitexe.obj) definiert
LIBC.lib(crt0init.obj) : error LNK2005: ___xi_a bereits in msvcrt.lib(cinitexe.obj) definiert
LIBC.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter bereits in msvcrt.lib(MSVCR71.dll) definiert
LIBC.lib(ieeemisc.obj) : warning LNK4006: '__isnan' bereits in 'msvcrt.lib(MSVCR71.dll)' definiert; zweite Definition wird ignoriert
LIBC.lib(crt0dat.obj) : warning LNK4006: '_exit' bereits in 'msvcrt.lib(MSVCR71.dll)' definiert; zweite Definition wird ignoriert
LIBC.lib(crt0init.obj) : warning LNK4006: '___xc_z' bereits in 'msvcrt.lib(cinitexe.obj)' definiert; zweite Definition wird ignoriert
LIBC.lib(crt0init.obj) : warning LNK4006: '___xc_a' bereits in 'msvcrt.lib(cinitexe.obj)' definiert; zweite Definition wird ignoriert
LIBC.lib(crt0init.obj) : warning LNK4006: '___xi_z' bereits in 'msvcrt.lib(cinitexe.obj)' definiert; zweite Definition wird ignoriert
LIBC.lib(crt0init.obj) : warning LNK4006: '___xi_a' bereits in 'msvcrt.lib(cinitexe.obj)' definiert; zweite Definition wird ignoriert
LIBC.lib(winxfltr.obj) : warning LNK4006: '___CppXcptFilter' bereits in 'msvcrt.lib(MSVCR71.dll)' definiert; zweite Definition wird ignoriert
   Bibliothek 'sinewave.lib' und Objekt 'sinewave.exp' wird erstellt
LINK : warning LNK4098: Standardbibliothek 'LIBC' steht in Konflikt mit anderen Bibliotheken; /NODEFAULT:Bibliothek verwenden
sinewave.dll : fatal error LNK1169: Ein oder mehrere mehrfach definierte Symbole gefunden
NMAKE : fatal error U1077: 'link': Rückgabe-Code '0x491'
Stop.
??? Error using ==> open_system
Unable to open the block or model file named 'C:\Program Files\National Instruments\LabVIEW 7.1\examples\Simulation Interface\Sine Wave\sinewave.mdl'.
0 Kudos
Message 8 of 10
(6,275 Views)
Hi,

i will setup a system with .NET, LV7.1, SIT 2.0.3 and R14SP1
I come back to you asap.

Regards,
ThSa
0 Kudos
Message 9 of 10
(6,260 Views)

The solution:

the versions are not compatible !!!

I need SIT 3.0 for Matlab 7.1.

Now I using Matlab 6.5, which is working with SIT 2.0.3 

0 Kudos
Message 10 of 10
(6,151 Views)