[チュートリアル]
リアルタイムの高性能モーション制御を実現するため、QEC-M-01 (EtherCAT MDevice) と SANYO DENKI SANMOTION G サーボ アンプ (EtherCAT) を組み合わせて使用開始するエンジニアやシステム インテグレーターに役立つ新しいテクニカル スタート ガイドを公開しました。

これらのガイドでは、ステップバイステップのセットアップ プロセス、実用的なコーディング例、統合のヒントが提供されており、CiA 402 CSP (Cyclic Synchronous Position) モードと PP (Profile Position) モードの両方がカバーされているため、立ち上げを迅速化し、エンジニアリング時間を短縮できます。
1. 新しいガイドのハイライト
QEC-M-01は、リアルタイム・マルチタスク・アーキテクチャと統合開発ツールを搭載した、コンパクトでパワフルなEtherCAT MDeviceです。オープンソースの86Duino IDEを搭載し、シンプルでありながら強力な自動化開発プラットフォームを提供します。
CiA402 CSP および PP モードの SANMOTION G サーボ シリーズ製品と組み合わせると、要求の厳しいモーション システムでも正確で応答性の高い制御が可能になります。

1.1 SANMOTION G (なぜ SANMOTION G なのか?)
SANMOTION G は、小型、軽量、省エネの AC サーボ アプリケーション向けに設計されており、高速/高精度の制御を可能にし、生産性と加工品質の向上を実現します。
主な機能のハイライト:
- 新開発の電流制御により、最大 3.5 kHz (従来比 1.6 倍) の高速周波数応答を実現。
- 摩擦/重力検出と補正により、位置決め安定化時間を短縮(5.5 ms、従来の約 1/3)します。
- 最大モーター速度が 6000 min⁻¹ から 6500 min⁻¹ に増加し、出力範囲が拡大しました。
- 高解像度エンコーダー: 標準 23 ビット、オプションで最大 27 ビットまで対応し、高精度で安定した位置決めを実現します。
- 信頼性と保守性の強化: ブレーキの残存寿命の推定、サージ電流制限の最適化、電力監視、EtherCAT 通信品質診断。

EtherCATをご使用のお客様向けに、SANMOTION GはEtherCATインターフェースのアンプを提供しています(例:2軸モデルの場合、インターフェースはEtherCATと表示されます)。詳細については、SANMOTION Gシリーズをご覧ください。
1.2 スタートガイドの利点
- ステップバイステップのセットアップガイド:
配線、EtherCAT ネットワークの起動、推奨パラメータ チェックリスト。 - プログラミング例(CSP / PP):
モーションを素早く実装するのに役立つ実用的なコード スニペットと制御フローの例。 - 統合のヒントとトラブルシューティング:
一般的な現場の問題 (ドライブ有効化シーケンス、アラーム処理、EtherCAT 品質チェックなど) に関するメモ。

2. SANMOTION G ACサーボでQEC-M-01を使い始める
初心者の方からプロの開発者の方まで、QEC-M-01とSANMOTION G ACサーボをスムーズに使い始めるために必要なサポートを、このガイドが提供します。PPモードとCSPモードを示す2つのサンプルプログラムをご紹介します。
2.1 プロファイルポジション(PP)モード
次のプログラムは、GADSA01AH24 を CiA402 プロファイル位置 (PP) モードに設定します。
- EtherCAT サイクル時間: 1 ミリ秒。
- EtherCAT モード: ECAT_SYNC。
The object (“mdevice”) represents the QEC-M-01, while the EthercatDevice_CiA402 object (“motor”) represents the GADSA01AH24 driver
サンプルコードは次のとおりです。
#include "Ethercat.h"
EthercatMaster master;
EthercatDevice_CiA402 motor;
int pp_state = 0;
void setup() {
Serial.begin(115200);
Serial.print("Begin: ");
Serial.println(master.begin());
Serial.print("Slave: ");
Serial.println(motor.attach(0, master));
motor.setCiA402Mode(CIA402_PP_MODE);
// No PDO mapping by default, needs to be filled out by users.
// RxPDO mapping configuration.
motor.sdoDownload8(0x1C12, 0x00, 0);
motor.sdoDownload8(0x1601, 0x00, 0);
motor.sdoDownload32(0x1601, 0x01, 0x60400010);
motor.sdoDownload32(0x1601, 0x02, 0x607A0020);
motor.sdoDownload8(0x1601, 0x00, 2);
motor.sdoDownload16(0x1C12, 0x01, 0x1601);
motor.sdoDownload8(0x1C12, 0x00, 1);
// TxPDO mapping configuration.
motor.sdoDownload8(0x1C13, 0x00, 0);
motor.sdoDownload8(0x1A01, 0x00, 0);
motor.sdoDownload32(0x1A01, 0x01, 0x60410010);
motor.sdoDownload32(0x1A01, 0x02, 0x60640020);
motor.sdoDownload8(0x1A01, 0x00, 2);
motor.sdoDownload16(0x1C13, 0x01, 0x1A01);
motor.sdoDownload8(0x1C13, 0x00, 1);
Serial.print("Start: ");
Serial.println(master.start(1000000, ECAT_SYNC));
Serial.print("Enable: ");
Serial.println(motor.enable());
motor.pp_SetMotionProfileType(0); // Linear ramp (trapezoidal profile)
motor.pp_SetVelocity(100000000);
motor.pp_SetAcceleration(50000000);
motor.pp_SetDeceleration(50000000);
}
void loop() {
Serial.print("Pos: ");
Serial.println(motor.getPositionActualValue());
switch (pp_state)
{
case 0:
if (motor.pp_Run(1000000000) == 0)
pp_state++;
break;
case 1:
if (motor.pp_IsTargetReached())
pp_state++;
break;
case 2:
if (motor.pp_Run(-1000000000) == 0)
pp_state++;
break;
case 3:
if (motor.pp_IsTargetReached())
pp_state = 0;
break;
}
}2.2 周期同期位置(CSP)モード
次のプログラムは、GADSA01AH24 を CiA402 周期同期位置 (CSP) モードに設定します。
- EtherCAT サイクル時間: 1 ミリ秒。
- EtherCAT モード: ECAT_SYNC。
- モーションは、コマンド位置を一定の速度 (一定速度) で移動することにより、1 ミリ秒の周期的なコールバック内で生成されます。
The object (“master”) represents the QEC-M-01, while the EthercatDevice_CiA402 object (“motor”) represents the GADSA01AH24 driver.
サンプルコードは次のとおりです。
#include "Ethercat.h"
EthercatMaster master;
EthercatDevice_CiA402 motor;
int32_t position = 0;
void MyCyclicCallback() {
if (motor.getCiA402State() != CIA402_OPERATION_ENABLED)
return;
motor.setTargetPosition(position += 10000);
}
void setup() {
Serial.begin(115200);
Serial.print("Begin: ");
Serial.println(master.begin());
Serial.print("Slave: ");
Serial.println(motor.attach(0, master));
motor.setDc(1000000);
motor.setCiA402Mode(CIA402_CSP_MODE);
// No PDO mapping by default, needs to be filled out by users.
// RxPDO mapping configuration.
motor.sdoDownload8(0x1C12, 0x00, 0);
motor.sdoDownload8(0x1601, 0x00, 0);
motor.sdoDownload32(0x1601, 0x01, 0x60400010);
motor.sdoDownload32(0x1601, 0x02, 0x607A0020);
motor.sdoDownload8(0x1601, 0x00, 2);
motor.sdoDownload16(0x1C12, 0x01, 0x1601);
motor.sdoDownload8(0x1C12, 0x00, 1);
// TxPDO mapping configuration.
motor.sdoDownload8(0x1C13, 0x00, 0);
motor.sdoDownload8(0x1A01, 0x00, 0);
motor.sdoDownload32(0x1A01, 0x01, 0x60410010);
motor.sdoDownload32(0x1A01, 0x02, 0x60640020);
motor.sdoDownload8(0x1A01, 0x00, 2);
motor.sdoDownload16(0x1C13, 0x01, 0x1A01);
motor.sdoDownload8(0x1C13, 0x00, 1);
master.attachCyclicCallback(MyCyclicCallback);
Serial.print("Start: ");
Serial.println(master.start(1000000, ECAT_SYNC));
motor.setTargetPosition(position = motor.getPositionActualValue());
Serial.print("Enable: ");
Serial.println(motor.enable());
}
void loop() {
Serial.print("Pos: ");
Serial.println(motor.getPositionActualValue());
delay(1000);
}さらに詳しく知りたい場合は、以下のリンクをクリックして完全なガイドをご覧ください。
- CSP モード:
- PPモード:
私たちは、よりスマートで高速、そして効率的な制御システムを実現する、堅牢で革新的なEtherCATオートメーションプラットフォームの提供を継続していきます。パートナー様と開発者の皆様には、革新的なオートメーションプロジェクトに向けてQECソリューションをご検討いただければ幸いです。
詳細情報やサンプルのご要望については、info@icop.com.tw までメールをお送りいただくか、最寄りの ICOP 支店 までお電話いただくか、ワールドワイド正規販売代理店までお問い合わせください。