MOGLabs microcontroller-based devices can be communicated with over USB or Ethernet using a simple human-readable control language, similar to the SCPI protocol that is uniquitous among laboratory devices. Due to institutional network restrictions and USB driver conflicts, some users experience some issues directly connecting their device to a host machine, so detailed instructions are provided here.
No special device drivers or API interface is required, allowing our products to be controlled from any programming language and integrated into any control system.
However we do provide language bindings in python, MATLAB and LabVIEW that simplify integration of our devices with your control system. These bindings provide a unified interface for devices on either USB or ethernet, and enable execution of arbitrary commands and queries as described in the manual.
Full error-checking is provided, allowing native error handling and ensuring that the device operates as expected.
MOGLabs products will automatically detect the network configuration when plugged in and request an IP address from the network server. However, if you don't have a network you can plug new devices in (either because your institution does not allow unregistered devices, or there just isn’t a network), the easiest approach is to connect an ethernet cable directly between your PC and the MOGLabs device.
These instructions assume an MWM but the instructions also apply for other ethernet-enabled MOGLabs devices.
- Connect device to Windows computer/laptop via standard ethernet patchcord (RJ45 to RJ45 connector).
- Provide power to the device. For the MWM, power can be provided by USB connection to a computer USB port, or to a USB power adapter.
- Start the device - either by turning on the power switch or holding down the OK button for a few seconds.
- After a few seconds, the device will show its IP address on the built-in display, for example the number at the bottom (10.1.1.80) is the IP address of the MWM below. We will use this later.
- On the Windows computer, press WIN-x and select Network Connections, then click on “Network and Sharing Center”. On Windows 7, use WIN-i and then find Network and Sharing Center
- Click on the appropriate network connection (see red box in example above). Click on “Properties”.
- A new dialog will open, and there should be an item labelled “Internet Protocol Version 4 (TCP/IPv4)”. Make sure this is checked. Select it and click "Properties" to open the connection settings.
Select “Use the following IP address” and enter a specific IP address, subnet and default gateway.
The IP address should be the same as at Step 4, except the last number which should be different (e.g. 2). Thus, in our case, 10.1.1.2.
The Subnet mask should be 255.255.255.0
The Default gateway should be the same as in Step 4, except the last number should be 1, i.e. 10.1.1.1.
Don’t worry about the DNS server addresses, or Advanced settings. Just press OK, then Close, then Close.
- Now you should be able to connect to the unit as described in the manual, use the provided software, apply firmware updates, etc.
When a MOGLabs product is connected to a Windows computer, the computer should automatically download and install the required STM32 Virtual COM Port Driver and then be automatically detected by the appropriate host software package.
To verify the driver installation, open Device Manager
- Hit WIN-x (that's the Windows key and "x" key at the same time), then select “Device Manager”.
For Windows 7, use WIN-i and then search to find Device Manager.
- Select the "Ports" item and expand (click on the > arrow) or just double-click on Ports. You should see something like:
If the device doesn't appear as expected, then the required driver is not installed. In some instances it might appear as "USB Serial Port", but this is a generic driver that will probably not function correctly.
To manually install the driver:
- Ensure the MOGLabs device is disconnected from your computer
- Download the drivers from: STM32 Virtual COM Port driver
- Double-click to run the .exe setup program you downloaded.
- Go to the install directory, usually
c:\Program Files (x86)\STMicroelectronics\Software\Virtual comport driverthen select
Win8(for Windows 8, 8.1 and 10).
- Double-click on
dpinst_x86.exefor 32-bit or
dpinst_amd64.exeif you are running 64-bit Windows , and follow the instructions.
- Once installation is completed, restart your computer.
- When your computer is finished booting, connect the USB cable to your device.
- Check for existence of VCP driver in Device Manager as above.