LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Xbee serial commnunication + Labview

Hello,

For the Shell eco marathon project we were asked to make a small telemetry system that computes all sorts of quantities (voltage, current, speed, ...) and so that we can monitor the state of the car.

We used an arduino and to send the info we used an Xbee module.

The Xbee works well but seeing the info on the terminal is quiet painful, the values are sent in form of a .csv format

for example : 50;5;25;14;......

I am working on a labview interface that would enhance and ease the viewing of the informations by plotting it into graphs, sinks, .... but I am new to labview !

I tried using the VISA vi with just the usb - xbee shield connected to the PC and launched a simple program that reads what is being sent to COM port but the indicator was always blank ! ( serial test program)

Then i learned about the LIFA toolkit, so i downloaded it but I don't know if it is possible to read the string with ?

Can anybody help me modify the program so that i can observe the stream of values in a read buffer? ( after that i guess the manipulation of the string shouldn't be difficult ! )

Thank you in advance

NB I am using an arduino due ( I dont think it will change a lot )

Download All
0 Kudos
Message 1 of 5
(7,351 Views)

The ease of using LIFA with your project will depend on what code you are currently running on the Arduino.  What features of Arduino do you use?  Are there any time critical computations? etc.  It would probably be helpful if you posted the Arduino code that you currently have because LIFA does not have all Arduion functionality implemented and may require custom LIFA firmware and LabVIEW functions.

I'm not familiar with direct serial streaming so I don't think I can help you if you choose to use just a serial monitor that parses the strings for data.

0 Kudos
Message 2 of 5
(3,369 Views)

Hello,

I hava attached the code, but I am really sure what you meant by time critical computations , I guess maybe the speed acquisition interrupt function may b critical but otherwise its quite basic.

I use an ADC, Timers, Interruptions and serial.print functions towards an LCD and writing into a SD card. I guess that is all.

Can I simply acquire all the information via Serial over the Xbee module connected to my pc in the same way it is sent to the terminal of the arduino program???

If i could just display what is the informations sent over the xbee ?

Thank you

0 Kudos
Message 3 of 5
(3,368 Views)

LIFA cannot use interrupts because when using LIFA, the Arduino is a slave device and cannot notify LabVIEW to run (even if this was possible, it would be very slow).

I don't entirely understand what is going on but I don't see anywhere that you are sending any actual data over the serial connection.  But, if you actually are sending it over serial somewhere probably write a serial monitor in LabVIEW (not related to LIFA) that parses the data and then uses the data for display and/or other calculations.

0 Kudos
Message 4 of 5
(3,368 Views)

Thank you very much for your answer.

One of the programs I have sent in the begining handled a VISA serial port reading but no information was displayed !

The Xbee were programmed via Xctu hence no need for coding inside the arduino program.

0 Kudos
Message 5 of 5
(3,368 Views)