LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Read magnetic sensor data via I2C

Solved!
Go to solution

Hello,

I hope you all are doing well.

I have just started to learn LABview and MyRio 1900. I want to read sensor data via I2C but i am unable to read any data.

Although i am able to get data in Arduino but currently having problem in Labview .  .

The snap shot of my VI is also attached.

Your Help will be much appreciated.

 

Data Sheet of sensor: 

https://www.infineon.com/dgdl/Infineon-TLV493D-A1B6-DS-v01_00-EN.pdf?fileId=5546d462525dbac40152a6b8...

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

Something I noticed while looking at the datasheet is that it appears that your device is looking for a "I2C fast mode". See page 15 of the datasheet for this information. Your code appears to be using standard mode for I2C, which could explain why you're not seeing any data or valid communication.

C. Weeks
Product Support Engineer
NI
0 Kudos
Message 2 of 6
(3,202 Views)

Hello Connor W.,

Thanks for the reply.

I have changed my sensor operation mode form standard to fast mode. 

I am now able to read data in both modes but only for a couple of seconds and then -363011 error comes up.  

I have attached the snapshot.

To me, its look like because of pull-up resistor I might be having this problem.

Your response, to the above question, will be highly appreciated.

regards,

M. Moid Khalid Khan 

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

That error could stem from a lot of places, and I don't know what the issue exactly is. However, there are a lot of people that have seen that issue and have solved it on the forums. Here are some of the links:

 

https://forums.ni.com/t5/LabVIEW/i2c-on-myRIO-1900/td-p/3681513

https://forums.ni.com/t5/Academic-Hardware-Products-myDAQ/Error-363011-in-I2C-Express-VI-with-myRIO-...

https://forums.ni.com/t5/Academic-Hardware-Products-myDAQ/Error-363011-occurred-at-myRIO-v1-0-Wrie-I...

 

If they are solved, you can click the green checkmark on the first post to go straight to the solution. See if any of those posts help out.

C. Weeks
Product Support Engineer
NI
0 Kudos
Message 4 of 6
(3,177 Views)
Solution
Accepted by topic author MoidKhan

Hello Connor,

Thanks for your help.

I am able to receive data without any error. Just added delay and making write bus always busy.

I have attached the snapshot .

 

Regards

M.Moid Khalid Khan

 

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

HoidKhan,

 

That's great to hear! Make sure to mark your last post as a solution, so people can find this solution in the future!

C. Weeks
Product Support Engineer
NI
0 Kudos
Message 6 of 6
(3,155 Views)