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

  • 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 266

Appendix B

B-136
Description
Use TAG_WRITE_W to write data to a tagged memory area. This
function writes the data, then it waits until a corresponding
TAG_READ_W is posted. This function guarantees that the write data
area is semaphored during the write operation.
C Example
unsigned my_fred;
unsigned status;
my_fred = 42;
.
.
.
status = TAG_WRITE_W (“Fred”,0,sizeof(my_fred),&my_fred,30);
BASIC Example
The BASIC function code is 67.
DIM status : INTEGER
DIM tag_id : INTEGER
DIM w_data : INTEGER
.
.
.
rem * TAG_WRITE_W - write 4 bytes to a tag, starting at offset 0 from
rem * w_data with a timeout of 30 seconds. This function
rem * will return only after the tag has been read by
rem * TAG_READ_W or a timeout.
RUN AB_BAS (67,status,tag_id,0,4,ADDR(w_data),30)
.
.
.
References
TAG_LINK(); TAG_DEFINE(); TAG_UNDEF();
TAG_GLOBAL_UNDEF(); TAG_READ(); TAG_LOCK();
TAG_UNLOCK(); TAG_READ_W(); TAG_WRITE();
Zobrazit stránku 266
1 2 ... 262 263 264 265 266 267 268 269 270 271 272 ... 311 312

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

Žádné komentáře