12-31-2015 06:53 AM
Hello?
I have a cRIO 9066 and the 9403 DIO module, and was hoping someone could help me figure out how to interface with a device that communicates over I2C.
I'm trynig to communicate with PH EZO (atlas scientific).
http://www.atlas-scientific.com/product_pages/circuits/ezo_ph.html
thanks in advance
Tamir
12-31-2015 01:01 PM
http://www.ni.com/white-paper/3479/en/
Or, you could just go to VIMP and download one of the many built librarys for I2C
01-01-2016 12:47 AM
I tried this on already and its doesn't work.
Did you hace a success with I2C and NI9403 ?
01-02-2016 11:08 AM
I haven't used the 9403 specifically. But, I tend to use the built libraries to work with I2C. My last post should have said VIPM instead of VIMP.
Really, I don't have enough to help you. Unless you're expecting me to write your entire project for you so that you can use my code, you've shown me nothing.
1) What have you tried? "I tried this" says nothing. Did you copy the code from the white paper and run into issues? Did you download a package from VIPM and couldn't figure that out? Where's your code?
2) What does "it doesn't work" mean? There's such a wide variety of issues we can be seeing here. Are you getting anything off the DIO lines? Are you getting a broken VI? Can you compile? Which line isn't behaving as you expect?
01-03-2016 09:00 AM
1) I tried several options: the link you posted and several options from vipm.
2) the code compiled but when i run it (i built code in the RT to control from their) but the sensor doesn't respond ( it have a LED to indicate).
when i connected scope to the DIO its seems the values have been changed from low to high.
the code that I'm tring to work with its this fron the white paper (http://www.ni.com/white-paper/3479/en/).
01-03-2016 11:41 AM
You say you have the DIO being read on a scope. At this point, it's a bit unclear what you mean. You say you see values changed from low to high. Does this mean it's only giving a high result and never a low? Do high values represent as a low?
If it's the first, remove the device from your I2C bus. Instead, just attach it to the scope and read.
My guess is the problem comes from a lack of understanding of I2C (specifically arbitration). https://en.wikipedia.org/wiki/I%C2%B2C#Arbitration_using_SDA
Do you have pull-up resistors on your bus? If not, it's likely your master is trying to rest at high, seeing a low, and then stopping the transmission. This is part of the I2C protocol.
01-04-2016 02:13 AM
I have pull up resistors.
I have one master and one slave, so i don't think it's arbitration issue.
I attached 3 pics. on of SCL scope and one from SDA and one from both together (in the one together its offset ,both 5 V high, so its be easy to see)
01-05-2016 06:00 PM
What are the values you are expecting?
01-07-2016 05:56 AM
from what i saw in i2c documentation, it's need to look like that.
01-08-2016 05:06 PM
I apologize. I am a little confused. What exactly is the issue you need assistance with? Are you getting incorrect or unexpected readings? Do the examples not work?
Will you please provide more specifics about your question?