From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XControl Shared Variable

Hi,

is there any working way to share data between XControls and another VI without using value-property-nodes?

The problem is that i have an XControl displaying and modifying data and another VI that also modifies and reads the data (concurrent access is no problem here).

Using references and the value-property-nodes does not work because i have a graph with a large dataset in another XCtrl and thus the property-node blocks the execution thread if you zoom/resize the graph. Using shared variables does not work because of the different contexts the XCtrl and the VI are running in (even with network-published ones this did not work).

Did i make any mistakes or is there another solution?

Thanks,
Thorsten

using LV 8.0
0 Kudos
Message 1 of 7
(3,159 Views)

@baumi wrote:
is there any working way to share data between XControls and another VI without using value-property-nodes?

The problem is that i have an XControl displaying and modifying data and another VI that also modifies and reads the data (concurrent access is no problem here).

Using references and the value-property-nodes does not work because i have a graph with a large dataset in another XCtrl and thus the property-node blocks the execution thread if you zoom/resize the graph. Using shared variables does not work because of the different contexts the XCtrl and the VI are running in (even with network-published ones this did not work).




Hi Thorsten,

maybe using a FGV (functional global variable) will help you. It consists of an uninitialized shift register which contains the data of your XControl.



With this, you can read and write to the FGV in multiple caller VIs without the use of property nodes.

Message Edited by SFK on 10-24-2007 05:33 PM

Download All
0 Kudos
Message 2 of 7
(3,142 Views)
Thanks for your efforts, but this wasn't exactly what I was looking for.

I've now build a small example of what i want to do and this is sadly also not working with functional global variables.

Maybe someone has another idee?

Thanks
Thorsten
0 Kudos
Message 3 of 7
(3,128 Views)

Thanks for your efforts, but this wasn't exactly what I was looking for.

I've now build a small example of what i want to do and this is sadly also not working with functional global variables.




Thorsten,

I am not quite sure if I can follow your use of the XControls. In your example, you are reading an FGV inside the XControl to display it's data, and in your first post, you wrote that you even intended to manipulate data inside the XControl.

Do I assume correctly that in your real application, you want to place the XControl in one VI for visualisation purposes and control the data generation and the display update process from separate VIs?

If yes, wouldn't the use of a notifier in your visualisation VI (which starts the display-updating read process) and a conventionally read FGV solve your problems the easy way?

If not, can you please clarify the intended use of your XControl and the program architecture?

Regards,
Sebastian
0 Kudos
Message 4 of 7
(3,117 Views)
Hi,

the software is a control interface for a measurement device. I have a XCtrl that provides complete script editor functionality. The Main VI owns this XCtrl and calles sub-VIs to process the created script. But during the processing the script editor should display status information about the running step within the script. This data is provided by the processing sub-VIs. And furthermore the script editor remains able to edit the running script. The whole project is a bit larger and wiring through all processing sub-VIs would be a pain. It was all working, but then there came the performance issue with the property-nodes.

Sincerely,
Thorsten
0 Kudos
Message 5 of 7
(3,107 Views)
I have been toying with using a re-entrant AE within an XControl but I have yet to hear of anyone interacting with an Xcontrol using one.
 
If this is possible, I definately want to hear about it.
 
There are two passages in the LabVIEW Advanced Application Course that apply to this topic.
 
From page 4-4
 

Xcontrols are powerful, difficult to create. Poorly formed XControls can cause significant problems, including hanging the development environment system. For these reasons, only an architecht or similarly experienced LabVIEW user should develop XControls.

 
from page 4-51

An XControl runs in a different LabVIEW context than ordinary VI's. The XControl does not share a data space with other VIs and you cannot use techniques such as global variables or syncronization mechanisms to transfer data between teh XControl and other VIs.

 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 7
(3,097 Views)

Does anyone known the cause why an XControl sometimes is hanging in the development environment system.

 

Erik

0 Kudos
Message 7 of 7
(1,871 Views)