08-22-2012 07:22 PM
Hello, I am new to LabVIEW programming. I have a while loop where a chart is updated with values from the RS232. The properties of this chart are defined in an outer loop. How I can do to refresh chart properties without leaving the while loop?. From what I can understand, if not get out of the loop where I am working, the properties are not updated if there was a change in them. If I put the definition of the properties within the while loop, the chart is not updated to the desired speed. My idea was to generate via a button, the refresh chart properties. How I can do?. thank you very much
08-22-2012 08:48 PM - edited 08-22-2012 08:49 PM
Put the property node inside a case structure in the inner loop and make sure it only goes true whenever a property changes.
Can you show us some code? What properties do you need to write?
08-23-2012 04:33 AM
Visual representation of what altenbach told
08-23-2012 10:49 AM
@nijams wrote:
Visual representation of what altenbach told
Please don't put words in my mouth. I did not suggest at all what you are showing here! Thanks!
08-24-2012 08:57 AM
08-24-2012 09:07 AM - edited 08-24-2012 09:09 AM
@Plínio wrote:
I think the image below explains a bit what Altenbach described above.
Please correct me if i am wrong.
I never said anything about a "refresh" button. 😮
I said "whenever a property changes". To see if the property node needs to update, you can compare it to the previous value using a feedback node. Here's a simple draft.
Note that the globally initialized feedback node start out with NaN to ensure that the property is written once at the beginning.
08-24-2012 09:15 AM
NaN is always Not Equal to NaN.
Ben
08-24-2012 09:44 AM
I would expect that the control is never NaN, thus resulting in an unconditional TRUE on first run.
In general, simply initialize with a highly unlikely value (-Inf, -1, 0, pi, etc.) as appropriate for the situation.
If you want, you can replace the comparison with "equal" and flip the two cases. Same difference. 😉
08-24-2012 10:15 AM
Altenbach, the ideia of a refresh button was wrote by DAScharf
@DAScharf wrote:
Hello, I am new to LabVIEW programming. I have a while loop where a chart is updated with values from the RS232. The properties of this chart are defined in an outer loop. How I can do to refresh chart properties without leaving the while loop?. From what I can understand, if not get out of the loop where I am working, the properties are not updated if there was a change in them. If I put the definition of the properties within the while loop, the chart is not updated to the desired speed. My idea was to generate via a button, the refresh chart properties. How I can do?. thank you very much
Plínio Costa
Application Engineering
National Instruments Brazil
08-27-2012 02:13 AM
"Please don't put words in my mouth. I did not suggest at all what you are showing here! Thanks!"
Altenbach, Sorry for my misunderstanding