Arduino and LabVIEW: This instructable is a quick tutorial explaning how to. Arduino UNO;; LM35 (Or other sensor);; LabVIEW Software with NI-VISA Driver.
This instructable is a quick tutorial explaning how to connect your Arduino to LabVIEW thought USB.
You’ll learn how to send a string and receive data available at USB port.
First of all, C programming skills and LabVIEW diagram block knowledge will help.
You will need:
- Arduino UNO;
- LM35 (Or other sensor);
- LabVIEW Software with NI-VISA Driver;
This tutorial will not explain how LM35 sensor works. See its datasheet.
What's LabVIEW?
LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a visual programming language developed by National Instruments. It's very useful for data acquisition (purpose of this tutorial), instrument control, industry automations.
Arduino?
Arduino is an open-source computer hardware used to develop interactive objects, taking inputs from a
variety of switches or sensors, and controlling a variety of lights, motors, and other physical outputs.
Arduino projects can be stand-alone, or they can communicate with software running on your computer (e.g. Flash, Processing, MaxMSP.) The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free. (from Arduino).
variety of switches or sensors, and controlling a variety of lights, motors, and other physical outputs.
Arduino projects can be stand-alone, or they can communicate with software running on your computer (e.g. Flash, Processing, MaxMSP.) The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free. (from Arduino).
If you have installed LabVIEW, chipKIT WF32 drivers, and LabVIEW MakerHub LINX already, you can skip this step.
First, install LabVIEW onto your computer.
Next, install NI VISA here if you did not include it in your LabVIEW installation. Once that is completed, install LabVIEW MakerHub LINX here by clicking on download now from the attached page. A detailed installation instruction video can be found by clicking on 'Getting Started.'
With all the required software installed, connect chipKIT WF32 to your PC using a USB A to mini B USB cable. Windows will most likely install the device drivers automatically. To make sure, open the device manager from the control panel and expand the Ports section. The COM port is the chipKIT WF32 and if the drivers were not installed correctly, a yellow exclamation mark will appear over the device.
If the drivers were not installed properly, download the drivers for your device which are included as part of MPIDE found at http://chipkit.net/started/install-chipkit-software/. Once the drivers are installed, right click on the COM port for the chipKIT WF32 and click properties then click on port settings and choose advanced. Under the BM options, change the latency timer to 1 ms.
Now, launch LabVIEW and click tools --> MakerHub --> LINX --> LINX Firmware Wizard to deploy the LINX firmware to the chipKIT. Choose Digilent from device family and choose chipKIT WF32 from device type and click next (pictured above). Choose the COM port that the WF32 is connected to. Click next and then choose LINX serial/USB and click next again. The firmware will then be transferred to the WF32 and the on-board lights will flash.
Again, if you're having trouble with these steps, check out the guide on LabVIEW MakerHub for step-by-step video instructions.