I am new to LabVIEW and am having great difficulty getting it to output a digital signal. I am using LabVIEW 2012 along with an NI PCI 6731 AO card hooked up to a BNC 2110 board. The 6731 card features four analog output channels and 8 digital I/O lines. I am already using all four analog output channels and am in need of a fifth output to control a motor that interfaces with a high (>3.3V) or low (<3.3V) signal. The rest of my analog output signals are being generated in MATLAB, and ideally, if I could use MATLAB to feed a binary array (010100001110001 etc.) along with a time array that instructs when the digital signal should be high or low, that would be perfect.
I've tried using DAQ assistant to accept a 1D array of digital waveforms, but am having trouble getting those waveforms to agree. I've also tried simulating an analog signal and using a comparator to convert it to a boolean array, but that also doesn't interface with the DAQ assistant. Any help would be greatly appreciated! Please advise.
If I understood correctly, you are trying to output this binary stream. Would you like to output it one bit at a time on a single line, or are you trying to write to the whole port at once?
Have you tried looking at the shipping examples that come with LabVIEW? I would recommend you look at the digital output examples. Click Help>>Find Examples.... Then navigate using the folders too Hardware Input and Output>>DAQmx>>Digital Ouput. Take a look at those examples. Do these do what you are trying to accomplish? The Digital - Finite Output example seems to be more or less what you are looking for. Do these examples help you?