LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

communication with Xcontrols

I want to program an XY-Graph that can mark some points of the curve and returns the marked points in an array. I want to combine all the functionality in one control, so I decided to use XControls.
 
But there is still a problem:
The XControl has only an input or an output (control or indicator). But I want it to have both at the same time, because I need to send the curve to the XY-Graph and afterwards I want it to return the marked points.
I also discovered the possibility of communication via the property-node of the XControl. But this doesn't work! I succeeded to create an additional property, but I don't know, how to connect the DataIn or DataOut from the FacadeVI (which contains my curve) to the property-input. The propertyVI has no DataIn- or DataOut-panel.
0 Kudos
Message 1 of 4
(2,840 Views)
This is a quick answer, without flushing all the details out.  I would make the data type the XY graph, and then create a property that returns the array of points.
 
Then in your Display State cluster have either the array of points or the reference to the data in the Facade VI.  So the facade keeps track of the points and whenever the property is called it can return the array.
 
Might work, if you attach your example Control we may all be able to play with it and find something.
0 Kudos
Message 2 of 4
(2,830 Views)

Thanks for the answer.

What Do you mean with "I would make the data type the XY graph"?

I already had the idea, to create a property that returns the array.

But I still have some problems with it. First of all I have read that propertynodes are quite slow. Is this true?

But the main problem is, that I don't know how to connect the DataIn / DataOut - panel of the facadeVI with the DisplayStateIn of the propertyVI. I already created the necessary datatype in the StateVI and connected the data-wire with the state-wire in the "DataChange-Event" of the facadeVI. So the data sould be sent to the DisplayStateOut-panel. But the property doesn't show any data!

Maybe there has to be something like another iteration-step to pass the data from the DisplayStateOut to the DisplayStateIn?

But I would prefer to solve the problem with only one iteration!

And another question:

How can I create a "reference to the data in the Facade VI"? I only know references in the case of propertynodes.

0 Kudos
Message 3 of 4
(2,818 Views)

Take a look at this example, does it do what you are looking for?

If not attach your control and I will take a look at it.

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