[EthercatDevice_DmpHID_Generic]
説明
指定された文字列をEtherCATスレーブデバイスのLCM画面に出力します。
派生クラス:
クラス名 | 製造者ID | 製品コード | UART | Keypad | LCM | MPG |
EthercatDevice_QECR11HU9S | 0x00000bc3 | 0x0086d402 | O | O | O | O |
EthercatDevice_QECR00HU9S | 0x00000bc3 | 0x0086d401 | O | O | O | O |
構文
int lcmPrint(const char *fmt, ...);
媒介変数
[in] const char *fmt
LCM 画面に出力される文字列。これは、出力のフォーマット仕様を含む NULLで終了する文字列へのポインタです。フォーマット文字列はCのprintf 関数と同じフォーマットに従い、変数やフォーマット・オプションを挿入できます。[in] ...
これは、fmt文字列の書式指定子に従ってフォーマットされた文字列に挿入される可変個引数です。
戻り値
LCM画面に出力される文字数を返します。戻り値が0より小さい場合、 error codeを示します。.
備考
この関数は、 EthercatMaster::begin()
が正常に実行された後に呼び出す必要があります。この関数はブロッキングされていないため、循環コールバック内で呼び出すことができます。
例
#include "Ethercat.h" EthercatMaster master; EthercatDevice_QECR11HU9S slave; void CyclicCallback() { slave.update(); } void setup() { master.begin(); slave.attach(0, master); master.attachCyclicCallback(CyclicCallback); master.start(); slave.lcmPrint("Hello world!"); } void loop() { // ... }
Please see EthercatDevice_DmpHID_Generic Class for more QEC HID slave instructions and API usage.