EthercatDevice_XXX.getProductCode()

[EthercatDevice_XXX]

Description

Get EtherCAT Slave Product Code on the EtherCAT bus.

Format

uint32_t getProductCode();

Syntax

EthercatDevice_XXX slave;
slave.getProductCode();

Returns

uint32_t: the EtherCAT Slave Product Code on the EtherCAT bus.

Example

#include "Ethercat.h"

EthercatMaster master;
EthercatDevice_QECR11DF0S slave;

void setup(void) {
    uint32_t getProductCode;
    
    Serial.begin(115200);
    while (!Serial);
    
    master.begin();
    slave.attach(0, master);
    master.start();
    getProductCode = slave.getVendorID();
    Serial.println(getProductCode);
}

void loop() {}

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