LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

HMC 6343 Tilt Compensated Magnetometer

Solved!
Go to solution

Hi everyone,

I am almost new to labview and want to read the data from HMC 6343 Compass.

I read the HMC 5883 Magnetometer discussion here and thanks to Nathan_B I could almost figure it out how to read the data from HMC 6343 but still I have problem with configuration EEPROM registers and how to chenge the setting like rate or inserting deviation error and another settings. For now I just can read the data. Attached is my Code and also the datasheet. Does anyone can help me that what is wrong with my settings when I want to chenge the registers?

How can I insert variation angle, devition angle and ... (page 8 of datasheet) in my code?  Like in the picture that I attached the part that I circled does not do anything.

Regards,

Sadegh

Download All
0 Kudos
Message 1 of 6
(3,952 Views)

Here is your VI (cleaned up a little) with the Variation Angle Correction just before setting the operational mode.

Message 2 of 6
(2,616 Views)

Hello Nathan,

Thank you so much for your help.

But still when I run the program and in the begining put the variation angle, it does not affect my reading at all. It stays same as before. Also for operational mode like I tried to see if I set the Standbye mode but nothing happens. Do you think like the address is wrong or something?

Like 0x19 address is not in manual, I couldn't get the data before. I just saw that someone used that address and then I could get the data. Doesn't say 0x32 in manual? why 0x19?

I ATTACHED THE ARDUINO CODE THAT SparkFun provided, maybe it will be helpful?

Thank you for your help again.

Regards,

Sadegh

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

Please look at the advanced example in the folder that I uploded in previous reply, maybe it helps?

0 Kudos
Message 4 of 6
(2,616 Views)

0x19 is the correct address to use.  0x32 is the 8-bit address which includes the read/write bit.  The 0x19 is the 7-bit address which does not include the read/write bit (the LIFA/LINX API uses requires the 7-bit address.

You should be able to look at the code yourself and see what data is being sent when they set that parameter.  I don't use 7z files but you can simply post the link to the Sparkfun code but I'd recommend that you look through it first.  If there is a good API , you can probably find a function just for setting that parameter.

0 Kudos
Message 5 of 6
(2,616 Views)
Solution
Accepted by topic author sadeghhajhashem

Finally I could solve the problem.

Well as I looked at the manual carefully, for our settings to be effective the processor need to be reseted at the end of settings (0x82).

The other problem was (XF1)! if we want to change any setting in EEPROM, we need to use the write in EEPROM command (xF1) followed by that specific command (like changing the operation mode) and the data.

Attached is the perfectly working code if somebody needs that.

Thank you for your help again,

Regards,

Sadegh

0 Kudos
Message 6 of 6
(2,616 Views)