With the use of available application adaptors and the low cost of the EMANT300, it may actually make economic sense to create a solution using several USB DAQ modules. The cost of redesigning the hardware and software to integrate the solution may be more than the cost of the additional EMANT300 modules. This is especially true in proof of concept projects.
When an EMANT300 is first connected to the PC, it is assigned an unique virtual COM port. This virtual COM port remains the same regardless which physical USB port the EMANT300 is connected to. To change the COM port assignment, see Appendix A. It is usually not necessary to change the COM port assignment when using multiple DAQ modules.
To illustrate how to do use two EMANT300, we will use an easy example - Measure 2 different light intensities using two EMANT300 and light application adaptors.
The program to measure the light intensity using one EMANT300 is shown below
To initialize the EMANT300, the default option is to automatically find the first available module. When you plug in one module at a time and run the program, you get the following results.
In my case, the first EMANT300 is connected to COM Port 6 or ASRL6::INSTR. Unplugging the first EMANT300 and plugging the second EMANT300 and running the same program again, I get the following result
The second EMANT300 is connected to COM Port 5 or ASRL5::INSTR
I now modify the program to use both EMANT300 at the same time
In the EMANT300 Initialize.VI, I have set the Find EMANT300 input to false and assigned the appropriate COM Ports found earlier.
When the program is run, both EMANT300 work independently.
Common mistakes
Wire the Reset EMANT300 input to false rather than Find EMANT300 input
Trying to select COM Port rather than typing it in.
Not assigning COM Ports to all the modules. All Find EMANT300 inputs must be false
The program to measure the light intensity using one EMANT300 is shown below
using System; namespace ReadLight DAQ.Open(); |
To initialize the EMANT300, the default option is to automatically find the first available module. When you plug in one module at a time and run the program, you get the following results.
In my case, the first EMANT300 is connected to COM6. Unplugging the first EMANT300 and plugging the second EMANT300 and running the same program again, I get the following result
The second EMANT300 is connected to COM5
I now modify the program to use both EMANT300 at the same time
using System; namespace ReadLight DAQ.Open(false,"COM5"); volt = DAQ.ReadAnalog(Emant300.AIN.AIN0,Emant300.AIN.COM); volt = DAQ2.ReadAnalog(Emant300.AIN.AIN0, Emant300.AIN.COM); DAQ.Close(); |
In the Open method I have set the Find input to false and assigned the appropriate COM Ports found earlier.
When the program is run, both EMANT300 work independently.
A common mistake is not assigning COM Ports to all the modules. All Find inputs must be false
To change the assigned COM Port
click on Windows->Start
choose My Computer
click View System Information
Click on Hardware Tab->Device Manager
Click on USB Serial Port and change from the conflicting port number to another free COM port. In the above example, change from COM1 to COM2.