LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter-driven DIO with NI USB-6001

Hi,

 

we'd like to emulate an I²C-Master with DAQmx-Hardware. Hardware used may be mainly NI PXI-6225, PXI-6229, USB-6008 and similar. I know that while emulating the interface in "bit-bang mode", we need to face some tradeoffs campared to the full I²C-specification, like lacking the capabilities of clock stretching or multimaster-mode. That's not an issue for us.

 

I tested my code successfully on an USB-6255. Now I tried to port it to an USB-6001. The device specification says, that this device has a built-in counter. Unfortunatelly, I can't use it for clocking the data on the device's GPIOs.

 

1. DAQmx Timing (Sample Clock).vi throws a pretty cryptic error:

DAQmx Create Channel (DO-Digital Output).vi:6970001<append>
<B>Device Specified: </B>Dev1

<B>Task Name: </B>_unnamedTask<13>

 

2. DAQmx Creat Channel (Co-Pulse Generation-Frequency).vi can't input anything at the input "counter" (drop-down menu is empty)

 

Can anyone give me a hint, why the code doesn't work with NI USB-6001? Does the device lack any functionality used in the code?

 

I attached a screenshot of the code and my low-level vi. The whole project is a lot bigger but all VIs are branded. If necessary, I can provide the complete source code to NI under NDA.

Download All
0 Kudos
Message 1 of 4
(774 Views)

It might be worth trying to define your clocking parameters in NI MAX for the 6001 to see if it will run. If you get it to go in NI MAX you can save the DAQmx task and use it in the LV code. I have had to make specific cases and tasks for various hardware because not all hardware supports all DAQmx tasks. 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 2 of 4
(761 Views)

The single counter in a USB-6001 is very limited.  It can't be used for outputting pulses or for most measurement tasks (such as frequency, pulse width, semiperiod, and more).  It can only count edges in software-timed mode.  See the spec sheet for more info.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 3 of 4
(745 Views)

An easier alternative is to use USB-845x in I2C mode.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 4
(712 Views)