MonoDAQ-E-gMeter EtherCAT configuration

MonoDAQ-E series of devices can be effectively used with non-DEWESoft EtherCAT master system as standard EtherCAT slaves. The following guide will help you to use the devices in such systems. If you want to learn more about using MonoDAQ-E series with DEWESoft, please follow this guide.

1. ESI file and firmware

Before proceeding please ensure that your MonoDAQ-E-gMeter device has the latest firmware version and that you have the latest ESI file description for the device.

The latest ESI file for the MonoDAQ-E-gMeter device is available here.
The latest firmware (0.101) for the MonoDAQ-E-gMeter device is available here as a .dxu package (for upgrading using DEWESoft, see below) and here as a .fwu package (for upgrading using 3rd party EtherCAT master, see below).

2. SDO startup commands

It is necessary to configure the device using the following SDO write over CoE on INIT to PREOP transition:
8020:07 (Buffered input / Operation mode) = 00
This sets the device in the mode appropriate for operation with non-DEWESoft EtherCAT master. If the device is connected to DEWESoft, the 8020:07 will be set to 01 and will need to be again switched to 00 when connected to non-DEWESoft master. This SDO write is also included in the ESI file as a startup command and should get automatically recognized by the majority of EtherCAT master systems.

3. Distributed clocks (DC)

Distributed clocks (DC) need to be correctly configured for operation with non-DEWESoft EtherCAT masters. If the EtherCAT master supports DC, the following settings should be used:
SYNC0: enabled, cycle time = 1 µs, shift time = 0
SYNC1: enabled, cylce time = 1 ms, shift time = 0

If the EtherCAT master does not support DC or cannot set the SYNC0 time to 1 µs, the DC should be completely disabled, i.e.:
SYNC0: disabled
SYNC1: disabled
LabView EtherCAT master running on CompactRIO is one of the examples that supports DC but does not allow the SYNC0 to be set to 1 µs.

4. PDO configuration and measurement data

There are four PDOs available on the device:

  • x1a01 (DI) PDO only holds two channels of data:
    • “Frame Counter” which increases each time the device receives the EtherCAT frame and is used only for monitoring purpose
    • “Sensor temperature” which tells the internal temperature of the accelerometer in degrees Celsius
  • x1a60 (ACC-X) PDO holds the acceleration measurement channel, direction X and denoted “X”
  • x1a61 (ACC-Y) PDO holds the acceleration measurement channel, direction Y and denoted “Y”
  • x1a62 (ACC-Z) PDO holds the acceleration measurement channel, direction Z and denoted “Z”

The measurement data in “X”, “Y” and “Z” PDO entries is in REAL format and gives directly the actual acceleration measurement in units of g.

5. Detailed device configuration (amplifier settings, sample rate, filters etc.)
The easiest way to configure the device is by using DEWESoft and setting all the amplifier parameters in DEWESoft channel setup. After the setup is complete, click the Set Power On Default button in DEWESoft Analog In screen (see DAQ actions on top of the channel grid in Analog In menu – click “…” and find it in the sub-menu if it is not visible by default). Disconnect the power and EtherCAT from the device for a few seconds and then connect it to the non-DEWESoft master system and the device should wake up in the same state as it was set in DEWESoft.
If the device is to be configured purely from a non-DEWESoft EtherCAT controller over CoE, the list below shows the meaning of variables. CoE objects can only be accessed when the device is not in OP state (Config mode). For the settings to be applied when switching to OP mode, the following action needs to be applied:
Write the value “2” to the 8020:02 (Power On Deault) before going to OP state for the device to remember the settings. The 8020:02 will immediately switch back to the value of “1”, but the device will remember the settings. If this write is not performed, the device will switch back to the settings previously saved with this action when going to OP.
8020:01 Sample Rate – sets the sample rate
The following sample rates are valid (in samples/second): 3, 6, 12, 25, 50, 100, 125, 200, 250, 500, 1000, 2000, 4000

The EtherCAT cycle time needs to match the sampling period (1/sample rate) for the EtherCAT controller to collect all the samples. If the latest sample from the device is not collected on time, the newer sample replaces it.

8040:01 Modul 1 Settings – Range

0: 2 g
1: 4 g
2: 8 g

Sets the measurement range. Specifically this is the setting for the X axis, but all axes operate at the same range, therefore this SDO write automatically also sets the other two axes to the same range. 8041:01 and 8042:02 contain the info of the Y and Z range respectively.


6. Upgrading MonoDAQ EtherCAT firmware using DEWESoft

When the device is connected to DEWESoft, navigate to Options/Settings (top right corner of the screen) and go to Update menu on the left side. The window below will appear. Click on the “…” button on the top right corner of the windows to select your latest .dxu package and the new firmware versions will become available in the list below. Select which devices you want to upgrade (Select column) and then click “Upgrade” button in the bottom right corner of this window.

Check the new firmware version after the upgrade to make sure it was successful.

7. Upgrading MonoDAQ EtherCAT firmware over FoE using Beckhoff TwinCAT

In the TwinCAT configuration tree click on the “EtherCAT” (network device) and select “EtherCAT” tab on the main screen. This will open the list of connected devices on the bottom half of the screen. Right-click on the device that needs a firmware upgrade and click on “Firmware upgrade”. When prompted for a file, make sure to look for all file types, not only the suggested “.efw” as the file type of the MonoDAQ firmware is “.fwu”. Select the file and load it onto the device.

Check the new firmware version after the upgrade to make sure it was successful. It is available in the CoE  – Online tab of the device under Software version.

8. Example: Using MonoDAQ-E-gMeter with Labview

Labview data acquisition software supports EtherCAT slave devices and can therefore collect the data from MonoDAQ EtherCAT devices. In this example we are using CompactRio as an EtherCAT master controller.

Labview project needs to include the cRio device and there needs to be the EtherCAT master available on the cRio. Consult Labview tutorials to bring your project up to this state.

The ESI file description needs to be imported into Labview. This is done by right-clicking the EtherCAT master and Utilities/Import Device Profiles.

Importing ESI files into Labview

After importing the ESI files from your PC to Labview, E-gMeter needs to be added as a new EtherCAT device to the EtherCAT master. Right click the EtherCAT master and go to New / Targets and Devices and the screen below will show up.

Add new EtherCAT device to Labview EtherCAT master

Connect the E-gMeter device over EtherCAT to the compactRio. Click Refresh button (see figure above) and the device should be recognized in the list of existing devices. Clicking OK will add the device (or multiple devices if a chain of them is connected to cRio) to the project.

Before deploying the configuration, set the scan engine period to 1 ms (right-click the cRio / Properties / Scan Engine). This is the period at which the EtherCAT frames will be sent to the E-gMeter device to collect data samples. The period can be reduced down to 500 us or even lower, depending on the Labview application. Consult if your application demands higher data rates than 1 kS/s.

Now right-click the EtherCAT master and click “Deploy”. This will put the EtherCAT devices into OP mode, i.e. measurement mode. The middle LED on the device should now be green (no flashing). You can check the device state by right-clicking the device and clicking Online Device State.

Checking device state

State should be operational when the EtherCAT master is deployed. Clicking EtherCAT:Parameters on the left hand side will show up CoE objects of the device that can be used for configuration, but the SDO write actions need to be performed via the block diagram in Labview .vi files.

To read the data from the E-gMeter device, the following minimal block diagram is needed:

Minimal .vi block diagram to read acceleration data from MonoDAQ-E-gMeter

The block that bring the data from EtherCAT device PDO into your program is the Shared Variable block, accessible under Data Communication section.

Shared variable in Labview

To assign a specific PDO / channel to the variable, click on it and select it like shown in the figure below.

Selecting EtherCAT PDO (channel) to a shared variable block

Running this .vi will show the data for each axis in its own waveform chart and numeric display:

This was a short guide to get you started using MonoDAQ-E-gMeter with Labview. For further questions please write us an email to