機能
モータ動作の速度変更、停止位置変更の設定を取得します。
書式
Ret = SmcWGetMotionChangeReady( Id , AxisNo , ChangeType )
引数
Id
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
SmcWInit 関数で取得したデバイスIDを指定します。
AxisNo
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
軸番号を指定します。
ChangeType
[ VB.NET: Short ] [ C, C++: short *] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short)
]
モータ動作変更タイプを格納する変数のアドレスを指定します。
0 |
瞬時に開始速度(FL速度)へ変更 |
1 |
瞬時に目標速度(FH速度)へ変更 |
2 |
減速して開始速度(FL速度)へ変更 |
3 |
加速して目標速度(FH速度)へ変更 |
4 |
動作速度と加減速度を変更 |
5 |
モータ停止位置を変更 (目標位置オーバーライド1) |
6 |
PCS信号によるモータ停止位置変更設定 (目標位置オーバーライド2) |
7 |
加減速レートを変更せずに動作速度のみ変更 |
戻り値
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
0 |
正常終了 |
0以外 |
異常終了 |
参照:エラーコード詳細
説明
この関数は軸が動作中の場合も実行可能です。
使用例
軸番号1のモータ動作変更の設定を取得します。
VB.NET
Dim Ret As Integer
Dim ChangeType As Short
ChangeType = 0
Ret = SmcWGetMotionChangeReady( Id , 1, ChangeType )
C, C++
long Ret;
short ChangeType ;
ChangeType = 0;
Ret = SmcWGetMotionChangeReady( Id , 1, &ChangeType );
C#
int Ret;
short ChangeType ;
ChangeType = 0;
Ret = Smc.WGetMotionChangeReady( Id , 1, out ChangeType );
Python
Ret = ctypes.c_long()
ChangeType = ctypes.c_short()
ChangeType.value = 0
Ret.value = csmc.SmcWGetMotionChangeReady( Id , 1, ctypes.byref(ChangeType)
)
関連項目