SmcWSetSDMode


Function

Sets the motion when SD signal comes in.

Format

Ret = SmcWSetSDMode( Id, AxisNo, SDMode )

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.

SDMode [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Set the motion when SD signal inputs.

0

Deceleration stop

1

Deceleration only (The carrier moving slows down to the initial speed)

2

Deceleration stop + SD signal latch

3

Deceleration + SD signal latch

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

Initial Value

0 : Deceleration stop

Remarks

It becomes the following operation by SD signal ON.

0

Deceleration stop. When the SD signal is turned off while decelerating, it accelerates to the TargetSpeed.

1

Deceleration. When the SD signal is turned off while after it decelerates or decelerating, it accelerates to the TargetSpeed.

2

Deceleration stop. Even if the SD signal is turned off while decelerating, it doesn't accelerate.

3

Deceleration. Even if the SD signal is turned off while after it decelerates or decelerating, the StartSpeed is maintained.

When the bit3(SD) of CtrlIn of the SmcWSetCtrlTypeIn function is not ON, this function is invalid.

This function cannot be executed when the device is in operation.

After "Initial Setting function" is executed, it is necessary to execute SmcWSetInitParam.
Refer to "About Initial Setting function".

Example

The operation when the SD signal of axis number 1 is input is set.
It sets it only to the deceleration (The carrier moving slows down to the initial speed).

VB.NET
Dim Ret As Integer
Dim SDMode As Short
SDMode = 1
Ret = SmcWSetSDMode( Id , 1, SDMode )

C, C++
long Ret;
short SDMode;
SDMode = 1;
Ret = SmcWSetSDMode( Id , 1, SDMode );

C#
int Ret;
short SDMode;
SDMode = 1;
Ret = Smc.WSetSDMode( Id , 1, SDMode );

Python
Ret = ctypes.c_long()
SDMode = ctypes.c_short()
SDMode.value = 1
Ret.value = csmc.SmcWSetSDMode( Id , 1, SDMode )

See Also

SmcWGetSDMode