Function
Retrieves the settings of type of control input signal.
Format
Ret = SmcWGetCtrlTypeIn( Id, AxisNo, CtrlIn )
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.
CtrlIn [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of a variable to store the type of control input signal.
[ 0 | 0 | IN6/CLR | IN5/PCS | IN4/LTC | IN3/SD | IN2/INP | IN1/ALM ] Available range: 0 to 3F (Hex)
IN1/ALM |
0 : Used as IN1 (general-purpose input) 1 : Used as the input of alarm (ALM) signal |
IN2/INP |
0 : Used as IN2 (general-purpose input) 1 : Used as the input of servo-driver positioning completion (INP) signal |
IN3/SD |
0 : Used as IN3 (general-purpose input) 1 : Used as the input of deceleration (deceleration stop) (SD) signal |
IN4/LTC |
0 : Used as IN4 (general-purpose input) 1 : Used as the input of LTC signal Latch the value of COUNTER1 to COUNTER2 (COUNTER1 to COUNTER4 for SMC-4/8DF) |
IN5/PCS |
0 : Used as IN5 (general purpose input) 1 : Used as the input of PCS signal The motion to determine the position begins when this signal comes in. (Used for override 2 of target position) |
IN6/CLR |
0 : Used as IN6 (general purpose input) 1 : Used as the input of CLR signal Reset the specified counters among COUNTER1 to COUNTER4 (For SMC-2/4/8DL, IN6 is fixed. CLR signal cannot be set) |
Return Value
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Initial Value
Used as the input of alarm (ALM) signal
Remarks
This function can be executed even if the device is in operation.
Example
The set up information of the control input signal form of axis number 1 is acquired.
C, C++
long Ret;
short CtrlIn ;
Ret = SmcWGetCtrlTypeIn( Id , 1, &CtrlIn );
Python
Ret = ctypes.c_long()
CtrlIn = ctypes.c_short()
Ret.value = csmc.SmcWGetCtrlTypeIn( Id , 1, ctypes.byref(CtrlIn) )
See Also