NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Vincent_R.
Posts: 31
0 Kudos

Model Framework - C Code - Model Name - File Version - Product Name

Hi,

 

I'm using the Model Framework Guide for a customer's project. So far so good, my first question is: how do I set the parameters to get them within "Simulation Model Info" section for my model in System Explorer for following fields:

File version: 
Product name: 
Internal name:
Company name:

I guess that some options are defined by the IDE (File version, Product name, ...) itself but I want to clarify which ones?

 

My second question is about Model name. In my C code, I changed the values for ModelName but, in my tests, it doesn't seem to be used by System Explorer. It seems that actual Model Name is the one from my DLL.

Can you tell me where I'm wrong?

 

NOTE: I joined a screenshot with green oval shapes to show what I would like to set within DLL code.

 

Best regards

 

Vincent

 

 

 

Member
Sylv_1
Posts: 6
0 Kudos

Re : Model Framework - C Code - Model Name - File Version - Product Name

Hello,

I have the same question, how do I set the parameters of the "Simulation Model Info" section, for a model in the System Explorer.

The difference with Vincent is that my model is a lvmodel build with LabVIEW 2011 to use with VeriStand 2011.

My fields of the "Simulation Model Info" section are filled like this :

File version: 1.0

Product name: My DLL

Internal name: My DLL

...

Thanks to help us to set these parameters ?

 

Best regards

 

Sylvain

Cordialement,
Sylvain
Member
NestorG
Posts: 119

Re : Model Framework - C Code - Model Name - File Version - Product Name

Hi Sylvain,

 

All this file information, with the exception of Model Rate, is stored and represented like any other Windows DLL. Below are ways to modify this information:

 

- The Mathworks, Inc. Simulink (R)

1.Open the model's Configuration Parameters window 2. Navigate to Real-Time Workshop >> NI Model Information  

 

Here you can modify the model file information. This is the recommended method to add file information. However, if you so desire to manually update the file information, such as the File Version, simply make your changes in the *.rc file. The DLL resource (.rc) file will be located next to the produced model DLL. After the changes, you must rebuild the DLL to apply the changes.

 

- LabVIEW Model Generation

1. Unfortunately, this feature is presently not available via the LV interface. CAR 361995 has been filed to address this issue.

Nestor
Member
Sylv_1
Posts: 6
0 Kudos

Re : Model Framework - C Code - Model Name - File Version - Product Name

Hello Nestor,

Thanks for your answer in this topic.

So for the moment it is not possible to set the field version for the lvmodel, but do you known if we have an other possibility to manage the model version. I need to set it and then to read the version for example with the system explorer ?

 

Thanks for your help.

Cordialement,
Sylvain
Member
NestorG
Posts: 119

Re : Model Framework - C Code - Model Name - File Version - Product Name

Yes, it is possible to set this information, but would require some manual and unsupported modifications (though nothing harmful). Follow these procedures to modify the file information.

 

1. Open the NIVS Model Generation tool

2. Click the Options button

3. Enable the "Retain Intermediate Files in Destination Folder"

4. Build the model

 

5. Navigate to the Destination folder and open the newly created LV Project (*.lvproj)

6. In the LV Project Explorer, expand the Build Specifications section and double click on the DLL specification

7. In the Properties window, select the Version Information category. You may modify the contents here accordingly.

 

8. Rebuild the model (aka. DLL) from LV Project Explorer

9. Navigate to the location of the built DLL. By default the name of the model is "lvsim_veristand.dll".

10. Rename the lvsim_veristand.dll" to myModel.lvmodel Note the change in the file extension from .dll to .lvmodel

 

Now you may import the model into System Explorer with the desired file info should now show up.

 

We will try to expose the majority of File Information via the Options dialog in a future release of NI VeriStand.

Nestor
Member
Sylv_1
Posts: 6
0 Kudos

Re : Model Framework - C Code - Model Name - File Version - Product Name

Hello Nestor,

 

Thanks a lot for your answer. This solution works good, and resolves my problem. :smileyhappy:

Cordialement,
Sylvain
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page