08-04-2013 09:19 AM
Hi,
I am trying to run the program posted in documents for the LSM303DLM imu, but for use with a LSM303DLHC accelerometer. Specifically the read axes VI as shown in the attachments, also I have the LIFA base program running on the Arduino. I always get a timeout error from not communiticating with the Arduino. I've changed address and register parameters to no avail. Has anyone successfully used this VI or any other VI with a LSM303DLHC to get accelerometer data?
Thanks.
Solved! Go to Solution.
08-06-2013 10:43 PM
Sorry for not getting back to you sooner. Pololu claims that the code needs to be changed to work with the LSM303DLHC. I've gone through and changed the slave address and the registers for the accelerometer and magnetometer but I don't see anything major that would make my other library not work if you use 0011001 as the slave address.
I think that maybe the initialization is not correct for the DLHC version. What I always do is find Arduino code that works and then base configuration off of that and is what I suggest you do. This will tell you if it's an issue with the sensor or if it's an issue with the configuration.
If you find working Arduino code (that you have personally tested), please attach that code here. If the configuration is different then modify the Accel Init.vi accordingly (in this new library attached) then let me know the results.
08-07-2013 10:06 PM
Nathan,
Attached is code from the Pololu website that works when running on the Arduino. I have played around with configuration settings in the LabVIEW code to no avail at this point. Thanks for looking into this though.
08-07-2013 10:31 PM
What did you try with my latest version? The Init sequence in the code that you posted is different from mine. Could you post the VI that modified and tried?
08-17-2013 09:58 PM
I apologize, I wasn't running the correct VI. I ran the graph data VI and now I am getting measurements. The Z accelerometer data is offset to positive 1200 for some reason. I will investigate further or just correct with a negative offset. Do you plan on expanding this library with calibration VI, etc....
Thanks.
08-18-2013 01:15 AM
Trey1234 wrote:
The Z accelerometer data is offset to positive 1200 for some reason.
I don't really know what that means without more information. When is it offset 1200? What is the orientation of the sensor when this happens (relative to gravity).
I don't currently have any active plans to add anything at the moment. If there is already code that does this, it can probably easily be ported to LabVIEW/LIFA.
08-18-2013 08:41 AM
It follows the orientation of the sensor to gravity. After reading the datasheet, there is always an acceleration due to gravity.