Function
Sets the width of deviation counter clear/alarm clear signals and the OFF timer time of deviation counter clear signal.
Format
Ret = SmcWSetErcAlmClearTime( Id, AxisNo, ErcTime, ErcOffTimer, AlmTime )
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.
ErcTime [ C, C++: short ] [ Python: ctypes.c_short ]
Set the width of error counter clear signal.
0 |
12[usec] |
1 |
102[usec] |
2 |
408[usec] |
3 |
1.6[msec] |
4 |
13[msec] |
5 |
52[msec] |
6 |
104[msec] |
7 |
Level output |
ErcOffTimer [ C, C++: short ] [ Python: ctypes.c_short ]
Set the OFF timer time of
deviation counter clear signal.
It is the weight time after a signal is in an OFF state after a deviation
counter clear signal output.
When a motion start is performed in this designated , a pulse is outputted
after this standard time setting passes after the deviation counter clear
signal OFF.
0 |
0[usec] |
1 |
12[usec] |
2 |
1.6[msec] |
3 |
104[msec] |
AlmTime [ C, C++: short ] [ Python: ctypes.c_short ]
Set the width of alarm clear signal.
0 |
12[usec] |
1 |
102[usec] |
2 |
408[usec] |
3 |
1.6[msec] |
4 |
13[msec] |
5 |
52[msec] |
6 |
104[msec] |
Return Value
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Initial Value
ErcTime |
0 : 12[usec] |
ErcOffTimer |
0 : 0[usec] |
AlmTime |
0 : 12[usec] |
Remarks
The setting of CtrlTypeOut1 to CtrlTypeOut3 by the SmcWSetCtrlTypeOut function is:
When "1: alarm clear"
is being set, the setting value of AlarmTime is valid.
When "2: deviation counter clear signal (ERC)" is being set,
the setting values of ErcTime and ErcOffTimer are valid.
The alarm clear signal can output one-shot pulse in its owning timing. Therefore, this function can be used to merely output one-shot pulse not only as alarm clear signal.
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 width of an alarm clear
signal and clearness/time of the deflection counter of axis number 1 of
deflection counter clear signal OFF timer are set.
The width of a deflection counter clear signal is set at 102 microseconds.
The time of deflection counter clear signal OFF timer is set at 12 microseconds.
The width of an alarm clear signal is set at 102 microseconds.
C, C++
long Ret;
short ErcTime ;
short ErcOffTimer ;
short AlmTime ;
ErcTime = 1;
ErcOffTimer = 1;
AlmTime = 1;
Ret = SmcWSetErcAlmClearTime( Id , 1, ErcTime , ErcOffTimer , AlmTime );
Python
Ret = ctypes.c_long()
ErcTime = ctypes.c_short()
ErcOffTimer = ctypes.c_short()
AlmTime = ctypes.c_short()
ErcTime.value = 1
ErcOffTimer.value = 1
AlmTime.value = 1
Ret.value = csmc.SmcWSetErcAlmClearTime( Id , 1, ErcTime , ErcOffTimer , AlmTime )
See Also