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 Web UI Builder and Data Dashboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading/Controlling Arduino with iPhone Dashboard

Solved!
Go to solution

Hello,

 

I am brand new to using NI Dashboard so please bear with me.

 

The setup I am working on is a TCP/IP connection between my computer and an Arduino with WiFi Shield. The computer has a VI that connects to the Arduino, currently the Arduino is the server, and receives sensor data that it displays in graphs and averages. The VI also has adjustable yellow and red limits for the sensor data and when the latter is reached, a stop test command is sent to the Arduino.

 

I am trying to add a smartphone to the current setup. Initially I planned to write an app with a customized telnet but I thought Dashboard might work better (especially with regard to displaying graphs). I downloaded Dashboard for iPhone but have only been able to establish a connection to the Arduino when it isn't connected to the computer VI. The connection itself does nothing on the iPhone side as the app is continuously showing that it is connecting and nothing else. The only way I know that a connection has been established is that the Arduino is set to light an LED only when connected.

 

The three major concerns I have are:

 

1. Is there documentation for using Dashboard with iPhone? If not, is the iPhone Dashboard more limited than the iPad Dashboard for which there is documentation? I haven't been able to find much documentation for Dashboard with iPhone, only iPad (http://www.ni.com/white-paper/13757/en/).

 

2. Building on Q1; is it possible to add controls to the iPhone Dashboard (I need to be able to send a stop command from the phone if the setup is to work)?

 

3. Does the Dashboard need to be connected to a computer running a VI? My initial plan to was to connect directly to the Arduino; jumping the stop command via the computer is doable but roundabout.

Hope to hear from you,
Yusif Nurizade 

0 Kudos
Message 1 of 5
(9,626 Views)

1. Yes, the phone versions of Data Dashboard (called "Data Dashboard Mobile") are more limited than the versions for iPad and Android tablets. The phone version has fewer indicators, and doesn't support controls at all (i.e., it is read-only).

2. As mentioned in the previous answer, you can't do control with the phone version. It is for display only.

3. Data Dashboard is designed specifically to work with LabVIEW applications (running VIs). The protocols that we use are the ones that LabVIEW already supports out of the box so that our users don't have to write their own low-level TCP communication. LabVIEW also facilitates the browsing experience on the mobile device, making it possible for you to discover which pieces of data are available on a given server rather than having to remember and type out a long URL.

 

If you want to communicate with an Arduino then you will need another machine running LabVIEW to act as an intermediary.

Message 2 of 5
(9,620 Views)

Adam,

 

Thank you for the reply, I have a couple of followup questions:

 

1. You mentioned the phone version has fewer indicators; does this include graphs? More broadly, is there a resource that illustrates the difference between Dashboard for tablet and mobile? I have not been able to find one.

 

2. My current setup is Arduino as the server and computer as the client. Would I have to reverse it to allow the phone to access the computer's data? You mentioned that the Dashboard doesn't require delving into low-level TCP/IP so I am wondering if there is a way to connect to the computer VI without involving the Arduino or flipping the server-client relationship.

 

Thanks again,

Yusif Nurizade

0 Kudos
Message 3 of 5
(9,613 Views)
Solution
Accepted by topic author Akello

The phone version has "charts", but not "graphs". In LabVIEW terminology that means you can see the latest data and history, but the history is stored locally in that chart (not on the server). You only see the history of data points that your client received. In the phone version we also only support scalar data types, which means that you can only see a single data point. Basically this means that it's not adequate for streaming waveforms. The dashboard will update the chart by appending a single data point at a fixed rate (described here: http://digital.ni.com/public.nsf/allkb/DF058CF63BC25E29862579EB0062E828). No matter what the server does the dashboard will only show data at that fixed rate, and it will drop any intermediate values that came in between the last update and the next update. It should only be used to see a snapshot of the latest value and some past values.

 

There are a few ways to see the differences between versions, but maybe not in the form that you are wanting. First, this page describes the supported data types for each version:

http://digital.ni.com/public.nsf/allkb/D9B247551BE7F46A8625795000552CDE

 

This page shows the new features available in 2.x version (which is only available on tablets):

http://www.ni.com/white-paper/14033/en/

 

Anything described as a new feature in that page is not available in the phone versions, which are based on the 1.0 version of the app.

 

"2. My current setup is Arduino as the server and computer as the client. Would I have to reverse it to allow the phone to access the computer's data? You mentioned that theDashboard doesn't require delving into low-level TCP/IP so I am wondering if there is a way to connect to the computer VI without involving the Arduino or flipping the server-client relationship."

 

I'm assuming that the data you actually care about originates from the Arduino so at some level the Arduino would still be considered a server. The concept of client and server gets a little fuzzier when you introduce an intermediary, which is what your LabVIEW application would be. From the Arduino's perspective the LabVIEW application would be a client (it connects to the Arduino). From the phone's perspective the LabVIEW application is the server (the phone connects to it). What your application would do is connect to the Arduino using its protocol, acquire any relevant data, convert it into a suitable data type, and publish it in a way that is accessible to the Data Dashboard app (that is, either a shared variable or a web service).

0 Kudos
Message 4 of 5
(9,608 Views)

Adam,

 

Thanks for elaborating, there's definitely a lot to consider.

 

I don't believe there is a requirement for the Arduino to be the server in this setup. As far as I understand it, and I will be looking into the matter, the computer can be the server and the Arduino can still send data as a client. The data I am interested in is coming from the Arduino but lives on the VI in a more presentable form; charts, averages, etc. Furthermore the Stop Test decision is being made on the VI and that is what I am most interested in.

 

I know it sounds like I'm convincing myself that the VI should be the server but I'm really not commited to either direction. When I started the Arduino seemed easier because I could just set it up and connect to it when needed since the VI was more interactive. I'm not sure how I would even go about connecting a second device, on demand, to the Arduino as server. In any case, I will try to reverse the Server-Client relationship and see how it goes.

 

Best,

Yusif Nurizade

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