I want to find...

Search

Shares

Table of Content

EthercatDevice_QECRXXUN01.attach()

[EthercatDevice_QECRXXUN01]

Description

Specify the EC-Slave number and mount it on the EC-Master.

Class Modules

class EthercatDevice_QECR11UN01;
/* RJ45 power [1, 1]. */
class EthercatDevice_QECR00UN01;
/* RJ45 power [0, 0]. */

Format

  • int attach(uint16_t slave_id, EthercatMaster *master, EthercatAttachMode mode = ECAT_SLAVE_NO);
  • int attach(uint16_t slave_id, EthercatMaster &master, EthercatAttachMode mode = ECAT_SLAVE_NO);
  • int attach(uint16_t slave_id, EthercatMaster *master, uint16_t lcd_id, EthercatAttachMode mode = ECAT_SLAVE_NO);
  • int attach(uint16_t slave_id, EthercatMaster &master, uint16_t lcd_id, EthercatAttachMode mode = ECAT_SLAVE_NO);

Syntax

EthercatDevice_QECR11UN01 slave;
slave.attach(0, master, lcd_id);

Parameters

  • uint16_t slave_id
    • ECAT_SLAVE_NO: EtherCAT Slave Number.
    • ECAT _ALIAS_ADDRESS: EtherCAT Slave Alias Address.
  • uint16_t lcd_id: LCD ID.
    • define ECAT_LCD_ILI9341_1 (0)
    • define ECAT_LCD_ILI9341_2 (1)
    • define ECAT_LCD_ILI9488_1 (2)
    • define ECAT_LCD_ILI9486_1 (3)
    • define ECAT_LCD_HX8347I_1 (4)
    • define ECAT_LCD_HX8347D_1 (5)
  • EthercatMaster *master / &master
  • EthercatAttachMode mode
  • ECAT_SLAVE_NO
    • ECAT_ALIAS_ADDRESS

Returns

Int: 0 for successful; if the return value is smaller than 0 means error.


Libraries Reference Home

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.

Leave a Comment

Scroll to Top