SmcWGetOrgMode


Function

Retrieves the settings of mode of origin return.

Format

Ret = SmcWGetOrgMode( Id, AxisNo, LimitTurn, OrgType, EndDir, ZCount )

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.

LimitTurn [ VB.NET: Short ] [ C, C++: short * ] [ C#: out 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 [ VB.NET: Short ] [ C, C++: short * ] [ C#: out 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 [ VB.NET: Short ] [ C, C++: short * ] [ C#: out 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 [ VB.NET: Short ] [ C, C++: short * ] [ C#: out 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 [ 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

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 axis is in operation.

Example

The set up information of the starting point return form of axis number 1 is acquired.

VB.NET
Dim Ret As Integer
Dim LimitTurn As Short
Dim OrgType As Short
Dim EndDir As Short
Dim ZCount As Short
Ret = SmcWGetOrgMode( Id , 1, LimitTurn , OrgType , EndDir , ZCount )

C, C++
long Ret;
short LimitTurn;
short OrgType;
short EndDir;
short ZCount;
Ret = SmcWGetOrgMode( Id , 1, &LimitTurn , &OrgType , &EndDir , &ZCount );

C#
int Ret;
short LimitTurn;
short OrgType;
short EndDir;
short ZCount;
Ret = Smc.WGetOrgMode( Id , 1, out LimitTurn , out OrgType , out EndDir , out 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

SmcWSetOrgMode