Function
Sets motor motion stop event.
Format
Ret = SmcWStopEvent( Id , AxisNo , hWnd , EventMode )
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 axis number.
hWnd
[ VB.NET: IntPtr ] [ C, C++: HWND ] [ C#: IntPtr ] [ Python: ctypes.wintypes.HANDLE
]
Specify the window handle who activates the event.
EventMode
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Set the event to valid/invalid.
0 |
Invalidates the event |
1 |
Validates the event |
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
When the motor stops, the events occur. (The
stop factor can be acquired with SmcWGetStopStatus. )
If the event generation function is executed once, the event is generated
every time the factor is generated afterwards.
It is not necessary to execute it two or more times excluding the purpose
to stop the event.
The message number is fixation.
The message of message number "8700H" is done in the specified
window handle when the stop event is generated and PostMessage is done.
The following information enters wParam and
lParam that is the parameter of the message respectively.
LOWORD(wParam)=ID acquired in SmcWInit function.
LOWORD(lParam)=Axis number.
- HIWORD and LOWORD show high word and low word respectively.
Example
The motor operation stop event is set to axis number 1.
VB.NET
Dim Ret As Integer
Ret = SmcWStopEvent( Id , 1 , Handle , 1)
C, C++
long Ret;
Ret = SmcWStopEvent( Id , 1 , hWnd , 1);
C#
int Ret;
Ret = Smc.WStopEvent( Id , 1 , hWnd , 1);
Python
Ret = ctypes.c_long()
Ret.value = csmc.SmcWStopEvent( Id , 1 , hWnd , 1)
See Also