Can anybody help me with the using the Dashboard with android phone with LABVIEW 2013 on my Windows PC. The tutorials on the NI site for getting stated with the dashboard are for 2012 LABVIEW versions in which you had to go to Bulid Specification to create a RESTful Web service. But that doesnot apply to LABVIEW 2013. In 2013, you can directly create a web service and make a VI with web services palette in the Web resources Tab, but now ,how do I make it work with Dashboard app. And one more problem is that there is no option for polling on the android phone in case of web service.
Right now what I am just trying to do is display a random number on my android phone when a web service on my Pc's ip at port 8080 is running.
Please share if there is a diffrent tutorial or video to do this.
Please Help and ask questions If you were not able to understand the problem.
You should be able to browse for the available web services on your server by entering the server's name or IP address and the port number (default is 8080). From there you can see the list of web services. When you choose a web service it shows you a list of methods, and when you choose a method it shows a list of compatible terminals. Only numeric and boolean terminal types are support in Data Dashboard Mobile, and only XML output is supported.
Data Dashboard Mobile always polls web services once a second.
It looks like the link in the tutorial pushed to instructions from LabVIEW 2011 instead of LabVIEW 2013.
Please try using this help information about how to create a Web Service in LabVIEW 2013:
Does this help?
Thanks for the prompt reply. I have kept the method as GET and the output as XML. But whenever I select the ip and the port in the app it says Connecction error unable to connect. And Also I am attaching the demo project if you may have a look at it. And see where am I going Wrong.
I have done that, but using web service with dashboard is the problem and not creating the web service. I went through that tutorial already.
Most connection problems are actually due to network configuration issues. You phone needs to be able to connect to the machine and the port needs to be accessible through any firewall that is enabled. Is your phone connected to the same network as the computer running LabVIEW?
Yes it is connected in the same network and there is no problem with the firewall as I am able to connect to shared variables with my phone.
One more thing Do I need to have my phone and PC in the same network while using web services . I thought that the whole point of it was to be able to access it through internet not depending on which network your phone is on.
I just checked your example code, and I see the problem. Your web service method doesn't have any outputs. You need to wire the shared variable to an indicator and then connect that indicator to the connector pane.
Web Services still require access to the server and access through to the web server port. One of the advantages is that there is only one port, and it's a port that IT people are more likely to allow you to open up. Shared Variables have a whole range of ports to open, and usually IT people don't want to open those ports. Still, web services aren't magic. You have to host them on a server that can be accessed by your client (the phone in this case). That means if you want to access it from anywhere on the internet then the server needs a public IP (possibly using port forwarding), and it needs to allow the web server port through the firewall.
1)Thanks for the reply. So, I have connected the shared variable to an indicator but I dont understand what you mean by "connect that indicator to the connector pane" ??. As, shown in the snapshot.
2)When I use the below port then it shows connection error.
|8080||TCP||HTTP alternate (http_alt)—commonly used for Web proxy and caching server, or for running a Web server as a non-root user|
But when I use some other port say 8000. It does not give any error just says no supported variables. And, I was able to communicate remotely with my PC using my android phone.
Please help will be appreciated.
It sounds like you may be very new to LabVIEW in general. I suggest you look through some of the resources available here to learn about LabVIEW programming. For setting up a connector pane you can look specifically at this document (ignore the part where you right-click to show the connector pane; it is already showing to the left of the icon in the top right of the front panel window).
Once you have set up the connector pane corerctly then you should be able to refresh your variable list to see it in the list. Regarding port numbers for web services, you can have different servers running on different ports. There is typically one main LabVIEW server running on 8080. That is the server that is used when you "Publish" the web service. However, when you right click the service and choose "Start" it is actually published to a "Local Debugging" server, which will be on a different port. Right click on your web method (called "Web Request Service.vi (GET)") in the project and choose "Show Method URL...". That will bring up a dialog with a dropdown to see the ports for each running server. On my machine the debugging server is on port 8001.