06-25-2012 01:21 PM
ok, that works with the file as well. So presumably I could have the model opening "lookup.csv" once, and just change the content of that file prior to a run from the LV side so nothing would be hardcoded.
L.
06-25-2012 01:24 PM
Yep, or you could just have multiple files for your lookup table, and pass in the path of the file you want to use to your model.
Matt M.
06-25-2012 04:35 PM
You can set the 1D array parameter for your LabVIEW Model using the Set Parameter 2D Array Values.vi as shown below. Just construct a column or row vector as a 2D array and everything works properly.
06-25-2012 05:16 PM - edited 06-25-2012 05:16 PM
Hi Jarrod,
There is still something I am missing here... What you are showing here is what I thought this API call was for. But where do I get the Lookup Table on the model side though, since the model build rejects 1D and 2D parameters ??
L.
06-26-2012 12:09 AM
06-26-2012 09:40 AM - edited 06-26-2012 09:44 AM
... So you are saying that the 1D parameter array in the model can be changed at run time using the Set Parameter 2D array... .
06-26-2012 09:41 AM
Stephen is correct. I would guess that setting the default value is the step you might have missed, since it is the least intuitive. The size of the parameter must be fixed when the LVModel is compiled. To set this size, the 1D array control must have a default value set of the correct size. I am attaching the test files I just used to test all this out if you want to take a look.
06-26-2012 09:42 AM
You can definitely change the 1D array value from the API. Refer to the test model and API caller I just attached.
06-26-2012 09:51 AM - edited 06-26-2012 09:52 AM
I see... I was not using the 2D API call to set the 1D parameter... And to recap what you say, the array size must be set at pre-compiled time. Ok somewhat limiting, but can be dealt with...
As mentioned earlier, I also use a read file call (once) to load the look up table from a file on the RT machine. May slow down the iteration loop on this call but the file is not large ~ 17 Kbytes.
L.