Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Digital waveform for Digital Output

First off, my hardware is the NI PCI-7813R, with the SCB-68 connector block.  The 7813 is configured for all Digital I/O, and I have already set several pins for input and several for output.  I have physically looped one digital output port to a digital input port.  I am on labview 8.6.

 

The purpose of the project is to capture data streaming across a serial link.  For testing purposes I cannot interface with the intended link so I would like to simulate one.  I have no problem collecting the input data, however I am not sure how to create the output signal.  My first thought was to use the Digital Pattern Generator vi, set to random, to create my digital signal, however, in order to output this it needs to be in boolean format.  Is there a way to do this? am i going about this the wrong way?

 

Attached are the 2 vi's running the program, the first DIOTest2(FPGA) is the vi running on the PCI-7813R, and the DIOTest2(Host) is where i want to create and monitor the signals.

Download All
0 Kudos
Message 1 of 2
(3,220 Views)

There exists a VI in the waveforms palette that you can use to convert a digital waveform to a binary or boolean waveform. Here is the palette hierarchy: Programming -> Waveform -> Digital Waveform -> Digital Conversion -> Digital to Boolean Array.vi

 

You will then just need to index into the 2d boolean array to get the value your interested in.

 

However, this all seems overkill just to create a random boolean value. If you look inside the digital pattern generator VI, you will just see that it simply uses the random number generator primitive and does a boolean compare to see if it is closer to zero or one. You could just put this simple piece of code in your while loop for the digital output. It will run faster than creating a digital waveform and converting it to a boolean array.

Message 2 of 2
(3,207 Views)