SmcWGetAlarmCode


Function

Retrieves alarm code.

Format

Ret = SmcWGetAlarmCode( Id, AxisNo, AlarmCode )

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 axis number.

AlarmCode [ VB.NET: Short ] [ C, C++: short *] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of the variable that stores the alarm code.

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

Remarks

Please refer to specifications of every driver unit for details of alarm code.

This function can be executed even if the axis is in operation.

Example

The alarm code of axis number 1 is acquired.

VB.NET
Dim Ret As Integer
Dim AlarmCode As Short
Ret = SmcWGetAlarmCode( Id , 1, AlarmCode )

C, C++
long Ret;
short AlarmCode;
Ret = SmcWGetAlarmCode( Id , 1, &AlarmCode );

C#
int Ret;
short AlarmCode;
Ret = Smc.WGetAlarmCode( Id , 1, out AlarmCode );

Python
Ret = ctypes.c_long()
AlarmCode = ctypes.c_short()
Ret.value = csmc.SmcWGetAlarmCode( Id , 1, ctypes.byref(AlarmCode) )