LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to perform dynamically-calculated synchronous DIO?

I'm running around in circles trying to do this. We have a PCI DIO-32HS
digital I/O board, LabView 6.1i. Here's what I need to do:

1: Read a set of digital lines from a hardware device, using a clock to
synchronize the read.

2: Compute a value (in LabView) to be output to a different series of lines on
the device, dependent on the data that was read in the last read.

3: Output the new digital value, a set of control bits, and the clock signal
to the device (in other words, a synchronous write)

4: Repeat the process starting at step 1.

I need to execute this from within a loop with the number of iterations
up to a maximum specified by the user and dependent also upon the data read
from the read in Step 1.


The heart of the problem seems to be the question of on the one hand
generating a clocking signal and on the other hand not having to have the data
to be written specified ahead of time (i.e. before the reads/writes begin).

How would I achieve this from LabView?

Alex Rast
arast@inficom.com
arast@qwest.net
0 Kudos
Message 1 of 3
(2,260 Views)
Alex;

As the 32HS board has two completely independent handshaking groups, you can set up one groups to do the input operation and the second group to do the output operation. There is a legal combination of Port number and hardware group you will need to follow, and that information can be found at the 653x User Manual, which you can download from NI Website.
Depending on how your external device will communicate with the DAQ board you can set a handshake protocol to do the input and output operations. If the data transfer needs to be synchronized by a clock signal, you can do Burst mode Input transfer, do the calculations in Labview, and do Burts Output mode to do the output data transfer.
There are examples about both methods in the Labview example folder. If y
ou go to Search Examples->I/O Interfaces->Data Acquisition->Digital Input and Output->Burst Buffered Mode I/O. You can also get good information about Burts Mode from the 653x User Manual.
Hope this helps.
Filipe
0 Kudos
Message 2 of 3
(2,260 Views)
In article <506500000005000000F4560000-1007855737000@exchange.ni.com>, Filipe wrote:
>Alex;
>
>As the 32HS board has two completely independent handshaking groups,
>you can set up one groups to do the input operation and the second
>group to do the output operation.

Yes, indeed, I'd set up my VI from the very outset to do that. I had my write
on Group 1 and read on Group 2. But that isn't the main problem

...
>If the data transfer needs to be synchronized by a clock
>signal, you can do Burst mode Input transfer, do the calculations in
>Labview, and do Burts Output mode to do the output data transfer.

Here is where I run into difficulty. So far, I've found that all of the
synchronous write operations, such as burst mode, need the write da
ta ahead of
time, before the write has already started. But what I need to do is have each
successive written data word be calculated based on the input from the last
read, which means that I don't have the data ahead of time. I've tried the
Digital Single Write vi, but this seems to die after 16 cycles, and if I look
at my clock line on the scope, I'm not seeing any clocking pulses on the
handshaking lines, although the data lines seem to be outputting (or trying to
output) data, if only for those 16 cycles. So that would appear either not to
be the solution or to be set up badly. Any ideas what I need to do?

Alex Rast
arast@inficom.com
arast@qwest.net
0 Kudos
Message 3 of 3
(2,260 Views)