From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Web UI Builder and Data Dashboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Data dashboard shared variable controls

I am just starting to play with the data dashboard and have a question. 

 

The help files all say it is poiible to read and write to shared variables, but when I try to use one as a control all I get is a message saying no compatible variables found.

 

Is there a special trick to writing to shared variables?  I am using data dashboard on an Ipad.

0 Kudos
Message 1 of 6
(7,741 Views)

Nevermind......Smiley Wink

.

It really helps to manually pick the ip address to refresh the shared variable list when you add variables.

 

So is it normal for the Ipad to not see new variables when the SVE is restarted?  Meaning you are supposed to manually reconnect to the IP address everytime you make a change.

 

Thanks

 

0 Kudos
Message 2 of 6
(7,738 Views)

Shared variable browsing can be a bit slow sometimes so Data Dashboard caches the results as you browse so that it's faster the next time. Refresh just clears the cache and requests the new data from the server. We think it's less common for the results to change so we optimized for the more common use case.

 

The cache is not saved so when the app restarts it will also have to ask the server again.

Message 3 of 6
(7,735 Views)

Thanks for the reply.

 

Can the on-off slider control be resized?  I would like to make it bigger so it is easier to turn on and off.

 

So is the web service considered "better" or just different?  I tried doing control with web services, but I had to push the control and then push the poll button.  Is that normal or did I do something wrong?

0 Kudos
Message 4 of 6
(7,733 Views)

The switch is an iOS system control, and that control can't be resized because it uses images for its rendering.

 

Web services are better for some use cases. With a shared variable you have to keep some LabVIEW process running which updates the variables, but with web services you can actually fetch data on demand with each call. It's also possible to use web sessions so that you can uniquely identify a running dashboard to distinguish it from another running dashboard (i.e., you can maintain state on the server for each client). Also, you can trigger actions on the server with a web service button, and you can send data from controls as a part of that action.

 

If you want to poll with web services then you can use the polling web service (right next to the button). The button is meant for on-demand web service calls, and it also allows you to hook up controls to inputs on the web service so you can send data to a web service. You can only use outputs for polling web services, but web service buttons can have both inputs and outputs.

 

If you want something like a slider where the slider directly controls a running LabVIEW process (without having to press a button after moving the slider) then shared variables are better for that use case.

 

You can also use security with web services (using NIAuth), but Data Dashboard does not support authentication of any kind with shared variables. That means shared variables are only appropriate for use within a secured network.

Message 5 of 6
(7,728 Views)

Thanks again for the information.  Learning new stuff is always fun!

0 Kudos
Message 6 of 6
(7,726 Views)