Need driver for Omega OM-DAQ-USB-2401 8/16 Channel USB DAQ

Dennis B.
Lititz, PA

Mar 31, 2015
5 Posts

0  |  0  

Re: Need driver for Omega OM-DAQ-USB-2401 8/16 Channel USB DAQ

Looking for a ATEasy driver for an Omega OM-DAQ-USB-2401 8/16 channel USB DAQ. A dll file called Omega.DAQ.dll is provided by Omega Engineering, but not a C++ header file defining the procedures. Does anyone have a driver or header file for this device? Here is a link to the files provided by Omega: ftp://ftp.omega.com/public/DASGroup/products/DAQ_Central/.

Solution Available
Victor B.
Lake Forest, CA

Mar 31, 2015
93 Posts

1  |  0  

Re: Need driver for Omega OM-DAQ-USB-2401 8/16 Channel USB DAQ

The Omega.Daq.dll that is included in API_1.0.3.zip is a .NET DLL, so there is no included header.  You can insert it into a Libraries sub-module by using the Insert Library dialog and selecting the .NET Assemblies tab.

Dennis B.
Lititz, PA

Apr 21, 2015
5 Posts

0  |  0  

Re: Need driver for Omega OM-DAQ-USB-2401 8/16 Channel USB DAQ

Here is a segment of C# code that I'm trying to implement in ATEasy to determine if the DAQ is connected:

       static void Main(string[] args)
        {
            //check for connected devices
            IList<Device> devices = Device.FindConnectedDevices();
            Console.WriteLine(devices);
            if (devices.Count > 0)
            {
                //use the first detected device for testing purposes
                RunTests(devices[0]);
            }
            else
            {
                Console.WriteLine("No devices detected.");
            }

            Console.Write("Done. Press <Enter> to exit.");
            Console.ReadLine(); //wait for Enter key
        }

I'm having several problems implementing this code in ATEasy:
1. IList<> is a generic list interface found in mscorlib Systems.Collections.Generic. IList does not show up as a legitimate type during variable declaration. The only type that seems to compile for "devices" is type "Any". Declaring as "Object" or any other type results in Compiler Error #682: Right side of assignment is not compatible with left. How do I declare "devices" in ATEasy so that I can determine what interface is connected?
2. mscorlib is a referenced library within the Omega_DAQ .NET assembly, but ATEasy cannot find mscorlib. Does it need to be explicitly added elsewhere?

Orr K.
Irvine, CA

Apr 21, 2015
21 Posts

0  |  0  

Re: Need driver for Omega OM-DAQ-USB-2401 8/16 Channel USB DAQ

Dennis,

In the driver you created open the Libraries, right-click and select Insert Library. Go to the .NET Assemblies tab and find mscorlib. You can add just Systems. Collections.Generic, all of the mscorlib library or just the List Interface. This should solve your issue of handling mscorlib referencing and it should now show up as a type you can use within the driver.

-Orr

Dennis B.
Lititz, PA

Apr 22, 2015
5 Posts

0  |  0  

Re: Need driver for Omega OM-DAQ-USB-2401 8/16 Channel USB DAQ

Imported appropriate classes of mscorlib successfully into the driver library list and was able to select type IList '<T>, but ATEasy tells me that is an illegal type when I try to assign it to variable "devices". If I try to use the non-generic type IList without the <T> type parameter, the properties dialog allows me to assign it, but the compiler once again complains that the right side assignment is not compatible with the left.

Here is the ATEasy code for my driver procedure called FindDevices() mscorlib.IList public:

variables
------------------------------
devices            mscorlib.IList

procedure
------------------------------
devices = Omega_Daq.Device.FindConnectedDevices()
return &devices


Suggestions?

DrATEasy (Ron Y.)
Mission Viejo, CA

Apr 23, 2015
368 Posts

0  |  0  

Re: Need driver for Omega OM-DAQ-USB-2401 8/16 Channel USB DAQ

ATEasy 9 does not support .Net generics classes. You will need to create a wrapper class that convert the return List from the FindConnectedDevices method to return the device instead of the list.



Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]