板卡程序错误 [1,50]

读板卡数据的命令，无特别的错误标识
ReadGeneralStatus / ReadCardBasicInfo / ReadResourceInfo /
ReadLastContexInfo / ReadFifiAbortContext / 
ReadDIStatus / ReadDOStatus  / ReadFindOriginState /
ReadAxisStatus /
ReadDAValue / ReadPWMValue
WirteLaser_ReadM4SerialData / ReadLaserWarning
ReadWheelInfo / ReadAdvWheelInfo


WriteDIConfigPara / WriteMutiDOValue / WriteOneDOValue /
WriteResetAxisCoordCmd / WriteClearWarningCmd / ReadCardID
1：参数不足

WriteStopCmd
1：执行失败

StartFifo / StopFifo / ClearFifo
1：有告警无法开始加工；
2：配置为联动的轴未全部处在空闲态；

FillFifo / GetFreeFifoSize
1：数据未按16字节对齐
2：系统未处在插补或空闲状态
3：FIFO数据溢出

WriteCardClock
1：参数不足
2：年份不合理
3：月份不合理
4：天数不合理
5：日期不合理
6：小时不合理
7：分钟不合理
8：秒数不合理
9：日期设定失败，内部错误
10：时间设定失败，内部错误

WriteRestartMainCardCmd
1: 系统未处在空闲态

WriteAxisConfigPara / WriteAxisJogCmd / WriteAxisJogCmd_stop / 
WriteAxisCoord / WriteAxisFeedbackEncoder
WriteFindOriginCmd / WriteAxisEnableCmd  / WriteClearAxisAlarm / WriteDoubleDriveConfig / WriteDoubleDriveErrorGate
1：参数不足；
2：轴不存在

AxisConfigPara
3：轴未处于空闲状态

AxisJogCmd / AxisJogCmd_stop
4：轴未处在空闲状态无法开始；或未处于单步状态，无法停止
5：单步速度不得为0
6：单步速度过大，超过500K
7：非独立轴
8：有告警发生，无法运动

AxisSetCoord / WriteAxisFeedbackEncoder
3：非独立轴

WriteFindOriginCmd
3：轴未处在空闲态，无法开始回原
4：急停或限位触发，无法回原
5：从轴

WriteDoubleDriveConfig
3：主轴与从轴不能为同一轴
4：轴未处于空闲态
5：主轴或从轴已被占用
6：主轴与从轴不为双驱关系，无法解除

WriteDoubleDriveErrorGate
3：误差值过大
4：指定轴非双驱主轴

AxisEnableCmd
3：轴处在非空闲状态
4：非独立轴

WriteDAValue_one / WritePWMValue_one
1：参数不足
2：端口不存在

WriteDAValue_one
3：设定值超出最大值
4：设定值超出最小值

WritePWMValue_one
3：频率设置值不合适
4：占空比设置值不合适

AxisParamSetting
1：参数不足
2：轴不存在或轴未处于空闲状态

//////////////////////////////////////////////////////////////////////////////////////
WriteStartUpdateCmd / WriteUpdateData / WirteEncryptUserData / WirteEncryptAdminData
1：系统未处于空闲状态

WriteStartUpdateCmd
2：解除写保护失败
3：启用写保护失败

WriteUpdateData
2：升级数据溢出
3：解除写保护失败
4：启用写保护失败

WirteEncryptUserData / WirteEncryptAdminData
2：参数不足
3：偏移未按四字节对齐
4：写区域溢出
5：解除写保护失败
6，7,8：启用写保护失败

ReadEncryptAdminData / ReadEncryptUserData
1：参数不足
2：偏移地址未按四字节对齐
3：读取字节数未按四字节对齐
4：读取区域溢出

ResetAxisCoord
1：参数不足
2：轴不存在

WirteLaser_ClearM4SerialFifo
1：拒绝执行

WirteLaser_WriteM4SerialData
1：数据未按协议对齐


/**********************************************************************************/
网络错误代码  作用范围：缓冲区数据错误Log  常规的日志内容Log
APP协议错误 [-1, -5]
-1 网络socket初始化错误
-2 主卡Modbus协议缺失
-3 网口连接激光器Modbus协议缺失
-4 PC串口连接激光器Modbus协议缺失

/**********************************************************************************/
应用层编码错误  主卡、网口激光器、PC串口激光器分别为 -2x、-3x、-4x （x为以下注释）
-21/-31/-41 主卡/网口激光器/PC串口激光器   编码参数错误
-22/-32/-42 主卡/网口激光器/PC串口激光器   接收数据为空
-23/-33/-43 主卡/网口激光器/PC串口激光器   帧标识错误
-24/-34/-44 主卡/网口激光器/PC串口激光器   帧ID不匹配
-26   主卡 接收数据Buffer不够组成一个命令码
-27   主卡 接收App协议数据丢失
-28   主卡 接收App协议数据超额

/**********************************************************************************/
串口返回错误 [71,80]
71=串口服务未开启 
72=接收数据失败 
73=串口操作异常 
74=写数据失败 
75=数据内容错误

/**********************************************************************************/
激光器错误
LaserType： 0=常规 1=锐科 2=IPG  
LaserCtrlType：0=IO 1=网口 2=MC串口 3=PC串口

ExeError： 锐科激光器 返回值错误、返回的数据大小不符合规则
IllegalFrame：锐科 收到的帧数据大小不对、帧结束符不对
FrameHeadError：接收的帧头不对
FrameTarilError：接收的帧尾不对
CheckCodeFail：校验位错误
DataLenError：接收到的数据中，实际的有效数据大小与返回的数据大小不一致

/**********************************************************************************/
Socket错误 范围 [10000, 12000)

Socket error 0 - Directly send error 

Socket error 10004 - WSAEINTR  A blocking operation was interrupted by a call to WSACancelBlockingCall.
Socket error 10009 - WSAEBADF  The file handle supplied is not valid.

Socket error 10013 - WSAEACCES An attempt was made to access a socket in a way forbidden by its access permissions.
Socket error 10014 - WSAEFAULT The system detected an invalid pointer address in attempting to use a pointer argument in a call.

Socket error 10022 - WSAEINVAL Invalid argument 
Socket error 10024 - WSAEMFILE Too many open sockets 

Socket error 10035 - WSAEWOULDBLOCK A non-blocking socket operation could not be completed immediately.
Socket error 10036 - WSAEINPROGRESS A blocking operation is currently executing.
Socket error 10037 - WSAEALREADY An operation was attempted on a non-blocking socket that already had an operation in progress
Socket error 10038 - WSAENOTSOCK An operation was attempted on something that is not a socket.
Socket error 10039 - WSAEDESTADDRREQ A required address was omitted from an operation on a socket

Socket error 10040 - WSAEMSGSIZE Message too long 
Socket error 10041 - WSAEPROTOTYPE A protocol was specified in the socket function call that does not support the semantics of the socket type requested.
Socket error 10042 - WSAENOPROTOOPT An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call
Socket error 10043 - WSAEPROTONOSUPPORT The requested protocol has not been configured into the system, or no implementation for it exists
Socket error 10044 - WSAESOCKTNOSUPPORT The support for the specified socket type does not exist in this address family 
Socket error 10045 - WSAEOPNOTSUPP The attempted operation is not supported for the type of object referenced.
Socket error 10046 - WSAEPFNOSUPPORT The protocol family has not been configured into the system or no implementation for it exists.
Socket error 10047 - WSAEAFNOSUPPORT An address incompatible with the requested protocol was used
Socket error 10048 - WSAEADDRINUSE Only one usage of each socket address (protocol/network address/port) is normally permitted.
Socket error 10049 - WSAEADDRNOTAVAIL The requested address is not valid in its context.

Socket error 10050 - WSAENETDOWN A socket operation encountered a dead network.
Socket error 10051 - WSAENETUNREACH A socket operation was attempted to an unreachable network.
Socket error 10052 - WSAENETRESET The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress.
Socket error 10053 - WSAECONNABORTED An established connection was aborted by the software in your host machine
Socket error 10054 - WSAECONNRESET An existing connection was forcibly closed by the remote host 
Socket error 10055 - WSAENOBUFS An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
Socket error 10056 - WSAEISCONN  A connect request was made on an already connected socket.
Socket error 10057 - WSAENOTCONN Socket is not connected 
Socket error 10058 - WSAESHUTDOWN Cannot send after socket shutdown 
Socket error 10059 - WSAETOOMANYREFS Too many references to some kernel object.

Socket error 10060 - WSAETIMEDOUT A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Socket error 10061 - WSAECONNREFUSED Connection refused 
Socket error 10062 - WSAELOOP Cannot translate name.
Socket error 10063 - WSAENAMETOOLONG Name component or name was too long.
Socket error 10064 - WSAEHOSTDOWN A socket operation failed because the destination host was down.
Socket error 10065 - WSAEHOSTUNREACH A socket operation was attempted to an unreachable host.
Socket error 10066 - WSAENOTEMPTY Cannot remove a directory that is not empty.
Socket error 10067 - WSAEPROCLIM A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously. 
Socket error 10068 - WSAEUSERS Ran out of quota.
Socket error 10069 - WSAEDQUOT Ran out of disk quota.

Socket error 10070 - WSAEREMOTE tem is not available locally.
Socket error 10071 - WSASYSNOTREADY Item is not available locally.

Socket error 10091 - WSASYSNOTREADY WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable.
Socket error 10092 - WSAVERNOTSUPPORTED The Windows Sockets version requested is not supported.
Socket error 10093 - WSANOTINITIALISED Either the application has not called WSAStartup, or WSAStartup failed.

Socket error 10101 - WSAEDISCON Returned by WSARecv or WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence.
Socket error 10102 - WSAENOMORE No more results can be returned by WSALookupServiceNext.
Socket error 10103 - WSAECANCELLED A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
Socket error 10104 - WSAEINVALIDPROCTABLE The procedure call table is invalid.
Socket error 10105 - WSAEINVALIDPROVIDER The requested service provider is invalid.
Socket error 10106 - WSAEPROVIDERFAILEDINIT The requested service provider could not be loaded or initialized.
Socket error 10107 - WSASYSCALLFAILURE A system call has failed.
Socket error 10108 - WSASERVICE_NOT_FOUND No such service is known. The service cannot be found in the specified name space.
Socket error 10109 - WSATYPE_NOT_FOUND The specified class was not found.

Socket error 10110 - WSA_E_NO_MORE No more results can be returned by WSALookupServiceNext.
Socket error 10111 - WSA_E_CANCELLED A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
Socket error 10112 - WSAEREFUSED A database query failed because it was actively refused

Socket error 11001 - WSAHOST_NOT_FOUND No such host is known.
Socket error 11002 - WSATRY_AGAIN This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.
Socket error 11003 - WSANO_RECOVERY A non-recoverable error occurred during a database lookup.
Socket error 11004 - WSANO_DATA The requested name is valid, but no data of the requested type was found.
Socket error 11005 - WSA_QOS_RECEIVERS At least one reserve has arrived.
Socket error 11006 - WSA_QOS_SENDERS At least one path has arrived.
Socket error 11007 - WSA_QOS_NO_SENDERS There are no senders.
Socket error 11008 - WSA_QOS_NO_RECEIVERS There are no receivers.
Socket error 11009 - WSA_QOS_REQUEST_CONFIRMED Reserve has been confirmed.

Socket error 11010 - WSA_QOS_ADMISSION_FAILURE Error due to lack of resources.
Socket error 11011 - WSA_QOS_POLICY_FAILURE Rejected for administrative reasons - bad credentials.
Socket error 11012 - WSA_QOS_BAD_STYLE  Unknown or conflicting style.
Socket error 11013 - WSA_QOS_BAD_OBJECT  Problem with some part of the filterspec or providerspecific buffer in general.
Socket error 11014 - WSA_QOS_TRAFFIC_CTRL_ERROR  Problem with some part of the flowspec.
Socket error 11015 - WSA_QOS_GENERIC_ERROR General QOS error.
Socket error 11016 - WSA_QOS_ESERVICETYPE  An invalid or unrecognized service type was found in the flowspec.
Socket error 11017 - WSA_QOS_EFLOWSPEC  An invalid or inconsistent flowspec was found in the QOS structure.
Socket error 11018 - WSA_QOS_EPROVSPECBUF  Invalid QOS provider-specific buffer.
Socket error 11019 - WSA_QOS_EFILTERSTYLE  An invalid QOS filter style was used.

Socket error 11020 - WSA_QOS_EFILTERTYPE  An invalid QOS filter type was used.
Socket error 11021 - WSA_QOS_EFILTERCOUNT  An incorrect number of QOS FILTERSPECs were specified in the FLOWDESCRIPTOR.
Socket error 11022 - WSA_QOS_EOBJLENGTH  An object with an invalid ObjectLength field was specified in the QOS provider-specific buffer.
Socket error 11023 - WSA_QOS_EFLOWCOUNT An incorrect number of flow descriptors was specified in the QOS structure.
Socket error 11024 - WSA_QOS_EUNKOWNPSOBJ  An unrecognized object was found in the QOS provider-specific buffer.
Socket error 11025 - WSA_QOS_EPOLICYOBJ  An invalid policy object was found in the QOS provider-specific buffer.
Socket error 11026 - WSA_QOS_EFLOWDESC  An invalid QOS flow descriptor was found in the flow descriptor list.
Socket error 11027 - WSA_QOS_EPSFLOWSPEC  An invalid or inconsistent flowspec was found in the QOS provider specific buffer.
Socket error 11028 - WSA_QOS_EPSFILTERSPEC  An invalid FILTERSPEC was found in the QOS provider-specific buffer.
Socket error 11029 - WSA_QOS_ESDMODEOBJ  An invalid shape discard mode object was found in the QOS provider specific buffer.

Socket error 11030 - WSA_QOS_ESHAPERATEOBJ  An invalid shaping rate object was found in the QOS provider-specific buffer.
Socket error 11031 - WSA_QOS_RESERVED_PETYPE  A reserved policy element was found in the QOS provider-specific buffer.
Socket error 11032 - WSA_SECURE_HOST_NOT_FOUND  No such host is known securely.
Socket error 11033 - WSA_IPSEC_NAME_POLICY_ERROR  Name based IPSEC policy could not be added.

