12-04-2019 02:43 AM
As I have taken 1D string into Property node of combobox and there are various Items to select from combobox.
I want to know what item got selected from comboBox and want to use it as a string for further conditional command. So how to take output from combobox selection.
i wand output from the array where i have my comboBox
12-04-2019 02:54 AM
12-04-2019 02:06 PM
The value out of the combobox is the selected value. It is that simple.
12-04-2019 02:19 PM
This is how you would get the value with a property node:
12-05-2019 03:13 AM - edited 12-05-2019 03:23 AM
@aeastet wrote:
This is how you would get the value with a property node:
But please note that access through a property node is always worse than accessing the terminal (or even a local variable) in terms of performance. Frontpanel element property nodes are not only fully synchronous, they also always execute in the UI thread which is used in LabVIEW for anything that concerns the UI update or has to be multithreading protected in some other ways.
This means for any such property node:
- the code has to arbitrate for the UI thread (since this is used for a lot of other things including all UI drawing this can take a considerable time in which your diagram is simply blocked and can't execute further once there are no other LabVIEW nodes to execute)
- it has to do a context switch to the UI thread (this costs also performance as the current thread state has to be saved and the UI thread state has to be restored into the CPU registers.
- it executes the code and has to wait until the property is fully read or updated
- it switches the thread context back to where it was originally and then can continue your diagram code
This is not shocking if it happens occasionally, the total time for this can be anywhere between several microseconds to many milliseconds mostly depending if the UI thread is readily available, but if you do that in a loop many 100 or more times a second your LabVIEW code will be crawling instead of speeding away.
Terminal access is different as it accesses a shadow copy of the control data that can be done in parallel to other activities of the control and does not require UI thread context switching. Instead the control will be signaled that something has changed and will then at its convinience update its own state based on the shadow copy data. This is good performance wise but obviously costs extra memory. For a terminal access which is the main way to access a controls data this was considered worth the memory cost. Doing the same for all property nodes would not only have made the internal implementation a lot more complex but also potentially exploded memory use.
And back in those days when property nodes were introduced in LabVIEW high end computers had 128 MB or 256MB of memory (and a few GB of HD space).
12-05-2019 07:38 AM
@rolfk wrote:
And back in those days when property nodes were introduced in LabVIEW high end computers had 128 MB or 256MB of memory (and a few GB of HD space).
My first PC had 4MB of memory and a full (1)GB of HDD! And it was good for its time. (I didn't come into contact with LV until some 10 years later, with LV 6(?) and the computer probably had 64 or 128Mb)
/Y