EnumClass.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace OmronFinsTCP.Net
  6. {
  7. /// <summary>
  8. /// 寄存器类型,十六进制表示形式
  9. /// </summary>
  10. public enum PlcMemory
  11. {
  12. //CIO_Word = 0xB0,
  13. //CIO_Bit = 0x30,
  14. //WR_Word = 0xB1,
  15. //WR_Bit = 0x31,
  16. //HR_Word =0xB2,
  17. //HR_Bit = 0x32,
  18. //AR_Word =0xB3,
  19. //AR_Bit = 0x33,
  20. //DM_Word = 0x82,
  21. //DM_Bit = 0x02
  22. CIO,
  23. WR,
  24. HR,
  25. AR,
  26. DM
  27. }
  28. /// <summary>
  29. /// 地址类型
  30. /// </summary>
  31. public enum MemoryType
  32. {
  33. Bit,
  34. Word
  35. }
  36. /// <summary>
  37. /// 数据类型,PLC字为16位数,最高位为符号位,负数表现形式为“取反加一”
  38. /// </summary>
  39. public enum DataType
  40. {
  41. BIT,
  42. INT16,
  43. REAL
  44. }
  45. /// <summary>
  46. /// bit位开关状态,on=1,off=0
  47. /// </summary>
  48. public enum BitState
  49. {
  50. ON = 1,
  51. OFF = 0
  52. }
  53. /// <summary>
  54. /// 区分指令的读写类型
  55. /// </summary>
  56. public enum RorW
  57. {
  58. Read,
  59. Write
  60. }
  61. }