focas_get_error_str(handle, errorCode)
Features
It is used to analyze the errorCode returned when using the Focas Library related function. When entering an error code, the cause of the related error is returned as a string.
Parameter
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
handle | int | - | Communication specific control constant value required for use of FOCAS |
errorCode | int | - | Error code returned after FOCAS related DRL execution |
Return
Value | Description |
---|---|
errorCodeString | Details of the error code (string) |
Exception
Exception | Description |
---|---|
DR_Error (DR_ERROR_TYPE) | Parameter data error occurred |
DR_Error (DR_ERROR_VALUE) | Parameter value is invalid |
DR_Error (DR_ERROR_RUNTIME) | C Extension module error occurred |
DR_Error (DR_ERROR_STOP) | Program terminated forcefully |
ErrorCode Details
Exception | Description |
.-17 | The following message is displayed depending on the detailed cause. "The send data is larger than the maximum transfer unit" "The sending data size is illegal" "The number of the recieved packet is 0" "The mark of the protocol is incorrect in the recieved packet header" "The packet type flag is incorrect in the recieved packet header" "The flag of the direction is incorrect in the recieved packet header" "Illegal received data size" "Communication error in the Ethernet Board " "protocol error" |
-16 | The following message is displayed depending on the detailed cause. "Error of socket API function ") "Error of connect API function") "Error of send API function" "Error of recv API function" "Error of select API function" "Error of setsockopt API function" "Error of gethostbyname API function" "Timeout error of send API function" "Timeout error of recv API function" "Error of Winsock API is occurred in other process" "EOF (end of file) detected " "socket error" |
-15 | "DLL not exist error" |
-14 | "error in APi library inital valiefile" |
-13 | "low temperature alarm of intellig0ent terminal" |
-12 | "hight temperature alarm of intelligent terminal" |
-11 | "bus error" |
-10 | "system error" |
-9 | "hssb communication error" |
-8 | "library handle error" |
-7 | "CNC/PMC version missmatch" |
-6 | "abnormal error" |
-5 | "system error" |
-4 | "shared RAM parity error" |
-3 | "emm386 or mmcsys install error" |
-2 | "reset or stop occured error" |
-1 | "busy error" |
0 | "no problem" |
1 | "command prepare error or pmc not exist" |
2 | "data block length error" |
3 | "data number error or address range error" |
4 | "data attribute error or data type error" |
5 | "data error" |
6 | "no option error" |
7 | "write protect error" |
8 | "memory overflow error" |
9 | "cnc parameter not correct error" |
10 | "buffer error" |
11 | "path error" |
12 | "cnc mode error" |
13 | "execution rejected error" |
14 | "data server error" |
15 | "alarm has been occurred" |
16 | "CNC is not running" |
17 | "protection data error" |
18 | "error generated by PMC" |
19 | "PMC handle error" |
20 | "overwrite stop in program read" |
21 | "reset interrupt in program read" |
-100 | "Library opening failed." |
-101 | "The maximum number of machine tools that can be connected has been exceeded." |
-102 | "The handle is not connected" |
Example
ErrCode, hMachineCenter = focas_connect("10.10.0.95", 8193, 10)
if ErrCode != 0 :
ErrorString = focas_get_error_str(hMachineCenter, ErrCode)
MC_Command = [-178.12, 11.478]
focas_pmc_write_double(hMachineCenter, "G", 3100, MC_Command, 2)
focas_disconnect(hMachineCenter)