Discussion:
trying to use NI-6251's DIO port as input and output.
(too old to reply)
rjohnson
2006-11-29 23:10:08 UTC
Permalink
I'm using a 6251 card with LabWindows/CVI on a WinXP machine.  

My problem is reading an EEPROM -- unfortunately, both its Clock (output from
6251) and Data (input to 6251) lines are hardwired on the same physical channel
(DIO Port1)

Is it possible to configure individual port
lines, so that one line (say, Port1.6) is an Output, and another line
(say, Port1.7) is an Input?I would like to not have to keep starting
and stoping the tasks on the whole port at
one time ,,,  but just leave each separate line running as a read or write
until the operation is completed.I'm beginning to think this is not possible.as it is now, i have to start a write task, toggle the clock, stop the task, start a read task, read the data bit, stop the read task, start the write task and toggle the clock.... all this for just one bit.   as you can imagine, the whole operation is rather slow:   im only getting a read throughput of about 100 bytes per second.     for an EEPROM that is capbable of delivering around 40,000 bytes per second.   if i didnt have to keep starting and stopping the clock's write task, i could probably get about 1000 bytes per second, and then I'd  be quite happy.any suggestions?thanks!
Kevin Price
2006-11-30 17:10:14 UTC
Permalink
I've used the 6259 to do something similar so I'd expect the 6251 would also be capable.  In my app, I had a counter generating a 10 kHz "sampling clock".  I configured a hw-timed output task to generate several output bits on the leading edge and configured a hw-timed input task to acquire several input bits on the trailing edge.  It worked out just fine.
Trouble is, I used LabVIEW and can't give you any syntax suggestions for LabWindows/CVI.  The main thing I can think of is that when I was configuring the virtual channel, the string looked like:
Output: "Dev0/port0/line0:7"
Input: "Dev0/port0/line8:31"
The key (for me) was to designate the range of individual lines within the digital port and not just setup "Dev0/port0" which implies ALL lines at once.  Maybe this helps?  In any event, I DO think the board can do what you want if you can find someone to show you how to do it with CVI.
-Kevin P.
Erik J
2006-11-30 22:40:11 UTC
Permalink
I posted a CVI example that uses port1, line6 as a digital output and port1, line7 as a digital input.  You do not have to restart any tasks to do this, just create one digital input task and one digital output task.  Note that while this is possible on the PCI-6251, it is not possible on all devices.  Some devices require all lines on a single port to be configured as all inputs or all outputs.
 
That post can be found <a href="http://forums.ni.com/ni/board/message?board.id=180&amp;message.id=26526" target="_blank">here</a>.
&nbsp;
Regards,
Erik

Loading...