Function
Sets the deviation counter clear signal.
Format
Ret = SmcWSetErcMode( Id, AxisNo, ErcMode )
Parameters
Id [ C, C++: short ] [ Python: ctypes.c_short ]
Specify the device ID retrieved by SmcWInit function.
AxisNo [ C, C++: short ] [ Python: ctypes.c_short ]
Specify the axis number.
ErcMode [ C, C++: short ] [ Python: ctypes.c_short ]
Specify the setting for ERC signal auto-output.
[ 0 | 0 | 0 | 0 | 0 | 0 | bit1 | bit0 ] Available range:0to 3 (Hex)
bit0 |
0 : Do not output ERC signal when stopping because of the input of LIM or ALM signal 1 : Output ERC signal automatically when stopping because of the input of LIM or ALM signal |
bit1 |
0 : Not output ERC signal when the origin return operation completes. 1 : Output ERC signal automatically when the origin return operation completes |
Return Value
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Initial Value
0 : Does not out put ERC signal
Remarks
When the bit1(ALM) of CtrlIn of the SmcWSetCtrlTypeIn function is not ON, it is not recognized as ALM signal.
The setting of CtrlTypeOut1 to CtrlTypeOut3 by the SmcWSetCtrlTypeOut function is:
when "2: deviation counter clear signal (ERC)" is not being set, the setting of 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
A deflection counter clear
signal of axis number 1 is set.
When the starting point resume operation is completed, the ERC signal is
output automatically.
C, C++
long Ret;
short ErcMode ;
ErcMode = 2 ;
Ret = SmcWSetErcMode( Id , 1, ErcMode );
Python
Ret = ctypes.c_long()
ErcMode = ctypes.c_short()
ErcMode.value = 2
Ret.value = csmc.SmcWSetErcMode( Id , 1, ErcMode )
See Also