04-13-2012 04:46 AM
Hi,
I am an absolute beginner in using LabVIEW to communicate through SPI to a 'SUB-20 Multi Interface USB Adapter' connected with a Acc/Gyro IC (LSM330DL). I have learnt the basic of the SPI protocol. My ultimate goal is to acquire the Acc/Gyro data continuously (well, say for 20 seconds) so that I can develop some algorithm using LabVIEW. However, I don't know how to start. At present, I need to know if it is possible to get data using the above mentioned platform. If Yes, how? If No, what do I need?
04-13-2012 06:57 AM
Are you asking how to use the board from LabVIEW, or are you asking how to control the gyro?
If it's the former, the company provides a DLL and a .NET assembly. They also provide a few VIs on their web site. Have you read this: http://www.xdimax.net/forum/viewtopic.php?f=2&t=25
If it's the latter, then you will need to read the documentation on the gyro to see what the message protocol is. I.e., what sequence of bytes you need to send to control the gyro, and what sequence of bytes it returns as data.
04-13-2012 07:10 AM
I want to do both. I have studied what the company provided. It seemed unclear in how I can use the VIs to achieve my objectives. I understand that when you said:' then you will need to read the documentation on the gyro to see what the message protocol is. I.e., what sequence of bytes you need to send to control the gyro, and what sequence of bytes it returns as data.'
I understand the protocol and that I have to send a command with the register address in order to read it. Anyhow, I do not know how to implement it. Is there any examples that I can learn from?
04-13-2012 07:17 AM
I think maybe the "Basic Serial Read Write.vi" in the example finder can give you a start. Can you communicate with your USB adapter? Try open Measurement and Automation Explorer (MAX) and see if you can find the unit there.
04-13-2012 07:25 AM
Thanks. I am looking into it.
04-13-2012 03:13 PM
I could be mistaken, but I don't believe the SUB-20 shows up as a virtual serial port, so in that case the VISA functions would not work. The company already provide a LabVIEW library to talk to the SUB-20.