Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

i2c sbrio 9636

Solved!
Go to solution

Dear All, 

Greetings 

I need help in implementing an I2C protcol in sbRIO 9636 (RIO evaluatation KIT) i try the one from this website (http://zone.ni.com/devzone/cda/epd/p/id/4063) after moving VIs it to my kit and deploy it i couldnt get the expected output as in figure (start condition) instead i got the output figure (output) !! any suggestion?? please help ... 

thanks in advance 

 

Mustafa

Download All
0 Kudos
Message 1 of 20
(10,075 Views)

Hi Mustafa,

 

what LabVIEW version do you use?

Did you try the example programs from the LabVIEW example library? You can find them in LabVIEW via Help >> Find Examples >> Search "I2C".
There is a good example I2C Communication sbRIO.

 

If you get an unexpected measurement again, please add photos of the same timebase and give some more information.

 

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 2 of 20
(10,049 Views)

Hello Melaniee,

i use LabVIEW 2012.I tried LabVIEW example finder but couldn't find useful codes for sbrio, then I just follow the instruction from this link http://www.ni.com/white-paper/3479/en to build the code and I get the attached results .. it looks better than before, what you suggest, is there a problem with timing?? other think is how to get 5V output instead of 3.3V ? in RIO evaluation KIT which i use? 

thank you very much 

 

Mustafa 

Download All
0 Kudos
Message 3 of 20
(10,025 Views)

Hi Mustafa,

 

I attached the project of the LabVIEW example I mensioned.

 

Please try to use it for the communication and let me know, if it works fine.

 

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 4 of 20
(10,008 Views)

Dear Melanee 

Greetings 

I try to deal with the example you sent but i couldn't make it work with my sbRIO 9636 as it has different I/O, so anyone have an idea how to make it works with the sbRIO 9639 ? 

i try to make new FPGA project compatible with my board and just add the VIs from the example above, but no results !! 

 

Mustafa 

0 Kudos
Message 5 of 20
(9,978 Views)

Hi Mustafa,

 

I converted the example project for your sbRIO. To run the example, please compile built the FPGA-VI first. You will need a build specification for it.

 

Afterwards you should be able to run the example and communicate via I2C.

 

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 6 of 20
(9,933 Views)

Hello Melaniee, 

 thanks for the program, 
I tried it but with no output signals !! first i assign SKC to DIO1 and DATA to DIO0 .. then i go to build specifications and click I2C Communication (FPGA) then click build. after that i clicked I2C communication (FPGA).vi .. i tried to set address, number of bytes and data to send so on .. but i got nothing in the DIO ports ??!  

could you help me please 

thank you and accept my best regards 

 

Mustafa 

0 Kudos
Message 7 of 20
(9,912 Views)

Hi Mustafa,

 

there are some files missing in your project. The project I created looks like in the screenshot below.

 

You need these VIs to communicate with the FPGA code and generate an output on the I2C bus.

 

I saved the project one more time and added it below. In general it is the same VI as in the I2C Communication example from the LabVIEW library. If you do not see these VIs and libs in your project, please import the files from the example and modify the FPGA reference in the code.
The VIs are also included in the file structure of the zip file.

 

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
Download All
Message 8 of 20
(9,900 Views)

hi Melaniee 

I try but also without results 😞 please check the attached picture and tell me if i miss somthing .. and what should i do?

thanks

 

Mustafa 

0 Kudos
Message 9 of 20
(9,892 Views)

Hi Mustafa,

 

could you please check that the hardware in the project is named as the hardware on your sbRIO. I did not change any hardware component names since I do not have the sbRIO you use.

 

For more troubleshooting steps you can also use the troubleshoting notes for the I2C Communication example from the example library. These VIs include a step by step instruction manual to which you can refer.

 

If this does not help, please try to debug the code. Maybe some addess or parameter is wrong.

 

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 10 of 20
(9,884 Views)