LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Xbee data extracting and graphing

Hi,

I have been trying for a few days to get this to work with no results. I have searched through google and some of the forums for help with nothing that really helped.

I am using two xbee devices to transfer data to labview to graph.Eventually I would like to use the ADC on the Xbee to take an analog signal and convert it to a digital signal for labview to read and so I can do my analysis on it. I started with getting a basic Visa program to work and send number from my arduino uno over and over again and placing those values into an array This works great with no problems. The problem comes when I try and send a signal through the Xbee.

I tried to send an analog signal out to the adc and I was getting some values in labview in Hex but I was unsure what they really meant. My second attemp was just to try and create a pulse wave using my arduino and send that to labview and have labview try and graph the incoming signal. This however did not work and I am not getting any data. I connected both Xbees up on a bread board without labview to see if I can get the a signal out of the recieving xbee and it worked. So the problem should not be with my xbee's but with my code.

The code is where I am not sure about. I was able to find examples of how to use the visa and was given a basic example of it. I have then tried to manipulate the program to see if ti would work for me. I am trying to take the signal from the VISA Read funciton and convert it to a 1d array to display on a graph. I have also tried to seperate the dat into an array char by char from the string. However, none of this worked. I am getting a zero value out for my graph and no values into my array. I am also getting no value into my READ String area.

The values I have sometimes gotten look like:

00\00\00\00\00\94\00\00\ and so on with different value. Some time the byte read is very large up to 475 when I am placing the pulse wave in or so and sometimes smaller at 19 when I tried to connect the ADC.

I have attached some of my VI's to see if anyone can come up with a better way or point me in a better direction.

The png is a pic of the results I got from the pulse input. So it looks like I am not getting any data at all.

Thanks for the help

Juan

Download All
0 Kudos
Message 1 of 2
(3,566 Views)

I have been able to get integer values from the arduino to transfer over. I created a for loop to count from 0 to 25 and they display fine with the above code. But I do not get any data when I am trying to pass the pulse wave through. I bet data bytes displaed but no actual value. I always get 0 for the pulse wave.

Juan

0 Kudos
Message 2 of 2
(3,179 Views)