LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

6008 or

Hello:

 

Can anyone help me? I need to know whether I could use NI myDAQ or USB-6008 to acquire digital signals from an accelerometer, which has only I2C/SPI digital output interface. If I can program using Labview, I will not buy the USB-I2C convertor.

 

What I tried before is the example: Cont Read Dig Chan-Ext Clk.vi Front Panel. But when I connect to the device and run, there is an error:

 

Possible reason(s):

Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.

Property: SampTimingType
Requested Value: Sample Clock
You Can Select: On Demand

Task Name: _unnamedTask<1>

 

Could you please tell me how to solve this problem?

 

Best Regards

 

Jeff

0 Kudos
Message 1 of 6
(4,712 Views)

You're not going to be able to use a USB-6008.  It's digital I/O is only software timed, which is probably the cause of your error message when you try to assign a clock to it.

 

SPI protocol is a high speed serial protocol and you are not going to be able to run your software fast enough to get all of the serial line transitions.

 

You need to look for a device designed to read SPI, or better yet, find another accelerometer.

0 Kudos
Message 2 of 6
(4,708 Views)

Duplicate post.

 

Please don't ask the same questions in multiple threads.

0 Kudos
Message 3 of 6
(4,707 Views)

Sorry to trouble you again. My white box is NI myDAQ. I checked the datasheet, it can be configured as a general-purpose software-timed digital input or output, or it can act as a special function input or output for a digital counter. Does it mean that I can try?

0 Kudos
Message 4 of 6
(4,696 Views)

Actually there is another mode I2C, could I change into that mode?

 

 

0 Kudos
Message 5 of 6
(4,694 Views)

As said by Ravens Fan, I2C and SPI are high speed protocols with very specific timing that can only be accomplished by hardware.  You cannot perform the same timing with a software timed device, such as the 6008.  The software has interrupts and the Windows OS performs many other tasks in a time slice fashion.  It will not be able to give you the precise timing you need for I2C or SPI.  When its time to send a clock signal, the OS may say, hey, this memory refresh is more important, so it takes time to do that instead, then it gets back to the clock signal and the clock is late.  So you cannot use the 6008, there is no getting around this.

You need to get either an expensive high speed DIO such as the 6551, or a much cheaper USB-8451 which can do I2C and SPI.  These devices use hardware for timing and they are not dependent on commands from the software for timing.  You set it up with software, then tell it to go, and off it goes.  Check out the USB-8451.  I've used it in the past with great success.  It isn't expensive at all.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 6
(4,666 Views)