From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XYGraph Cursor legend bug instantly crashes LabView 2012

Solved!
Go to solution

Hi!

 

I am just facing a very annoying bug.

Please find my example VI attached, I would like to know wheather you can confirm the bug? Run the VI if you wish to see some curve (actually the bug appears even if you do not put any data on the graph, if you do, just the same) and after that try to click on the cursor legend vertical scrollbar to scroll up or down to see the cursor names.

 

It instantly crashes my LabView 2012 Full version:  12.0.1f2 (32-bit). This XYGraph always crashes LabView... I cannot go on with my project, now I will just try to bypass the error, I will try to delete the cursors, and add them again...

Anyhow, very strange and annoying behaviour...

 

Anyone could repeat the same bug?

 

Thanks for support!

 

0 Kudos
Message 1 of 6
(2,348 Views)
Solution
Accepted by topic author Blokk

The reason for the crash seems to be duplication of the cursor "Gas_inject". It is defined four times. Using the property node "CursorList" to remove those duplicates made the VI NOT crashing when moving the vertical scrollbar of the cursor legend.

For simplification:

Read the CursorList first, delete the duplicated elements of the array manually in the indicator (right click on element >> Data Operations >> Delete Element). The change it to a control, change the property node to write and run the VI once.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(2,340 Views)

hello,

 

please find attached my example VI, where I would like to programmatically set the label position of a cursor. Why my code does create at every run a new cursor with the same name?

 

thanks!

0 Kudos
Message 3 of 6
(2,337 Views)

You shouldn't work with static indices in the code (in your case: 1). Instead, search for the desired cursor (by name, passing as parameter?) and then modify that.

The reason for the additional cursors is that you are using "Insert Into Array" instead of "Replace Array Subset".

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 6
(2,333 Views)

Clear!

Thanks for support, I just learn all the time 🙂

 

ps.: in my project, I will have a constant number of cursors, so I can handle them in order with their indices. But I am curious: how can I do a dynamic change using the name of the cursor? Shell I search for the name in the list, and extract the corresponding index to use as input for the "Replace Array Subset" ?

 

thanks!

0 Kudos
Message 5 of 6
(2,331 Views)

Exactly:

Get the list of current cursors, search for the name which will result in a valid index. If the name is not present, the index returned is -1 (if you use the correct functions!) which can be captured in the code.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 6
(2,279 Views)