AsIOAcc.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 _IEC_CONST
  12. #define _IEC_CONST _WEAK const
  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. _IEC_CONST unsigned short ioacERR_ACCESS = 30196U;
  25. _IEC_CONST unsigned short ioacERR_PARAMETER = 30195U;
  26. _IEC_CONST unsigned short ioacERR_NOTSUPPORTED = 30194U;
  27. _IEC_CONST unsigned short ioacERR_TIMEOUT = 30193U;
  28. _IEC_CONST unsigned short ioacERR_CHANNEL = 30192U;
  29. _IEC_CONST unsigned short ioacERR_DEVICE = 30191U;
  30. _IEC_CONST unsigned short ioacERR_INTERNAL = 30190U;
  31. #endif
  32. /* Datatypes and datatypes of function blocks */
  33. typedef struct IOAC_I_TYPE
  34. { unsigned short StateMan;
  35. unsigned short ErrMan;
  36. unsigned long Init;
  37. unsigned long Taskhandle;
  38. unsigned long Semaphore;
  39. unsigned long Requestsize;
  40. unsigned long Answersize;
  41. unsigned long pAccessObj;
  42. unsigned long Offset;
  43. unsigned long flags;
  44. } IOAC_I_TYPE;
  45. typedef struct AsIOAccReadReg
  46. {
  47. /* VAR_INPUT (analog) */
  48. unsigned char nodeNr;
  49. unsigned short registerNr;
  50. unsigned char size;
  51. /* VAR_OUTPUT (analog) */
  52. unsigned short status;
  53. unsigned long value;
  54. /* VAR (analog) */
  55. unsigned short i_state;
  56. unsigned short i_result;
  57. unsigned long i_tmp;
  58. /* VAR_INPUT (digital) */
  59. plcbit enable;
  60. } AsIOAccReadReg_typ;
  61. typedef struct AsIOAccWriteReg
  62. {
  63. /* VAR_INPUT (analog) */
  64. unsigned char nodeNr;
  65. unsigned short registerNr;
  66. unsigned char size;
  67. unsigned long value;
  68. /* VAR_OUTPUT (analog) */
  69. unsigned short status;
  70. /* VAR (analog) */
  71. unsigned short i_state;
  72. unsigned short i_result;
  73. unsigned long i_tmp;
  74. /* VAR_INPUT (digital) */
  75. plcbit enable;
  76. } AsIOAccWriteReg_typ;
  77. /* Prototyping of functions and function blocks */
  78. void AsIOAccReadReg(struct AsIOAccReadReg* inst);
  79. void AsIOAccWriteReg(struct AsIOAccWriteReg* inst);
  80. #ifdef __cplusplus
  81. };
  82. #endif
  83. #endif /* _ASIOACC_ */