SmcWGetTargetSpeed


Function

Retrieves the setting of target speed of pulse output.

Format

Ret = SmcWGetTargetSpeed( Id, AxisNo, TargetSpeed )

Parameters

Id [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
SSpecify the Deice ID retrieved by SmcWInit function.

AxisNo [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Specify the axis number.

TargetSpeed [ VB.NET: Double ] [ C, C++: double * ] [ C#: out double ] [ Python: ctypes.POINTER(ctypes.c_double) ]
Specify the address of a variable to store the value of target speed. The unit is [pps].

Return Value

Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]

0

Terminated normally

Non-zero

Terminated abnormally

See also: Error code details

Remarks

The value is corrected to the multiple of the resolution set with SmcWSetResolve Speed.
Example: 105pps in case of resolution 15pps
This function can be executed even if the axis is in operation.

Example

The set up information at the speed of the pulse output target of axis number 1 is acquired.

VB.NET
Dim Ret As Integer
Dim TargetSpeed As Double
Ret = SmcWGetTargetSpeed( Id , 1, TargetSpeed )

C, C++
long Ret;
double TargetSpeed;
Ret = SmcWGetTargetSpeed( Id , 1, &TargetSpeed );

C#
int Ret;
double TargetSpeed;
Ret = Smc.WGetTargetSpeed( Id , 1, out TargetSpeed );

Python
Ret = ctypes.c_long()
TargetSpeed = ctypes.c_double()
Ret.value = csmc.SmcWGetTargetSpeed( Id , 1, ctypes.byref(TargetSpeed) )

See Also

SmcWSetTargetSpeed