Rockwell-automation AutoMax ControlNet Communication Interface Module Manual de usuario Pagina 49

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 80
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 48
AutoMax ControlNet Module Page 49
Publication number DSMBCN-UM001B-EN-P February 2003
module to be read from
20 LOCAL DST% \! The address of the destination node &
on the local ControlNet network
21 LOCAL STS% \! The location where the status &
resulting from the operation is stored
22 LOCAL SZE% \! The number of registers to be &
transferred
23 LOCAL CMD% \! The PCCC command sent by the module
30 DST% = 3
31 STS% = 0
32 SZE% = 100
33 CMD% = 6
40 IF NOT GATEWAY_CMD_OK@(STS%, CMD%, DST%, "N7:0", &
VARPTR!(B3BASE%), SZE%) THEN 20000 \! process errors &
at line 20000
Example 4: Command 7, Typed Write
In the example below, the module is writing 100 words from the local N7
file to the file address N10:10 in the PLC at node address 7. The variable
N7BASE% is defined in the rack configuration.
10 COMMON N7BASE% \! Represents the physical address of &
the starting register on the &
module to be written to
20 LOCAL DST% \! The address of the destination node &
on the local network
21 LOCAL STS% \! The location where the status &
resulting from the operation is stored
22 LOCAL SZE% \! The number of registers to be &
transferred
23 LOCAL CMD% \! The PCCC command sent by the module
30 DST% = 7
31 STS% = 0
32 SZE% = 100
33 CMD% = 7
40 IF NOT GATEWAY_CMD_OK@(STS%, CMD%, DST%, "N10:10",&
VARPTR!(N7BASE%), SZE%) THEN 20000 \!process errors &
at line 20000
Example 5: Command 5, Read-Modify-Write
In the example below, the module writes to three addresses in a PLC,
N7:0, N7:2, and N7:4. The AND/OR mask pairs are stored in three
consecutive pairs of registers starting at B3BASE%. The variable
B3BASE% is defined in the rack configuration.
10 COMMON B3BASE% \! Represents the physical address of &
the starting register on the &
Vista de pagina 48
1 2 ... 44 45 46 47 48 49 50 51 52 53 54 ... 79 80

Comentarios a estos manuales

Sin comentarios