Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime error 10401 with CWAOPoint1 control

I am trying to run an older application and it fails with Runtime error 10401...the specified device is not a NI product... I am trying to run this on a laptop that does not have the hardware.  How can I get around this error so I can step through my code (VB6)?  I have the both the latest DAQMX and traditional Nidaq software installed as well as Measurement Studio 8 installed.
0 Kudos
Message 1 of 7
(8,729 Views)
Hi tfer1226,

Can you provide more information about what part of you code is causing the runtime error?  If you can post the part of your code that are causing this error, that would be helpful to answer your question.

This link may be helpful, it contains more information about what can cause this error:  KB 2VIDNK6I: Why Do I Receive Error -10401 When I Run My LabVIEW Program (Unknown Device Error)? .  While this knowledge base article is written for LabVIEW, it is still applicable to CVI.

What device does this application normally communicate with?
Jessica
National Instruments
Product Support Engineer
0 Kudos
Message 2 of 7
(8,725 Views)

The following is the subroutine used.  Its giving the error on the SingleWrite commands. VB does not report any references missing in the project.

Sub cmdSetLEDVoltages_Click(Index As Integer)
    Select Case Index
        Case 0
            CWAOPoint1.ChannelString = "1"
            CWAOPoint1.SingleWrite cwnGlareLEDVoltage(Index).Value
           
            CWAOPoint1.ChannelString = "0"
            CWAOPoint1.SingleWrite cwnRefLEDVoltage(Index).Value
        Case 1
            CWAOPoint2.ChannelString = "1"
            CWAOPoint2.SingleWrite cwnRefLEDVoltage(Index).Value
           
            CWAOPoint2.ChannelString = "0"
            CWAOPoint2.SingleWrite cwnGlareLEDVoltage(Index).Value
    End Select
   
End Sub

0 Kudos
Message 3 of 7
(8,712 Views)
The cwnGlareLEDVoltage(Index).Value statement is the from the NI control CWNumEdit
0 Kudos
Message 4 of 7
(8,707 Views)
Hi tfer1226,

You can simulate your device in Measurement and Automation Explorer.  If you simulate the device that is expected, this should allow you to run your code without that error. 

For more information about how to simulate a device, see this article: What are NI-DAQmx Simulated Devices and How Do I Use Them?

Jessica
National Instruments
Product Support Engineer
0 Kudos
Message 5 of 7
(8,699 Views)
I'm still getting the error.  The MAX report on the computer that has the boards installed shows the PCI cards under the Traditional (Legacy) Devices.  They are both PCI-6025E cards and are named Device 1 and Device 2.  I cannot name the devices the same in the DaqMX - it doesn't like the space.  I'm beginning to think that I won't be able to simulate the hardware on the development computer.
0 Kudos
Message 6 of 7
(8,659 Views)
Hi tfer1226,

You can simulate DAQmx devices, but Traditional NI-DAQ does not support the simulated device feature.  Without using DAQmx to simulate the devices, you are going to continue to receive those errors. 
Jessica
National Instruments
Product Support Engineer
0 Kudos
Message 7 of 7
(8,635 Views)