
ICPDAS
I-8092F Software User Manual
34
3.6 Reading and Clearing the ERROR Status
BYTE
i8092MF_GET_ERROR(
BYTE
cardNo
)
Description:
This function checks whether an error occurs or not.
Parameters:
cardNo
:
Module number
Return:
YES:
Some
errors
happened.
Please use i8092MF_GET_ERROR_CODE () to get more
information. If
GET_ERROR_CODE =256
, it means that the
motion stop was due to the “STOP” command, not because
an error happened. Please refer to
6.5.5
and following
example
to clear ERROR.
NO:
No error.
EXAMPLE:
If
(i8092MF_GET_ERROR(1) == YES)
{
//read module 1 and ERROR is found
WORD ErrorCode_X = i8092MF_GET_ERROR_CODE(1, AXIS_X);
WORD ErrorCode_Y = i8092MF_GET_ERROR_CODE(1, AXIS_Y);
if
((ErrorCode_X || ErrorCode_Y) == 256)
{
//It means that motion was stopped due to the stop command was
issued, not because any error happened. Please take some actions to
clear the malfunction; then clear the STOP status.
i8092MF_CLEAR_STOP(1);
}
}
WORD
i8092MF_GET_ERROR_CODE(
BYTE
cardNo
,
WORD
axis
)
Description:
This function reads the ERROR status.
Parameters:
cardNo
:
Module number
axis
:
Axis (Please refer to Table 2-1)
The axis can be either X and Y