LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to program pxi 6508 port0 and port1 as one port of 16 bits?

I want to program PXI 6508 device port0 and port1 as one 16 bits port or port2 and port3 as one 16 bits port.  There are option in DAQmx to do port0-port3 (port0_32) as one 32 bits port but no port configuration as port0_16 or port2_16, etc...  Any help or hint would be apprecicated.  I'm using LabWidows 8.0 for programming.
0 Kudos
Message 1 of 2
(2,991 Views)
Hello,

You can achieve this by using the DAQmxWriteDigitalU16. Details on this function can be found in the DAQmx C Reference Help. One of the parameters for this function are writeArray which is a uInt16[]. This is an array of 16-bit integer samples to write to the task. You can also use the DAQmx_Val_GroupByChannel, which makes the samples non-interleaved. Non-interleaved samples prioritize channels before samples, such that the array lists all samples from the first channel in the task, then all samples from the second channel, up to all samples from the last channel.

In the configuration for the DAQmx channel you can use the DAQmxCreateDOChan. For the "lines" parameter, you can select a channel range to cover all the lines in your port. You can do something like Dev0/port0:1 to include two ports. You can also specify a range of lines such as Dev0/port0/line0:4.

Regards,

Raajit L
Raajit L
National Instruments
0 Kudos
Message 2 of 2
(2,969 Views)