Who doesn't love LabVIEW? it's nice visual programming language makes it easy to solve complex engineering problems fast.
In this tutorial we’ll explain:
- How to send values from LabVIEW.
- How to read values from LabVIEW
We'll use a Sine wave simulator in LabVIEW and then send its data to Ubidots by making an HTTP Post request to this URL:
In this case, the device label will be "labview", so the data will appear in Ubidots under a device named "labview":
You can change the name, but not the API label, since it is the unique ID used to identify the device in your account. Here's the source code image:
This is how the interface looks like:
Here's a link to the VI file. Finally, we can build a nice Ubidots dashboard with the incoming data:
Getting Values from Ubidots
This example will read the last value of a Ubidots variable using this endpoint URL:
- Device Label: The unique identifier of the device in your Ubidots account that contains the variable you wish to read. In our case "labview".
- Variable Label: The unique identifier of the variable within the device. In our case "signal".
So our URL to make the GET request is:
Here's the source code image:
This is the actual interface:
You can find our GET Vi project here. This animation shows the successful reading of a Ubidots value inside LabVIEW. In this case, we're using a control widget to send a value to the "signal" variable, which is then read by LabVIEW to update the Gauge in our VI.
Hope you enjoy these examples!