LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cursor List Property - error 1077

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? 😉

0 Kudos
Message 1 of 9
(3,963 Views)

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 :

 

Voila_Capture6.png

 

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

Antoine Chalons

Message 2 of 9
(3,955 Views)

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:

 

cursors.png

 

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? 😄

 

0 Kudos
Message 3 of 9
(3,950 Views)

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.

0 Kudos
Message 4 of 9
(3,947 Views)

Oh, no, if property is synchronous and terminal is asynchronous, then everything is working exactly as it suppose to work.

0 Kudos
Message 5 of 9
(3,944 Views)

@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.

0 Kudos
Message 6 of 9
(3,940 Views)

Still impressed by this thread  (Front Panel Control/Indicator Update Speed) I added a DeferPanelUpdate before writing the CursorList:

DeferPanelUpdate.png

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.

0 Kudos
Message 7 of 9
(3,912 Views)

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:

 

fig1.jpg

 

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:

 

fig2.jpg

0 Kudos
Message 8 of 9
(3,890 Views)

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?

0 Kudos
Message 9 of 9
(3,822 Views)