03-08-2008 01:02 PM
03-08-2008 01:09 PM
03-10-2008 06:51 PM
Hi Brian
Before we get to writing to your digital lines, I want to let you know that the 6220 only has 8 DIO lines that support hardware timing, and they are all located on Port 0 (lines 0 to 7). In order to achieve deterministic timing as you have specified (on update every 1/40,000 of a second) we need to use hardware timing. It is not possible to use software timing for this sort of application because typical operating systems are not deterministic and it is impossible to guarantee an update rate of this speed. The fastest you can expect to go with a software timed task is about 1 update per millisecond.
Here are a few good form threads that go into more detail.
http://forums.ni.com/ni/board/message?board.id=70&message.id=5329&requireLogin=False
http://forums.ni.com/ni/board/message?board.id=70&message.id=5241&requireLogin=False
The 6254 and 6259 both have more hardware timed DIO ports that may be better for your application.
In order to set a sample clock for your hardware timed DIO, please see the following knowledge base article. It explains what different options are available.
What Options Do I Have for Hardware-Timed Digital I/O on my M Series DAQ Device?
http://digital.ni.com/public.nsf/allkb/51754212AD10BDCE862573BD007BFDD2?OpenDocument
There are also some good DIO examples located here
C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Digital\Generate Values
Chris_K