SmcWSetCtrlTypeOut


Function

Sets the type of control output signal.

(General-purpose output,ALM Clear,ERC,Hold off)

 

Format

Ret = SmcWSetCtrlTypeOut( Id, AxisNo, CtrlOut1, CtrlOut2, CtrlOut3)

 

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.

 

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

Set the type of control output signal OUT1.

 

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

Set the type of control output signal OUT2.

 

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

Set the type of control output signal OUT3.

 

Signal form setting for control output OUT1 to OUT3

0

General-purpose output

1

Alarm clear signal

2

Deviation counter clear signal (ERC)

3

Output pulse counter count agreement signal(CP1)

4

Encoder counter count agreement signal(CP2)

5

Hold off signal

 

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 : Control outputs OUT1 to OUT3 are all used as general-purpose outputs

 

Remarks

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 control output signal form of axis number 1 is set.

 

C, C++

long Ret;

short CtrlOut1 ;

short CtrlOut2 ;

short CtrlOut3 ;

Ret = SmcWSetCtrlTypeOut( Id , 1, CtrlOut1 , CtrlOut2 , CtrlOut3);

 

Python

Ret = ctypes.c_long()

CtrlOut1 = ctypes.c_short()

CtrlOut2 = ctypes.c_short()

CtrlOut3 = ctypes.c_short()

Ret.value = csmc.SmcWSetCtrlTypeOut( Id , 1, CtrlOut1 , CtrlOut2 , CtrlOut3)

 

See Also

SmcWGetCtrlTypeOut