LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using the Digital I/O board Ni 6534, how do I output a pattern of 19 "1's" and "O's" to one channel only, where I pass a single "1" or "O" at each transition of a clock HI to LO or Lo to Hi?

I looked at the sample code in "Buffered Pattern Output VI" and thought this might be the way to go. I will use the internal clock on the board and set it to 20 MHz. Each time there is a clock transition from LO to HI, I need to output a new "1" or "o". For example, a pattern of 19 bits I would need to output is :
1010101011001110100, and this on the same channel over 19 clock transitions. I am not sure if this code is a good place to start. I do not understand how the port list or Output info is to be controlled, i.e. where I should output my pattern and how to
tell the device say, port "0", DIOA0. I think it should be easy to do this, but I am still very unfamiliar with Labview.
0 Kudos
Message 1 of 2
(2,610 Views)
Hello,

Using the Buffered Pattern Output VI as a reference here is how you write your output data to the buffer:

On the DIO write VI on the block diagram, there is an intput of "digital data" which is the array of data you wish to output on the digital lines. With the 6534 you can configure 8, 16, and 32 bit ports. In your case of 19 bits you will have to configure a 32 bit port and simply write ZEROs for all the bits that you are not using.

The array that is written to the "digital data" input will be in interleaved format.
Meaning that a 32-bit output is comprised of 4 8-bit ports, so the array will be written in the following manner:

array element 0 = first update for lines 0-7
array element 1 = first update for lines 8-15
array element 2 = first update for
lines 16-23
array element 3 = first update for lines 24-31
array element 4 = second update for lines 0-7
array element 5 = second update for lines 8-15
array element 6 = second update for lines 16-23
array element 7 = second update for lines 24-31
....etc..

This being the case you will need to have the array data repeat 19 times for each change in order to output the same data for 19 clock cycles(updates). The other choice would be to choose a slower clock rate (update rate) to output the digital data.

Good Luck.
0 Kudos
Message 2 of 2
(2,610 Views)