LabView SDK

Richard Stoneback edited this page May 29, 2014 · 6 revisions

LabVIEW SDK

SensorCloud provides VI's which allow your LabVIEW applications to communicate with SensorCloud. They are designed to work for desktop applications and embedded devices lik the NI CompactRIO. They make it simple to authorize devices, register sensors, and send data from within your LabView code.

Resources:

SensorCloud VI's (.zip) for LabVIEW 2011.

SensorCloud VI's (.zip) for LabVIEW 2010 SP1.

SensorCloud package (.vip). Get the VI Package Manager here.

Installation

From the .zip file: Download the SensorCloud VI's .zip file from the above resources. Unzip the file to a folder and place the SensorCloud folder in the <LabVIEW>\vi.lib directory. Place "sensorcloud.mnu" in the <LabVIEW>\menus\Categories directory.

From the .vip package: Get the VI Package Manager here. Select File >> Open Package File(s) and find the microstrain_lib_sensorcloud-x.x.x.x.vip file on your hard drive.

Authorization VI

The Authorization VI handles the authorization of your device with SensorCloud. To authorize your device you need your Device Serial and Password, which will be wired into the corresponding terminals. If the credentials provided to the VI are incorrect you will be prompted to enter them in again. The output terminal provides a Device Handle to the authorized device. Once you have authorized your device, periodic re-authorization will be handled while your VI is running.

Initialize Sensor VI

The Initialize Sensor VI sets up your sensor to push data. Each sensor on your device must have its own instance of the VI, but many VI's can share the same Device Handle. To initialize your sensor you must provide the Sensor Name, Channel, Sample Rate, and the Sample Rate Type. The Sample Rate is an integer value and the Sample Rate Type is an enumeration type of HERTZ(1) or SECONDS(0). If the Sensor Name provided does not match any existing sensor for your device, you will be prompted to enter necessary information about the sensor. The sensor will then be added to your device on SensorCloud.

Data Acquisition VI

The Data Acquisition VI collects data samples to be sent to SensorCloud. It should be placed in your data acquisition loop. The handle from the Initialize Sensor VI should be wired into the Sensor Handle terminal. The source of your data samples should be wired into the Data terminal. You have the option of providing a standard LabVIEW time stamp with each sample through the Time Stamp terminal. If you do not provide a time stamp then one will be taken as the Data Acquisition VI receives the sample.

Data Upload VI

The Data Upload VI collects and uploads your data to SensorCloud. It should be wired in parallel with the data acquisition loop, so they are running simultaneously. A handle that is connected to a Data Acquisition VI should be wired into the Sensor Handle terminal. The Data Upload VI will collect the data from the Data Acquisition VI and upload the data once the maximum number of data points has been reached. The maximum number of data points can be set with the Max Datapoints terminal, or left at the default, and maximum value, of 10,000.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.