LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XControl component reference access

Hi all,
 
We have an XControl that contains a graph.  Is there anyway of getting a reference to that graph out of the XControl?
 
We have a task that should be updating the XControl graph using the XControl data update, but due to a bug in LabView 8.5.1 our controller can't contain a reference to the XControl as part of its state data.
 
If our task can't hold a reference to the XControl, it should be able to hold a reference to the XControls graph and update the graph using the property node.
 
Any ideas?
 
Best regards
 
Phill
 
 
0 Kudos
Message 1 of 4
(3,010 Views)
Hi Phill,

I have a couple of questions before I try to find a workaround. Can you post your XControl, so I can understand what exactly you are trying to do.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 4
(2,978 Views)
Hi Adnan,
 
I thought this may be a solution to a problem I've discussed with you previously.  We have a producer task wrapped up in a class that needs to update an XControl graph.  Due to an error in LV 8.5.1, the class can't hold a reference to the XControl.
 
I've got a workaround where a proxy class object sits between the producer and XControl.  The proxy can hold a reference to the XControl.  When the proxy is notified by a user event from the producer it writes a value the XControl reference which will update a graph in the XControl via the Data change event.  However the notification via the proxy seems to be slowing things down.
 
If the producer can't hold a reference to the entire XControl, could it hold a reference to just the Graph from the XControl.  The producer could then update the graph directly.
 
Best regards
 
Phill
0 Kudos
Message 3 of 4
(2,962 Views)

It possible to acces the references of the objects inside the x-control.

 

First you need to add a reference to the state data.

Then add a read-only property to acces this reference form you caller VI

Last in your Facade VI you have to write the needed reference into the state data, and set State Changed? to TRUE.

 

Now you can acces to reference and all its property.

I've added an example as well

 

Regards Patrick

 

0 Kudos
Message 4 of 4
(2,822 Views)