AsIOAcc.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /* Automation Studio generated header file */
  2. /* Do not edit ! */
  3. #ifndef _ASIOACC_
  4. #define _ASIOACC_
  5. #ifdef __cplusplus
  6. extern "C"
  7. {
  8. #endif
  9. #include <bur/plctypes.h>
  10. #include <runtime.h>
  11. #ifndef _BUR_PUBLIC
  12. #define _BUR_PUBLIC
  13. #endif
  14. /* Constants */
  15. #ifdef _REPLACE_CONST
  16. #define ioacERR_ACCESS 30196U
  17. #define ioacERR_PARAMETER 30195U
  18. #define ioacERR_NOTSUPPORTED 30194U
  19. #define ioacERR_TIMEOUT 30193U
  20. #define ioacERR_CHANNEL 30192U
  21. #define ioacERR_DEVICE 30191U
  22. #define ioacERR_INTERNAL 30190U
  23. #else
  24. #ifndef _GLOBAL_CONST
  25. #define _GLOBAL_CONST _WEAK const
  26. #endif
  27. _GLOBAL_CONST unsigned short ioacERR_ACCESS;
  28. _GLOBAL_CONST unsigned short ioacERR_PARAMETER;
  29. _GLOBAL_CONST unsigned short ioacERR_NOTSUPPORTED;
  30. _GLOBAL_CONST unsigned short ioacERR_TIMEOUT;
  31. _GLOBAL_CONST unsigned short ioacERR_CHANNEL;
  32. _GLOBAL_CONST unsigned short ioacERR_DEVICE;
  33. _GLOBAL_CONST unsigned short ioacERR_INTERNAL;
  34. #endif
  35. /* Datatypes and datatypes of function blocks */
  36. typedef struct IOAC_I_TYPE
  37. { unsigned short StateMan;
  38. unsigned short ErrMan;
  39. unsigned long Init;
  40. unsigned long Taskhandle;
  41. unsigned long Semaphore;
  42. unsigned long Requestsize;
  43. unsigned long Answersize;
  44. unsigned long pAccessObj;
  45. unsigned long Offset;
  46. unsigned long flags;
  47. } IOAC_I_TYPE;
  48. typedef struct AsIOAccRead
  49. {
  50. /* VAR_INPUT (analog) */
  51. unsigned long pDeviceName;
  52. unsigned long pChannelName;
  53. /* VAR_OUTPUT (analog) */
  54. unsigned short status;
  55. unsigned long value;
  56. /* VAR (analog) */
  57. struct IOAC_I_TYPE intern;
  58. /* VAR_INPUT (digital) */
  59. plcbit enable;
  60. } AsIOAccRead_typ;
  61. typedef struct AsIOAccWrite
  62. {
  63. /* VAR_INPUT (analog) */
  64. unsigned long pDeviceName;
  65. unsigned long pChannelName;
  66. unsigned long value;
  67. /* VAR_OUTPUT (analog) */
  68. unsigned short status;
  69. /* VAR (analog) */
  70. struct IOAC_I_TYPE intern;
  71. /* VAR_INPUT (digital) */
  72. plcbit enable;
  73. } AsIOAccWrite_typ;
  74. typedef struct AsIOAccReadReg
  75. {
  76. /* VAR_INPUT (analog) */
  77. unsigned char nodeNr;
  78. unsigned short registerNr;
  79. unsigned char size;
  80. /* VAR_OUTPUT (analog) */
  81. unsigned short status;
  82. unsigned long value;
  83. /* VAR (analog) */
  84. unsigned short i_state;
  85. unsigned short i_result;
  86. unsigned long i_tmp;
  87. /* VAR_INPUT (digital) */
  88. plcbit enable;
  89. } AsIOAccReadReg_typ;
  90. typedef struct AsIOAccWriteReg
  91. {
  92. /* VAR_INPUT (analog) */
  93. unsigned char nodeNr;
  94. unsigned short registerNr;
  95. unsigned char size;
  96. unsigned long value;
  97. /* VAR_OUTPUT (analog) */
  98. unsigned short status;
  99. /* VAR (analog) */
  100. unsigned short i_state;
  101. unsigned short i_result;
  102. unsigned long i_tmp;
  103. /* VAR_INPUT (digital) */
  104. plcbit enable;
  105. } AsIOAccWriteReg_typ;
  106. /* Prototyping of functions and function blocks */
  107. _BUR_PUBLIC void AsIOAccRead(struct AsIOAccRead* inst);
  108. _BUR_PUBLIC void AsIOAccWrite(struct AsIOAccWrite* inst);
  109. _BUR_PUBLIC void AsIOAccReadReg(struct AsIOAccReadReg* inst);
  110. _BUR_PUBLIC void AsIOAccWriteReg(struct AsIOAccWriteReg* inst);
  111. #ifdef __cplusplus
  112. };
  113. #endif
  114. #endif /* _ASIOACC_ */