Function
Sets the type of control output signal.
(General-purpose output,Alarm Clear, ERC, Hold off)
Format
Ret = SmcWSetCtrlTypeOut( Id, AxisNo, CtrlOut1, CtrlOut2, CtrlOut3)
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 the axis number.
CtrlOut1
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Set the type of control output signal OUT1.
CtrlOut2
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Set the type of control output signal OUT2.
CtrlOut3
[ VB.NET: Short ] [ C, C++: short ] [ 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 [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ 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.
VB.NET
Dim Ret As Integer
Dim CtrlOut1 As Short
Dim CtrlOut2 As Short
Dim CtrlOut2 As Short
Ret = SmcWSetCtrlTypeOut( Id , 1, CtrlOut1 , CtrlOut2 , CtrlOut3)
C, C++
long Ret;
short CtrlOut1 ;
short CtrlOut2 ;
short CtrlOut3 ;
Ret = SmcWSetCtrlTypeOut( Id , 1, CtrlOut1 , CtrlOut2 , CtrlOut3);
C#
int Ret;
short CtrlOut1 ;
short CtrlOut2 ;
short CtrlOut3 ;
Ret = Smc.WSetCtrlTypeOut( 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