Dm&p vortex86dx 600mhz
pc/104 cpu module
with 2s/2usb/vga/lcd/gpio/pwmx16
128mb ddr2 onboard (39 pages)
Summary of Contents for ICOP Technology QEC-M-02
Page 1
ICOP Technology Inc. User Manual QEC-M-02 DM&P Vortex86EX2 Processor EtherCAT MDevice with Isolated 32-ch DIO, USB, GLAN, COM port, HDMI display. (Revision 1.1) QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 2
Update Power LED Error Indication in page 20. Add“(This chapter is available in multiple languages)” 2025/03/31 Version1.1 in Ch.4 Getting Started. Delete the extra “•” in Ch.4.5.4 CANopen over EtherCAT (CoE) Functions. QEC-M-02 User Manual Ver 1.1 March, 2025...
No part of this manual may be reproduced, copied, translated or transmitted, in whole or in part, in any form or by any means without the prior written permission of ICOP Technology Inc.
WARNING! DO NOT ATTEMPT TO OPEN OR TO DISASSEMBLE THE CHASSIS (ENCASING) OF THIS PRODUCT. PLEASE CONTACT YOUR DEALER FOR SERVICING FROM QUALIFIED TECHNICIAN. QEC-M-02 User Manual Ver 1.1 March, 2025...
EMOVING CH. 4 GETTING STARTED (THIS CHAPTER IS AVAILABLE IN MULTIPLE LANGUAGES) ..41 4.1 P ........................44 ACKAGE ONTENTS 4.2 H ......................45 ARDWARE ONFIGURATION 4.3 S ..................47 OFTWARE EVELOPMENT NVIRONMENT QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 6
4.5.4 CANopen over EtherCAT (CoE) Functions ................ 68 4.5.5 Cyclic Callback Functions ....................75 4.5.6 Distributed Clock (DC) Configuration Functions .............. 82 4.5.7 86EVA, an EtherCAT Configuration Tool ................87 4.5.8 Import ENI to QEC-M-02 ..................... 97 4.6 B ......................107 OOTLOADER SAGE 4.6.1 Turn on Bootloader Menu ....................
Real-Time Precision for Motion and I/O Control With a precise synchronization cycle of 125μs (min.) and jitter time under 1μs, the QEC-M-02 is designed for highly synchronized motion and I/O control applications, making it ideal for precision automation.
Controls the Primary/Secondary Ethernet Driver, sending EtherCAT frames • The programs are designed to run on the FreeDOS operating system and have been compiled using the GCC compiler provided by the DJGPP environment. QEC-M-02 User Manual Ver 1.1 March, 2025...
As most applications run on the Master System, the EtherCAT MDevice Firmware running on the Slave System is free from interference by other applications. This setup allows it to focus on executing the EtherCAT MDevice Core, ensuring the synchronization and real-time capabilities of EtherCAT. QEC-M-02 User Manual Ver 1.1 March, 2025...
When the EtherCAT MDevice Core reaches the Write Outputs stage, it copies Output PDO data from DPRAM to the Ethernet Driver’s DMA and sends frames. These tasks are executed periodically in a cyclic manner, following the outlined procedural steps, ensuring the synchronization of dual-system PDO data. QEC-M-02 User Manual Ver 1.1 March, 2025...
EtherCAT network; its functions are as follows: EtherCAT SubDevice scanning. • Import ENI file. • Setting EtherCAT MDevice. • Configure EtherCAT SubDevices. • For other detailed functions, please refer to the 86EVA User Manual. QEC-M-02 User Manual Ver 1.1 March, 2025...
+19 to +50VDC Power Input (Typ. +24VDC) Power Consumption Operating Temperature -20 to +70°C/-40 to +85°C (Option) Dimension 107.45 x 49 x 77.31 mm LED Indicator PWR, RUN, LINK, Digital status Rotary switch Max. 16 modes QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 14
ICOP Technology Inc. Weight 370 g Mounting DIN-Rail Internal Monitoring Temperature, Voltage, Current, Start-up time Software Support 86Duino Coding IDE 501+ QEC-M-02 User Manual Ver 1.1 March, 2025...
ICOP Technology Inc. 1.4 Mounting Instruction QEC-M-02 is an easy-install design to help you maintain your modules easily. Please refer to Ch.3.1 DIN-Rail installation. DIN-Rail QEC-M-02 User Manual Ver 1.1 March, 2025...
C: Yes. None or N: Normal 1.5.1 Ordering Part Number: QEC-M-02-DFF: EtherCAT MDevice with Isolated Digital Input 16-ch/Output 16-CH / USB / GLAN / HDMI / COM / Rotary switch. QEC-M-02P-DFF: EtherCAT MDevice with Isolated Digital Input 16-ch/Output 16-CH / USB / GLAN / HDMI ...
I/O Status LEDs External Status LEDs Digital I/O Connector External Status LEDs Rotary switch External Rotary switch DIN-Rail External RJ45 Connector Giga LAN 8-pin (Gold finger) HDMI HDMI 2.0 Serial Port DB9 serial port 9-pin QEC-M-02 User Manual Ver 1.1 March, 2025...
Pin # Signal Name LAN2_TX+ LAN2_TX- LAN2_RX+ LAN2_RX- VS- (GND) VP- (GND) PoE LAN with the Red Housing; Regular LAN with Black Housing. L4, L5, L7, L8 pins are option, for RJ45 Power IN/OUT. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 22
When connecting PoE and non-PoE devices, make sure to disconnect Ethernet cables at pins 4, 5, 7, and 8 (e.g., when a PoE-supported QEC EtherCAT MDevice connects with a third-party EtherCAT SubDevice). QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 23
VS- (GND) VP- (GND) PoE LAN with the Red Housing; Regular LAN with Black Housing. L4, L5, L7, L8 pins are option, for RJ45 Power IN/OUT. QEC’s PoE power supply is up to 24V/3A. QEC-M-02 User Manual Ver 1.1 March, 2025...
Vs for system power; Vp for peripheral power and backup power. Pin # Signal Name Pin # Signal Name Vs- (GND) Vp- (GND) Power Input voltage +19 to +50VDC Power Input (Typ. +24VDC) QEC-M-02 User Manual Ver 1.1 March, 2025...
Orange LED (Green + Red) will continuously flash (at Orange LED On Voltage > 50V or < 12V 0.3-second intervals) until the Vs and Vp voltages are correct. Vs power status will be displayed first. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 26
APP software CHECKSUM failed. 2 Long Lights Not yet defined. Note: This table is for reference only. If any of the above patterns occur, please contact ICOP for diagnosis and resolution via email at info@icop.com.tw. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 27
Please refer to the table below for the LAN port LED indications. Notation Color States Description Green Green LED Blinking Data Activity LINK Orange Orange LED On 100Mbps Connection Green Green LED Blinking Data Activity LINK Orange Orange LED On 100Mbps Connection QEC-M-02 User Manual Ver 1.1 March, 2025...
ICOP Technology Inc. 2.2.4 USB Type-C The QEC-M-02 features a USB Type-C port primarily used for programming uploads and debugging. You can connect the device to a computer using a USB to USB Type-C cable to upload code and configure the system.
The LEDs of 16 digital outputs are 0 to 15, individually indicating the status of the 16 digital channels. Notation Color States Description Digital output status is “Off” Green Digital output status is “On” QEC-M-02 User Manual Ver 1.1 March, 2025...
ICOP Technology Inc. 2.2.7 USB The QEC-M-02 has a Standard USB 2.0 port with hot-plug support. You can use this port to connect: USB Disk: For file storage, transfer, or accessing configuration data. Keyboard/Mouse: For HMI display, control, or enter.
Usage: Turn the switch with a small flathead screwdriver to the desired address. User can use 86Duino Coding IDE 501+ to select the address slot that what to upload the program. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 35
1. Turn off the power before adjusting the rotary switch. 2. Use a small flathead screwdriver to rotate the switch to the desired position. 3. Power on the device and confirm the selected address. QEC-M-02 User Manual Ver 1.1 March, 2025...
ICOP Technology Inc. 2.2.9 DIN-Rail installation QEC-M-02 is an easy-install design to help you maintain your modules easily. Please refer to Ch.3.1 DIN-Rail installation. DIN-Rail QEC-M-02 User Manual Ver 1.1 March, 2025...
ICOP Technology Inc. 2.2.10 Giga LAN The QEC-M-02 features one Giga LAN port and is dedicated to external Ethernet communication for general network use. The Giga LAN port is located on the device's bottom side (as shown in the diagram).
ICOP Technology Inc. 2.2.11 HDMI The QEC-M-02 is equipped with an HDMI 2.0 connector. Display Resolution: 1280 x 720 x 256 Supported Libraries: Compatible with LVGL and 86HMI Editor for graphical interface design. To display content on an HDMI-connected monitor, use the...
RS485+/RXD Note: RS232 and RS485 cannot be used simultaneously. The Serial specification table: Serial Port Interface Mode RS232/RS485 (D-Sub 9-pin) Data transfer rate (bps) 2400,4800,9600,14400,19200,38400,57600,115200 Data width (bit) 5/6/7/8 Hardware Flow Control CTS/RTS QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 40
While the Serial Port’s signal works, the tx/rx LEDs on the front side will flash. Switch DIP switch for changing serial communication to RS232 or RS485. Notation States RS485 RS232 Enable RS232 RS485 Enable Note: RS232 and RS485 cannot be used simultaneously. QEC-M-02 User Manual Ver 1.1 March, 2025...
2.3 Wiring to the Connector 2.3.1 Connecting the wire to the connector Insulated Terminals Dimensions (mm) Position Ø D1 Ø d1 Ø D2 CN 0.5-6 CN 0.5-8 CN 0.5-10 10.0 2.3.2 Removing the wire from the connector QEC-M-02 User Manual Ver 1.1 March, 2025...
Maximum Load Voltage: Load Voltage +24V (Options: 24V or 48V) • Safe Operating Frequency: ≤3000 Hz (Rise Time (tr): 6us, Fall Time (tf): 6us) • Type: Sink (Supports both NPN and PNP configurations) • Isolation Protection: 2500 Vrms • QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 43
Maximum Load Voltage: +50Vdc • Typ. 500mA (peak 1000mA) • Operating Frequency: 1000Hz (Turn-On Time: 0.25ms, Turn-Off Time: 20us) • Type: Sink (Supports both NPN and PNP configurations) • Isolation Protection: 1500 Vrms • QEC-M-02 User Manual Ver 1.1 March, 2025...
QEC-M-02. Always mount QEC-M-02 one at a time. 3.1 DIN-Rail installation Slide in the QEC-M-02 on the hookup guides and press the QEC-M-02 with a certain amount of force against the DIN track until the DIN track mounting hook lock into place.
ICOP Technology Inc. 3.2 Removing QEC-M-02 Unit Use a flat-blade screwdriver to remove the DIN Track mounting hook on the unit. Pull down the flat-blade screwdriver against the DIN track until the mounting hook being removed from the track. QEC-M-02 User Manual...
Getting Started (This chapter is available in multiple languages) QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 48
ICOP Technology Inc. This chapter explains how to start with QEC-M-02 and its software, 86Duino Coding IDE. Note. QEC’s PoE (Power over Ethernet) In QEC product installations, users can easily distinguish between PoE and non-PoE: if the RJ45 house is red, it is PoE type, and if the RJ45 house is black, it is non-PoE type.
Page 49
VS- (GND) VP- (GND) PoE LAN with the Red Housing; Regular LAN with Black Housing. L4, L5, L7, L8 pins are option, for RJ45 Power IN/OUT. QEC’s PoE power supply is up to 24V/3A. QEC-M-02 User Manual Ver 1.1 March, 2025...
Please get in touch with our sales channels if any of the package items are missing or damaged. Also, feel free to reuse the shipping materials and cartons for further storing and shipping needs in the future. QEC-M-02 User Manual Ver 1.1 March, 2025...
Plug in the power supply. There are two groups of power supplies in QEC-M-02, Vs and Vp. The voltage requirement for both supplies’ ranges from 19V to 50V wide voltage. After powering it on, the power LED lights up (green).
Page 52
1 short flash microchip internal SRAM failed. 2 short flashes APP software CHECKSUM failed. 2 Long Lights Not yet defined. Note: If you encounter any of the above abnormal states, please contact us. QEC-M-02 User Manual Ver 1.1 March, 2025...
After downloading, please unzip the downloaded zip file, no additional software installation is required, just double-click 86duino.exe to start the IDE. Note: If Windows displays a warning, click Details and then click the Continue Run button once. 86Duino Coding IDE 501+ looks like below. QEC-M-02 User Manual Ver 1.1 March, 2025...
4.4 Connect to your PC and set up the environment Follow the steps below to set up the environment: Connect the QEC-M-02 to your PC via a USB Type-C to USB cable (86Duino IDE installed). Turn on the QEC power.
Page 55
ICOP Technology Inc. Open the 86Duino IDE. Select the correct board: In the IDE's menu, select “Tools” ->” Board” -> “QEC-M-02” (or the QEC-M MDevice model you use). Select Port: In the IDE's menu, select “Tools” -> ”Port” and select the USB port to connect to the QEC-M MDevice (in this case, COM5 (QEC)).
SubDevice. A distinction is made between the following states: Init • Pre-Operational • Safe-Operational and • Operational • Boot • The regular state of each EtherCAT SubDevice after bootup is the OP state. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 57
ICOP Technology Inc. The EtherCAT MDevice (QEC-M-02) can be configured in the EtherCAT network via the EtherCAT library and programmed with the control action in the 86Duino IDE. The 86Duino development environment has two main parts: setup() and loop(), which correspond to initialization and main programs.
Page 58
(step 2), it does not wait for the EtherCAT MDevice library and directly continues with the next action. The two systems operate independently, with no synchronization. If the user has registered a cyclic callback, the cyclic interrupt will call it, as shown in step 4A. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 59
ICOP Technology Inc. Here is the example code: #include "Ethercat.h" EthercatMaster master; void CyclicCallback() { // ... void setup() { master.begin(); master.attachCyclicCallback(CyclicCallback); master.start(1000000, ECAT_FREERUN); void loop() { // ... QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 60
4. As long as the user reads the current input process data within the cyclic callback, processes it, calculates the output process data, and writes it back, the current cycle will send the output process data to the EtherCAT network, fulfilling the requirements of real-time control systems. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 61
ICOP Technology Inc. Here is the example code: #include "Ethercat.h" EthercatMaster master; void CyclicCallback() { // ... void setup() { master.begin(); master.attachCyclicCallback(CyclicCallback); master.start(1000000, ECAT_SYNC); void loop() { // ... QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 62
The Free Run Manual Mode diagram for QEC MDevice: Here is the example code: #include "Ethercat.h" EthercatMaster master; void setup() { master.begin(); master.start(1000000, ECAT_FREERUN_MANUAL); void loop() { // ... master.update(); QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 64
ICOP Technology Inc. Serial.println(); void loop() { // put your main code here, to run repeatedly: QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 66
FoE Details: 0x"); Serial.println(slave.getFoEDetails(), HEX); Serial.print(" EoE Details: 0x"); Serial.println(slave.getEoEDetails(), HEX); Serial.print(" SoE Channels: "); Serial.println(slave.getSoEChannels()); Serial.print(" DC Supported: "); Serial.println(slave.isSupportDC()); void loop() { // put your main code here, to run repeatedly: QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 67
// Skip this slave if attachment fails Serial.print("Slave "); Serial.println(i); Serial.print(" Name: "); Serial.println(slave.getDeviceName(name, 256)); Serial.print(" Vendor ID: 0x"); Serial.println(slave.getVendorID(), HEX); Serial.print(" Product Code: 0x"); Serial.println(slave.getProductCode(), HEX); Serial.print(" Revision Number: 0x"); Serial.println(slave.getRevisionNumber(), HEX); Serial.print(" Serial Number: 0x"); Serial.println(slave.getSerialNumber(), HEX); QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 68
FoE Details: 0x"); Serial.println(slave.getFoEDetails(), HEX); Serial.print(" EoE Details: 0x"); Serial.println(slave.getEoEDetails(), HEX); Serial.print(" SoE Channels: "); Serial.println(slave.getSoEChannels()); Serial.print(" DC Supported: "); Serial.println(slave.isSupportDC()); void loop() { // put your main code here, to run repeatedly: QEC-M-02 User Manual Ver 1.1 March, 2025...
Overall, process data is an essential part of EtherCAT technology and is suitable for real-time applications in robot control, CNC control, automation control, and other fields. EtherCAT: Exchange of internet packets and data. (Source of information: http://www.ethercat.org/) QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 70
// Read and display the state of PDO bits Serial.print("Bit0 => "); Serial.print(slave.pdoBitRead(0)); // Read PDO bit 0 Serial.print(", Bit9 => "); Serial.println(slave.pdoBitRead(9)); // Read PDO bit 9 delay(1000); // Wait for 1 second QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 71
Serial.print((slave.pdoRead8(0) >> 0) & 1); // Read PDO byte 0, extract bit 0 Serial.print(", Bit9 => "); Serial.println((slave.pdoRead8(1) >> 1) & 1); // Read PDO byte 1, extract bit 9 delay(1000); // Wait for 1 second before reading again QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 72
// Wait for 1 second // Set Bit 0 and Bit 9 to 0 slave.pdoBitWrite(0, 0); // Write 0 to Bit 0 slave.pdoBitWrite(9, 0); // Write 0 to Bit 9 delay(1000); // Wait for 1 second QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 73
// Wait for 1 second // Write 0x00 to PDO byte 0 and byte 1 slave.pdoWrite8(0, 0x00); // Set byte 0 to 0x00 slave.pdoWrite8(1, 0x00); // Set byte 1 to 0x00 delay(1000); // Wait for 1 second QEC-M-02 User Manual Ver 1.1 March, 2025...
The SDO services primarily consist of two types of commands. The SDO command is utilized for accessing objects stored in the Object Dictionary, while the SDO information command is employed to retrieve details about these objects. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 75
// Read and print the value of SDO 0x1C13.0 Serial.print("1C13h.0 => "); Serial.println(slave.sdoUpload8(0x1C13, 0x00)); // Upload 8-bit SDO data from 0x1C13.0 void loop() { // put your main code here, to run repeatedly: QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 76
(slave.sdoUpload(0xFFFF, 0xFF, &value, sizeof(value), &abortcode) == ECAT_ERR_DEVICE_COE_ERROR) { Serial.print("Abort Code: 0x"); Serial.println(abortcode, HEX); // Print the abort code in hexadecimal format void loop() { // put your main code here, to run repeatedly: QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 77
Here is the example code: #include "Ethercat.h" EthercatMaster master; EthercatDevice_Generic slave; void setup() { master.begin(); slave.attach(0, master); slave.sdoDownload8(0x1C12, 0x00, 0); slave.sdoDownload8(0x1C13, 0x00, 0); void loop() { // put your main code here, to run repeatedly: QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 78
(slave.sdoDownload(0xFFFF, 0xFF, &value, sizeof(value), &abortcode) == ECAT_ERR_DEVICE_COE_ERROR) { Serial.print("Abort Code: 0x"); Serial.println(abortcode, HEX); // Print the abort code in hexadecimal format void loop() { // put your main code here, to run repeatedly: QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 79
= slave.sdoUpload8(mapping, 0x00); for (int n = 0; n < mapping_nr; n++) { entry = slave.sdoUpload32(mapping, n + 1); Serial.print(" "); Serial.print(entry, HEX); Serial.println("h"); // Process TxPDO Assignments assign_nr = slave.sdoUpload8(0x1C13, 0x00); QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 80
(int n = 0; n < mapping_nr; n++) { entry = slave.sdoUpload32(mapping, n + 1); Serial.print(" "); Serial.print(entry, HEX); Serial.println("h"); void loop() { // put your main code here, to run repeatedly: QEC-M-02 User Manual Ver 1.1 March, 2025...
2000002 Multiple working counter faults occurred. ECAT_ERR_SINGLE_LOST_FRAME 2000003 Frame was lost. ECAT_ERR_MULTIPLE_LOST_FRAMES 2000004 Frames were lost multiple times. ECAT_ERR_CABLE_BROKEN 2000007 The cable is broken. ECAT_ERR_WAIT_ACK_TIMEOUT 2001000 Firmware timeout waiting for cyclic interrupt ACK. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 82
The event codes supported by the Event Callback are as follows: Definition Code Description ECAT_EVT_STATE_CHANGED 1000001 The EtherCAT state of the MDevice has changed. ECAT_EVT_CABLE_RECONNECTED 1000002 The cable has been reconnected. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 83
// Attach the first EtherCAT slave to the master master.attachCyclicCallback(myCallback); // Attach cyclic callback master.start(1000000); // Start EtherCAT Master with 1 ms cycle time void loop() { // put your main code here, to run repeatedly: QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 84
// Error callback function void myErroCallback(uint32_t errorcode) { switch (errorcode) { case ECAT_ERR_WKC_SINGLE_FAULT: wkc_single_fault_cnt++; break; case ECAT_ERR_WKC_MULTIPLE_FAULTS: wkc_multiple_faults_cnt++; break; case ECAT_ERR_SINGLE_LOST_FRAME: single_lost_frame_cnt++; break; case ECAT_ERR_MULTIPLE_LOST_FRAMES: multiple_lost_frames_cnt++; break; case ECAT_ERR_CABLE_BROKEN: cable_broken_cnt++; break; case ECAT_ERR_WAIT_ACK_TIMEOUT: wait_ack_timeout_cnt++; break; QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 85
Serial.print("ECAT_ERR_WKC_SINGLE_FAULT = "); Serial.println(wkc_single_fault_cnt); Serial.print("ECAT_ERR_WKC_MULTIPLE_FAULTS = "); Serial.println(wkc_multiple_faults_cnt); Serial.print("ECAT_ERR_SINGLE_LOST_FRAME = "); Serial.println(single_lost_frame_cnt); Serial.print("ECAT_ERR_MULTIPLE_LOST_FRAMES = "); Serial.println(multiple_lost_frames_cnt); Serial.print("ECAT_ERR_CABLE_BROKEN = "); Serial.println(cable_broken_cnt); Serial.print("ECAT_ERR_WAIT_ACK_TIMEOUT = "); Serial.println(wait_ack_timeout_cnt); delay(1000); // Wait 1 second before the next print QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 86
// Attach event callback master.begin(); // Initialize EtherCAT Master master.start(); // Start EtherCAT communication void loop() { // Print event counts to Serial Monitor Serial.print("ECAT_EVT_STATE_CHANGED = "); Serial.println(state_changed_cnt); Serial.print("ECAT_EVT_CABLE_RECONNECTED = "); Serial.println(cable_reconnected_cnt); QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 87
ICOP Technology Inc. delay(1000); // Wait 1 second before the next update QEC-M-02 User Manual Ver 1.1 March, 2025...
Therefore, the EtherCAT solution for synchronizing nodes is based on such distributed clocks (DC). EtherCAT: Illustration of Distributed Clock (DC). (Source of information: http://www.ethercat.org/) QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 89
I/O signal from two EC-SubDevices is around 20 nano-seconds. (*1) Please refer to EtherCAT standard document ETG1000.4 Synchronicity and Simultaneousness: Scope view of two distributed devices with 300 nodes and 120 m of cable between them. (Source of information: http://www.ethercat.org/) QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 90
DC Cycle Time 1 is used to set the cycle time for the SYNC1 signal, which refers to the • delay defined after the SYNC0 pulse. This parameter is optional. DC Shift Time is used to set the offset of the SYNC0 signal relative to the DC Base. • QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 91
// Initialize EtherCAT Master slave.attach(0, master); // Attach the first EtherCAT slave slave.setDc(1000000); // Set Distributed Clock synchronization to 1 ms slave.sdoDownload8(0x6060, 0x00, 8); // Set operation mode to CSP (Cyclic Synchronous Position) QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 92
0x06); // Switch to "Shutdown" state delay(1000); slave.pdoWrite8(0, 0x07); // Switch to "Switch On" state delay(1000); slave.pdoWrite8(0, 0x0F); // Switch to "Operation Enable" state delay(1000); void loop() { // put your main code here, to run repeatedly: QEC-M-02 User Manual Ver 1.1 March, 2025...
Optional ENI file • 4. EtherCAT SubDevice Settings: Set SubDevice Object Name • Set SubDevice Alias Address • SubDevice I/O Mapping can be set • Display secondary device information • View internal information • QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 94
QEC-M-02: Press twice on the image of the QEC-M-02 to see the parameter settings. You can set the EtherCAT MDevice Object Name, Apply BIOS Settings, Enable the EtherCAT Cable Redundancy option, set EtherCAT Cycle Time and DC synchronization function, and select the ENI file.
Page 95
If users select “Apply BIOS Settings”, then the select box “Enable Redundancy” and the dropdown menu “Cycle Time” will not be available. While not using the BIOS settings, users can select to enable the redundancy function. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 96
In “Enable DC Synchronization,” you can enable the DC function for all EtherCAT SubDevices on the current EtherCAT network that supports it and can be certificated by 86EVA. Users can also select DC mode by the dropdown menu “DC Mode”, with options “Bus Shift” and “Master Shift”. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 97
After you click the “Open” button, 86EVA will show file upload window to select the ENI file you need. And it’ll show the file name under the “Select ENI file” label after you upload the ENI file. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 98
Safe-OP When an Error Occurs” and “Auto Restart When Error-Free”. You can also see the voltage, current and system temperature in the “Device Status” area. Users can also set the maximum number of the Virtual Arduino functions. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 99
Once you’re finished your EtherCAT configuration, go back to the home screen and press the "Code Generation" button in the bottom right corner. When you're done, double-click the OK button to turn off 86EVA, or it will close in 10 seconds. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 100
The program will run when the upload is complete. For more detailed information, please refer to 86EVA, EtherCAT-Based Virtual Arduino. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 101
2. Connect the QEC-M: Use a USB cable to connect the QEC-M to your computer. 3. Open 86Duino IDE: After the installation is complete, open the 86Duino IDE software. 4. Select Board: From the IDE menu, choose “Tools” > “Board” > “QEC-M-02” (or the specific model of QEC-M you are using).
Page 102
QEC-M name will appear. Clicking on it will start the update process, which will take approximately 5-20 minutes. QEC-M-02: • Step 3: Complete the Update After completing the above steps, your QEC-M has been successfully updated to the latest version of the development environment. QEC-M-02 User Manual Ver 1.1 March, 2025...
ICOP Technology Inc. 4.5.8 Import ENI to QEC-M-02 The EtherCAT Network Information (ENI) file contains the essential settings needed to configure an EtherCAT network. This XML-based file includes general information about the MDevice and the configurations of every SubDevice connected to it. Using the EtherCAT Configuration Tool, you can read ESI files or perform an online scan of the network to detect all connected SubDevices.
Page 104
// Note: the USB disk readings via QEC Master will be under the P:\\ path. for (int i = 0; i < Device; i++) { Serial.println(slave[i].attach(i, master)); Serial.println(master.start()); Serial.println("...OK"); void loop() { // put your main code here, to run repeatedly: // ... QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 105
Verify that the ENI file is correctly imported and the network is operational via Serial • Monitor. If the ENI file is imported successfully, you will see the following return value in Serial • Monitor: QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 106
ICOP Technology Inc. If there is an error, such as -1051 (which means ECAT_ERR_MASTER_ENI_MISMATCH), refer • to the EtherCAT API user manual for other error codes and their meanings. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 107
Step 1: Turn on 86EVA and scan: The 86EVA tool can be opened via the following buttons. • Once you have confirmed that the correct COM port has been selected of QEC-M-02, press • the Connect button to start scanning the EtherCAT network.
Page 108
ICOP Technology Inc. Step 2: Import ENI file: Press twice on the QEC-M-02 to enter the corresponding parameter setting screen. • You can see the parameter settings for the QEC-M-02. • Click on the “Open” button next to the “Select ENI file” in the General area.
Page 109
Browse where you saved the ENI file in Chapter 2, and open it. • After you import the ENI file into the 86EVA, you can see the ENI file name. • Please click “Back” button in the upper left corner to return. • QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 110
The generated code and files are as follows: • a. sketch_jul23d: Main Project (.ino, depending on your project name). b. GPT.h: Parameters to provide to ChatGPT referred. c. myeva.cpp: C++ program code of 86EVA. d. myeva.h: Header file of 86EVA. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 111
Once the code is completed, click on the toolbar to compile, and to confirm that the • compilation is complete and error-free, you can click to upload. The program will run when the upload is complete. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 112
Verify that the ENI file is correctly imported and the network is operational via Serial • Monitor. If the ENI file is imported successfully, the Serial Monitor will return nothing; if there is an • error, it will return the error directly to the Serial Monitor. QEC-M-02 User Manual Ver 1.1 March, 2025...
The Bootloader accepts user-uploaded sketch programs and writes them to the 86Duino device's onboard memory. After successfully uploading a sketch, the Bootloader executes the program automatically. This section is a detailed guide to navigating and using the bootloader menu's features effectively. QEC-M-02 User Manual Ver 1.1 March, 2025...
The Bootloader Menu can be opened via the following buttons. Please select the correct COM port and then click the “Connect” button. Once you have confirmed that the correct COM port has been selected of QEC-M-02, press the Connect button to start the bootloader menu.
Page 115
Configure the BIOS default EtherCAT cycle time and enable/disable redundancy. 3. Security: Set or update the bootloader password to secure access. 4. Exit: Save or discard changes and reboot the device. QEC-M-02 User Manual Ver 1.1 March, 2025...
The General Page displays essential system information and provides basic configuration options. System Info: Machine Model: Displays the current hardware model (e.g., QEC-M-02). BIOS Version: Displays the installed BIOS version. Firmware Version: Shows the current firmware version installed.
Page 117
Boot and Developer Options: Boot: Enable BIOS Menu: Enable or disable BIOS Menu. Developer: Allow 86Duino IDE connection: for development purposes. Allow Resources Dumping: Enable or disable Resources Dumping for debugging. QEC-M-02 User Manual Ver 1.1 March, 2025...
Enabling redundancy in the EtherCAT Page will automatically enable the Redundancy checkbox in the 86EVA Configurator, and setting the Cycle Time in the BIOS will apply it as the default value in the configurator. QEC-M-02 User Manual Ver 1.1 March, 2025...
This feature ensures only authorized users can access the Bootloader Menu. Bootloader Login: Bootloader password: Users can click gear icon to open the “Setup Bootloader Password” window, as shown below. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 120
When users finish setting the bootloader password, click “OK”. A [ Success ] window will appear to let the users know that the new password has been set successfully. Then, the Security page will look like this. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 121
Users can click the gear icon to change the password and click the garbage can icon to delete the password. Once users save the bootloader menu configuration, the password will be saved, and the bootloader menu will show when users open it next time. QEC-M-02 User Manual Ver 1.1 March, 2025...
ICOP Technology Inc. 4.6.5 Exit Page The Exit Page allows users to save or discard changes made in the Bootloader Menu before rebooting the QEC-M-02. This ensures all settings are properly applied or reverted based on user preference. Exit Page: ...
This section provides an overview of the serial communication capabilities of your QEC-M-02 device. The QEC-M-02 is equipped with a standard DB9 connector, which supports both RS-232 and RS-485 serial communication. Users can switch between RS-232 and RS-485 using a DIP switch located on the device.
ICOP Technology Inc. 4.7.1 Serial Communication To use the serial communication, refer to the Serial Library documentation. Users can use SerialCOM to configure the serial port on the QEC-M-02 device. Below is a simple example: void setup() { SerialCOM.begin(115200); Serial.begin(115200);...
Support Modbus gateway function • This section provides the foundation for implementing robust RS485 communication using the QEC-M-02. For additional examples and advanced configurations, consult the linked documentation. *Note that please switch Serial port to RS485 mode. For detailed usage, visit the 86Duino Modbus Library Documentation.
Page 126
= false; uint16_t coils = state ? 0xAAAA : 0x5555; // Odd coils 1, even coils 0 and vice versa bus.writeMultipleCoils(30, 0, 8, &coils); state = !state; delay(1000); // Wait for 1 second QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 127
= bus.readHoldingRegisters(30, 4, 1, data); if (result == 0) { Serial.print("Holding Register 4 Value: "); Serial.println(data[0]); } else { // Handle error lastTime = currentTime; // Update the last time a write was attempted QEC-M-02 User Manual Ver 1.1 March, 2025...
ICOP Technology Inc. 4.8 USB Device Usage This section ensures proper usage of the USB device and file storage on the QEC-M-02. The QEC-M-02 features a Standard USB 2.0 port with hot-plug support, allowing users to connect USB storage devices for file storage, transfer, or accessing configuration data.
Page 129
= fopen("P:\\test.txt", "r"); while (fgets(str, sizeof(str), fp)!=NULL ) { Serial.print(str); fclose(fp); void loop() { // put your main code here, to run repeatedly: *Note: Please use an external USB disk in the QEC-M-02 device. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 130
"%s\n", strs[i]); fclose(fp); // Read the strings and print them fp = fopen("C:\\test.txt", "r"); while (fgets(str, sizeof(str), fp)!=NULL ) { Serial.print(str); fclose(fp); void loop() { // put your main code here, to run repeatedly: QEC-M-02 User Manual Ver 1.1 March, 2025...
4.9 Giga LAN Configuration This section introduces the Giga LAN configuration and control for your QEC MDevice. The QEC-M-02 features one Giga LAN port dedicated to external Ethernet communication for general network use. To drive the Giga LAN, you can utilize either the...
In 86Duino Coding, the library supports up to four concurrent connections (incoming or outgoing or a combination); and in later versions, up to 128 concurrent connections. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 133
// print your local IP address: Serial.print("My IP address: "); for (byte thisByte = 0; thisByte < 4; thisByte++) { // print the value of each byte of the IP address: Serial.print(Ethernet.localIP()[thisByte], DEC); Serial.print("."); Serial.println(); void loop() { QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 134
(client.available()) { char c = client.read(); Serial.write(c); if (c == '\n' && currentLineIsBlank) { // send a standard http response header client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println("Connnection: close"); client.println(); client.println("<!DOCTYPE HTML>"); client.println("<html>"); QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 135
(c != '\r') { // you've gotten a character on the current line currentLineIsBlank = false; // give the web browser time to receive the data delay(1); // close the connection: client.stop(); Serial.println("client disonnected"); QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 136
// initialize the ethernet device not using DHCP: Ethernet.begin(mac, ip, dnsserver, gateway, subnet); // print your local IP address: Serial.print("My IP address: "); ip = Ethernet.localIP(); for (byte thisByte = 0; thisByte < 4; thisByte++) { QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 137
= true; // read the bytes incoming from the client: char thisChar = client.read(); // echo the bytes back to the client: server.write(thisChar); // echo the bytes to the server as well: Serial.print(thisChar); QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 138
(!Serial); // wait for serial port to connect Ethernet.begin(mac_addr); Serial.println("Connecting..."); if (conn.connect(server_addr, 3306, user, password)) { delay(1000); // You would add your code here to run a query once on startup. else Serial.println("Connection failed."); conn.close(); void loop() { QEC-M-02 User Manual Ver 1.1 March, 2025...
IPAddress serverIp(192, 168, 1, 102); int led = 0; uint32_t value = 0; void setup() Ethernet.begin(mac, localIp); /* Modbus TCP Mode via Ethernet. */ bus.begin(MODBUS_TCP, serverIp); /* Slave node initialize. */ node.attach(11, bus); void loop() uint16_t reg[2]; QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 140
= node.getResponseBuffer(0) | (node.getResponseBuffer(1) << 16); Serial.println(value); /* Read 1 word from input registers address 2 of the slave with ID 11. */ node.readInputRegisters(2, 1); Serial.print(" Input Register: "); Serial.print(node.getResponseBuffer(0)); Serial.println(); led = !led; value++; delay(1000); QEC-M-02 User Manual Ver 1.1 March, 2025...
4.10 Digital IO Configuration This section introduces the digital IO pin control for your QEC-M-02 device. Users can control QEC-M-02's digital input (X) and digital output (Y) using standard Arduino code. The QEC-M-02 is compatible with the 86Duino language, allowing seamless integration with familiar Arduino functions.
Page 142
ICOP Technology Inc. Example 1: Read Digital Input X00 Read the digital input pin X00 on QEC-M-02 Here is the example code: void setup() Serial.begin(115200); void loop() int inputState = digitalRead(X00); Serial.print("X00 State: "); Serial.println(inputState); delay(500); QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 143
ICOP Technology Inc. Example 2: Write Digital Output Y10 Write the digital output pin Y10 on QEC-M-02 Here is the example code: void setup() { // ... void loop() { digitalWrite(Y10, HIGH); delay(4000); digitalWrite(Y10, LOW); delay(1000); QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 144
ICOP Technology Inc. Example 3: Read Digital Input (X00) and Control Digital Output (Y10) Read digital input pin X00 and control digital output pin Y10 on QEC-M-02 Here is the example code: void setup() { Serial.begin(115200); void loop() { int inputState = digitalRead(X00);...
4.10.1 PLC Ladder Diagram Tool: LDmicro LDmicro is a PLC ladder diagram programming tool integrated into the 86Duino IDE. It is used to configure QEC-M-02 using ladder logic, making it an ideal choice for users familiar with traditional PLC programming.
Page 146
Users can use the following buttons to open the LDmicro. In LDmicro, users can check the platform currently using “Settings > MicroController > DMP Vortex Series”. Inside, there is a VEX2 option, which is selected by default. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 147
For example, users can use “Insert Contacts: Input Pin” to control digital input pins (X) and “Inset Coil: Output Pin” to control digital output pins (Y) in the “Contacts and Coils / Relays”. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 148
Users can double-click the object, and a setup window will appear, allowing them to set the source and name for the object. Input Pin X: Output Pin Y: After changing the names of the objects, they look like the image below. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 149
ICOP Technology Inc. Then, users can select the pin assignment to the QEC-M-02 by clicking the list at the bottom. In this example, we configure Xa to X00 and Ya to Y00. To learn the digital pins assignment of QEC-M-02, refer to Chapter 2.2.6 Digital I/O...
Page 150
The generated code and files are as follows: a. sketch_mar13a: Main Project (.ino, depending on your project name). b. ladder.h: LDmicro parameters header file. c. sketch_mar13a.cpp: C++ program code of LDmicro. d. sketch_mar13a.h: Header file of LDmicro. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 151
Releases & Latest Changes – Shows updates and release notes. • LDmicro Forum – Connects to the online community for discussions. • Create New Issue – Report bugs or request features. • E-mail... – Contact support via email. • QEC-M-02 User Manual Ver 1.1 March, 2025...
Package Contents, Hardware Configuration, Software Driver Installation, and set up the QEC-M-02. There is a HDMI 2.0 port on the bottom side of QEC-M-02. Users can connect it to a monitor to show the display designed by users. ...
HMIs tailored to your specific application. For more details about LVGL, please see https://docs.lvgl.io/7.11/index.html. *Note: 86Duino IDE 501+ has already tested the LVGL version 9.3, so users can import the LVGL library manually. QEC-M-02 User Manual Ver 1.1 March, 2025...
HMI APIs (Application Programming Interface), thus achieving the effect of creating HMIs without writing programs. Below are the complete steps to design UI to QEC-M-02 using 86HMI: 1. Open 86HMI tool via 86Duino Coding IDE 501+. 2. Choose QEC-M-02.
Page 155
After generating, you can see myhmi.h and myhmi.cpp in 86Duino IDE. And after you finish uploading, you can see the user interface you just designed on QEC-M-02. For more details about 86HMI Editor, please refer to the 86HMI user manual: https://www.qec.tw/86duino/86hmi/.
86Duino boards. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Arduino IDE, Processing, DJGPP, and other open-source software. Please visit qec.tw for 86Duino Coding IDE 501+ details. You can Download here: https://www.qec.tw/software/. QEC-M-02 User Manual Ver 1.1 March, 2025...
SubDevices, enabling users to code in a more user-friendly and concise manner. The list below introduces the EtherCAT Library API functions of our QEC MDevice. Please visit the EtherCAT Library API User Manual for details on the API Function. QEC-M-02 User Manual Ver 1.1 March, 2025...
The class relationships of EthercatMaster are illustrated in the following diagram: There is an association between EthercatMaster and _EthercatDevice_CommonDriver, with _EthercatDevice_CommonDriver depending on EthercatMaster. There is an association between EthercatMaster and EthercatDevice_CiA402, with EthercatMaster depending on EthercatDevice_CiA402. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 160
Find the sequence number of the matching EtherCAT getSlaveNo() SubDevice on the network. Note 1: This function can only be called in error callback. Note 2: This function can only be called in event callback. QEC-M-02 User Manual Ver 1.1 March, 2025...
EtherCAT SubDevice part depending on the EtherCAT MDevice part. As shown in the diagram below, there is an association relationship between _EthercatDevice_CommonDriver and EthercatMaster. Classes: _EthercatDevice_CommonDriver • EthercatDevice_Generic • EthercatDevice_CiA402 • QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 162
Get the vendor ID. getVendorID() Get the product code. getProductCode() Get the revision number. getRevisionNumber() Get the serial number. getSerialNumber() Get the alias address. getAliasAddress() Get the sequence ID on the EtherCAT network. getSlaveNo() QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 163
Get the entry description of the object. getEntryDescription() FoE communication functions Read a file from the EtherCAT SubDevice. readFoE() Write a file to the EtherCAT SubDevice. writeFoE() DC configuration functions Configure DC parameters. setDc() QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 164
Read 16-bit value from the SII EEPROM. readSII16() Read 32-bit value from the SII EEPROM. readSII32() Initialization-related functions Initialize the object of this EtherCAT SubDevice class. attach() Deinitialize the object of this EtherCAT SubDevice class. detach() QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 165
EthercatDevice_Generic inherits from _EthercatDevice_CommonDriver. Base Class _EthercatDevice_CommonDriver • Functions Function Name Description Callback Available Initialization-related functions Initialize the object of this EtherCAT SubDevice class. attach() Deinitialize the object of this EtherCAT SubDevice class. detach() QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 166
CiA Draft Standard 402: CANopen device profile drives and motion control • ETG.6010 Implementation Directive for CiA402 Drive Profile • User manual for the currently used CiA 402 drive device • The class relationships of EthercatDevice_CiA402 are illustrated in the following diagram: QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 167
ICOP Technology Inc. EthercatDevice_CiA402 inherits from _EthercatDevice_CommonDriver. • Base Class _EthercatDevice_CommonDriver • For more detailed information about CiA 402 API, please refer to the EtherCAT Library API User Manual - QEC. QEC-M-02 User Manual Ver 1.1 March, 2025...
QEC-Series SubDevice part depending on the EtherCAT SubDevice part. As shown in the diagram below, there is an association relationship between _EthercatDevice_DmpCommonDriver and _EthercatDevice_CommonDriver. Classes _EthercatDevice_DmpCommonDriver EthercatDevice_DmpDIQ_Generic QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 169
ICOP Technology Inc. EthercatDevice_DmpAIQ_Generic EthercatDevice_DmpHID_Generic EthercatDevice_DmpLCD_Generic EthercatDevice_DmpStepper_Generic QEC-M-02 User Manual Ver 1.1 March, 2025...
The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain. QEC-M-02 User Manual Ver 1.1 March, 2025...
Network Configuration section: Online Scanning or Reading ENI. This library, however, supports both. In the case of Reading ENI, this library currently extracts only partial information from the ENI file for network configuration. QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 173
InitCmds : InitCmd : Timeout Attribute • InitCmds : InitCmd : CompleteAccess Purpose • After switching the EtherCAT state machine to the Pre-Operational state, execute the CoE initialization commands for the EtherCAT SubDevice in EthercatMaster::begin(). QEC-M-02 User Manual Ver 1.1 March, 2025...
Page 174
Used to configure the Sync Manager registers for the process data of an EtherCAT SubDevice. EtherCATConfig : Config : SubDevice : DC Elements • CycleTime0 CycleTime1 ShiftTime Purpose • Used to configure the DC parameters of an EtherCAT SubDevice. QEC-M-02 User Manual Ver 1.1 March, 2025...
Need help?
Do you have a question about the QEC-M-02 and is the answer not in the manual?
Questions and answers