LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview for NI USB-8451

Can anybody give me an example code for read data from my devices?I'm using Labview 7.1 but each time I run my program an error will occurs. I already change alias for my NI USB-8451.How to set slave address to read data?
0 Kudos
Message 1 of 6
(4,678 Views)

Hi Hairul,

What error is occuring?  Does it have a specific number?  You may want to take a look at the example programs included with the 8451 driver.  You can open the NI Example Finder (Help > Find Examples) and then Browse to Hardware Input and Output > I2C and SPI.  There you can find both basic and advanced examples for the 8451. 

Another useful reference is the NI-845x Software User Manual which has information about using the NI 845x API in LabVIEW. 

Hope this helps!

Adam W
Applications Engineering
National Instruments

 
0 Kudos
Message 2 of 6
(4,667 Views)
I succeeded to read data from my device. But how can I write and read data at the same time?
I've tried using NI-845xI2C write read.vi from Labview but an "error -301742" will occured whem I run my program.Am I used a I2C wrong setting?

Thanks you for your response!!!
0 Kudos
Message 3 of 6
(4,647 Views)
Hi Hairul,

The NI-845x Write Read.vi will perform a write followed by a read (combined format).  The NI-845x API Help has some more information as well.  Have you taken a look at the Microchip 24LC512 Read.vi example?  It uses this vi to read data back from the microchip.  You may want to check that out to model your configuration for your code.  The error could be caused by your configuration parameters, such as your address.  If your write and read are not related to each other, have you tried using I2C Write and I2C Read seperately?

Regards,

Adam W
Applications Engineering
National Instruments

0 Kudos
Message 4 of 6
(4,627 Views)
I am trying to use LabVIEW Embedded with a DSPic demo board. Do you have any samples that will help me to get started?
0 Kudos
Message 5 of 6
(4,398 Views)

Hello,

The dsPIC boards I'm familiar with employ 16-bit processors - can you tell us which board you are using?  If it is a 16-bit processor, please bear in mind that the LabVIEW Microprocessor SDK (formerly known as the LabVIEW Embedded Development Module) is designed to support 32-bit processors only.  

If you're not using the Microprocessor SDK or Embedded Development Module, could you be more specific in what software you are using and how you would like to interface with your board?

 
Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 6 of 6
(4,360 Views)