Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ-PAD 6508 initialization

I have a problem with initialization for a set of (3) DAQ PAD 6508 modules. Sometimes (not always) the module assigned as device 2 does not read the address (identifier string) correctly, This results in a error with code 10401 when I start the application. I am using legacy drivers since this system needs to be compatible with another machine that is using PCI cards. i have two identical setups that have the same problem. It is not the 6508, as changing it does not eliminate the problem. When this occurs, simply powering down the offending module and powering it back up usually recitifies the situtation. It never happens to device 1 or 3, only 2. When you look in the explorer, the device ID is scrambled, like the bytes have been flipped.
 
Ideas?
0 Kudos
Message 1 of 25
(5,503 Views)

The first thing that I would verify is that the bus has enough power to support three DAQ Pad's.  I would check the power coming off of all three USB busses and compare that to the power requirement for the DAQ Pad(s).  Have you tried running with just Device 2 and still seen the same error.

Hope this helps!

Jeff Phillips
National Instruments Applications Engineer

0 Kudos
Message 2 of 25
(5,469 Views)

These are running off of the external (brick) power supplies (3 of them) and they are connected to a 7 port USB Hub (Belkin), which is also powered by an external supply. I find it very unlikely that it is power related. The problem seems to be in the MAX/device identification process.

I have seen this behaviour on three seperate systems.

 

0 Kudos
Message 3 of 25
(5,466 Views)

Is there something common that happens when your device does not work?  Is this a start-up VI that runs when your computer boots up or has the computer and hardware been on for some amount of time prior to the VI starting?  Also, do you have one sub-VI that initializes all three pieces of hardware or separate sub-VI's that initialize all of them.  If they are separate, is there a different VI talking to each DAQ Pad or one VI all-together.  If this error doesn't happen every time, then there has to be something common to the failure mode.  Which version of the Legacy driver are you using?
-Jeff

0 Kudos
Message 4 of 25
(5,460 Views)

The device numbers are assigned by MAX.

The application is a VB6 program that was originally written for PCI-DIO-96 PCI cards. Never had the issue with the PCI cards. It seems to happen when I first try to run the program after a computer login or boot.

Here is the entire initialization program:

Public Sub Initialize_DIO()

Dim I As Integer

DAQDevice = 1       'device number 1 PCI-DIO 96
    For I = 0 To 5  'Ports 0-5 are outputs
        Status = DIG_Prt_Config(DAQDevice, I, 0, 1) 'Mode 0 Output
            If Status <> 0 Then
            Call DIO_Error(Status, DAQDevice)
            End If
        Next I
      'Ports 8 and 11 are inputs
        Status = DIG_Prt_Config(DAQDevice, 8, 0, 0) 'Mode 0 Input
        If Status <> 0 Then
            Call DIO_Error(Status, DAQDevice)
            End If
        Status = DIG_Prt_Config(DAQDevice, 11, 0, 0) 'Mode 0 Input
        If Status <> 0 Then
            Call DIO_Error(Status, DAQDevice)
            End If
      'Ports 6,7,9 and 10 are outputs (com enable lines)
        Status = DIG_Prt_Config(DAQDevice, 6, 0, 1) 'Mode 0 Output
        If Status <> 0 Then
            Call DIO_Error(Status, DAQDevice)
            End If
        Status = DIG_Prt_Config(DAQDevice, 7, 0, 1) 'Mode 0 Output
        If Status <> 0 Then
            Call DIO_Error(Status, DAQDevice)
            End If
        Status = DIG_Prt_Config(DAQDevice, 9, 0, 1) 'Mode 0 Output
        If Status <> 0 Then
            Call DIO_Error(Status, DAQDevice)
            End If
        Status = DIG_Prt_Config(DAQDevice, 10, 0, 1) 'Mode 0 Output
        If Status <> 0 Then
            Call DIO_Error(Status, DAQDevice)
            End If

DAQDevice = 2       'device number 2 PCI-DIO 96
    For I = 0 To 11
        Status = DIG_Prt_Config(DAQDevice, I, 0, 0) 'Mode 0 Input
            If Status <> 0 Then
            Call DIO_Error(Status, DAQDevice)
            End If
    Next I
DAQDevice = 3       'device number 3 PCI-DIO 96
    For I = 0 To 11
        Status = DIG_Prt_Config(DAQDevice, I, 0, 0) 'Mode 0 Input
            If Status <> 0 Then
            Call DIO_Error(Status, DAQDevice)
            End If
    Next I
'Set port 1 to digital output for force alarms
    Status = DIG_Prt_Config(DAQDevice, 1, 0, 1) 'Mode 0 Output
   
            If Status <> 0 Then
            Call DIO_Error(Status, DAQDevice)
            End If
End Sub

0 Kudos
Message 5 of 25
(5,461 Views)
Here is the rest, post was limited to 5000 characters.
 
Device 2 is returning a 10401, unknown device.
 
If you open MAX, Device 2 is there but the serial number is scrambled. If you switch the power off and on on device 2, MAX will then recognize the correct serial number and the program will run. I am running NI-DAQ 7.
 
I have tried changing the DAQ-PAD, but the problem still occurs.
 
Thanks for the help.
0 Kudos
Message 6 of 25
(5,456 Views)

Is this a start-up program that runs when the computer boots up or do you have to go to VB and then tell it to run.  The reason I ask is that MAX has threads that run during start-up of the computer that take a little longer than normal threads to execute.  So, start-up files that run as soon as the computer boots up often run into problems talking to MAX because the MAX start-up thread(s) aren't finished yet.  They will return the unknown device error because MAX hasn't finished indexing its own files to find the name of the device.  I will continue to look into this if this is not the case.
-Jeff

0 Kudos
Message 7 of 25
(5,452 Views)

No,

The computer has been booted for some time and then I start the program. Note that it will not clear itself. I have to power down the DAQ-PAD and power it back on to get the problem resolved..

0 Kudos
Message 8 of 25
(5,448 Views)
On a side note, you ever work for HP? Jeff Phillips used to support our ATE ;-)
0 Kudos
Message 9 of 25
(5,454 Views)
I'm curious if this is caused by a conflict between the drivers.  Can you uninstall both Traditional (Legacy) DAQ and DAQmx via the Add/Remove Programs from the control panel.  After that, I would install just Traditional DAQ 7.4.1. 
 
Install just this Traditional driver and see if your behavior is repeated.  This will either eliminate the driver from the picutre or target the driver as the problem.  Also, be sure that the DAQ Pad's are not connected to the computer during the uninstall/reinstall process.
-Jeff P.
0 Kudos
Message 10 of 25
(5,455 Views)