LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing Labview with Arduino and Zigbee

Hello everyone! My team and I (students) ought to make a temperature data logging and monitoring. We are to present our proposal next week, and I have a lot of question. I am a newbie in LabVIEW and only knows the basics.

Our system is composed of 3 nodes (each has 1 zigbee an arduino) each collecting data (using thermocouple), and then send the data through Zigbee to the base station where arduino and zigbee are present as well. The data will now be sent to the LabVIEW for processing the data. We will set a temperature threshold wherein the temperature should not go above andbelow a certain temperature.

Problem, we set a temperature where it should not exceed say 110C and below 90C, suddenly temperature went up to 125C at node 1 (as seen in the GUI), an alarm will trigger, of course the labview will be the only one to know this. It will command the node 1 to on an alarm of RED light. Can the LabVIEW command arduino in node 1? And how will I program the LabVIEW to do this?

If possible can someone show me the concept in block diagram in LabVIEW.

I have attached our system diagram, hoping for postive answer.

Thank You!

0 Kudos
Message 1 of 21
(8,394 Views)

You do not need an Arduino board at your base station.  You should install the base station XBee in a Sprkfun XBee Explorer board and then plug the Explorer board into a USB port on your PC.

How will you adjust temperature.?  Your block diagram shows an adjust temperature block but you don't describe what you use to adjust temperature in your written description.

If you use LIFA, in addition to getting a reading from a node's thermocouple you can send commands to the same node to turn a heater or a LED on and off.

hrh1818

0 Kudos
Message 2 of 21
(4,139 Views)

If I were to use Xbee explorer board, then I would have 3 arduino COMx. From my own understanding, I havent programmed LIFA, or arduino as to I am learning to. What would be the problem that I may encounter using 3 nodes?

The temperature will be adjust manually by the operator as we are focued on monitoring and data logging.

I see, then from the LabVIEW, it will just show what node is beyond the threshold. BTW, based from the tutorials that I see, all the programs are in LabVIEW. Where shall I program the on and off of LED, I see on my Arduino IDE have tabs such as AFmotor.h, I should program that in "LABVIEWInterface.h"?

0 Kudos
Message 3 of 21
(4,139 Views)

You can power an LED on an Arduino with just a digital pin.  So, if you wire it correctly, you simply write to a that digital pin the value that you want the LED to be:  1 for on, 0 for off.  There is no need to edit the firmware.

0 Kudos
Message 4 of 21
(4,139 Views)

Im confused, the programming for reading the temperatre is on arduino and be sent to LabVIEW for processing, it would also be the one to set the condition for LEDs.

Since Im having 3 arduinos each measuring a temperature sending to the base sation.

arduinoCOM.JPG

Assuming COM1, COM2, and COM3. Is this correct?

0 Kudos
Message 5 of 21
(4,139 Views)

To clarify, to use LIFA, you must use the LIFA firmware sketch on the Arduino.  If you have special Arduino code that acquires the temperature, you would need to create a custom LIFA function to execute the code and send the result to LabVIEW.

If you have three Arduino connected, they should each get their own COM port (as shown in the device manager).  The exact number is determined by your operating system/drivers.  Check the device manager for the actual values.

To answer your question regarding using three Arduino's, you would require three Init.vi's (one for each Arduino) accompanied by three Close.vi's.

Message 6 of 21
(4,139 Views)

I see. I have a code specifically designed for the arduino to acquire/analyze temperature from thermocouple, which I should upload to the arduino. You say that a custom LIFA, does this mean I should edit the Labviewinterface.h or create another one and upload to the arduino. Will this send the result to the LabVIEW automatically?

0 Kudos
Message 7 of 21
(4,139 Views)

You would need to build your code into the LIFA architecture (if you can't simply reproduce your Arduino code in LabVIEW).  It would be much easier to help you if you posted your Arduino code.

0 Kudos
Message 8 of 21
(4,139 Views)

Sorry I should correct that "I will have to make a code". Upon searching, it is much easier to do in LIFA. What is in there is Thermistor Read for thermistor, what I need is for thermocouple.

There is a VI in LabVIEW for converting thermocouple voltages. Problem the thermocouple VI does not have Arduino Resource for me to connect the wiring. (This might be easier since I wont need any amplifier?)

0 Kudos
Message 9 of 21
(4,139 Views)

The Arduino cannot read a thermocouple with any reasonable accuracy.  So, you would need to get some sort of device that can either read the thermocouple voltage and communicate to you the temperature (e.g. I2C-based thermocouple device) or a device to amplify the thermocouple voltage difference so that it becomes reasonable to read with the Arduino's analog inputs.

0 Kudos
Message 10 of 21
(4,139 Views)