我想找...

搜尋

分享

目錄

EthercatDevice_Dmp.getDeliveryDate()

[EthercatDevice_Dmp]

描述

Get the delivery date.

語法

char *getDeliveryDate(char *buffer = NULL);

參數

  • [out] char *buffer
    String data buffer, please ensure that the string array size is greater than or equal to 5. If this parameter is not provided, the internal data buffer will be used.

回傳值

Return a pointer to the delivery date string.

備註

This function must be called after a successful execution of EthercatMaster::begin(). This function is blocking and cannot be called within the callback functions.

範例程式碼

#include "Ethercat.h"

EthercatMaster master;
EthercatDevice_QECR11DT0H slave;
char DeliveryDate[5];

void setup() {
  Serial.begin(115200);

  master.begin();
  slave.attach(0, master);

  Serial.print("Delivery Date: ");
  Serial.println(slave.getDeliveryDate());
  Serial.print("Delivery Date: ");
  Serial.println(slave.getDeliveryDate(DeliveryDate));
  Serial.print("Delivery Date: ");
  Serial.println(DeliveryDate);
}

void loop() {
  // ...
}

Please see the EtherCAT Library User Manual for more QEC EtherCAT instructions and API usage.

返回頂端