LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem reading DIO lines using 4351 driver

Hi,
I'm using an NI4351 PCI DAQ card with the Ni435x driver and LabWindows/CVI v5.5 (on Windows 98) to capture digital logic states on the DIO lines. I used NI's MAX utility to establish a virtual DAQ input channel from 'Data Neighborhood'. When I tested this channel from the utility by connecting the DIO line to 5V or GND via a 10K resistor, the logic levels were registerd. In LabWindows, I use the 'NI435X_Init' and 'NI435X_Configure_Digital_Lines' driver functions to respectively initalize the DAQ card and set one of the DIO lines as an input, with the rest being set as outputs. However, I cannot read the input line using 'NI435X_Read_Line' unless I directly connect this channel to 5V or GND (i.e. without a series resistor), bu
t 'NI435X_Write_Line' works fine. (Analog data capture also works OK with other NI435x driver functions.) I'm wondering if there is something other than the initialize function that should be called. For the 'NI435X_Read_Line' function, I tried the following linemask combinations to set the port lines, using F or 1 to represent an output and 0 for an input:

NI435X_Configure_Digital_Lines(DAQ_session, 0x0FFFFFFF) // DIO 0 set as input, the rest as outputs
NI435X_Configure_Digital_Lines(DAQ_session, 0x01111111) // DIO 0 set as input, the rest as outputs

I am unsure which, if either, is correct and would be grateful for any help on this problem. Thanks.
0 Kudos
Message 1 of 1
(2,474 Views)