機能
減速時間を取得します。
書式
Ret = SmcWGetDecelTime( Id , AxisNo , DecelTime )
引数
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
]
軸番号を指定します。
DecelTime
[ VB.NET: Double ] [ C, C++: double * ] [ C#: out double ] [ Python: ctypes.POINTER(ctypes.c_double)
]
減速を格納する変数のアドレスを指定します。時間単位は[ms]です。
戻り値
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
0 |
正常終了 |
0以外 |
異常終了 |
参照:エラーコード詳細
説明
SmcWSetStartSpeed および SmcWSetTargetSpeed (S字動作を使用する場合は、SmcWSetSSpeed )により値は補正されます。
この関数は軸が動作中の場合も実行可能です。
使用例
軸番号1の減速時間を取得します。
VB.NET
Dim Ret As Integer
Dim DecelTime As Double
Ret = SmcWGetDecelTime( Id , 1, DecelTime )
C, C++
long Ret;
double DecelTime ;
Ret = SmcWGetDecelTime( Id , 1, &DecelTime );
C#
int Ret;
double DecelTime ;
Ret = Smc.WGetDecelTime( Id , 1, out DecelTime );
Python
Ret = ctypes.c_long()
DecelTime = ctypes.c_double()
Ret.value = csmc.SmcWGetDecelTime( Id , 1, ctypes.byref(DecelTime) )
関連項目