Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

pcie-6323 not getting digital output to scb-68A connetor 1 port 0 \lin8:15

 I am getting output with dev0\line7:0 (Connector 0) but not getting output from dev0\line15:8 which outputs thru connector SCB-68A Connector 1 output .. 

It does work thru the NI max Test panel , but not thru the code .

 

0 Kudos
Message 1 of 5
(936 Views)

Try dev0\line8:15 instead.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 5
(922 Views)

tried this--- I get output through the test panel dev0\line8:15  on connector 1-scb-68A,,, but not through by code. My code works for dev0\line7:0 though

any ideas.

0 Kudos
Message 3 of 5
(920 Views)

The version of DAQmx Write you're using is for "single sample, single channel (port format)".

 

Port format means that each bit in the numeric value you write corresponds to a line on the digital port.  You're writing a constant value of 255 (decimal format) which tells bits 0:7 to be high and bits 8:31 to be low.

 

This is (presumably) then masked against the lines that you actually configured to be part of your digital channel.  So when the channel consists of lines 8:15, only the bits at those positions *actually* get written.

 

This might be a good time to right-click the 255 constant and choose "Properties" at the bottom of the popup menu.

- on the Display Format tab, select Hexadecimal, check the "Use minimum field width" box, set the width to 8, and then "Pad with zeros on left"

- on the Appearance tap, check the "Show radix" box.  (And make this a habit for any non-decimal display formats)

 

In hex format, each set of 2 hex digits corresponds to 8 bits.  So to set bits 0:7, you use hex 000000FF.   To set the next group of bits 8:15, you use hex 0000FF00.  For bits 16:23, you use hex 00FF0000.

 

You *could* calculate the corresponding decimal values and they'd work just fine, but hex format makes the pattern *so* much clearer.  Now you just include the correct hex number in each of the cases where you select from among Port A, Port B, Port C.  The lines you choose to configure and the numeric value you write need to match up.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 5
(902 Views)

thank you very much for the fast response. It is greatly appreciated. I will try it soon as i get back in the lab next week and let you know.

0 Kudos
Message 5 of 5
(896 Views)