Problems Using the Simulink Tester

A place for discussing topics that do not fit into the other Simulink/Stateflow categories

Problems Using the Simulink Tester

Postby USA_Aggie » Tue Jul 29, 2008 11:46 am

Good Morning. I attempted to post this in the Bugs section but I could not find the New Post button as is in that forum or any of the other forums (not sure if that requires special permission or not). Also, I am very glad to have found this board because we finally have someone to ask questions to!

Basically, a few of my co-workers and I have been put on a team whose purpose is to use the Simulink Tester to verify a set of requirements using a Simulink model and T-Vec. The Simulink model we are supposed to test is not ready yet, but we thought it would be useful to work a few examples from the Simulink Tester User's Guide so we would understand how to use the software. Unfortunately, we have run into a few issues with the first example we are working on. In the event the person who answers our question has access to the Simulink Tester User's Guide, the particular example I am referring to is Test Automation Example (starts on page 22) which uses the Simulink model called first_example.mdl which was included when T-Vec was installed (I believe).

Before I get into the problem let me point out that to generate all of the required files we used a computer with Real Time Workshop (RTW) on it as well as T-Vec. However, to attempt to accomplish the Visual C part of the example (creating the executable) we did have to switch to a different computer (we're working on getting the license moved to the same computer). It does appear that the C code was still generated using the first computer, we are just having a problem using it with the second computer (we think). Additionally, we have set up our directories like it reccommends on page 21 of the User's Guide.

So, our problems start on Executing Tests section of the example (on page 49 in the Simulink Tester User's Guide). We performed Step 1 and attempted to use the batch file (hack_sl_makefile.bat) to modify the makefile which had been created. Additionally in the folder where the makefile was created we found a batch file entitled build_sl2tvec_first_example_root.bat. Neither of these batch files performed the operations the User's Guide says that they should (described on page 230 (Appendix C) of the User's Guide). Both batch files give the warning "The system cannot find the path specified." Obviously, when we tried to create the executable (with Visual C) it did not work because the nmake file was not correct (it also gave us an error similar to "the file cannot be found"). So, because the bat files did not work to change the file we wanted to change things by hand. However, a few of the directions in the User's Guide are a bit vague. For instance, on page 230 where it says change the default directories (MATLAB_ROOT and MATLAB_BIN), do we change just the first occurance or all of the occurances of those variables (I believe they are defined at least twice in the nmake file).

Anyway, thank you very much for your time.

USA_Aggie
USA_Aggie
 
Posts: 3
Joined: Tue Jul 29, 2008 9:56 am

Re: Problems Using the Simulink Tester

Postby busser » Tue Jul 29, 2008 12:57 pm

Hi USA_Aggie

The examples and processes in the User's Guide do presume that the environment that you are using includes all of the necessary tools, Matlab, Visual C++, T-VEC VGS, and Simulink Tester. So, moving things between platforms is likely to be problematic. Normally, for these very simple examples, all you need to do is Export, Translate and then run the Generate & Execute Tests command.

first_example.png
first_example.png (114.24 KiB) Viewed 6859 times


This command simply runs "make" (gnumake) on a top level make file (<modelName>.prj.c.mak) that is created by the Simulink Tester translator to set up some environment variables and paths, based on the current configuration and directory information, and then runs another make file "build_and_test.c.mak" that is included in the Simulink Tester installation area. It is that make file that runs the hack_sl_makefile.bat to modify the .mk file produced by the RTW code generator to include the test driver .c file and then build and execute the tests and run the comparisons. Now, if you move any of the expected files to another machine, then these make file are going to start having trouble finding directories and other files they depend on. For one thing, there is usually dependencies on include file and library files that are part of the Matlab installation. So, if you are trying to compiler and execute tests on a machine that does not have a Matlab install or is installed in another location, the build process will not be able to complete.

For instance, on page 230 where it says change the default directories (MATLAB_ROOT and MATLAB_BIN), do we change just the first occurance or all of the occurances of those variables (I believe they are defined at least twice in the nmake file).

What you are trying to do, translate and generate tests and test drivers, on one machine and build the executable on another, is possible. But it will take a lot of familiarity and capability with tools like "make" and running the command line version of Visual C/C++, etc. The information in the Sl2TVEC User's Guide is not really meant to provide anything more than some basic guidance in this regards. In addition, the RTW output (such as the make files it produces) changes from Matlab RTWversion to Matlab RTW version. It is possible that you will need to change these definitions in multiple locations.

Before making an modifications to any of the make files, produced either by Simulink Tester or RTW, I would suggest that you make sure that you can simply build the code for the model itself first, without trying to include the test driver files, etc. In other words, try starting with Matlab/Simulink/RTW artifacts only. Once you can build these files on your Visual C platform, then try to make the changes necessary to add the test drivers to the .mk make file build process and get the make files that we distribute to control the whole process and run the test drivers and compare the results.

I would like to add a couple more comments. The Simulink Tester/T-VEC VGS suite of tools is rather unlike most, or any, other software development tools/technologies that you make be familiar with. Consequently, it is not that easy to learn to use them simply by following User's Guide material and documentation. We highly recommend scheduling at least a 3-4 day training class for some or all of your intended users. It is far easier to go through the learning curve with personal instruction than trying to learn via email and questions in the Users Forum. However, we will do all that we can to help you be successful via any means we can. So, please continue to ask questions via this Forum whenever they arise.
busser
Site Admin
 
Posts: 52
Joined: Thu Mar 13, 2008 7:42 pm

Re: Problems Using the Simulink Tester

Postby busser » Tue Jul 29, 2008 1:12 pm

Hi Again USA_Aggie

With respect to this issue

Good Morning. I attempted to post this in the Bugs section but I could not find the New Post button as is in that forum or any of the other forums (not sure if that requires special permission or not). Also, I am very glad to have found this board because we finally have someone to ask questions to!

It should look something like this

NewTopic.png
NewTopic.png (35.2 KiB) Viewed 6852 times


Please let me know if you do not see this button. We have tested it here and the ability for registered users to add topics to this section seems to be okay.
busser
Site Admin
 
Posts: 52
Joined: Thu Mar 13, 2008 7:42 pm

Re: Problems Using the Simulink Tester

Postby USA_Aggie » Tue Jul 29, 2008 1:41 pm

Thank you for the answers to my questions (I think I posted another post before I saw your reply - so I think you probably already answered it). Anyway, I will ask the people in charge in my office about the 3-4 day class you mentioned and see if they think it is worth the investment. Also, I just went back and doublechecked the Bugs section and the New Post button DOES NOT appear. It appeared in the section I posted in (that is how I posted). Anyway, thanks for your help.
USA_Aggie
 
Posts: 3
Joined: Tue Jul 29, 2008 9:56 am

Re: Problems Using the Simulink Tester

Postby busser » Tue Jul 29, 2008 2:49 pm

I believe that you should now be able to see the New Topic button in the bug reports section. Not sure why, but your account did not have permission for posting in this area. I should now. Sorry for the inconvenience
busser
Site Admin
 
Posts: 52
Joined: Thu Mar 13, 2008 7:42 pm


Return to General Topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron