LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initializing digital sensor with command sequence

Yeah I displayed the index more for myself, to verify I didn't screw it up.

 

I think I've got the array indexing under control, now the question becomes how to properly send that over the I2C line to tell the sensor to start reading.

0 Kudos
Message 11 of 16
(1,348 Views)

Did you install the software that comes with the myRIO or did you already have LabVIEW installed?

 

If you installed that software that came with it, that should have included I2C API that you can find on the functions palette when you right-click the Block Diagram.

 

You can download that here too: http://sine.ni.com/nips/cds/view/p/lang/en/nid/210637

0 Kudos
Message 12 of 16
(1,346 Views)

I have the myRio software on my project laptop (but for whatever the i2c package won't install on my desktop).

 

I can see there's a folder with different options. Would I want to use the configure block or write block to send the initiation commands?

0 Kudos
Message 13 of 16
(1,305 Views)

So after using the ctrl+H command to dig around, would the slave address input on the read/write blocks be exactly what I've been looking for? Additionally, unless if I'm mistaken, I first need an open block as well to configure the channel (A vs B block).

0 Kudos
Message 14 of 16
(1,301 Views)

You would want to start off using the Configure VI.  This will setup the connection you desire.  After it is configured, you can use the read/write VIs to pass data using I2C.  The address is the address of the slave you wish to connect with, treating your myRIO as the master.

0 Kudos
Message 15 of 16
(1,276 Views)

I gave it a shot and tried connecting everything to the myRio, but I still don't seem to be able to read any data (the indicator array remains empty when I run it).

 

Can you take a look at my code and see what's wrong? The slave address is 0x28.

0 Kudos
Message 16 of 16
(1,242 Views)