Siemens SIMATIC TIWAY 1 Especificaciones Pagina 83

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 207
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 82
DirectNET Host
Communications Prog.
6–2
DirectNET Host Communications Programs
Why do you need a communications program?
Since DirectNET is a master / slave network, the master station must initiate
requests for network data transfers. If youre using a host as the master station, you
will need to use a communications program written with the DirectNET protocol.
The communications program used with a hosted network is more complex than the
simple RLL instructions used with the other configurations, but the concept is the
same. The host is the DirectNET master and must use a DirectNET protocol
communications program to initiate all network requests to read or write data. These
communication programs can be written in many different languages, such as
BASIC, C, etc. and must include the appropriate DirectNET commands.
Here’s an example of a DirectNET program. (This is just part of the program.)
DirectNET Program in BASIC
10 REM Program to read X0X7 from a DL405 PLC
20 REM
30 REM Define all variables
40 REM
50 REM Change the slave address in HEX at line 60 if required.
60 SLAVEADDRESS=&H1
70 DATATYPE$=CHR$(&H32)
80 DATAADDR$=CHR$(&H30)+CHR$(&H31)+CHR$(&H30)+CHR$(&H31)
90 COMPLETEBLK$=CHR$(&H30)+CHR$(&H30)
100 PARTBLK$=CHR$(&H30)+CHR$(&H32)
110 MASTERADDR$=CHR$(&H30)+CHR$(&H30)
120 NORMAL$=CHR$(&H4E)
130 SLAVEADDR$=HEX$(SLAVEADDRESS)
140 IF LEN(SLAVEADDR$)<2 THEN SLAVEADDR$=”0”+SLAVEADDR$
150 OFFSETADDR$=CHR$(&H20+SLAVEADDRESS)
NOTE: This manual does not show you how to build communications programs that
manage the data storage and communications ports. You should check the
documentation that came with your programming software to determine the
appropriate techniques to solve these requirements.
The Master
Initiates Requests
DirectNET
Programs
Vista de pagina 82
1 2 ... 78 79 80 81 82 83 84 85 86 87 88 ... 206 207

Comentarios a estos manuales

Sin comentarios