LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

spi

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? 

0 Kudos
Message 1 of 6
(3,055 Views)

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.

0 Kudos
Message 2 of 6
(3,042 Views)

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?

0 Kudos
Message 3 of 6
(3,036 Views)

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.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 4 of 6
(3,031 Views)

Thanks. I am looking into it.

0 Kudos
Message 5 of 6
(3,025 Views)

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.

0 Kudos
Message 6 of 6
(3,009 Views)