Mazak.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace MazakCnc
  7. {
  8. public class Mazak:Ntif
  9. {
  10. public const short EW_OK = (short)focas_ret.EW_OK;
  11. /* Error Codes */
  12. public enum focas_ret
  13. {
  14. EW_PROTOCOL = (-17), /* protocol error */
  15. EW_SOCKET = (-16), /* Windows socket error */
  16. EW_NODLL = (-15), /* DLL not exist error */
  17. EW_BUS = (-11), /* bus error */
  18. EW_SYSTEM2 = (-10), /* system error */
  19. EW_HSSB = (-9), /* hssb communication error */
  20. EW_HANDLE = (-8), /* Windows library handle error */
  21. EW_VERSION = (-7), /* CNC/PMC version missmatch */
  22. EW_UNEXP = (-6), /* abnormal error */
  23. EW_SYSTEM = (-5), /* system error */
  24. EW_PARITY = (-4), /* shared RAM parity error */
  25. EW_MMCSYS = (-3), /* emm386 or mmcsys install error */
  26. EW_RESET = (-2), /* reset or stop occured error */
  27. EW_BUSY = (-1), /* busy error */
  28. EW_OK = 0, /* no problem */
  29. EW_FUNC = 1, /* command prepare error */
  30. EW_NOPMC = 1, /* pmc not exist */
  31. EW_LENGTH = 2, /* data block length error */
  32. EW_NUMBER = 3, /* data number error */
  33. EW_RANGE = 3, /* address range error */
  34. EW_ATTRIB = 4, /* data attribute error */
  35. EW_TYPE = 4, /* data type error */
  36. EW_DATA = 5, /* data error */
  37. EW_NOOPT = 6, /* no option error */
  38. EW_PROT = 7, /* write protect error */
  39. EW_OVRFLOW = 8, /* memory overflow error */
  40. EW_PARAM = 9, /* cnc parameter not correct error */
  41. EW_BUFFER = 10, /* buffer error */
  42. EW_PATH = 11, /* path error */
  43. EW_MODE = 12, /* cnc mode error */
  44. EW_REJECT = 13, /* execution rejected error */
  45. EW_DTSRVR = 14, /* data server error */
  46. EW_ALARM = 15, /* alarm has been occurred */
  47. EW_STOP = 16, /* CNC is not running */
  48. EW_PASSWD = 17, /* protection data error */
  49. /*
  50. Result codes of DNC operation
  51. */
  52. DNC_NORMAL = (-1), /* normal completed */
  53. DNC_CANCEL = (-32768), /* DNC operation was canceled by CNC */
  54. DNC_OPENERR = (-514), /* file open error */
  55. DNC_NOFILE = (-516), /* file not found */
  56. DNC_READERR = (-517) /* read error */
  57. };
  58. }
  59. }