LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

no data pass in xcontrol

Hello,

 

It's the first time that I use XControls.  The xcontrol is working fine exept that I can't find a way to get my data out of the xcontrol.   I've attach the xcontrol to this message.  Can you tell me what I did wrong?

 

Thank you,

0 Kudos
Message 1 of 4
(2,715 Views)

You're on the right track by placing data in the 'data' cluster.

 

However you need to be more specific which data you store, currently you only store the last selected value.

 

I think the following steps should help you:

  • Disconnect the Actions control on the Facade from the data1.ctl
  • Replace the listbox in data1.ctl with a table
  • Upon a double click you replace (or add) the correct cell with the string representation of the possible actions
  • You need a property 'ActionsData' (get and set)
  • This property outputs the data table.
  • In your test.vi you do a read 'ActionsData' from the control XControl and a write 'ActionsData' to the indicator XControl.
  • In the facade VI you need to detect that a write to the ActionsData has happenend, when a property is executed the event 'Display State Change' is triggered, for now you can 'quick and dirty' parse the table and update the Facade Actions control.


Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 4
(2,693 Views)

Thank you for your answer.  I've manage to add the read property but not the write property.  Do I do it in the "display state change"?  Where can I find from wich property the display change came from?

 

Thank you,

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

coolaid wrote:

Thank you for your answer.  I've manage to add the read property but not the write property.  Do I do it in the "display state change"?  Where can I find from wich property the display change came from?

 

Thank you,


For detecting which property caused the event to be triggered you need to write yourself a framework. What I normally do is add a string to the data cluster that I set in the property and reset in the event.

 

You should call these properties in your owning VI of the XControl.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 4
(2,642 Views)