06-07-2013 04:41 PM
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.
06-07-2013 05:01 PM
Nevermind......
.
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
06-07-2013 05:04 PM
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.
06-07-2013 05:08 PM
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?
06-07-2013 05:35 PM
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.
06-07-2013 05:39 PM
Thanks again for the information. Learning new stuff is always fun!