Function
Sets the logic of origin input.
Format
Ret = SmcWSetOrgLog( Id, AxisNo, OrgLog )
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.
OrgLog [ C, C++: short ] [ Python: ctypes.c_short ]
Set the logic of origin input.
[ 0 | 0 | 0 | 0 | 0 | 0 | Z | ORG ] Available range:0 to 3
Z |
0:Falling edge 1:Rising edge |
ORG |
0:Negative logic 1:Positive logic |
Return Value
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Initial Value
Z |
0:Falling edge |
ORG |
0:Negative logic |
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 starting point input logic of axis number 1 is set to "Positive logic and Rising edge".
C, C++
long Ret;
short OrgLog ;
OrgLog = 1;
Ret = SmcWSetOrgLog( Id , 1, OrgLog );
Python
Ret = ctypes.c_long()
OrgLog = ctypes.c_short()
OrgLog.value = 1
Ret.value = csmc.SmcWSetOrgLog( Id , 1, OrgLog )
See Also