Function
Sets bank event.
Format
Ret = SmcWBankEvent( Id , AxisNo , hWnd , EventMode , BankNo )
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 |
Invalidate the event. |
1 |
Validate the event |
BankNo
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Please set the bank number in which the events occur.
If 0 is specified, each events occur to complete each bank.
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
It is effective only while the bank operation is executed. When other operating, the events not occur.
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 "8703H" is done in the specified
window handle when the bank completion 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.
It is not possible to use it with SMC-2/4/8DL series.
Example
The bank completion event when completing it by the third bank for axis number 1 is set.
VB.NET
Dim Ret As Integer
Ret = SmcWBankEvent( Id , 1 , Handle , 1 , 3)
C, C++
long Ret;
Ret = SmcWBankEvent( Id , 1 , hWnd , 1 , 3);
C#
int Ret;
Ret = Smc.WBankEvent( Id , 1 , hWnd , 1 , 3);
Python
Ret = ctypes.c_long()
Ret.value = csmc.SmcWBankEvent( Id , 1 , hWnd , 1 , 3)
See Also