06-23-2010 02:36 AM
I've been using CVI 2009 and I'm able to create a simple network variable using Distributed System Manager 2009 (DSM 2009).
Now I need a "struct" network variable, and I noticed that the only option I can choose is "From Custom Control..." which asks me for a LabVIEW .ctl file.
I read this KB and I created a custom control with LabVIEW 8.2.1, but DSM gives me the error "Invalid data type". I find the same error even if I create a .ctl file with a simple numeric indicator.
Should I use a specific LabVIEW version to create this .ctl file?
How can I create a struct network variable with DSM if I only have CVI 2009?
06-23-2010 09:22 AM
This seems to work fine if one creates the variable in LabVIEW itself and not in Distributed System Manager. Basically, in LV, create a new variable by right-clicking the 'My Computer' icon in the Project tree and choosing New >> Variable. Then point LV to the .ctl file containing the cluster definition for the variable type. Finally, deploy the variable in LV - by right-clicking the library node in the project tree and choosing 'Deploy All'. Now, the variable appears in DSM. I tried this with LV 2009 and DSM 2009.
06-23-2010 09:26 AM
Hey Vix,
The easiest way to create a variable you will write struct data to is to specify the datatype of the variable as "Variant". You the can't see the individual struct fields in DSM, but you will be able to see the updated timestamp when the variable is written to.
NickB
National Instruments
06-23-2010 09:31 AM
I tried with LV 8.2.1 and Variable Manager 8.2.1 and everything seems OK (both creating the varibale in LabVIEW and in Variable Manager).
The problem is that I want to deploy variables on the PC where I have CVI 2009, that is not my old one where I have LabVIEW.
On my new PC I only have CVI 2009 and DSM 2009, but not LabVIEW: how can I create a "struct" network variable?
06-24-2010 08:19 AM
Like Nick recommends, your best option would be to use a variable of type 'Variant'. You can write values of any type to 'Variant' variables. You can also create such a variable programmatically in CVI 2009 instead of using DSM - see the CNVNewVariable function. This may or may not be better for your deployment use case.