05-27-2012 10:10 AM
Hello
I'm trying to programatically create cursors in the Waveform Graph. I want to have as many cursors as plots in the graph. See the attached VI. And now the weird thing: when I decrement number of plots, everything is OK - plots are shown, cursors are created. But when I increment them - I get "Error 1077 - Invalid property value." from the Cursor List Property Node.
So the typical question: is it me or LabVIEW doing it wrong? 😉
05-27-2012 12:45 PM
Hmmm.. Surprising, I have to say I don't know why you get this error, but to solve the problem here's what you can do, remove the "Cursor Plot" from entry from your "bundle by name" that's in the loop (the default value of 0 >> first plot" will be kept and after setting the cursor list, re-set the correct plot / cursor association. See this :
Anyway, if someone can explain why this error comes up, I am interested in knowing why.
Hope this helps
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
05-27-2012 03:02 PM
Thanks to your reply, TiTou, I've came with another workaround - if you put wait (for example 10 ms) into the sequence struct on my VI's front panel, it works. And this lead me tothe best solution yet - update graph using Value property:
This leads to interesting conclusion regarding updating controls using terminal or property node. It seems that update through terminal is the quickest method, but it doesnt work immediately - the graph didn't know about the data update right after the cable reached the terminal! When you use Value property node, you can be sure that everything is updated when the flow leave the node.
Any comments from NI about this? 😄
05-27-2012 03:13 PM
I hope that NI considers this to be a bug.
This thread (Front Panel Control/Indicator Update Speed) points out that writing to the terminal takes place asynchronously whereas writing to the value property is a synchromous action. So it should be a bug.
05-27-2012 03:24 PM
05-27-2012 04:12 PM
@PiDi wrote:
Oh, no, if property is synchronous and terminal is asynchronous, then everything is working exactly as it suppose to work.
Nothing is alright: By wiring to an indicator, the data value is set. Using the value property can be used to read the data. In your code it did not work when first wiring to the indicator but it works when first writing to the value property.
I expect this to be a race condition in LabVIEW.
05-29-2012 04:55 PM
Still impressed by this thread (Front Panel Control/Indicator Update Speed) I added a DeferPanelUpdate before writing the CursorList:
As a result, LabVIEW redraws the FP and then writes the CursorList without any error!
I must confess that I do not like this workaround.
06-11-2012 05:23 AM
Hello,
As writing by terminal is asynchronous, it does not guaranty that it will be finished before writing to CrsrList property. Even if writing to CrsrList property occurs letter on the block diagram, and even when writing to property node is synchronous. Therefore the application mentioned above requires using fully synchronous code as below:
It is to work without any additional delays (wait functions). Please also note, that property node updates properties in order in which they appear on block diagram (from top to bottom). This is why the code shown below would NOT be the proper one:
10-19-2012 01:50 PM
Are you basically saying that every time the cursorlist property is changed or updated that the graph value must be written again? Also if you write a cursorlist without a grpah value already in teh graph, woudl this cause a problem?