SmcWSetErcOut


Function

Output the (ERC) signal of clearness of the deflection counter

 

Format

Ret = SmcWSetErcOut( Id , AxisNo, ErcOn )

 

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 axis number.

 

ErcOn [ C, C++: short ] [ Python: ctypes.c_short ]

When the ERC output is set to the level output, it resets it.

Value that can be specified: 0 and 1

0

The ERC signal is output.

1

The ERC signal is reset.

 

Return Value

Ret [ C, C++: long ] [ Python: ctypes.c_long ]

0

Terminated normally

Non-zero

Terminated abnormally

See also: Error code details

 

Remarks

When the deflection counter is cleared, it executes it.
It can not be executed while motor is already in motion.
The width of the signal of a deflection clear counter is set by the initializing utility.
The width of the signal of a deflection clear counter is set by the SmcWSetErcAlmCLRTime function.

However, when "2: a deflection counter clear signal" is set to the setting of CtrlTypeOut1 to CtrlTypeOut3 by the SmcWSetCtrlTypeOut function, it is effective.
The signal is reset by setting when the signal width setting of the deflection clear counter set by the SmcWSetErcAlmClearTime function resets the output signal at the level as ErcOn=1.

 

Example

The (ERC) signal of clearness of the deflection counter of axis number 1 is output.

 

C, C++

long Ret;

short ErcOn ;

ErcOn = 1;

Ret = SmcWSetErcOut( Id , 1, ErcOn );

 

Python

Ret = ctypes.c_long()

ErcOn = ctypes.c_short()

ErcOn.value = 1

Ret.value = csmc.SmcWSetErcOut( Id , 1, ErcOn )

 

See Also