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-01 User Manual Ver 3.0 December, 2024...
4.3 S ..................35 OFTWARE EVELOPMENT NVIRONMENT 4.4 C ..............36 ONNECT TO YOUR AND SET UP THE ENVIRONMENT 4.5 E CAT C ......................38 THER OMMUNICATION 4.5.1 EtherCAT State Machine (ESM) ..................38 QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 6
CAT F ......................117 THER UNCTION 5.2.1 EthercatMaster Class Functions ..................117 5.2.2 EthercatDevice Class Functions ..................119 5.2.3 QEC Series Device Functions ................... 121 5.3 A ........................ 122 DDITIONAL ESOURCES WARRANTY ..........................123 QEC-M-01 User Manual Ver 3.0 December, 2024...
Users can upload the developed executable files and required images or data, such as HMI images, to the QEC-M-01’s SLC via the 86Duino IDE without affecting the performance of the master system. It has two networks for EtherCAT Cable Redundancy, one Giga LAN for external network connection, RS485 signal pins, HD Audio, and USB;...
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-01 User Manual Ver 3.0 December, 2024...
As most applications run on the Master System, the EtherCAT Master Firmware running on the Slave System is free from interference by other applications. This setup allows it to focus on executing the EtherCAT Master Core, ensuring the synchronization and real-time capabilities of EtherCAT. QEC-M-01 User Manual Ver 3.0 December, 2024...
When the EtherCAT Master 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-01 User Manual Ver 3.0 December, 2024...
EtherCAT network; its functions are as follows: EtherCAT slave devices scanning. • Import ENI file. • Setting EtherCAT MainDevice. • Configure EtherCAT Sub-devices. • For other detailed functions, please refer to the 86EVA User Manual. QEC-M-01 User Manual Ver 3.0 December, 2024...
Internal Monitoring Temperature, Voltage, Current, Startup time Certifications CE, FCC, VCCI 86Duino Coding IDE 500+ Software Support (The environment is written in Java and based on Arduino IDE, Processing, DJGPP, and other open-source software) QEC-M-01 User Manual Ver 3.0 December, 2024...
ICOP Technology Inc. 1.4 Mounting Instruction QEC-M-01 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-01 User Manual Ver 3.0 December, 2024...
ICOP Technology Inc. 1.5 Ordering Information (Below is the customization function, the unfilled fields do not need to be filled in; if the customer does not require, it will be directly shipped standard material number, such as QEC-M-01) Type LCD size...
Power and Connection Status LEDs External Status LEDs RS-485 Terminal Block Interface 4-pin Standard USB 2.0 Micro USB (Debug and Upload port) Micro USB (Type-B) Audio HD Audio Giga LAN External RJ45 Connector (Gold finger) 8-pin DIN-Rail QEC-M-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
Page 21
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-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
Page 24
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-01 User Manual Ver 3.0 December, 2024...
Page 25
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-01 User Manual Ver 3.0 December, 2024...
Page 26
ICOP Technology Inc. 2.2.4 RS-485 The QEC-M-01 provides a set of RS485+ and RS485- signal pins and two ground (GND) pins for the RS-485 communication interface. The RS-485 is located on the device's front panel (as shown in the diagram) and is labeled as 485+/-.
ICOP Technology Inc. 2.2.5 USB The QEC-M-01 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. The USB port is located on the device's front panel (as shown in the diagram) and is labeled as USB.
ICOP Technology Inc. 2.2.6 Micro USB The QEC-M-01 features a Micro USB port primarily used for programming uploads and debugging. You can connect the device to a computer using a USB to micro-USB cable to upload code and configure the system.
ICOP Technology Inc. 2.2.7 Audio The QEC-M-01 features an HD Audio (Line-Out) port for connecting external audio devices such as speakers or headphones. The HD Audio port is located on the device's front panel (as shown in the diagram). Compatible with standard 3.5mm audio jacks.
ICOP Technology Inc. 2.2.8 Giga LAN The QEC-M-01 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 front panel (as shown in the diagram).
ICOP Technology Inc. 2.2.9 DIN-Rail installation QEC-M-01 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-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
QEC-M-01. Always mount QEC-M-01 one at a time. 3.1 DIN-Rail installation Slide in the QEC-M-01 on the hookup guides and press the QEC-M-01 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-01 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-01 User Manual...
Getting Started QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 37
ICOP Technology Inc. This chapter explains how to start with QEC-M-01 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.
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 carton for further storing and shipping needs in the future, QEC-M-01 User Manual Ver 3.0 December, 2024...
4.2 Hardware Configuration The development environment will be pre-installed before the QEC-M is shipped to customers. Users must download the software (see 4.3 Software/Development Environment) and follow this user manual to set up the device. QEC-M-01 User Manual Ver 3.0 December, 2024...
ICOP Technology Inc. 4.2.1 Plug in the power supply There are two groups of power supplies in QEC-M-01, 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).
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 once and then click the Continue Run button once. 86Duino Coding IDE 500+ looks like below. QEC-M-01 User Manual Ver 3.0 December, 2024...
Open “Device Manager” -> “Ports (COM & LPT)” in your PC and expand the ports; you should see that the “Prolific PL2303GC USB Serial COM Port (COMx)” is detected; if not, you will need to install the required drivers. (For Windows PL2303 driver, you can download here) QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 43
ICOP Technology Inc. Open the 86Duino IDE. Select the correct board: In the IDE's menu, select “Tools” ->” Board”- > QEC-M-01 (or the QEC-M MainDevice model you use). Select Port: In the IDE's menu, select “Tools”- >” Port” and select the USB port to connect to the QEC-M MainDevice (in this case, COM3 (QEC)).
A distinction is made between the following states: Init • Pre-Operational • Safe-Operational and • Operational • Boot • The regular state of each EtherCAT slave after bootup is the OP state. QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 45
ICOP Technology Inc. The EtherCAT MainDevice (QEC-M-01) 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 46
(step 2), it does not wait for the EtherCAT master 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-01 User Manual Ver 3.0 December, 2024...
Page 47
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-01 User Manual Ver 3.0 December, 2024...
Page 48
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-01 User Manual Ver 3.0 December, 2024...
Page 49
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-01 User Manual Ver 3.0 December, 2024...
Page 50
As indicated by the numbered arrows in the diagram, the two systems operate independently, with no synchronization. The Free Run Manual Mode diagram for QEC MainDevice: QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 51
ICOP Technology Inc. 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-01 User Manual Ver 3.0 December, 2024...
Page 53
ICOP Technology Inc. Serial.println(); void loop() { // put your main code here, to run repeatedly: QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 55
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-01 User Manual Ver 3.0 December, 2024...
Page 56
// 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-01 User Manual Ver 3.0 December, 2024...
Page 57
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-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
Page 59
// 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-01 User Manual Ver 3.0 December, 2024...
Page 60
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-01 User Manual Ver 3.0 December, 2024...
Page 61
// 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-01 User Manual Ver 3.0 December, 2024...
Page 62
// 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-01 User Manual Ver 3.0 December, 2024...
Serial.print("1C12h.0 => "); Serial.println(slave.sdoUpload8(0x1C12, 0x00)); // Upload 8-bit SDO data from 0x1C12.0 // 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 QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 64
ICOP Technology Inc. void loop() { // put your main code here, to run repeatedly: QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 65
(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-01 User Manual Ver 3.0 December, 2024...
Page 66
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-01 User Manual Ver 3.0 December, 2024...
Page 67
(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-01 User Manual Ver 3.0 December, 2024...
Page 68
= 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-01 User Manual Ver 3.0 December, 2024...
Page 69
(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-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
Page 71
The event codes supported by the Event Callback are as follows: Definition Code Description ECAT_EVT_STATE_CHANGED 1000001 The EtherCAT state of the MainDevice has changed. ECAT_EVT_CABLE_RECONNECTED 1000002 The cable has been reconnected. QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 72
// 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-01 User Manual Ver 3.0 December, 2024...
Page 73
// 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-01 User Manual Ver 3.0 December, 2024...
Page 74
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-01 User Manual Ver 3.0 December, 2024...
Page 75
// 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-01 User Manual Ver 3.0 December, 2024...
Page 76
ICOP Technology Inc. delay(1000); // Wait 1 second before the next update QEC-M-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
Page 78
EC-Slaves 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-01 User Manual Ver 3.0 December, 2024...
Page 79
// 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-01 User Manual Ver 3.0 December, 2024...
Page 80
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-01 User Manual Ver 3.0 December, 2024...
Optional ENI file • 4. EtherCAT Slave Settings: Set Slave Object Name • Set Slave Alias • Slave I/O Mapping can be set • Display secondary device information • View internal information • QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 82
QEC-M-01: Press twice on the image of the QEC-M-01 to see the parameter settings. You can set the EtherCAT MainDevice Object Name, Apply BIOS Settings, Enable the EtherCAT Cable Redundancy option, set EtherCAT Cycle Time, and Select the ENI file if you need.
Page 83
Safe-OP When an Error Occurs” and “Auto Restart When Error-Free”. You can also see the Voltage system, peripheral, and system temperature in “Device Status” area. For more detailed information, please refer to 86EVA, EtherCAT-Based Virtual Arduino - QEC. QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 84
1. Using the EtherCAT Out port (top side) connected to the EtherCAT In port of QEC-R11D88H via RJ45 cable (powered by PoE). 2. Connect to Vs+/Vs- and Vp+/Vp- power supplies via EU terminals for 24V power. QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 85
ICOP Technology Inc. QEC-R11D88H-N Connect from VP+ to DO 0+. Connect the 24V LED+ terminal to DO 0-. Connect the 24V LED- end to the VP-. Wiring Diagram: QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 86
Connect button to start scanning the EtherCAT network. The connected devices will be displayed after the EtherCAT network has been scanned. Press the "View" button in the lower left corner to check the device's status. QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 87
Click on the scanned device image to enter the corresponding parameter setting screen. QEC-M-01: Click on the image of the QEC-M-01 to see the parameter settings. If you are developing for the first time, please use the preset settings first and click "Back" in the upper left corner to return.
Page 88
Once you've set your device's parameters, 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-01 User Manual Ver 3.0 December, 2024...
Page 89
After 86EVA generates code, the following code will be automatically generated in the main program (.ino), and any of them missing will cause 86EVA not to work. 1. #include “myeva.h” : Include EVA Header file 2. EVA.begin(); in setup() : Initialize the EVA function QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 90
// Wait for 1 second Note: Once the code is written, click on the toolbar to compile, and to confirm that the compilation is complete and error-free, you can click to upload. QEC-M-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
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-01, press the Connect button to start the bootloader menu.
Page 93
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-01 User Manual Ver 3.0 December, 2024...
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-01). BIOS Version: Displays the installed BIOS version. Firmware Version: Shows the current firmware version installed.
Page 95
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-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
Page 98
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-01 User Manual Ver 3.0 December, 2024...
Page 99
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-01 User Manual Ver 3.0 December, 2024...
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-01. This ensures all settings are properly applied or reverted based on user preference. Exit Page: ...
This section introduces the RS485 configuration and control on your QEC MainDevice. The RS485 Communication section introduces the features and usage of the RS485 interface on the QEC-M-01. RS485 is a versatile serial communication standard, suitable for long-distance, noise-resistant data transmission in industrial environments.
Serial.begin(baud_rate): Initializes communication with the specified baud rate. • Serial.read(): Reads incoming data from the RS485 interface. • Serial.write(data): Sends data through the RS485 interface. • For more information, refer to the 86Duino Serial Library Reference. QEC-M-01 User Manual Ver 3.0 December, 2024...
Runs as both Modbus master and Modbus slave nodes. • Support Modbus gateway function • This section provides the foundation for implementing robust RS485 communication using the QEC-M-01. For additional examples and advanced configurations, consult the linked documentation. For detailed usage, visit the 86Duino Modbus Library Documentation.
Page 104
= 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-01 User Manual Ver 3.0 December, 2024...
Page 105
= 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-01 User Manual Ver 3.0 December, 2024...
ICOP Technology Inc. 4.8 USB Device Usage This section ensures proper usage of the USB device and file storage on the QEC-M-01. The QEC-M-01 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 107
"%s\n", strs[i]); fclose(fp); // Read the strings and print them fp = 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: QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 108
"%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-01 User Manual Ver 3.0 December, 2024...
4.9 Giga LAN Configuration This section introduces the Giga LAN configuration and control for your QEC MainDevice. The QEC-M-01 features one Giga LAN port dedicated to external Ethernet communication for general network use. To drive the Giga LAN, you can utilize either the Ethernet Library or the Modbus Library in the 86Duino environment.
// 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-01 User Manual Ver 3.0 December, 2024...
Page 111
(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-01 User Manual Ver 3.0 December, 2024...
Page 112
(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-01 User Manual Ver 3.0 December, 2024...
Page 113
Serial.println("connecting..."); if (client.connect(server, 80)) { Serial.println("connected"); client.println("GET /search?q=arduino HTTP/1.0"); client.println(); } else { Serial.println("connection failed"); void loop() { if (client.available()) { char c = client.read(); Serial.print(c); if (!client.connected()) { Serial.println(); Serial.println("disconnecting."); client.stop(); QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 114
(!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-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
Page 116
= 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-01 User Manual Ver 3.0 December, 2024...
Demonstrates the use of the Audio library for the QEC-M-01. This example demonstrates the use of the Audio library with the QEC-M-01 to play a .wav audio file stored on a USB storage device. The program reads audio data from the file, processes it using the Audio library, and outputs it in real-time.
Page 118
(myFile.available()) { myFile.read(buffer, sizeof(buffer)); int volume = 1024; Audio.prepare(buffer, S, volume); Audio.write(buffer, S); count++; if (count == 100) { Serial.print("."); count = 0; myFile.close(); Serial.println("End of file. Thank you for listening!"); while (true) ; QEC-M-01 User Manual Ver 3.0 December, 2024...
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-01” (or the specific model of QEC-M you are using).
Page 120
QEC-M name will appear. Clicking on it will start the update process, which will take approximately 5-20 minutes. QEC-M-01: • 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-01 User Manual Ver 3.0 December, 2024...
Java and based on Arduino IDE, Processing, DJGPP, and other open-source software. Please visit qec.tw for 86Duino Coding IDE 500+ details. You can Download here: https://www.qec.tw/software/. For 86Duino Coding IDE 500 release note, please refer to https://www.qec.tw/86duino/release-note/. QEC-M-01 User Manual Ver 3.0 December, 2024...
Get the Global Shift Time for DC-Synchronous mode. getSystemTime() Get the system time of the current cycle. getWorkingCounter() Get the working counter for the current cycle. getExpectedWorkingCounter() Get the expected working counter. QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 124
Find the sequence number of the matching EtherCAT slave device getSlaveNo() 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-01 User Manual Ver 3.0 December, 2024...
Read 32-bit input process data. pdoRead64() Read 64-bit input process data. CoE communication functions sdoDownload() Write multiple bytes of data to the object. sdoDownload8() Write 8-bit value to the object. sdoDownload16() Write 16-bit value to the object. QEC-M-01 User Manual Ver 3.0 December, 2024...
Page 126
Read 16-bit value from the SII EEPROM. readSII32() Read 32-bit value from the SII EEPROM. Initialization-related functions attach() Initialize the object of this EtherCAT slave device class. detach() Deinitialize the object of this EtherCAT slave device class. QEC-M-01 User Manual Ver 3.0 December, 2024...
The main class relationship between the QEC-Series Device part and the EtherCAT Device part is association, with the QEC-Series Device part depending on the EtherCAT Device part. Classes _EthercatDevice_DmpCommonDriver EthercatDevice_DmpDIQ_Generic EthercatDevice_DmpAIQ_Generic EthercatDevice_DmpHID_Generic EthercatDevice_DmpLCD_Generic EthercatDevice_DmpStepper_Generic QEC-M-01 User Manual Ver 3.0 December, 2024...
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-01 User Manual Ver 3.0 December, 2024...
Need help?
Do you have a question about the QEC-M-01 and is the answer not in the manual?
Questions and answers