LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing/reading serial digital data

I'm trying to figure out how to both read and write digital data in a serial fashion. Mainly, I'd prefer to be able to do so serially because I need to 16 bits apiece for both input and output, and this becomes cumbersome to do in parallel.

Ideally, what I'd like to be able to do is have a 16 bit unsigned integer as input, convert to a boolean array (or maybe digital waveform) and write this data to a single digital output channel. I have been unable to find very much useful information on how to do this, although I did find a somewhat helpful message on these forums (http://forums.ni.com/ni/board/message?board.id=170&message.id=289673&query.id=56887). The example VI mentioned in that post (Cont Write Dig Chan-Burst.vi and similar VIs) does not work, though. When attempting to run it, I get an error message related to the DAQmx Timing:

Error -200077 occurred at Property Node DAQmx Timing (arg 1) in DAQmx Timing (Burst Export Clock).vi:1->Cont Write Dig Chan-Burst.vi

Possible reason(s):

Measurements: Requested value is not a supported value for this property.

Property: SampTimingType
You Have Requested: Burst Handshake
You Can Select: On Demand, Handshake

The hardware in question is the SCB-100 for digital I/O. I'm running LabView 8.5 with DAQmx 8.7.1.

I'd be interested in suggestions on either how to get these example VIs working properly or alternative methods for how to write digital data serially (I'm sure the reading will be easy enough once I figure out how to do the writing).
0 Kudos
Message 1 of 4
(3,267 Views)
The SCB-100 is just a terminal block.  What DAQ card do you have installed?
0 Kudos
Message 2 of 4
(3,260 Views)
Sorry, the device is the NI PCI-6025E.
0 Kudos
Message 3 of 4
(3,254 Views)
Hi,

The DIO communication on the 6025E is only timed through software while on the PXI-6534 (mentioned in the other post you linked to) uses hardware timing.

Since you're limited to software timing, your communication will be significantly slower. The fastest that Windows typically controls software-timed DIO is on the order of 1kHz. However, I don't know your application, so perhaps that rate is fast enough.

Assuming that you want to use your 6025E card, I would suggest looking at some of the digital port and channel examples that ship with LabVIEW. The example finder is under LabVIEW » Help » Find Examples. From there, navigate to Hardware Input and Output » DAQmx. There are two folders for Digital Generation and Digital Measurements, and the example finder will list the devices that support each example in the lower right. The ones that will work on your card are 'Read Dig Chan.vi', 'Read Dig Port.vi', 'Write Dig Chan.vi', 'Write Dig Port.vi'.

Please experiment with those and use them to build the application you need. If you need further clarification, please let me know.

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 4 of 4
(3,225 Views)