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: 

Slider text labels and markers

Hi All,

I'm a newbie at this Labview business, so hopefully the problem I'm
having is purely due to my newbie-nature...!

I've been making a slider where I have a series of labels to be placed
at some marker positions. So, I have a property node for the slider to
which I pass an array of marker positions (e.g., 0, .25, .5, .75, 1)
and marker labels (e.g., MIN, SOME, MID, LOTS, LOADS) at runtime.
However, the ouput is odd - markers appear at the correct positions,
but the text is incorrect.

E.g. 1: If I have Markers (0, .5, 1) and Text (MIN, MID, MAX), the
slider is labelled (0 - MIN, .5 - MAX, 1 - MAX).

E.g. 2: If I have Markers (0, .25, .5, .75, 1) and Text (MIN, SOME,
MID, LOTS, LOADS), the slider is labelled (MIN, MID, LOTS, LOADS,
LO
ADS).

So, the second text label is ignored and the others sort of 'shifted
left', with the final label being duplicated at the last marker
position.

Any ideas?

(BTW - LV 6i, Windows XP)

Steve.
0 Kudos
Message 1 of 9
(5,349 Views)
Steve,
Please find the attached example that has 5 markers. You can change the marker labels in the array.
The VI was created in 6.1 and I saved it back to 6.0, but did not test it in 6.0. It should work the same.

Zvezdana S.
National Instruments
0 Kudos
Message 2 of 9
(5,349 Views)

I am using 8.5.1 and I have experienced the same problem, five years later! The workaround provided will work for sequential values of text labels only - I am programmatically assigning Marker Values for non-equally spaced ticks.

 

For instance, when Marker Values are programmatically set to (1, 2, 4, 😎 and the Text Labels are programmatically set to (one, two, four, eight), the text labels actually put onto the slide are (one, four, eight, eight). Now here's the kicker: when I set the Text Labels to (one, DUMMY, two, four, eight), they show up properly on the slide.

 

As Steve orignally noted, the second text label is being ignored. Further, the "dont-show then show" trick suggested by Zvezdana as the workaround does not fix this problem. What gives?

 

Thanks,

Jack

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

Hi Jack,

 

I took a look at the functionality of mixing markers and text label and believe what you are seeing is a bug. I will report this to the development team.

 

Thanks,

Sappster
0 Kudos
Message 4 of 9
(5,044 Views)

Thanks, Mark!

0 Kudos
Message 5 of 9
(5,039 Views)

This bug still exists in LV2012

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 6 of 9
(4,438 Views)

This bug still exists in LV2015

Message 7 of 9
(4,141 Views)

Bug still exists in LabView 2016 (16.0)

0 Kudos
Message 8 of 9
(3,923 Views)
0 Kudos
Message 9 of 9
(3,622 Views)