I'm sampling a digital line at about 25kHZ, 1080 samples each second (using USB-6221). So I take data for about 40ms and have the rest of the 1 second (~960ms) to do other things the program has to do, including write that data to an open file. I'm reading the data using the "DAQmx Read" VI, which outputs a digital waveform that includes time information that I don't need. So I've stripped out just the 1080 values using the "Get Waveform Components" VI, to pull out the "Y" component (data). This is a boolean array, 1080 boolean values.
So I'm trying to write this boolean array to a binary file. I can convert the boolean array to digital using the "Get Digital Data Component" VI, and write that with "Write to Binary File", but this is wasteful because it uses one byte in the file for each original bit of data. Also it makes reading the file difficult. I would rather write it directly to the binary file as a binary bit stream. Any idea how to do this? Thanks for the help!