04-22-2013 04:38 PM
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 )
04-23-2013 04:43 PM
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.
04-24-2013 01:22 PM
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
04-24-2013 09:39 PM
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.
04-27-2013 07:45 AM
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.