Simulink model build for NI Veristand fails

80 views (last 30 days)
Hi Folks,
Everything worked fine since today morning, when I came back to office after weekend and cannot compile any model. At the end I made the simplest model ever and it did not work also. I have problem with building simulink models for NI Veristand. The model is supposed to run under PharLap on PXI, I am using NI Veristand 2012, Matlab 2012b and MS Visual Studio 2008 compiler.
When I stared building my model, it generates C code files, but at the point where makefile is to be created, the following error appears:
NI VeriStand error ==> An error occured setting the make-file command options.
Attempt to reference field of non-structure array.
There is console log of build operation:
### Starting build procedure for model: fault0
### Generating code into build folder: C:\NI\MATLAB\Fault\fault0_niVeriStand_rtw
### Invoking Target Language Compiler on fault0.rtw
### Using System Target File: C:\VeriStand\2012\ModelInterface\tmw\R2007b\NIVeriStand.tlc
### Loading TLC function libraries
.....
### Initial pass through model to cache user defined code
..
### Caching model source code
............................
### Writing header file fault0.h
### Writing header file fault0_types.h
### Writing header file rtwtypes.h
.
### Writing source file fault0.c
### Writing header file fault0_private.h
### Writing header file rtmodel.h
.
### Writing source file fault0_data.c
### Writing header file rt_nonfinite.h
### Writing source file rt_nonfinite.c
.
### Writing header file rt_defines.h
### Writing header file rtGetInf.h
### Writing source file rtGetInf.c
.
### Writing header file rtGetNaN.h
### Writing source file rtGetNaN.c
### TLC code generation complete.
### Generating TLC interface API.
...
### NI VeriStand 2012 Modifying fault0.c file
.Unknown data type. Constructor is void
### NI VeriStand 2012 Modifying fault0_data.c file
### NI VeriStand 2012 Modifying fault0.h file
### NI VeriStand 2012 Generating Ports Readme file
### NI VeriStand 2012 Generating Signals Readme file
### NI VeriStand 2012 Deleting *.obj files from previous build (if any)
Could Not Find C:\NI\MATLAB\Fault\fault0_niVeriStand_rtw\*.obj
### Creating project marker file: rtw_proj.tmw
.
### Processing Template Makefile: C:\VeriStand\2012\ModelInterface\tmw\R2007b\NIVeriStand_vc.tmf
### Build procedure for model: 'fault0' aborted due to an error.
The current model is really simple, so the second line of error is impossible:
So After that I tried several things:
  • At the first I tried to compile this code for cRIO, there is another tlc template and it uses WxWorks compiler -> it worked.
  • Then I had idea, that it might be something wrong with visual studio compiler, so I tried to mex some file -> it worked.
Now I am out of ideas ... Do you anybody have any idea how to make it run, or find out where is the problem ? In the attachment there is model with product of build operation.
Greetings, Vladimir.

Accepted Answer

Vladimir
Vladimir on 13 Oct 2014
Problem solved.
I re-installed all the stuff (Matlab,NI Veristand, Veristand Model Support, Visula Studio 2008) but nothing helped.
At the end I have found out that something had cleared out of my windows paths variable PATH (PATH "c:windows\system32"). After adding it back, it starts work again.
  2 Comments
Jixin Zhao
Jixin Zhao on 30 Jul 2015
Hello Vladimir, I have the same problem with you except for I use matlab2015(64) matlab2012(32),Veristand2014 and Visual Studio 2010.
Could you tell me more details about the path setting? Does it mean I must install all the three software in the same disk and under the same folder?
thank you :)
zhaohang liu
zhaohang liu on 13 Sep 2016
Dear zhao,
HelloI have the same problem like this.Have you solved the problem and could you give me some suggests or ways to solve the problem.

Sign in to comment.

More Answers (3)

qiming wang
qiming wang on 19 Oct 2018
VeriStand: An error occurred setting the make-file command options. VeriStand: Cannot locate a supported installation of the Microsoft Visual Studio C++ tool chain. Visit www.ni.com/info and enter the Info Code ex3efp for a list of supported compiler configurations Please help me !
  2 Comments
periere in mare zeng
periere in mare zeng on 17 Jun 2020
Me too. I have the same problam ,I use matlab2014a, Veristand 2015 .Have you solved the problem?
Thank you :)
zhang jian
zhang jian on 29 Nov 2023
Edited: zhang jian on 29 Nov 2023
VeriStand: An error occurred setting the make-file command options. VeriStand: Cannot locate a supported installation of the Microsoft Visual Studio C++ tool chain. Visit www.ni.com/info and enter the Info Code ex3efp for a list of supported compiler configurations.
matlab2020a,Veristand 2020R4, vs2017
I got this too, anyone solved? thank you

Sign in to comment.


yuan wei
yuan wei on 12 Nov 2020
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: F:\VeriStand\Positionloop_control_niVeriStand_rtw
### VeriStand 2018.1.0.28 (2018 SP1) code generation started
### Invoking Target Language Compiler on Positionloop_control.rtw
### Using System Target File: F:\VeriStand\2018\ModelInterface\tmw\target\NIVeriStand.tlc
### Loading TLC function libraries
### Generating TLC interface API for custom data
.
### Initial pass through model to cache user defined code
.
### Generating code for S Function : <S38>/State-Space
### Caching model source code
...............................................................................
............................................................
### Writing header file Positionloop_control_types.h
### Writing header file Positionloop_control.h
### Writing header file Positionloop_control_private.h
.
### Writing header file rtwtypes.h
### Writing header file builtin_typeid_types.h
### Writing header file multiword_types.h
### Writing header file zero_crossing_types.h
### Writing header file rtGetNaN.h
### Writing source file rtGetNaN.c
### Writing header file rt_nonfinite.h
.
### Writing source file rt_nonfinite.c
### Writing header file rtGetInf.h
### Writing source file rtGetInf.c
### Writing source file Positionloop_control.c
### Writing header file rtmodel.h
### Writing source file Positionloop_control_data.c
.
### Writing header file rt_defines.h
### TLC code generation complete.
### Generating TLC interface API.
...............................................................................
.............................
### VeriStand 2018.1.0.28 (2018 SP1) Modifying source file Positionloop_control.c
### VeriStand 2018.1.0.28 (2018 SP1) Modifying source file Positionloop_control_data.c
.
Error: File: F:\VeriStand\2018\ModelInterface\tmw\codegen\NiUtilityLib.tlc Line: 440 Column: 80
Unable to find Members within the CGType scope
Main program:
==> [00] F:\VeriStand\2018\ModelInterface\tmw\codegen\NiUtilityLib.tlc:NiCodeGenEditModelSourceFile(440)
[01] F:\VeriStand\2018\ModelInterface\tmw\codegen\NIVeriStand_codegen.tlc:<NONE>(838)
Error: File: F:\VeriStand\2018\ModelInterface\tmw\codegen\NiUtilityLib.tlc Line: 440 Column: 88
The left-hand side of a . operator must be a valid scope identifier
Main program:
==> [00] F:\VeriStand\2018\ModelInterface\tmw\codegen\NiUtilityLib.tlc:NiCodeGenEditModelSourceFile(440)
[01] F:\VeriStand\2018\ModelInterface\tmw\codegen\NIVeriStand_codegen.tlc:<NONE>(838)
### VeriStand 2018.1.0.28 (2018 SP1) Writing header file ni_pglobals.h
### VeriStand 2018.1.0.28 (2018 SP1) Modifying header file Positionloop_control.h
### VeriStand 2018.1.0.28 (2018 SP1) Generating Ports Readme file
### VeriStand 2018.1.0.28 (2018 SP1) Generating Signals Readme file
### VeriStand 2018.1.0.28 (2018 SP1) Generating Parameters Readme file
### VeriStand 2018.1.0.28 (2018 SP1) Copying support files
已复制 1 个文件。
移动了 1 个文件。
已复制 1 个文件。
已复制 1 个文件。
### Aborted due to an error in the build procedure for model: Positionloop_control
Build Summary 1
Elapsed: 0.16 sec
Top model targets built:
Model Action Rebuild Reason
================================================================================
Positionloop_control Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 21.366s
Error: Errors occurred - aborting
Component:Simulink | Category:Block diagram error

Viyils Sangregorio
Viyils Sangregorio on 8 Apr 2022
I have a related issue,
Somebody have have some advice ??
DINTEGER_CODE=0 -DMT=1 -DTID01EQ=1 -DMODEL=Library_ADRC -DNUMST=3 -DNCSTATES=2 -DHAVESTDIO -DRT -DUSE_RTMODEL @Library_ADRC_comp.rsp -o"rtmodel.obj" "C:/Pasantia/Library_ADRC_veristand_rtw/rtmodel.c"
gmake: *** No rule to make target `Sangregorio/AppData/Roaming/MATHWO~1/MATLAB', needed by `veristand_model_capi.obj'. Stop.
C:\Pasantia\Library_ADRC_veristand_rtw>echo The make command returned an error of 2
The make command returned an error of 2
C:\Pasantia\Library_ADRC_veristand_rtw>exit /B 1
Build Summary
Error(s) encountered while building "Library_ADRC"
Component:Simulink | Category:Block diagram error

Categories

Find more on Code Generation in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!