LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Network variable creation through DSM

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?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 5
(3,405 Views)

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.

 

0 Kudos
Message 2 of 5
(3,385 Views)

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

0 Kudos
Message 3 of 5
(3,382 Views)

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?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 4 of 5
(3,381 Views)

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.

0 Kudos
Message 5 of 5
(3,357 Views)