Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing Digital Patterns

I am trying to write a digital pattern at 5kHz to a digital line using Labview. Software timing only allows 1kHz from what I can tell, so I was trying to use one of the clocks on one of my devices. I've tried almost every device and can't seem to get the sample timing to work. I want to take an array of bool and feed that one by one at a specfic rate to a digital out. The devices I have at my disposal are PXI 6289, PXI 4461, PXI 6515, USB 6009, USB 6016. Can any of these do what I want it to do? It seems like a simple problem, but I can't seem to get anything to work.

Thanks,
Tim
0 Kudos
Message 1 of 4
(3,930 Views)
Tim,

The PXI-6289, and all M Series for that matter, are capable of performing correlated digital I/O. The only caveat is that an external clock must be supplied. Alternatively, you can use one of the counters on your M Series to create this clock. An example of this is the LabVIEW shipping example, Multi-Function-Synch Dig Read Write With Counter.vi. It can be found in LabVIEW's example finder (Help->Find Examples). This VI performs both digital output and digital input, so you will likely get rid of the digital input portion (middle task). Simply specify the frequency of the counter pulse generation task, and this will serve as the sample clock for your digital output. Please let us know if you have any questions using this VI.

Regards,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 2 of 4
(3,907 Views)
The LabVIEW example you mentioned worked fine on my 6251 card when using port 0 exclusively. Anyway, I would like to use the ports P1 and P2 (in either PFI or static mode) to generate and acquire digital waveforms, too. LabVIEW complains, that these ports are not able to run buffered operations.

I've been through some forum posts and have read many manual pages, but I still I don't understand how I can generate a waveform (e.g. to communicate with peripheral hardware) and aquire a response, without using an external clock (I need to use one-wire communication with a microcontroller). And I didn't get the message why and how to use PFI-Ports except, that they are intended for timered applications. I would appreciate any hint.

In the attechment you can see the application, that I would like to move to the PFI-I/Os.
0 Kudos
Message 3 of 4
(3,792 Views)
Hello Tim,

Port 0, as you discovered is the only port on the 6251 which can preform correlated digital I/O.  Port 1 and 2 employ static digital input and output which means
every digital read or write the board performs must be initiated by a software command and on receiving the command the lines or ports immediately inputs or outputs a pattern.  I don't think this is what you have in mind.

You could  generate a pulse train using one of your counters and route the output of the counter to one of the PFI lines to be used as an external clock.  The M Series Hardware-Timed DIO with Counter Clock Generation example demonstrates this.

Let us know if you have any questions about this VI!

Regards,

Message Edited by McKala[DE] on 06-07-2006 08:39 PM

Micaela N
National Instruments
0 Kudos
Message 4 of 4
(3,776 Views)