06-26-2020 02:32 AM - edited 06-26-2020 02:39 AM
Hello NI community.
I have a problem.
There are several cursors in the program (they set the boundaries for calculating the area under the curve). (See front panel)
After some time, they begin to flicker randomly (the graph does not flicker) - they can flicker 1 out of 10 or 10 out of 10, once a second or once every 20 seconds.
All this is in the event structure, which is in the while structure (see block diagram).
And the question is - how to remove this flicker?
P.S. I apologize that the screenshots have a lot in Russian, but I hope the essence is clear.
P.p.s. By the way, can someone else know how to increase the font size in the cursor name?
06-26-2020 02:40 AM - edited 06-26-2020 02:44 AM
Hi fizikaman,
why did you edit your message to replace all that English message text by Russian? You are limiting the number of people being able to help a lot…
Ok, now it's English again…
Comments on your block diagram image:
Way too much code! Way too many Rube-Goldberg constructs!
Use loops to repeat the same steps!
Why do you need to bundle a cluster just to unbundle in the next step?
And do you really need to call all those property nodes for all cursors in parallel?
How often is this user event called?
Why do those terminals miss their labels?
I recommend to use one FormatIntoString function instead of two NumericToString, one two ConcatString and some string constants to simplify the code…
Please attach the VI (LV2017 preferred) to get more/specific help.
06-26-2020 03:17 AM
"Way too much code!"
this is just a small part of a large program that controls spectrometers, lasers, etc.
"Why do you need to bundle a cluster just to unbundle in the next step?"
In the future, I want to make a subVI with one input.
"And do you really need to call all those property nodes for all cursors in parallel?"
Yes, because the calculations go in parallel.
"How often is this user event called?"
after measurement or after changing the number in the "standard (эталон on front panel)" window
Only all your questions are off topic of my problem. All of these calculations do not affect the flickering of cursors. But also I can’t understand what makes them flicker.
06-26-2020 04:02 AM - edited 06-26-2020 04:06 AM
Hi Fizikaman,
@Fizikaman wrote:
Only all your questions are off topic of my problem. All of these calculations do not affect the flickering of cursors. But also I can’t understand what makes them flicker.
The cursors can flicker when they are redrawn.
They are redrawn when you change their properties or when the plots are redrawn.
So my comments on using all those property nodes do relate to your problem of flickering cursors! And so does the question on graph update rate…
@Fizikaman wrote:
"Way too much code!"
this is just a small part of a large program that controls spectrometers, lasers, etc.
"Why do you need to bundle a cluster just to unbundle in the next step?"
In the future, I want to make a subVI with one input.
When even this small part of your code is so bloated then you really should cleanup your whole project…
Even when you want to create a subVI then an array instead of a cluster would be more reasonable: keep in mind the comment on using loops instead of duplicated code!
06-26-2020 10:45 AM
@Fizikaman wrote:
"Way too much code!"
this is just a small part of a large program that controls spectrometers, lasers, etc.
"Why do you need to bundle a cluster just to unbundle in the next step?"
In the future, I want to make a subVI with one input.
"And do you really need to call all those property nodes for all cursors in parallel?"
Yes, because the calculations go in parallel.
"How often is this user event called?"
after measurement or after changing the number in the "standard (эталон on front panel)" window
Only all your questions are off topic of my problem. All of these calculations do not affect the flickering of cursors. But also I can’t understand what makes them flicker.
It seems like you don't want to take GerdW's excellent advice. You can try, no guarantees, to defer Front panel updates before your event and then enable when done.
Another note, property nodes execute in the UI thread, which is single threaded, thus property nodes in parallel do not execute in parallel. You should use a loop construct, no change in execution but easier to maintain.
mcduff
06-26-2020 11:36 AM
There is no way to troubleshoot this from a picture.