Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

ctrl val.set cluster element

Hi,
 
there is a method of VI called "Control Value:Set [Variant]". It works fine, but I have no iedea how should it work with clusters. As Control Name parameter I have tried to put [Clustername.Element] syntax, but it doesn´t work.
 
thanks in advance
 
(LabVIEW 8.2)
 
regards
MB
0 Kudos
Message 1 of 3
(3,294 Views)

Hi,

 

you can not set single elements of a cluster with this method. What you have to do is, first call the method "Control Value:Get [Variant]" on the whole cluster. Then tranform the variant to your cluster, change the needed values, after that transform the cluster back to a variant and pass this on to "Control Value:Set [Variant]" .  See the attached screenshot.

0 Kudos
Message 2 of 3
(3,286 Views)
A second solution would be, to get the control reference of the cluster. With this reference you can get all controls contained in the cluster (See second screenshot atttached below). This can get complicated, if your cluster is complex. You can decide which solution isbetter for you.
 
André
 
0 Kudos
Message 3 of 3
(3,284 Views)