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.
Best Answer