Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6501 DAQmxBaseReadDigitalU8.vi.ProxyCaller

Hi,

 

We have six teststations using USB-6501.

 

Recently an error message has started to appear sometimes (attached).

NI_error.png

 

When this happens the USB-6501 dissapears from the device manager.

USB connector must be unplugged and plugged back and then it works again.

 

The software is devloped in Borland Delphi 6 and we use NI-DAQmxBase 3.0. Methods are called via NIDAQMXBASE.DLL.

 

Code snippet where this happens:

 

function TNIUSB6501_IO.GetDIO(Bit: Integer): Boolean;
var
  i: Integer;
  Read,BytesPerSamp:  Integer;
  R_Data: array [0..0] of Byte;
  TestBit:  Longword;
begin
  TestBit := Bit;
  while TestBit > ioDIO_Bit_7 do
    TestBit := TestBit shr 8;
  case Bit of
    ioDIO_Bit_0..ioDIO_Bit_7: i := 0;
    ioDIO_Bit_8.. ioDIO_Bit_15: i := 1;
    ioDIO_Bit_16..ioDIO_Bit_23: i := 2;
  else
    raise E_DigitalIO.Create(
      sioInvalidIO, cDigitalIO_InvalidIO);
  end;
  CheckDAQmxStatus(DAQmxBaseReadDigitalU8(TDAQmxTask(DAQmxTaskList[i]).TaskHandle,
                                          1,10.0,DAQmx_Val_GroupByChannel,@R_data[0],1,@Read,@BytesPerSamp,nil));
  if (R_Data[0] and TestBit = TestBit) then
    Result := True
  else
    Result := False;
end;

 

We have tried to install NI-DAQmxBase 3.3 and 3.4 (including updating USB-6501 firmware) but with no success.

 

We have tried to change USB-6501 HW on one equipment, no success.

 

We are starting to suspect that maybe some kind of OS update causes this problem since it is new to use. Some of these teststations has been running for years without this problem.

 

OS is XP Professional SP3.

 

Any ideas of what might be going wrong here?

0 Kudos
Message 1 of 1
(2,910 Views)