Rockwell-automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User M Uživatelský manuál Strana 239

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 312
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 238

Appendix B

B-108
BASIC Example
The BASIC function code is 43.
DIM status : INTEGER
DIM iostat : INTEGER
DIM msgwbuf(5) : INTEGER
.
.
.
rem * MSG_WRITE_W_HANDLER - Set up handler to allow for an asynchronous message
rem * write of msgwbuf. This function will return to the
rem * user befor completion of the I/O. MSG_WAIT must be
rem * called to complete the I/O process. Size of buffer
rem * is 20 bytes, message number is 0, umber of items
rem * to read is 5, the timeout value is 6 seconds, the
rem * coprocessor data type is integer, the plc data type
rem * is short and iostat gets the I/O completion code.
RUN AB_BAS (43,status,ADDR(msgwbuf(1)),20,1,5,6,5,3,ADDR(iostat))
.
.
.
References
MSG_READ_HANDLER(); MSG_WAIT(); MSG_CLR_MASK();
MSG_SET_MASK(); MSG_TST_MASK(); MSG_ZERO_MASK();
Also see synchronous functions:
MSG_WRITE_W_HANDLER(); MSG_READ_W_HANDLER();
Zobrazit stránku 238
1 2 ... 234 235 236 237 238 239 240 241 242 243 244 ... 311 312

Komentáře k této Příručce

Žádné komentáře