07-18-2009 01:09 PM
i m trying to use simulink dll in Labview.Both softwares r installed on same drive,i ve installed simulation toolkit also.but it gives the following error
### Starting Real-Time Workshop build procedure for model: Lab3_part1
### Generating code into build directory: D:\Program Files\My Documents\MATLAB\Lab3_part1_nidll_rtw
Warning: Unable to determine a fixed step size based on the sample times in the model 'Lab3_part1', because the model does not have any discrete sample times. Picking a fixed step size of (0.2) based on simulation start and stop times. You can disable this diagnostic by explicitly specifying a fixed step size in the Solver pane of the Configuration Parameters dialog box, or setting the 'Automatic solver parameter selection' diagnostic to 'none' in the Solver group on the Diagnostics pane of the Configuration Parameters dialog box.
### Invoking Target Language Compiler on Lab3_part1.rtw
tlc
-r
D:\Program Files\My Documents\MATLAB\Lab3_part1_nidll_rtw\Lab3_part1.rtw
D:\SimulationInterfaceToolkit\ModelInterface\tmw\nidll.tlc
-OD:\Program Files\My Documents\MATLAB\Lab3_part1_nidll_rtw
-ID:\SimulationInterfaceToolkit\ModelInterface\tmw
-ID:\Program Files\My Documents\MATLAB\Lab3_part1_nidll_rtw\tlc
-ID:\Program Files\MatLab\rtw\c\tlc\mw
-ID:\Program Files\MatLab\rtw\c\tlc\lib
-ID:\Program Files\MatLab\rtw\c\tlc\blocks
-ID:\Program Files\MatLab\rtw\c\tlc\fixpt
-ID:\Program Files\MatLab\stateflow\c\tlc
-aEnforceIntegerDowncast=1
-aFoldNonRolledExpr=1
-aInlineInvariantSignals=0
-aInlineParameters=0
-aLocalBlockOutputs=1
-aRollThreshold=5
-aZeroInternalMemoryAtStartup=1
-aZeroExternalMemoryAtStartup=1
-aInitFltsAndDblsToZero=1
-aGenerateReport=0
-aGenCodeOnly=0
-aRTWVerbose=1
-aIncludeHyperlinkInReport=0
-aLaunchReport=0
-aForceParamTrailComments=0
-aGenerateComments=1
-aIgnoreCustomStorageClasses=1
-aIncHierarchyInIds=0
-aMaxRTWIdLen=31
-aShowEliminatedStatements=0
-aPrefixModelToSubsysFcnNames=1
-aIncDataTypeInIds=0
-aInsertBlockDesc=0
-aSimulinkBlockComments=1
-aInlinedPrmAccess="Literals"
-aTargetFcnLib="ansi_tfl_tmw.mat"
-aIsPILTarget=0
-aLogVarNameModifier="rt_"
-aGenerateFullHeader=1
-p10000
### Loading TLC function libraries
.....
### Initial pass through model to cache user defined code
### Caching model source code
.......................
### Writing header file Lab3_part1_types.h
### Writing header file Lab3_part1.h
.
### Writing source file Lab3_part1.c
### Writing header file Lab3_part1_private.h
### Writing header file rtmodel.h
.
### Writing source file Lab3_part1_data.c
### Writing header file rt_nonfinite.h
### Writing source file rt_nonfinite.c
### TLC code generation complete.
### Generating TLC interface API.
.
Error: File: D:\SimulationInterfaceToolkit\ModelInterface\tmw\nidll_codegen.tlc Line: 249 Column: 87
ComplexSignal is no longer a field within the DataInputPort scope. Execute "helpview ([docroot '/toolbox/rtw/helptargets.map'], 'rtwfileformatchanges')" at the MATLAB command prompt to see how to access that information.
Error: File: D:\SimulationInterfaceToolkit\ModelInterface\tmw\nidll_codegen.tlc Line: 249 Column: 108
The == and != operators can only be used to compare values of the same type
Error: File: D:\SimulationInterfaceToolkit\ModelInterface\tmw\nidll_codegen.tlc Line: 252 Column: 107
Undefined identifier Width
Error: File: D:\SimulationInterfaceToolkit\ModelInterface\tmw\nidll_codegen.tlc Line: 252 Column: 107
The + operator only works on numeric arguments
### Real-Time Workshop build procedure for model: 'Lab3_part1' aborted due to an error.
>>
AND IN SIMULINK
Error building Real-Time Workshop target for block diagram 'Lab3_part1'. MATLAB error message:
Error: File: D:\SimulationInterfaceToolkit\ModelInterface\tmw\nidll_codegen.tlc Line: 253 Column: 105
Undefined identifier Width.
07-19-2009 03:55 PM
Looks like it's a problem with your Simulink model. What version of the Simulink Interface Toolkit and Matlab are you using?
By the way, you should define a Fixed step size in the Solver properties (Configuration parameters) based on the rate you want your Simulink DLL to run.
07-20-2009 11:57 AM
Hello tripper,
What is the defined time step in your Simulink model? I should not that you CANNOT use a variable time step when using the Simulation Interface Toolkit.
MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies.