Discussion:
program 6020E in Csharp? need legacy code?
(too old to reply)
xyzyx
2008-08-08 14:10:10 UTC
Permalink
This is a repeat:  Is there a way to control a DAQPad 6020E in C#.Net?  A reply from Mike W (mickeyw) said to use code in NI-DAQ/Examples/DotNET2.0/Cs, but that code doesn't work.  I get an error message that "Device identifier is invalid" and status code -20220.  Apparently that code is only for newer DAQmx devices, whereas the 6020e is a "Traditional NI-DAQ (Legacy) Device".  That code works fine with a MIO-16E board.
 
I see some postings related to this issue, but it isn't clear what to do.
 
My 6020e has a steady green lignt (device is configured OK according to the manual) and it works fine using the test panel in the Traditional Device section of Measurement and Automation Explorer, so the hardware isn't broken.
 
   Paul
 
dansch
2008-08-11 15:40:09 UTC
Permalink
Hello Paul,You are correct that the examples you have tried are for use with DAQmx devices, whereas the DAQPad 6020E is only supported by Traditional NI-DAQ. Unfortunately, National Instruments does not provide native .NET components for Traditional NI-DAQ. However, it is possible to use the Traditional NI-DAQ ActiveX controls to perform data acquisition with this device. For more information on this subject, please refer to the online KnowledgeBase article titled "<a href="http://digital.ni.com/public.nsf/websearch/F0FD13D2DD0C433986256D9C00468D29?OpenDocument" target="_blank">Programming DAQ in Visual C# .NET</a>". Hope this helps,
Loading...