LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Model from VI

Solved!
Go to solution

Hi,

I implemented LabVIEW model and I generate model from VI, that should be used on VeriStand (Tools ->NI VeriStand -> Generate Model from VI) and I chose to create dynamic lib for Linux. I found out what are supported types for inputs and outputs (https://www.ni.com/docs/en-US/bundle/labview-model-interface-toolkit-api-ref/page/vsmithelp/mit_mode... but Ićm interested in obtained header file *.h . It doesn't matter which type I choose as input and output, I always get double input and outputs in function Model in header file. Is obtained behavior same as expected? Also, if that's OK, do I need to do some explicit conversions of data or not? For example, my inputs are boolean and cluster of number, boolean and 1d array. Something similar is with output. I couldn't find any documentation on this topic. I would appreciate any of your help. Thank you!   

0 Kudos
Message 1 of 3
(1,143 Views)
Solution
Accepted by topic author labanja

Within the VeriStand Engine, all data are processed in data format of Double. You should do the conversion if you don't want the unexpected casting behavior.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 3
(1,068 Views)

Thanks for Your answer!

I have some more questions. Is there any documentation about input/output data serialization? 
For example, if 1d array is used as input/output, default values (which mean size and actual values) have to be set in order to generate model from VI. That means if I set input array with 3 elements in LabVIEW model, it will later (in dynamic lib) use 3 elements although I want more/less elements. Is there any solution to this problem? Also, if there are more than one output, I would say that it store them in double outputs[] from the last to first connected output from LabVIEW model and I have to know size of arrays or whatever in order to pull out elements I want. I couldn't find any documentation on this topic, so I would appreciate any kind of help. 

0 Kudos
Message 3 of 3
(1,039 Views)