LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Attribute of Shared Variable type Variant

I'm using a Shared Variable of type Variant to communicate between labview processes.  The first process can write one of two different clusters to the SV (attachment 1).  I add an Attribute to the Variant to indicate which cluster was written (cluster1 or cluster2).  The second process sets up a User Event for the SV, and when the SV has been written to, reads the data-type (attachment 2).  If data-type is Custom (as it should be for SV Cluster data), then the Attribute should be read to determine how to de-cluster the data from the SV.  But, the 'Read Attribute' VI never reads the actual Attribute data.  I've checked that the Attribute is written in the first process, and this is ok.  Does Variant Attribute data get transferred via a SV?  If not, how can I determine which de-clustering to use?  Is this a bug - I haven't found anything within the 'Known Issues' papers.

 

thanks for any insights into this problem

gary boorman
 

Download All
0 Kudos
Message 1 of 3
(3,018 Views)

Hello,

 

I tested this in LabVIEW 2009. To send the variant with attribute data, I used this code:

 

sender.png

 

And then to receive the variant with attribute data, I used this code:

 

receiver.png

 

This gave me the correct result:

 

result.PNG

 

 

If this is a bug (which I haven't been able to find any mention of), it has been fixed in LabVIEW 2009?

 

Could you confirm what version of LabVIEW you are using? Are you able to try this in LabVIEW 2009?

 

Happy to help!

Message Edited by macaba on 08-28-2009 04:05 AM
0 Kudos
Message 2 of 3
(2,954 Views)

Hello,

 

I'm using Labview 8.5.   I've tried Setting the Attribute and then Getting it, but it just doesn't work when using the Variant as a shared variable.

I'm reluctant to upgrade to 2009 just yet, since it would involve updating several machines within our lab.  But it looks like I will have to try it on at least one machine.

 

Many thanks for your help.   

 

 

cheers

gary 

0 Kudos
Message 3 of 3
(2,921 Views)