03-04-2017 08:13 PM
Hi
Im doing a project to acquire data from an analog accelerometer ( adxl335 ) interfaced to an arduino uno. I have very limited knowledge on labview programming. Can you please guide me on creating a VI to acquire x y and z axes data from the adxl335 using VISA.
thanks 🙂
Solved! Go to Solution.
03-04-2017 10:35 PM
I would recommend you learn more about LabVIEW from here. How to Learn LV
03-04-2017 11:15 PM
please check this vi. Only x axis is represented graphically. what am i doing wrong??
03-04-2017 11:33 PM
What exactly do you mean by that? That only the X axis is getting data and not Y and Z? What data is coming in from the serial port?
You don't need 3 index arrays. Just drag the bottom border down of the first one until you have 3 outputs. You won't even need the constants 0, 1, and 2 for the indices.
03-05-2017 12:06 AM
only the waveform chart for X axis is responding to the data. ie the acceleration along x axis. Im using a three axes mems based analog accelerometer adxl335. In the response box there is a change in the values for y and z axes when Im tilting the sensor but there is no response along the graph.
thank you for responding 🙂
03-05-2017 11:36 AM
You have a comma wired into the top as the delimiter of the Spreadsheet String to Array. I don't see a comma in your data stream. You have either a space or a tab there.
03-05-2017 08:53 PM
In this picture i have highlighted the execution. visa read gets three values and the string is passed to the spreadsheet string to array from where only one of the values is passed to the charts. Sorry if Im being too ignorant..like I said im a beginner at this. 😄
thanks again!
03-05-2017 10:06 PM
What do you have wired into the top of the Spreadsheet String to Array function now?
It no longer looks like a comma. Is it a space? A tab? Is it an empty string?
Why don't you run your VI once. Save Values as Default from the Edit menu. Save your VI. Attach it to the message. It is a lot easier to debug VI's, particularly ones that include data, then it is to debug a picture.
03-05-2017 10:49 PM
yes Ive edited the comma and replaced it as a space. this is the VI.
03-06-2017 08:00 AM
If you go back and read my message #6, you'll see I said you have either a space or a tab in there. Well when space didn't work, did you try the other choice of a tab?
Now that I can see your data, I went to the response and change it to \code display mode. It shows me \t all throughout it. You have tabs as a delimiter. The default delimiter for Spreadsheet String to Array happens to be a tab. So if you delete the constant wired it, it will work just fine.
See the attached modified VI where I fixed some other things like the extra Index Arrays I mentioned.