LabVIEW Web UI Builder and Data Dashboard

cancel
Showing results for 
Search instead for 
Did you mean: 

"data dashboard" version 2.0 dropdown only views "One, Two, Etc." Instead of the Enum text

Solved!
Go to solution

I am currently using the new Data Dashboard on on an iPad 1. I am coding in Labview 2012 developer suite. I found that the control switches work very well when linked to a shared variable. I finally managed to get the drop down to control a shared variable of data type typedef/enum. This controls very well within the Labview program, but on the Data Dashboard the dropdown only displays "One" "Two" etc.. instead of the actual Enum text of "This" "That" "The other" I can write back to the dashboard with a text conversion of the enum to the dashboard and place it in a string display above the drop down. While this gives the operator a display of the current Typedef/enum, it is not very intuitive. They have to select "One" to display "This" "Two to display "That" etc..

 

How can I get the Data Dashboard drop down control to display the enum text instead of "One" "Two" etc???

 

Glad to answer questions. Thanks for any KUDOS or marked solutions 😉
0 Kudos
Message 1 of 12
(11,284 Views)

Try this forum: http://forums.ni.com/t5/LabVIEW-Web-UI-Builder-and-Data/bd-p/480

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 12
(11,280 Views)

I must have missed something on this link. I just don't see anything that applies to my question. Could you be more specific?

 

Thanks

Glad to answer questions. Thanks for any KUDOS or marked solutions 😉
0 Kudos
Message 3 of 12
(11,273 Views)
Solution
Accepted by topic author PatrickLye

I think the point was that your question belongs in that other forum, not the LabVIEW forum. 😄

 

(I'll ask the moderator to move ithis thread.)

0 Kudos
Message 4 of 12
(11,263 Views)

Hello,

 

The drop down control and list box control/indicator have two separate connections: one for the selected index and one for the actual string text to display. To use a shared variable to display your own custom strings in the drop down control, tap the connect to data button.

2012-10-24 - Connect to Data.png

 

You will see the following "Choose a Property" dialog. Select the "Item Strings" property and then choose a shared variable providing an array of strings.

2012-10-24 - Choose a Property.png

 

The drop down and list box controls were designed to have separate index and string connections to support populating and changing the strings based on other program conditions. In addition, the web services protocol will only provide the data type of the connection (e.g. enum) but not the set of values available for the enum, so this functionality was required to support the web services connection.

 

Grant M.
Senior Software Engineer | LabVIEW Tablets | National Instruments

0 Kudos
Message 5 of 12
(11,218 Views)

Also if the enum values are constant / won't change, you can just type them directly into data dashboard, without connecting to the strings property separately.

If you select a listbox / dropdown, click the gear icon at the top right (Properties), then click Strings, you can manually enter in the enum values that will map to each position in the dropdown / listbox.

Message 6 of 12
(11,208 Views)

Best members of the Forum,

 

I have trouble to get a listbox control to work with my VI. Das somebody have a example of VI with a case structure witch is been controlled with a listbox of Data dashboard? I have connect a shared variable of the type enum. To the case selector and linked to the index var of the listbox control in Data dashboard.

 

Greatings hans

0 Kudos
Message 7 of 12
(11,041 Views)

It might be easier if you could just post a small example project and a dashboard which shows how you are trying to use the feature. Then if we see what is wrong we could explain how to fix it. If we post an example then you would just have to study it to find the differences, and that might be harder for you.

0 Kudos
Message 8 of 12
(11,035 Views)

AdamKemp,

 

Thanks for helping me out. I sent a zip file with a project file. The project map contains also  the data dashboardfile.

 

Greatings Hans

0 Kudos
Message 9 of 12
(11,022 Views)

This is what I found when looking at your attached example:

 

  1. The "selector" variable was missing its typedef. I will assume that your actual code has the typedef (I think it would be broken otherwise). I just created an enum typedef with "Left" (0) and "Right" (1) and then fixed up the test VI accordingly.
  2. The dashboard had the slider bound to the "selector" variable instead of the "slider" variable. This was interfering with the selector.
  3. The variables did not have initial values. We treat this as an error in data dashboard because we don't know which value to display. You should be sure to give each variable an initial value when starting your application.

 

I'm not sure why the LEDs are not updating, though, and I keep getting a hang when trying to stop the dashboard. I filed bug reports for each of those. I am out of the office at the moment so I can't investigate them immediately,  but I will keep you posted.

0 Kudos
Message 10 of 12
(10,969 Views)