focas_get_error_str(handle, errorCode)
기능
Focas Library관련 기능 사용시 반환되는 errorCode의 분석을 위해서 사용합니다. 에러코드 입력시 관련 에러의 원인에 대해서 string으로 반환합니다.
인수
인수명 | 자료형 | 기본값 | 설명 |
---|---|---|---|
handle | int | - | FOCAS 사용에 필요한 통신 고유의 제어상수값 |
errorCode | int | - | FOCAS관련 DRL 수행후 반환되는 에러코드 |
리턴
값 | 설명 |
---|---|
errorCodeString | 에러코드의 상세 내역(string) |
예외
예외 | 설명 |
---|---|
DR_Error (DR_ERROR_TYPE) | 인수들의 데이터형 오류 시 |
DR_Error (DR_ERROR_VALUE) | 인수의 값이 유효하지 않을 시 |
DR_Error (DR_ERROR_RUNTIME) | C Extension 모듈 에러 발생 시 |
DR_Error (DR_ERROR_STOP) | 프로그램 강제 종료 시 |
상세 에러코드
예외 | 설명 |
---|---|
.-17 | 상세 원인에 따라 아래의 메시지가 출력됨 "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 | 상세 원인에 따라 아래의 메시지가 출력됨 "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" |
예제 상세 에러코드
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)