10-23-2024 05:19 PM
Hi all,
I'm having a strange issue with using a text ring.
Steps of execution:
1. Programmatically set the ring string and values using this property node:
2. Read RingText.Text property but gets back <0>
3. If I use another method by indexing the Strings[] property with current value, then the returned string is correct (matching the displayed text on the ring)
Here are some screenshots from my actual application:
method using RingText.Text property:
method using indexing String[] property:
Problem is that if I take out the UI component and do it in a blank VI, the ring text property works as expected.
Expected behaviour works if code is running on a simple VI:
Anyone came across this issue?
Thanks in advance 🙂
LV Version: LV2018 32-bit
Solved! Go to Solution.
10-23-2024 05:45 PM
Instead of a long set of pictures, attach a simplified version of your VI.
(Everything you describe seems to work fine in LabVIEW 2024, but we cannot really tell all your details)
10-23-2024 06:13 PM
That looks like a strict type def'd control (probably set to allow undefined strings) I would expect the "<0>"
10-23-2024 06:32 PM
Add a query after step1 to see if the value gets set properly.
10-24-2024 02:12 PM
I'm guessing that you've got a race condition; but I can't tell because you didn't post your code.
10-24-2024 03:13 PM
@JÞB wrote:
That looks like a strict type def'd control (probably set to allow undefined strings) I would expect the "<0>"
I did not see a black corner on the terminal and since he is writing a value of zero right after defining the strings&values property, and the string&value of the first item is ["A", 0], there is no reason to expect a <0> here, even if undefined string are allowed.
And yes, we cannot efficiently troubleshoot from pictures.
10-24-2024 04:28 PM
Hi all, thanks for your response.
I didn't post the code because getting the ringtext.text property works as expected in a simple VI but not in my application.
Which leads me to think about the race condition in my application that @paul_a_cardinale has mentioned.
I've found the issue to be the use of defer front panel update function in a separate loop causing UI to update at an independent rate. It's all working fine now.
Thanks again.
10-29-2024 11:30 AM
@J.CHEN wrote:
Hi all, thanks for your response.
I didn't post the code because getting the ringtext.text property works as expected in a simple VI but not in my application.
Which leads me to think about the race condition in my application that @paul_a_cardinale has mentioned.
I've found the issue to be the use of defer front panel update function in a separate loop causing UI to update at an independent rate. It's all working fine now.
Thanks again.
Technically not a race condition, but yes, if you disable front panel updates you won't have any text to read from the controls ...