LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adxl335 VISA data acquisition

Solved!
Go to solution

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 🙂

0 Kudos
Message 1 of 12
(4,543 Views)

I would recommend you learn more about LabVIEW from here. How to Learn LV

Message 2 of 12
(4,508 Views)

please check this vi. Only x axis is represented graphically. what am i doing wrong??

0 Kudos
Message 3 of 12
(4,505 Views)

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.

Message 4 of 12
(4,499 Views)

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 🙂

0 Kudos
Message 5 of 12
(4,492 Views)

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.

Message 6 of 12
(4,458 Views)

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!

 

0 Kudos
Message 7 of 12
(4,441 Views)

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.

Message 8 of 12
(4,435 Views)

yes Ive edited the comma and replaced it as a space. this is the VI.

0 Kudos
Message 9 of 12
(4,430 Views)
Solution
Accepted by topic author reshma_a

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.

Message 10 of 12
(4,406 Views)