Function
Retrieves the settings of mode of origin return.
Format
Ret = SmcWGetOrgMode( Id, AxisNo, LimitTurn, OrgType, EndDir, ZCount )
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.
LimitTurn [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of a variable to store the value that indicates whether the limit is to be turned over.
0 |
Disable the reversal by LIM signal |
1 |
Enable reversal by LIM signal |
2 |
LIM signal is ON, Origin return motion can start |
3 |
Origin return motion by using the LIM signal |
OrgType [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of a variable to store the value that indicates whether to use phase Z.
0 |
Do not use (ORG only used) |
1 |
Use (ORG + phase Z) |
EndDir [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of a variable to store the value that indicates the run-into direction when origin returning.
0 |
Unspecified |
1 |
Positive direction |
2 |
Negative direction |
ZCount [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of a variable to store the number of Z-phase when origin returning.
Return Value
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Initial Value
LimitTurn |
1 : Return the limit over |
OrgType |
0 : Unspecified (If phase Z is used, it is "1" (positive direction)) |
EndDir |
0 : Unspecified |
ZCount |
0 : Unspecified (disabled by default) |
Remarks
This function can be executed even if the device is in operation.
Example
The set up information of the starting point return form of axis number 1 is acquired.
C, C++
long Ret;
short LimitTurn ;
short OrgType ;
short EndDir ;
short ZCount ;
Ret = SmcWGetOrgMode( Id , 1, &LimitTurn , &OrgType , &EndDir , &ZCount );
Python
Ret = ctypes.c_long()
LimitTurn = ctypes.c_short()
OrgType = ctypes.c_short()
EndDir = ctypes.c_short()
ZCount = ctypes.c_short()
Ret.value = csmc.SmcWGetOrgMode( Id , 1, ctypes.byref(LimitTurn) , ctypes.byref(OrgType) , ctypes.byref(EndDir) , ctypes.byref(ZCount) )
See Also