Hi darkownsu,
Welcome to the NI discussion forums. I will do my best to
provide you with some example programs and ideas for your program, but I just
wanted to set the expectation that you are unlikely to find one example program
that does everything that you want it to do.
There are basically two ways that you can program your
USB-6008 using the NI-DAQmx driver. The
first way is to use the DAQ assistant (from the block diagram, right-click and
go to Measurement I/O >> NI-DAQmx >> DAQ assist). The DAQ assistant
offers a configuration based dialog box that you can use to setup a simple
counter operation, or a digital read, or a digital pulse. The DAQ assistant is quick to setup, but
doesn?t offer as many operations and doesn?t support many of the advanced
functionality you can do with the lower level VIs.
The second way is to use the NI-DAQmx lower level VI?s. There are found on the same palette on the
block diagram as the DAQ assistant, but I would start by looking in the NI
Example Finder. Open LabVIEW and then go to Help >> Find Examples. In the lower right hand corner of the NI
Example Finder select the drop down menu under Hardware and select Add
device. Find the entry for the USB-6008
and use the arrow to add it to the right hand side of the window. Click OK.
Back on the NI Example Finder use the drop down menu under Hardware to
now select the USB-6008. Put a check
mark next to limit results to hardware.
On the right hand side you can now browse to examples suited for your
hardware. Go to Hardware Input and
Output >> DAQmx and look through the Counter Measurements, Digital
Generation, and Digital Measurements folders for examples about how to do
various kinds of measurements.
For example, the Count Digital Events.vi in the Counter
Measurements >> Count Digital Events folder shows an example program to
count digital edges on a counter.
I would also recommend searching NI.com and the discussion
forums for examples. For example here is
a <a href="http://forums.ni.com/ni/board/message?board.id=70&message.id=5527&view=by_date_ascending&page=1" target="_blank">discussion forum</a> that talks about using PWM with the USB-6008.
The best way to learn LabVIEW and programming hardware is to
go through examples like these:
For LabVIEW:
<a href="http://zone.ni.com/devzone/cda/tut/p/id/5243" target="_blank">Developer
Zone Tutorial: LabVIEW Introduction Course - Three Hours</a>
<a href="http://zone.ni.com/devzone/cda/tut/p/id/5241" target="_blank">Developer Zone Tutorial:
LabVIEW Introduction Course - Six Hours</a>
<a href="http://digital.ni.com/express.nsf/bycode/exzsvg" target="_blank">Top 10 Requested
White Papers and Tutorials for NI LabVIEW</a>
For programming hardware:
<a href="http://zone.ni.com/devzone/cda/tut/p/id/2835" target="_blank">Developer
Zone Tutorial: Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your
Data Acquisition Applications</a>
<a href="http://zone.ni.com/devzone/cda/tut/p/id/3116" target="_blank">Developer Zone Tutorial:
Complete Data Acquisition Tutorial</a>
<a href="http://zone.ni.com/devzone/cda/tut/p/id/4656" target="_blank">Developer Zone Tutorial:
Using the DAQ Assistant to Automatically Generate LabVIEW Code</a>
<a href="http://digital.ni.com/public.nsf/allkb/BB06D0620FDD7ADB86256D2700557BFC" target="_blank">KnowledgeBase
2XE9HRIP: Physical Channels, Virtual Channels, and Tasks in NI-DAQmx</a>
I will also just mention that the USB-6008 has limited
functionality compared to some of NI?s more advanced DAQ boards. The USB-6008
is an excellent low cost device well suited for many applications, but it is
possible that you may run into a hardware limitation depending on your program
requirements.
Hope this helps.