You are on page 1of 133

REDES INDUSTRIALES. ING. ALFONSO PEREZ GARCIA. INSTITUTO TECNLOGICO DE SAN LUIS POTOSI.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

INDICE

2 DE 133

INDICE.

PROGRAMA Prcticas. BIBLIOGRAFIA. UNIDAD 1 MODELO OSI


1.1 El modelo OSI. Modelo OSI
Historia Modelo de referencia OSI Capa Fsica (Capa 1) Codificacin de la seal Topologa y medios compartidos Equipos adicionales Capa de enlace de datos (Capa 2) Capa de red (Capa 3) Capa de transporte (Capa 4) Capa de sesin (Capa 5) Capa de presentacin (Capa 6) Capa de aplicacin (Capa 7) Unidades de datos Transmisin de los datos Formato de los datos Operaciones sobre los datos Bloqueo y desbloqueo Concatenacin y separacin

6 7 7 9
9 9
9 10 10 11 11 11 12 12 12 13 13 14 14 16 17 18 18 18

Vase tambin Enlaces externos 1.2 Su relacin con las redes industriales Red industrial
INTRODUCCIN LA TECNOLOGA DE BUSES DE CAMPO ALGUNOS TIPOS DE BUS CLASIFICACION DE LAS REDES INDUSTRIALES. COMPONENTES DE LAS REDES INDUSTRIALES. TOPOLOGIA DE REDES INDUSTRIALES BENEFICIOS DE UNA RED INDUSTRIAL REDES INDUSTRIALES CON PLC SOLUCIONES CON ETHERNET CONCLUSION

18 18 18 19
19 19 20 21 21 22 22 22 22 23

UNIDAD 2 LAYERS FISICOS


2.1 Los estandares RS232, IEEE-488 y RS485 RS-232
Scope of the standard History Limitations of the standard Role in modern personal computers Standard details Conventions RTS/CTS handshaking 3-wire and 5-wire RS-232 ING. ALFONSO PEREZ GARCIA

Enlaces externos

23 24 24
24 24 25 26 26 33 33 33

24

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

INDICE Seldom used features Signal rate selection Loopback testing Timing signals Secondary channel Related standards

3 DE 133 33 34 34 34 34 35

See also References External links


EIA-485 Waveform example References See also External links

36 37 37
38 40 42 42 42

Interface Converter RS232 to RS485 cable pinout IEEE-488


History Applications Signals Connectors

43 48
50 50 51 53

See also References External links 2.2 El lazo de corriente 4-20 Ma y HART HART Protocol
Analog/digital mode Multidrop mode Packet Structure

53 53 53 55 55
56 56 56

UNIDAD 3 FIELDBUS

External links

58

59

3.1 INTRODUCCION. 59 ANALISIS DEL ESTADO DEL ARTE DE LOS BUSES DE CAMPO APLICADOS AL CONTROL DE PROCESOS INDUSTRIALES 59
RESUMEN 1. INTRODUCCIN 2. VENTAJAS DE LOS BUSES DE CAMPO 3. BUSES DE CAMPO EXISTENTES 4. ALGUNOS BUSES ESTANDARIZADOS 5. LA GUERRA DE LOS BUSES. 6. CONCLUSIONES BIBLIOGRAFIA 59 59 60 62 63 70 71 71

UNIDAD 4 BITBUS

3.2 ESPECIFICACION. 3.3 APLICACIONES. 4.1 INTRODUCCION. Cableado y terminaciones Conectores Estructura Tipos de nodos Modos de sincronizacin Codificacin Trama del mensaje

73 73 74 74 74 74 75 75 76 76

74

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

INDICE Flag Direccin esclavo Control Informacin CRC

4 DE 133 76 76 78 79 79

Trama del campo de informacin


Longitud de informacin Tipo de mensaje (MT) Fuente de la orden (SE) Destino de la orden (DE) Pista (TR) 4 bits reservados Direccin esclavo Codificacin de tareas Tareas usuario/Errores Datos

79
79 79 79 80 80 80 80 80 81 81

Registros de estado y contadores de secuencia Bibliografa

81 83

What is BITBUS?
What is the History of BITBUS? What are the Features of the iDCX 51 real time operating system? Can I still get BITBUS software? Can I still get BITBUS hardware? Can I still get BITBUS documentation?

84
84 85 85 85 86

BITBUS Basics UNIDAD 5 ASi

87
97 97 98 98
98 99

4.2 ESPECIFICACION. 4.3 APLICACIONES. 5.1 INTRODUCCION. AS-interface

98

AS-Interface

Caractersticas principales Enlaces externos

99
102 103 103 104 104
104 104 104 105

UNIDAD 6 CAN

External links 5.2 ESPECIFICACION. 5.3 APLICACIONES. 6.1 INTRODUCCION. Controller Area Network
Origins Applications CAN Network Testing Technology

104

UNIDAD 7 DEVICENET
7.1 INTRODUCCION DeviceNet
History ING. ALFONSO PEREZ GARCIA

See also References External links 6.2 ESPECIFICACION. 6.3 APLICACIONES.

115 115 115 117 117 118 118


118 INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

118

INDICE Technical Snapshot Architecture Conformance Test Sources

5 DE 133 118 119 120 122

UNIDAD 8 PROFIBUS
8.1 INTRODUCCION. Profibus Vase tambin Enlaces externos Profibus
From Wikipedia, the free encyclopedia Retrieved from "http://en.wikipedia.org/wiki/Profibus" Origin Use Technology Standardization Organization

7.2 ESPECIFICACION. 7.3 APLICACIONES.

124 124 125 125 125 125 126


126 126 126 126 127 129 129

125

References External links 8.2 ESPECIFICACION. 8.3 APLICACIONES.

129 129 130 130

UNIDAD 9 ETHERNET
9.1 INTRODUCCION. PROFINET
Technology PROFINET CBA PROFINET IO Organization Weblinks

131
131 131
131 131 131 132 132

9.2 ESPECIFICACION. 9.3 APLICACIONES.

133 133

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

PROGRAMA

6 DE 133

PROGRAMA
S.E.P. DIRECCIN GENERAL DE INSTITUTOS TECNOLGICOS S.E.l.T 1. IDENTIFICACION DEL PROGRAMA DESARROLLADO POR UNIDADES DE APRENDIZAJE. NOMBRE DE LA ASIGNATURA: NIVEL: CARRERA: CLAVE: REDES INDUSTRIALES (3-2-8). LICENCIATURA. INGENIERIA ELECTRONICA. ECM 0705

NUMER O 1 2

TEMA MODELO OSI LAYERS FISICOS

SUBTEMAS: 1.1 El modelo OSI. 1.2 Su relacin con las redes industriales 2.1 Los estandares RS232, RS488 y RS485 2.2 El lazo de corriente 420 Ma y HART 3.1 INTRODUCCION. 3.2 ESPECIFICACION. 4.1 INTRODUCCION. 4.2 ESPECIFICACION. 5.1 INTRODUCCION. 5.2 ESPECIFICACION. 6.1 INTRODUCCION. 6.2 ESPECIFICACION. 7.1 INTRODUCCION 7.2 ESPECIFICACION. 8.1 INTRODUCCION. 8.2 ESPECIFICACION. 9.1 INTRODUCCION. 9.2 ESPECIFICACION.

DURACIO EVAL. N 1 100% SEMANAS EE 1 100% SEMANAS EE

3 4 5 6 7 8 9

FIELDBUS BITBUS ASi CAN DEVICENET PROFIBUS ETHERNET

3.3 APLICACIONES. 4.3 APLICACIONES. 5.3 APLICACIONES. 6.3 APLICACIONES. 7.3 APLICACIONES. 8.3 APLICACIONES. 9.3 APLICACIONES.

2 SEMANAS 2 SEMANA 2 SEMANAS 2 SEMANAS 2 SEMANA 2 SEMANA 2 SEMANA

100% EE 100% EE 100% EE 100% EE 100% EE 100% EE 100% EE

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

PROGRAMA

7 DE 133

Prcticas.
NUMERO DE PRACTICA. 1 2 3 DESCRIPCION (TEMA). Red simple con protocolo HART Red simple de actuadores y sensores digitales con ASi. Red simple con protocolo Ethernet. 2 5 9 UNIDAD.

BIBLIOGRAFIA.
AUTOR

1 Steve Mackay, Edwin Wright, Deon Reynders, John Park 2 Franco Davoli, Sergio Palazzo, Distributed Cooperative Laboratories: Networking, Sandro Zappatore Instrumentation, and Measurements (Signals and Communication Technology) 3 N. P. Mahalik Fieldbus Technology: Industrial Network Standards for Real-Time Distributed Control (Hardcover) NOMBRE HOW STUFF WORKS ESNIPS PAGINA PROFE FAIRCHILD SEMICONDUCTORS B&B ELECTRONICS. DIRECCION WWW.HOWSTUFFWORKS.COM DEL WWW.ESNIPS.COM/WEB/REDESINDUSTRIA LES WWW.FAIRCHILDSEMI.COM WWW.BB-ELEC.COM WWW.HARTCOMM.ORG WWW.FIELBUS.ORG

TITULO Practical Industrial Data Networks: Design, Installation and Troubleshooting (IDC Technology (Paperback)) (Paperback)

EDITORIAL

Newnes (July 2003) Springer; 1 edition (April 5, 2006) Springer; 1 edition (October 19, 2005) TEMAS

TODOS TODOS OPTOACOPLADORES RS232, RS488 Y RS485 HART PROTOCOL FIELDBUS ORGANIZATION

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

PROGRAMA

8 DE 133

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI

9 DE 133

UNIDAD 1 MODELO OSI


1.1 El modelo OSI. Modelo OSI
De Wikipedia, la enciclopedia libre

El modelo de referencia de Interconexin de Sistemas Abiertos (OSI, Open System Interconnection) lanzado en 1984 fue el modelo de red descriptivo creado por ISO.
Historia

A principios de la dcada de 1980 el desarrollo de redes sucedi con desorden en muchos sentidos. Se produjo un enorme crecimiento en la cantidad y el tamao de las redes. A medida que las empresas tomaron conciencia de las ventajas de usar tecnologa de networking, las redes se agregaban o expandan a casi la misma velocidad a la que se introducan las nuevas tecnologas de red. Para mediados de la dcada de 1980, estas empresas comenzaron a sufrir las consecuencias de la rpida expansin. De la misma forma en que las personas que no hablan un mismo idioma tienen dificultades para comunicarse, las redes que utilizaban diferentes especificaciones e implementaciones tenan dificultades para intercambiar informacin. El mismo problema surga con las empresas que desarrollaban tecnologas de networking privadas o propietarias. "Propietario" significa que una sola empresa o un pequeo grupo de empresas controla todo uso de la tecnologa. Las tecnologas de networking que respetaban reglas propietarias en forma estricta no podan comunicarse con tecnologas que usaban reglas propietarias diferentes. Para enfrentar el problema de incompatibilidad de redes, la Organizacin Internacional para la Estandarizacin (ISO) investig modelos de networking como la red de Digital Equipment Corporation (DECnet), la Arquitectura de Sistemas de Red (SNA) y TCP/IP a fin de encontrar un conjunto de reglas aplicables de forma general a todas las redes. Con base en esta investigacin, la ISO desarroll un modelo de red que ayuda a los fabricantes a crear redes que sean compatibles con otras redes.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI Modelo de referencia OSI

10 DE 133

Siguiendo el esquema de este modelo se crearon numerosos protocolos, por ejemplo X.25, que durante muchos aos ocuparon el centro de la escena de las comunicaciones informticas. El advenimiento de protocolos ms flexibles donde las capas no estn tan demarcadas y la correspondencia con los niveles no era tan clara puso a este esquema en un segundo plano. Sin embargo sigue siendo muy usado en la enseanza como una manera de mostrar como puede estructurarse una "pila" de protocolos de comunicaciones (sin importar su poca correspondencia con la realidad). El modelo en s mismo no puede ser considerado una arquitectura, ya que no especifica el protocolo que debe ser usado en cada capa, sino que suele hablarse de modelo de referencia. Este modelo est dividido en siete capas:
Capa Fsica (Capa 1)

Artculo principal: Nivel fsico

La Capa Fsica del modelo de referencia OSI es la que se encarga de las conexiones fsicas de la computadora hacia la red, tanto en lo que se refiere al medio fsico (medios guiados: cable coaxial, cable de par trenzado, fibra ptica y otros tipos de cables; medios no guiados: radio, infrarrojos, microondas, lser y otras redes inalmbricas); caractersticas del medio (p.e. tipo de cable o calidad del mismo; tipo de conectores normalizados o en su caso tipo de antena; etc.) y la forma en la que se transmite la informacin (codificacin de seal, niveles de tensin/intensidad de corriente elctrica, modulacin, tasa binaria, etc.) Es la encargada de transmitir los bits de informacin a travs del medio utilizado para la transmisin. Se ocupa de las propiedades fsicas y caractersticas elctricas de los diversos componentes; de la velocidad de transmisin, si sta es uni o bidireccional (smplex, dplex o full-dplex). Tambin de aspectos mecnicos de las conexiones y terminales, incluyendo la interpretacin de las seales elctricas/electromagnticas. Se encarga de transformar una trama de datos proveniente del nivel de enlace en una seal adecuada al medio fsico utilizado en la transmisin. Estos impulsos pueden ser elctricos (transmisin por cable) o electromagnticos (transmisin sin cables). Estos ltimos, dependiendo de la frecuencia / longitud de onda de la seal pueden ser pticos, de micro-ondas o de radio. Cuando acta en modo recepcin el trabajo es inverso; se encarga de transformar la seal transmitida en tramas de datos binarios que sern entregados al nivel de enlace. Sus principales funciones se pueden resumir como:

Definir el medio o medios fsicos por los que va a viajar la comunicacin: cable de pares trenzados (o no, como en RS232/EIA232), coaxial, guas de onda, aire, fibra ptica.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI

11 DE 133

Definir las caractersticas materiales (componentes y conectores mecnicos) y elctricas (niveles de tensin) que se van a usar en la transmisin de los datos por los medios fsicos. Definir las caractersticas funcionales de la interfaz (establecimiento, mantenimiento y liberacin del enlace fsico). Transmitir el flujo de bits a travs del medio. Manejar las seales elctricas/electromagnticas Especificar cables, conectores y componentes de interfaz con el medio de transmisin, polos en un enchufe, etc. Garantizar la conexin (aunque no la fiabilidad de sta).

Codificacin de la seal

El nivel fsico recibe una trama binaria que debe convertir a una seal elctrica, electromagntica u otra dependiendo del medio, de tal forma que a pesar de la degradacin que pueda sufrir en el medio de transmisin vuelva a ser interpretable correctamente en el receptor. En el caso ms sencillo el medio es directamente digital, como en el caso de las fibras pticas, dado que por ellas se transmiten pulsos de luz. Cuando el medio no es digital hay que codificar la seal, en los casos ms sencillos la codificacin puede ser por pulsos de tensin (PCM o Pulse Code Modulatin) (por ejemplo 5 V para los "unos" y 0 V para los "ceros"), es lo que se llaman codificacin unipolar RZ. Otros medios se codifican mediante presencia o ausencia de corriente. En general estas codificaciones son muy simples y no usan bien la capacidad de medio. Cuando se quiere sacar ms partido al medio se usan tcnicas de modulacin ms complejas, y suelen ser muy dependientes de las caractersticas del medio concreto. En los casos ms complejos, como suelen ser las comunicaciones inalmbricas, se pueden dar modulaciones muy sofisticadas, este es el caso de los estndares WiFi, con tcnicas de modulacin complejas de espectro ensanchado
Topologa y medios compartidos

Indirectamente, el tipo de conexin que se haga en la capa fsica puede influir en el diseo de la capa de Enlace. Atendiendo al nmero de equipos que comparten un medio hay dos posibilidades: Conexiones punto a punto: que se establecen entre dos equipos y que no admiten ser compartidas por terceros Conexiones multipunto: en la que ms de dos equipos pueden usar el medio. As por ejemplo la fibra ptica no permite fcilmente conexiones multipunto (sin embargo, vase FDDI) y por el contrario las conexiones inalmbricas son inherentemente multipunto (sin embargo, vanse los enlaces infrarrojos). Hay topologas como el anillo, que permiten conectar muchas mquinas a partir de una serie de conexiones punto a punto.
Equipos adicionales

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI

12 DE 133

A la hora de disear una red hay equipos adicionales que pueden funcionar a nivel fsico, se trata de los repetidores, en esencia se trata de equipos que amplifican la seal, pudiendo tambin regenerarla. En las redes Ethernet con la opcin de cableado de par trenzado (la ms comn hoy por hoy) se emplean unos equipos de interconexin llamados concentradores (repetidores en las redes 10Base-2) ms conocidos por su nombre en ingls (hubs) que convierten una topologa fsica en estrella en un bus lgico y que actan exclusivamente a nivel fsico, a diferencia de los conmutadores (switches) que actan a nivel de enlace.
Capa de enlace de datos (Capa 2)

Artculo principal: Nivel de enlace de datos

Cualquier medio de transmisin debe ser capaz de proporcionar una transmisin sin errores, es decir, un trnsito de datos fiable a travs de un enlace fsico. Debe crear y reconocer los lmites de las tramas, as como resolver los problemas derivados del deterioro, prdida o duplicidad de las tramas. Tambin puede incluir algn mecanismo de regulacin del trfico que evite la saturacin de un receptor que sea ms lento que el emisor. La capa de enlace de datos se ocupa del direccionamiento fsico, de la topologa de la red, del acceso a la red, de la notificacin de errores, de la distribucin ordenada de tramas y del control del flujo. Se hace un direccionamiento de los datos en la red ya sea en la distribucin adecuada desde un emisor a un receptor, la notificacin de errores, de la topologa de la red de cualquier tipo. La tarjeta NIC (Network Interface Card, Tarjeta de Interfaz de Red en espaol o Tarjeta de Red) que se encarga que tengamos conexin, posee una direccin MAC (control de acceso al medio) y la LLC (control de enlace lgico). La PDU de la capa 2 es la trama.
Capa de red (Capa 3)

Artculo principal: Nivel de red

El cometido de la capa de red es hacer que los datos lleguen desde el origen al destino, an cuando ambos no estn conectados directamente. Los dispositivos que facilitan tal tarea se denominan en castellano encaminadores, aunque es ms frecuente encontrar el nombre ingls routers y, en ocasiones enrutadores. Adicionalmente la capa de red debe gestionar la congestin de red, que es el fenmeno que se produce cuando una saturacin de un nodo tira abajo toda la red (similar a un atasco en un cruce importante en una ciudad grande). La PDU de la capa 3 es el paquete. Los switch tambin pueden trabajar en esta capa dependiendo de la funcin que se le asigne.
Capa de transporte (Capa 4)

Artculo principal: Nivel de transporte

Su funcin bsica es aceptar los datos enviados por las capas superiores, dividirlos en pequeas partes si es necesario, y pasarlos a la capa de red. En el caso del modelo OSI, tambin se asegura que lleguen correctamente al otro lado
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI

13 DE 133

de la comunicacin. Otra caracterstica a destacar es que debe aislar a las capas superiores de las distintas posibles implementaciones de tecnologas de red en las capas inferiores, lo que la convierte en el corazn de la comunicacin. En esta capa se proveen servicios de conexin para la capa de sesin que sern utilizados finalmente por los usuarios de la red al enviar y recibir paquetes. Estos servicios estarn asociados al tipo de comunicacin empleada, la cual puede ser diferente segn el requerimiento que se le haga a la capa de transporte. Por ejemplo, la comunicacin puede ser manejada para que los paquetes sean entregados en el orden exacto en que se enviaron, asegurando una comunicacin punto a punto libre de errores, o sin tener en cuenta el orden de envo. Una de las dos modalidades debe establecerse antes de comenzar la comunicacin para que una sesin determinada enve paquetes, y se ser el tipo de servicio brindado por la capa de transporte hasta que la sesin finalice. De la explicacin del funcionamiento de esta capa se desprende que no est tan encadenada a capas inferiores como en el caso de las capas 1 a 3, sino que el servicio a prestar se determina cada vez que una sesin desea establecer una comunicacin. Todo el servicio que presta la capa est gestionado por las cabeceras que agrega al paquete a transmitir. En resumen, podemos definir a la capa de transporte como: Capa encargada de efectuar el transporte de los datos (que se encuentran dentro del paquete) de la mquina origen a la destino, independizndolo del tipo de red fsica que se est utilizando. La PDU de la capa 4 se llama Segmentos.
Capa de sesin (Capa 5)

Artculo principal: Nivel de sesin

Esta capa Establece, gestiona y finaliza las conexiones entre usuarios (procesos o aplicaciones) finales. Ofrece varios servicios que son cruciales para la comunicacin, como son: Control de la sesin a establecer entre el emisor y el receptor (quin transmite, quin escucha y seguimiento de sta). Control de la concurrencia (que dos comunicaciones a la misma operacin crtica no se efecten al mismo tiempo). Mantener puntos de verificacin (checkpoints), que sirven para que, ante una interrupcin de transmisin por cualquier causa, la misma se pueda reanudar desde el ltimo punto de verificacin en lugar de repetirla desde el principio. Por lo tanto, el servicio provisto por esta capa es la capacidad de asegurar que, dada una sesin establecida entre dos mquinas, la misma se pueda efectuar para las operaciones definidas de principio a fin, reanudndolas en caso de interrupcin. En muchos casos, los servicios de la capa de sesin son parcialmente, o incluso, totalmente prescindibles. En conclusin esta capa es la que se encarga de mantener el enlace entre los dos computadores que estn trasmitiendo archivos.
Capa de presentacin (Capa 6)

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI

14 DE 133

El objetivo de la capa de presentacin es encargarse de la representacin de la informacin, de manera que aunque distintos equipos puedan tener diferentes representaciones internas de caracteres (ASCII, Unicode, EBCDIC), nmeros (littleendian tipo Intel, big-endian tipo Motorola), sonido o imgenes, los datos lleguen de manera reconocible. Esta capa es la primera en trabajar ms el contenido de la comunicacin que cmo se establece la misma. En ella se tratan aspectos tales como la semntica y la sintaxis de los datos transmitidos, ya que distintas computadoras pueden tener diferentes formas de manejarlas. Por lo tanto, podemos resumir definiendo a esta capa como la encargada de manejar las estructuras de datos abstractas y realizar las conversiones de representacin de datos necesarias para la correcta interpretacin de los mismos. Esta capa tambin permite cifrar los datos y comprimirlos. En pocas palabras es un traductor
Capa de aplicacin (Capa 7)

Ofrece a las aplicaciones(de usuario o no) la posibilidad de acceder a los servicios de las dems capas y define los protocolos que utilizan las aplicaciones para intercambiar datos, como correo electrnico (POP y SMTP), gestores de bases de datos y servidor de ficheros (FTP). Hay tantos protocolos como aplicaciones distintas y puesto que continuamente se desarrollan nuevas aplicaciones el nmero de protocolos crece sin parar. Cabe aclarar que el usuario normalmente no interacta directamente con el nivel de aplicacin. Suele interactuar con programas que a su vez interactan con el nivel de aplicacin pero ocultando la complejidad subyacente. As por ejemplo un usuario no manda una peticin "HTTP/1.0 GET index.html" para conseguir una pgina en html, ni lee directamente el cdigo html/xml. Entre los protocolos (refirindose a protocolos genricos, no a protocolos de la capa de aplicacin de OSI) ms conocidos destacan: HTTP (HyperText Transfer Protocol) el protocolo bajo la www FTP (File Transfer Protocol) ( FTAM, fuera de TCP/IP) transferencia de ficheros SMTP (Simple Mail Transfer Protocol) (X.400 fuera de tcp/ip) envo y distribucin de correo electrnico POP (Post Office Protocol)/IMAP: reparto de correo al usuario final SSH (Secure SHell) principalmente terminal remoto, aunque en realidad cifra casi cualquier tipo de transmisin. Telnet otro terminal remoto, ha cado en desuso por su inseguridad intrnseca, ya que las claves viajan sin cifrar por la red. Hay otros protocolos de nivel de aplicacin que facilitan el uso y administracin de la red: SNMP (Simple Network Management Protocol) DNS (Domain Name System)
Unidades de datos

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI

15 DE 133

El intercambio de informacin entre dos capas OSI consiste en que cada capa en el sistema fuente le agrega informacin de control a los datos, y cada capa en el sistema de destino analiza y remueve la informacin de control de los datos como sigue: Si un ordenador (host A) desea enviar datos a otro (host B), en primer trmino los datos deben empaquetarse a travs de un proceso denominado encapsulamiento, es decir, a medida que los datos se desplazan a travs de las capas del modelo OSI, reciben encabezados, informacin final y otros tipos de informacin.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI

16 DE 133

N-PDU (Unidad de datos de protocolo) Es la informacin intercambiada entre entidades pares,es decir,dos entidades pertenecientes a la misma capa pero en dos sistemas diferentes, utilizando una conexin(N-1). Esta compuesta por: N-SDU (Unidad de datos del servicio) Son los datos que se necesitan la entidades(N) para realizar funciones del servicio pedido por la entidad(N+1). N-PCI (Informacin de control del protocolo) Informacin intercambiada entre entidades (N) utilizando una conexin (N1) para coordinar su operacin conjunta. N-IDU (Unidad de datos del interface) Es la informacin transferida entre dos niveles adyacentes,es decir, dos capas contiguas. Esta compuesta por: N-ICI (Informacin de control del interface) Informacin intercambiada entre una entidad (N+1) y una entidad (N) para coordinar su operacin conjunta. Datos de Interface-(N) Informacin transferida entre una entidad-(N+1) y una entidad-(N) y que normalmente coincide con la (N+1)-PDU.
Transmisin de los datos

La capa de aplicacin recibe el mensaje del usuario y le aade una cabecera constituyendo as la PDU de la capa de aplicacin. La PDU se transfiere a la capa de aplicacin del nodo destino, este elimina la cabecera y entrega el mensaje al usuario. Para ello ha sido necesario todo este proceso: 1-Ahora hay que entregar la PDU a la capa de presentacin para ello hay que aadirla la correspondiente cabecera ICI y transformarla as en una IDU, la cual se transmite a dicha capa. 2-La capa de presentacin recibe la IDU, le quita la cabecera y extrae la informacin, es decir, la SDU, a esta le aade su propia cabecera (PCI) constituyendo as la PDU de la capa de presentacin. 3- Esta PDU es transferida a su vez a la capa de sesin mediante el mismo proceso, repitindose as para todas las capas. 4-Al llegar al nivel fsico se envan los datos que son recibidos por la capa fsica del receptor. 5-Cada capa del receptor se ocupa de extraer la cabecera, que anteriormente haba aadido su capa homloga, interpretarla y entregar la PDU a la capa superior. 6-Finalmente llegar a la capa de aplicacin la cual entregar el mensaje al usuario.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI

17 DE 133

Formato de los datos

Estos datos reciben una serie de nombres y formatos especficos en funcin de la capa en la que se encuentren, debido a como se describi anteriormente la adhesin de una serie de encabezados e informacin final. Los formatos de informacin son los que muestra el grfico:

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI

18 DE 133

APDU: Unidad de datos en la capa de aplicacin. PPDU: Unidad de datos en la capa de presentacin. SPDU: Unidad de datos en la capa de sesin. TPDU:(segmento) Unidad de datos en la capa de transporte. Paquete: Unidad de datos en el nivel de red. Trama: Unidad de datos en la capa de enlace. Bits: Unidad de datos en la capa fsica.
Operaciones sobre los datos

En determinadas situaciones es necesario realizar una serie de operaciones sobre las PDU para facilitar su transporte, bien debido a que son demasiado grandes o bien porque son demasiado pequeas y estaramos desaprovechando la capacidad del enlace.
Segmentacin y reensamblaje [editar]

Hace corresponder a una (N)-SDU sobre varias (N)-PDU. El reensamblaje hace corresponder a varias (N)-PDUs en una (N)-SDU.
Bloqueo y desbloqueo

El bloqueo hace corresponder varias (N)-SDUs en una (N)-PDU. El desbloqueo identifica varias (N)-SDUs que estn contenidas en una (N)-PDU.
Concatenacin y separacin

La concatenacin es una funcin-(N) que realiza el nivel-(N) y que hace corresponder varias (N)-PDUs en una sola (N-1)-SDU. La separacin identifica varias (N)-PDUs que estn contenidas en una sola (N-1)-SDU. Vase tambin Familia de protocolos de Internet Enlaces externos Estndar ISO 7498-1:1994 (formato ZIP) Cybertelecom Layered Model of Regulation OSI Reference Model The ISO Model of Architecture for Open Systems Interconnection, Hubert Zimmermann, IEEE Transactions on Communications, vol. 28, no. 4, April 1980, pp. 425 - 432. Introduction to Data Communications Internetworking Basics MODELO DE REFERENCIA OSI - Interconexin de Sistemas Abiertos Ctedra Sistemas de Comunicaciones. Universidad Tecnolgica Nacional, Facultad Regional Mendoza, Argentina. 1.2 Su relacin con las redes industriales
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI

19 DE 133

Red industrial
De Wikipedia, la enciclopedia libre Obtenido de "http://es.wikipedia.org/wiki/Red_industrial" INTRODUCCIN

Las redes de comunicaciones industriales deben su origen a la fundacin FieldBus (Redes de campo). La fundacin FieldBus, desarrollo un nuevo protocolo de comunicacin, para la medicin y control de procesos donde todos los instrumentos puedan comunicarse en una misma plataforma. Las comunicaciones entre los instrumentos de proceso y el sistema de control se basan principalmente en seales analgicas (neumticas de 3 a 15 psi en las vlvulas de control y electrnicas de 4 a 20 mA cc). Pero ya existen instrumentos digitales capaces de manejar gran cantidad de datos y guardarlos histricamente; su precisin es diez veces mayor que la de la seal tpica de 4-20 mA cc. En vez de transmitir cada variable por un par de hilos, transmiten secuencialmente las variables por medio de un cable de comunicaciones llamado bus. La tecnologa fieldbus (bus de campo) es un protocolo de comunicaciones digital de alta velocidad que esta creada para remplazar la clsica seal de 4-20 mA que an se utiliza en muchos de los sistemas DCS (Sistema de Control Distribuido) y PLC (Controladores Lgicos Programables), instrumentos de medida y transmisin y vlvulas de control. La arquitectura fieldbus conecta estos instrumentos con computadores que se usan en diferentes niveles de coordinacin y direccin de la planta. Muchos de los protocolos patentados para dichas aplicaciones tiene una limitante y es que el fabricante no permite al usuario final la interoperabilidad de instrumentos, es decir, no es posible intercambiar los instrumentos de un fabricante por otro similar. Es claro que estas tecnologas cerradas tienden a desaparecer ya que actualmente es necesaria la interoperabilidad de sistemas y aparatos y as tener la capacidad de manejar sistemas abiertos y estandarizados. Con el mejoramiento de los protocolos de comunicacin es ahora posible reducir el tiempo necesitado para la transferencia de datos, asegurando la misma, garantizando el tiempo de sincronizacin y el tiempo real de respuesta determinstica en algunas aplicaciones.
LA TECNOLOGA DE BUSES DE CAMPO

Fsicamente podemos considerar a un bus como un conjunto de conductores conectando conjuntamente ms circuitos para permitir el intercambio de datos. Contrario a una conexin punto a punto donde solo dos dispositivos intercambian informacin, un bus consta normalmente de un nmero de usuarios superior, adems que generalmente un bus transmite datos en modo serial, a excepcin de algn protocolo de bus particular como SCSI, o IEEE-488 utilizado para interconexin de instrumentos de medicin, que no es el caso de los buses tratados como buses de campo. Para una transmisin serial es suficiente un nmero de cables muy limitado, generalmente son suficientes dos o tres conductores y la debida proteccin contra las perturbaciones externas para permitir su tendido en ambientes de ruido industrial.
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI Ventajas de un bus de campo

20 DE 133

- El intercambio puede llevar a cabo por medio de un mecanismo estndar. Flexibilidad de extensin. - Conexin de mdulos diferentes en una misma lnea. Posibilidad de conexin de dispositivos de diferentes procedencias. - Distancias operativas superiores al cableado tradicional. - Reduccin masiva de cables y costo asociado. - Simplificacin de la puesta en servicio.
Desventajas de un bus de campo

- Necesidad de conocimientos superiores. - Inversin de instrumentacin y accesorios de diagnstico. - Costos globales inicialmente superiores.
Procesos de comunicacin por medio de bus

El modo ms sencillo de comunicacin con el bus es el sondeo cliente/servidor. Ms eficiente pero tambin ms costoso es el Token bus ( IEEE 802.4), desde el punto de vista fsico tenemos un bus lineal, desde el punto de vista lgico un token ring. El procedimiento token passing es una combinacin entre cliente/servidor y token bus. Todo servidor inteligente puede ser en algn momento servidor.
ALGUNOS TIPOS DE BUS

La mayora de los buses trabajan en el nivel 1 con interfaz RS 485.


ASI (Actuator Sensor Interface)

Es el bus ms inmediato en el nivel de campo y ms sencillo de controlar, consiste en un bus cliente/servidor con un mximo de 31 participantes, transmite por paquetes de solo 4 bits de dato. Es muy veloz, con un ciclo de 5 ms aproximadamente. Alcanza distancias de mximo 100 m.
BITBUS

Es el ms difundido en todo el mundo, es cliente/servidor que admite como mximo 56 clientes, el paquete puede transmitir hasta 43 bytes de dato.
PROFIBUS (PROcess FIeld BUS)

Es el estndar europeo en tecnologa de buses, se encuentra jerrquicamente por encima de ASI y BITBUS, trabaja segn procedimiento hbrido token passing, dispone de 31 participantes hasta un mximo de 127. Su paquete puede transmitir un mximo de 246 Bytes, y el ciclo para 31participantes es de aproximadamente 90 ms. Alcanza una distancia de hasta 22300 m.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI FieldBus en OSI

21 DE 133

En la arquitectura OSI, fieldbus ocupa los niveles 1 (Fsico), 2 (Enlace de Datos) y 7 (Aplicacin); teniendo en cuenta que este ltimo no solo se encarga de la interfaz de usuario sino de aplicaciones especificas dependiendo de cada aplicacin.
CLASIFICACION DE LAS REDES INDUSTRIALES.

Si se clasifican las redes industriales en diferentes categoras basndose en la funcionalidad, se har en:
Buses Actuadores y Sensores

Inicialmente es usado un sensor y un bus actuador en conexin simple, dispositivos discretos con inteligencia limitada, como un foto sensor, un switch limitador o una vlvula solenoide, controladores y consolas terminales.
Buses de Campo y Dispositivos

Estas redes se distinguen por la forma como manejan el tamao del mensaje y el tiempo de respuesta. En general estas redes conectan dispositivos inteligentes en una sola red distribuida.(Delta V de Emmerson) Estas redes ofrecen altos niveles de diagnstico y capacidad de configuracin, generalmente al nivel del poder de procesamiento de los dispositivos ms inteligentes. Son las redes ms sofisticadas que trabajan con control distribuido real entre dispositivos inteligentes, tal es el caso de FIELDBUS FOUNDATION.
COMPONENTES DE LAS REDES INDUSTRIALES.

En grandes redes industriales un simple cable no es suficiente para conectar el conjunto de todos los nodos de la red. Deben definirse topologas y diseos de redes para proveer un aislamiento y conocer los requerimientos de funcionamiento.
Bridge

Con un puente la conexin entre dos diferentes secciones de red, puede tener diferentes caractersticas elctricas y protocolos; adems puede enlazar dos redes diferentes.
Repetidor

El repetidor o amplificador es un dispositivo que intensifica las seales elctricas para que puedan viajar grandes distancias entre nodos. Con este dispositivo se pueden conectar un gran nmero de nodos a la red; adems se pueden adaptar a diferentes medios fsicos como cable coaxial o fibra ptica.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI Gateway

22 DE 133

Un gateway es similar a un puente ya que suministra interoperabilidad entre buses y diferentes tipos de protocolos y adems las aplicaciones pueden comunicarse a travs de l.
Enrutadores

Es un switch "Enrutador" de paquetes de comunicacin entre diferentes segmentos de red que definen la ruta.
TOPOLOGIA DE REDES INDUSTRIALES

Los sistemas industriales usualmente consisten de dos o mas dispositivos, como un sistema industrial puede ser bastante grande debe considerarse la topologa de la red; las topologas ms comunes son: La Red Bus, Red Estrella y Red Hbrida
BENEFICIOS DE UNA RED INDUSTRIAL

- Reduccin de cableado (fsicamente) - Dispositivos inteligentes (funcionalidad y ejecucin) - Control distribuido (Flexibilidad) - Simplificacin de cableado de las nuevas instalaciones - Reduccin de costo en cableado y cajas de conexin Aplicable a todo tipo de sistema de manufactura - Incremento de la confiabilidad de los sistemas de produccin - Optimizacin de los procesos existentes.
REDES INDUSTRIALES CON PLC

Muchos sistemas estn conformados por equipos de diferentes fabricantes y funcionan en diferentes niveles de automatizacin; adems, a menudo se encuentran distanciados entre s; pero sin embargo, se desea que trabajen en forma coordinada para un resultado satisfactorio del proceso. El objetivo principal es la comunicacin totalmente integrada en el sistema. Al usuario, esto le reporta la mxima flexibilidad ya que tambin puede integrar sin problemas productos de otros fabricantes a travs de las interfaces software estandarizadas. En los ltimos aos, las aplicaciones industriales basadas en comunicacin digital se han incrementado haciendo posible la conexin de sensores, actuadores y equipos de control en una planta de procesamiento. De esta manera, la comunicacin entre la sala de control y los instrumentos de campo se han convertido en realidad. La Comunicacin digital debe integrar la informacin provista por los elementos de campo en el sistema de control de procesos.
SOLUCIONES CON ETHERNET

Aunque los buses de campo continuarn dominando las redes industriales, las soluciones basadas en Ethernet se estn utilizando cada vez ms en el sector de las tecnologas de automatizacin, donde las secuencias de procesos y produccin son controladas por un modelo cliente/servidor con controladores, PLC y sistemas
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 1 MODELO OSI

23 DE 133

ERP (Planificacin de los recursos de la empresa), teniendo acceso a cada sensor que se conecta a la red. La implementacin de una red efectiva y segura tambin requiere el uso de conectores apropiados, disponibles en una amplia variedad y para soluciones muy flexibles. Los Gateway son dispositivos de capa de transporte; en donde la capa de aplicacin no necesariamente es software por lo general las aplicaciones son de audio (alarmas), vdeo (vigilancia), monitoreo y control (sensores), conversin anloga/digital y digital/analga. Para la programacin de gateway de alto nivel se utiliza el C++ y para la programacin menos avanzada se hace con hojas de clculo. Estos dispositivos pueden ser programados de tal forma que en caso de una emergencia o un simple cambio a otro proceso no se haga manualmente sino realmente automtico.
CONCLUSION

Hoy en da las tecnologas que triunfan en el mercado son aquellas que ofrecen las mejores ventajas y seguridad a los clientes, cada vez se est acabando con tecnologas cerradas; que en un mundo en proceso de globalizacin, es imposible que sobrevivan. A nivel industrial se est dando un gran cambio, ya que no solo se pretende trabajar con la especificidad de la instrumentacin y el control automtico, sino que existe la necesidad de mantener histricamente informacin de todos los procesos, adems que esta informacin este tambin en tiempo real y que sirva para la toma de decisiones y se pueda as mejorar la calidad de los procesos. Las condiciones extremas a nivel industrial requieren de equipos capaces de soportar elevadas temperaturas, ruido excesivo, polvo, humedad y dems condiciones adversas; pero adems requiere de personal capaz de ver globalmente el sistema de control y automatizacin industrial junto con el sistema de red digital de datos. Enlaces externos redes de comunicacin industrial redes induatriales aplicaciones redes industruales con PLC

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

24 DE 133

UNIDAD 2 LAYERS FISICOS


2.1 Los estandares RS232, IEEE-488 y RS485 RS-232
From Wikipedia, the free encyclopedia Retrieved from "http://en.wikipedia.org/wiki/RS-232"

In telecommunications, RS-232 (Recommended Standard 232) is a standard for serial binary data signals connecting between a DTE (Data terminal equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports. A similar ITU-T standard is V.24.
Scope of the standard

The Electronic Industries Alliance (EIA) standard RS-232-C[1] as of 1969 defines:

Electrical signal characteristics such as voltage levels, signaling rate, timing and slew-rate of signals, voltage withstand level, short-circuit behavior, maximum stray capacitance and cable length. Interface mechanical characteristics, pluggable connectors and pin identification. Functions of each circuit in the interface connector. Standard subsets of interface circuits for selected telecom applications.

The standard does not define such elements as


character encoding (for example, ASCII, Baudot or EBCDIC) the framing of characters in the data stream (bits per character, start/stop bits, parity) protocols for error detection or algorithms for data compression bit rates for transmission, although the standard says it is intended for bit rates lower than 20,000 bits per second. Many modern devices support speeds of 115,200 bps and above power supply to external devices.

Details of character format and transmission bit rate are controlled by the serial port hardware, often a single integrated circuit called a UART that converts data from parallel to serial form. A typical serial port includes specialized driver and receiver integrated circuits to convert between internal logic levels and RS-232 compatible signal levels.
History

The original DTEs were electromechanical teletypewriters and the original DCEs were (usually) modems. When electronic terminals (smart and dumb) began to be used, they were often designed to be interchangeable with teletypes, and so
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

25 DE 133

supported RS-232. The C revision of the standard was issued in 1969 in part to accommodate the electrical characteristics of these devices. Since application to devices such as computers, printers, test instruments, and so on were not considered by the standard, designers implementing an RS-232 compatible interface on their equipment often interpreted the requirements idiosyncratically. Common problems were non-standard pin assignment of circuits on connectors, and incorrect or missing control signals. The lack of adherence to the standards produced a thriving industry of breakout boxes, patch boxes, test equipment, books, and other aids for the connection of disparate equipment. A common deviation from the standard was to drive the signals at a reduced voltage: the standard requires the transmitter to use +12V and -12V, but requires the receiver to distinguish voltages as low as +3V and -3V. Some manufacturers therefore built transmitters that supplied +5V and -5V and labeled them as "RS232 compatible." Later personal computers (and other devices) started to make use of the standard so that they could connect to existing equipment. For many years, an RS-232compatible port was a standard feature for serial communications, such as modem connections, on many computers. It remained in widespread use into the late 1990s. While it has largely been supplanted by other interface standards in computer products, it is still used to connect older designs of peripherals, industrial equipment (such as based on PLCs), and console ports, and special purpose equipment such as a cash drawer for a cash register. The standard has been renamed several times during its history as the sponsoring organization changed its name, and has been variously known as EIA RS 232, EIA 232, and most recently as TIA 232. The standard continues to be revised and updated by the EIA and since 1988 the Telecommunications Industry Association (TIA)[2]. Revision C was issued in a document dated August 1969. Revision D was issued in 1986. The current revision is TIA-232-F Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange, issued in 1997. Changes since Revision C have been in timing and details intended to improve harmonization with the CCITT standard V.24, but equipment built to the current standard will interoperate with older versions.
Limitations of the standard

Because the application of RS-232 has extended far beyond the original purpose of interconnecting a terminal with a modem, successor standards have been developed to address the limitations. Issues with the RS-232 standard include:

The large voltage swings and requirement for positive and negative supplies increases power consumption of the interface and complicates power supply design. The voltage swing requirement also limits the upper speed of a compatible interface. Single-ended signaling referred to a common signal ground limit the noise immunity and transmission distance. Multi-drop (meaning a connection between more than two devices) operation of an RS-232 compatible interface is not defined; while multi-drop

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

26 DE 133

"work-arounds" have been devised, they have limitations in speed and compatibility. Asymmetrical definitions of the two ends of the link make the assignment of the role of a newly developed device problematic; the designer must decide on either a DTE-like or DCE-like interface and which connector pin assignments to use. The handshaking and control lines of the interface are intended for the setup and takedown of a dial-up communication circuit; in particular, the use of handshake lines for flow control is not reliably implemented in many devices. No method for sending power to a device, while a small amount of current can be extracted from the DTR and RTS lines this can only be used for low power devices such as mice. While the standard recommends a connector and pinout, the connector is large by current standards.

Role in modern personal computers

PCI Express x1 card with one RS-232 port Main article: Serial port In the book PC 97 Hardware Design Guide[3], Microsoft deprecated support for the RS-232 compatible serial port of the original IBM PC design. Today, RS-232 is gradually being superseded in personal computers by USB for local communications. Compared with RS-232, USB is faster, has lower voltage levels, and has connectors that are simpler to connect and use. Both standards have software support in popular operating systems. USB is designed to make it easy for device drivers to communicate with hardware. However, there is no direct analog to the terminal programs used to let users communicate directly with serial ports. USB is more complex than the RS 232 standard because it includes a protocol for transferring data to devices. This requires more software to support the protocol used. RS 232 only standardizes the voltage of signals and the functions of the physical interface pins. Serial ports of personal computers are also often used to directly control various hardware devices, such as relays or lamps, since the control lines of the interface could be easily manipulated by software. This isn't feasible with USB which requires some form of receiver to decode the serial data. As an alternative, USB docking ports are available which can provide connectors for a keyboard, mouse, one or more serial ports, and one or more parallel ports. Corresponding device drivers are required for each USB-connected device to allow programs to access these USB-connected devices as if they were the original directly-connected peripherals. Devices that convert USB to RS 232 may not work with all software on all personal computers.
Standard details ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

27 DE 133

In RS-232, data is sent as a time-series of bits. Both synchronous and asynchronous transmissions are supported by the standard. In addition to the data circuits, the standard defines a number of control circuits used to manage the connection between the DTE and DCE. Each data or control circuit only operates in one direction, that is, signaling from a DTE to the attached DCE or the reverse. Since transmit data and receive data are separate circuits, the interface can operate in a full duplex manner, supporting concurrent data flow in both directions. The standard does not define character framing within the data stream, or character encoding.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS Voltage levels

28 DE 133

Diagrammatic oscilloscope trace of voltage levels for ASCII "K" character (0x4b) with 1 start bit, 8 data bits, 1 stop bit Main article: Serial port The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels. Valid signals are plus or minus 3 to 15 volts. The range near zero volts is not a valid RS-232 level; logic one is defined as a negative voltage, the signal condition is called marking, and has the functional significance of OFF. Logic zero is positive, the signal condition is spacing, and has the function ON. The standard specifies a maximum open-circuit voltage of 25 volts; signal levels of 5 V,10 V,12 V, and 15 V are all commonly seen depending on the power supplies available within a device. RS-232 drivers and receivers must be able to withstand indefinite short circuit to ground or to any voltage level up to +/-25 volts. The slew rate, or how fast the signal changes between levels, is also controlled. Because the voltage levels are higher than logic levels typically used by integrated circuits, special intervening driver circuits are required to translate logic levels. These also protect the device's internal circuitry from short circuits or transients that may appear on the RS-232 interface, and provide sufficent current to comply with the slew rate requirements for data transmission. Because both ends of the RS-232 circuit depend on the ground pin being zero volts, problems will occur when connecting machinery and computers where the voltage between the ground pin on one end, and the ground pin on the other is not zero. This may also cause a hazardous ground loop.
Connectors

RS-232 devices may be classified as Data Terminal Equipment (DTE) or Data Communications Equipment (DCE); this defines at each device which wires will be sending and receiving each signal. The standard recommended but did not make mandatory the D-subminiature 25 pin connector. In general, terminals have male connectors with DTE pin functions, and modems have female connectors with DCE pin functions. Other devices may have any combination of connector gender and pin definitions. Presence of a 25 pin D-sub connector does not necessarily indicate an RS-232C compliant interface. For example, on the original IBM PC, a male D-sub was an RS232C DTE port (with a non-standard current loop interface on reserved pins), but the female D-sub connector was used for a parallel Centronics printer port. Some personal computers put non-standard voltages or signals on their serial ports.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

29 DE 133

Female 9 pin plug The standard specifies 20 different signal connections. Since most devices use only a few signals, smaller connectors can be used. For example, the 9 pin DE-9 connector was used by most IBM-compatible PCs since the IBM PC AT, and has been standardized as TIA-574. More recently, modular connectors have been used. Most common are 8 pin RJ45 connectors. Standard EIA/TIA 561 specifies a pin assignment, but the "Yost Serial Device Wiring Standard" invented by Dave Yost is common on Unix computers and newer devices from Cisco Systems. Many devices don't use either of these standards. 10 pin RJ-50 connectors can be found on some devices as well. Digital Equipment Corporation defined their own DECconnect connection system which was based on the Modified Modular Jack connector. This is a 6 pin modular jack where the key is offset from the center position. As with the Yost standard, DECconnect uses a symmetrical pin layout which enables the direct connection between two DTEs. Another common connector is the DH10 header connector common on motherboards and add-in cards which is usually converted via a cable to the more standard 9 pin DE-9 connector (and frequently mounted on a free slot plate or other part of the housing).

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS Pinouts (DTE relative)

30 DE 133

The following table lists the commonly used RS-232 signals and common pin assignments DE-9 Cisc Signal Abbr DBEIA/TIA RJHirschman Alternate Dir. (TIAYost MMJ o RJType . 25 561 50 n RJ-45 s 574) 45 Common G Ground Transmitt TxD ed Data 7 5 3 2 4 6 5 3 1 8 4,5 6 3 6 2 7 1 8 9 7 5 4 3,4 2 5 1 6 4,5 3 6 2 7 4 3 5 -

Out 2 3

Received RxD In Data Data Terminal Ready

DTR Out 20 4 6 6 7

Data Set DSR In Ready Request To Send Clear Send Carrier Detect To RTS

Out 4

1 (Aux only) 8 (Aux only) -

CTS

In

5 8

8 1

7 2 1

8 7 -

DCD In In

10 2 -

Ring RI Indicator

22 9

The signals are labeled from the standpoint of the DTE device; TD, DTR, and RTS are generated by the DTE and RD, DSR, CTS, DCD, and RI are generated by the DCE. The ground signal is a common return for the other connections; it appears on two pins in the Yost standard but is the same signal. Connection of pin 1 (protective ground) and pin 7 (signal reference ground) is a common practice but not recommended. Use of a common ground is one weakness of RS-232. If the two pieces of equipment are far enough apart or on separate power systems, the ground will degrade between them and communications will fail; this is a difficult condition to trace. Note that EIA/TIA 561 combines DSR and RI, and the Yost standard combines DSR and DCD.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS Signals

31 DE 133

Commonly-used signals are: Transmitted Data (TxD) Data sent from DTE to DCE. Received Data (RxD) Data sent from DCE to DTE. Request To Send (RTS) Asserted (set to 0) by DTE to prepare DCE to receive data. This may require action on the part of the DCE, e.g. transmitting a carrier or reversing the direction Clear To Send (CTS) Asserted by DCE to acknowledge RTS and allow DTE to transmit. Data Terminal Ready (DTR) Asserted by DTE to indicate that it is ready to be connected. If the DCE is a modem, this may "wake up" the modem, bringing it out of a power saving mode. This behaviour is seen quite often in modern PSTN and GSM modems. When this signal is de-asserted, the modem may return to its standby mode, immediately hanging up any calls in progress. Data Set Ready (DSR) Asserted by DCE to indicate an active connection. If DCE is not a modem (e.g. a null modem cable or other equipment), this signal should be permanently asserted (set to 0), possibly by a jumper to another signal. Data Carrier Detect (DCD) Asserted by DCE when a connection has been established with remote equipment. Ring Indicator (RI) Asserted by DCE when it detects a ring signal from the telephone line. The standard defines RTS/CTS as the signaling protocol for flow control for data transmitted from DTE to DCE. The standard has no provision for flow control in the other direction. Various implementations of compatible ports may reassign other pins for flow control.
Cables

Main article: Serial Cable Since the standard definitions are not always correctly applied, it is often necessary to consult documentation, test connections with a breakout box, or use trial and error to find a cable that works when interconnecting two devices. Connecting a fully-standard-compliant DCE device and DTE device would use a cable that connects identical pin numbers in each connector (a so-called "straight cable"). "Gender changers" are available to solve gender mismatches between cables and connectors. Connecting devices with different types of connectors requires a cable that connects the corresponding pins according to the table above. Cables with 9 pins on one end and 25 on the other are common. Manufacturers of equipment with RJ-45 connectors usually provide a cable with

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

32 DE 133

either a DB-25 or DE-9 connector (or sometimes interchangeable connectors so they can work with multiple devices).

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS Conventions

33 DE 133

For functional communication through a serial port interface, conventions of bit rate, character framing, communications protocol, character encoding, data compression, and error detection, not defined in RS 232, must be agreed to by both sending and receiving equipment. For example, consider the serial ports of the original IBM PC. This implementation has an integrated circuit UART, often 16550 UART, using asynchronous start-stop character formatting with 7 or 8 data bits per frame, usually ASCII character coding, and data rates programmable between 75 bits per second and 115,000 bits per second. Data rates above 20,000 bits per second are out of the scope of the standard, although higher data rates are sometimes used by commercially manufactured equipment. In the particular case of the IBM PC, baud rates were programmable with arbitrary values, so that a PC could be connected to, for example, MIDI music controllers (31,250 bits per second) or other devices not using the rates typically used with modems. Since most devices do not have automatic baud rate detection, users must manually set the baud rate (and all other parameters) at both ends of the RS-232 connection.
RTS/CTS handshaking

The standard RS-232 use of the RTS and CTS lines is asymmetrical. The DTE asserts RTS to indicate a desire to transmit to the DCE. The DCE asserts CTS in response to grant permission. This allows for half-duplex modems that disable their transmitters when not required, and must transmit a synchronization preamble to the receiver when they are re-enabled. There is no way for the DTE to indicate that it is unable to accept data from the DCE. A non-standard symmetrical alternative is widely used: CTS indicates permission from the DCE for the DTE to transmit, and RTS indicates permission from the DTE for the DCE to transmit. The "request to transmit" is implicit and continuous. Thus, with this alternative usage, one can think of RTS asserted (logic 0) meaning "ready to receive characters" from the DTE, rather than a "request to transmit" to the DCE.
3-wire and 5-wire RS-232

A minimal "3-wire" RS-232 connection consisting only of transmit data, receive data, and ground, is commonly used when the full facilities of RS-232 are not required. When only flow control is required, the RTS and CTS lines are added in a 5-wire version.
Seldom used features

The EIA-232 standard specifies connections for several features that are not used in most implementations. Their use requires the 25-pin connectors and cables, and of course both the DTE and DCE must support them.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS Signal rate selection

34 DE 133

The DTE or DCE can specify use of a "high" or "low" signaling rate. The rates as well as which device will select the rate must be configured in both the DTE and DCE. The prearranged device selects the high rate by setting pin 23 to ON.
Loopback testing

Many DCE devices have a loopback capability used for testing. When enabled, signals are echoed back to the sender rather than being sent on to the receiver. If supported, the DTE can signal the local DCE (the one it is connected to) to enter loopback mode by setting pin 18 to ON, or the remote DCE (the one the local DCE is connected to) to enter loopback mode by setting pin 21 to ON. The latter tests the communications link as well as both DCE's. When the DCE is in test mode it signals the DTE by setting pin 25 to ON. A commonly used version of loopback testing doesn't involve any special capability of either end. A hardware loopback is simply a wire connecting complementary pins together in the same connector. See loopback. Loopback testing is often performed with a specialized DTE called a Bit Error Rate Tester (BERT).
Timing signals

Some synchronous devices provide a clock signal to synchronize data transmission, especially at higher data rates. Two timing signals are provided by the DCE on pins 15 and 17. Pin 15 is the transmitter clock, or send timing (ST); the DTE puts the next bit on the data line (pin 2) when this clock transitions from OFF to ON (so it is stable during the ON to OFF transition when the DCE registers the bit). Pin 17 is the receiver clock, or receive timing (RT); the DTE reads the next bit from the data line (pin 3) when this clock transitions from ON to OFF. Alternatively, the DTE can provide a clock signal, called transmitter timing (TT), on pin 24 for transmitted data. Again, data is changed when the clock transitions from OFF to ON and read during the ON to OFF transition. TT can be used to overcome the issue where ST must traverse a cable of unknown length and delay, clock a bit out of the DTE after another unknown delay, and return it to the DCE over the same unknown cable delay. Since the relation between the transmitted bit and TT can be fixed in the DTE design, and since both signals traverse the same cable length, using TT eliminates the issue. TT may be generated by looping ST back with an appropriate phase change to align it with the transmitted data. ST loop back to TT lets the DTE use the DCE as the frequency reference, and correct the clock to data timing.
Secondary channel

Data can be sent over a secondary channel (when implemented by the DTE and DCE devices), which is equivalent to the primary channel. Pin assignments are described in following table:
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

35 DE 133

Signal Common Ground Secondary (STD) Secondary (SRD) Transmitted Received Data Data

Pin 7 (same primary) 14 16 as

Secondary Request To Send 19 (SRTS) Secondary (SCTS) Secondary (SDCD)


Related standards

Clear Carrier

To

Send Detect

13 12

Other serial signaling standards may not interoperate with standard-compliant RS232 ports. For example, using the TTL levels of near +5 and 0 V puts the mark level in the undefined area of the standard. Such levels are sometimes used with NMEA 0183-compliant GPS receivers and depth finders. 20 mA current loop uses the absence of 20 mA current for high, and the presence of current in the loop for low; this signaling method is often used for long-distance and optically isolated links. Connection of a current-loop device to a compliant RS232 port requires a level translator; current-loop devices are capable of supplying voltages in excess of the withstand voltage limits of a compliant device. The original IBM PC serial port card implemented a 20 mA current-loop interface, which was never emulated by other suppliers of plug-compatible equipment. Other serial interfaces similar to RS-232:

RS-422 (a high-speed system similar to RS-232 but with differential signaling) RS-423 (a high-speed system similar to RS-422 but with unbalanced signaling) RS-449 (a functional and mechanical interface that used RS-422 and RS-423 signals - it never caught on like RS-232 and was withdrawn by the EIA) RS-485 (a descendant of RS-422 that can be used as a bus in multidrop configurations) MIL-STD-188 (a system like RS-232 but with better impedance and rise time control) EIA-530 (a high-speed system using RS-422 or RS-423 electrical properties in an EIA-232 pinout configuration, thus combining the best of both; supersedes RS-449) TIA-574 (standardizes the 9-pin D-subminiature connector pinout for use with EIA-232 electrical signalling, as originated on the IBM PC/AT)
INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

ING. ALFONSO PEREZ GARCIA

UNIDAD 2 LAYERS FISICOS

36 DE 133

See also

Asynchronous start-stop List of device bandwidths

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

37 DE 133

References 1. ^ Electronics Industries Association, "EIA Standard RS-232-C Interface Between


Data Terminal Equipment and Data Communication Equipment Employing Serial Data Interchange", August 1969, reprinted in Telebyte Technology Data Communication Library, Greenlawn NY, 1985, no ISBN 2. ^ TIA Web site 3. ^ (1997) PC 97 Hardware Design Guide. Redmond,Washington, USA: Microsoft Press. ISBN 1-57231-381-1.

External links

Wikibooks' Serial Programming has more about this subject: Serial Programming:RS-232 Connections

RS-232 tutorial Yost Serial Device Wiring Standard Serial Port Basics RS232 serial port info

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS EIA-485 From Wikipedia, the free encyclopedia Retrieved from "http://en.wikipedia.org/wiki/EIA-485"

38 DE 133

EIA-485 (formerly RS-485 or RS485) is an OSI model physical layer electrical specification of a two-wire,[1] half-duplex, multipoint serial connection. The standard specifies a differential form of signalling. The difference between the wires voltages is what conveys the data. One polarity of voltage indicates a logic 1 level, the reverse polarity indicates logic 0. The difference of potential must be at least 0.2 volts for valid operation, but any applied voltages between +12 V and -7 volts will allow correct operation of the receiver. EIA-485 only specifies electrical characteristics of the driver and the receiver. It does not specify or recommend any data protocol. EIA-485 enables the configuration of inexpensive local networks and multidrop communications links. It offers high data transmission speeds (35 Mbit/s up to 10 m and 100 kbit/s at 1200 m). Since it uses a differential balanced line over twisted pair (like EIA-422), it can span relatively large distances (up to 4000 feet or just over 1200 metres). In contrast to EIA-422, which has a single driver circuit which cannot be switched off, EIA-485 drivers need to be put in transmit mode explicitly by asserting a signal to the driver. This allows EIA-485 to implement linear topologies using only two wires. The equipment located along a set of EIA-485 wires are interchangeably called nodes, stations and devices. The recommended arrangement of the wires is as a connected series of point-topoint (multidropped) nodes, a line or bus, not a star, ring, or multiply-connected network. Ideally, the two ends of the cable will have a termination resistor connected across the two wires. Without termination resistors, reflections of fast driver edges can cause multiple data edges that can cause data corruption. Termination resistors also reduce electrical noise sensitivity due to the lower impedance, and bias resistors (see below) are required. The value of each termination resistor should be equal to the cable impedance (typically, 120 ohms for twisted pairs). Star and ring topologies are not recommended because of signal reflections or excessively low or high termination impedance. Somewhere along the set of wires, powered resistors are established to bias each data line/wire when the lines are not being driven by any device. This way, the lines will be biased to known voltages and nodes will not interpret the noise from undriven lines as actual data; without biasing resistors, the data lines float in such a way that electrical noise sensitivity is greatest when all device stations are silent or unpowered. Often in a master-slave arrangement when one device dubbed "the master" initiates all communication activity, the master device itself provides the bias and not the slave devices. In this configuration, the master device is typically centrally located along the set of EIA-485 wires, so it would be two slave devices located at
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

39 DE 133

the physical end of the wires that would provide the termination. The master device would provide termination if it itself was located at a physical end of the wires, but that is often a bad design as the master would be better located at a halfway point between the slave devices. Note that it is not a good idea to apply the bias at multiple node locations, because, by doing so, the effective bias resistance is lowered, which could possibly cause a violation of the EIA-485 specification and cause communications to malfunction. By keeping the biasing with the master, slave device design is simplified and this situation is avoided. EIA-485, like EIA-422 can be made full-duplex by using four wires, however, since EIA-485 is a multi-point specification, this is not necessary in many cases. EIA-485 and EIA-422 can interoperate with certain restrictions. RS-485 can be used to communicate with remote devices at distances up to 4000 ft (1200 m) at speeds of up to 100 kbit/s at this distance. Converters between RS232 and RS485, USB and RS485, Ethernet and RS485 are available to allow your PC to communicate with remote devices. By using "Repeaters" and "MultiRepeaters" very large RS485 networks can be formed. The Application Guidelines for TIA/EIA-485-A has one diagram called "Star Configuration. Not recommended." Using an RS485 "Multi-Repeater" can allow for "Star Configurations" with "Home Runs" (or multi-drop) connections similar to Ethernet Hub/Star implementations (with greater distances). Hub/Star systems (with "Multi-Repeaters") allow for very maintainable systems, without violating any of the RS485 specifications. Repeaters can also be used to extend the distance and/or number of nodes on a network.
Uses of EIA-485

SCSI-2 and SCSI-3 (for instance) use this specification to implement the physical layer. EIA-485 is often used with common UARTs to implement low-speed data communications in commercial aircraft cabins. For example, some passenger control units use it. It requires minimal wiring, and can share the wiring among several seats. It therefore reduces the system weight. EIA-485 also sees some use in programmable logic controllers and on factory floors in order to implement proprietary data communications. Since it is differential, it resists electromagnetic interference from motors and welding equipment. EIA-485 is used in large sound systems, as found at music events and theatre productions, for remotely controlling high-end sound-processing equipment from a standard computer running special software. The EIA-485 link is typically implemented over standard XLR cables more usually used for microphones, and so can be run between stage and control desk without laying special cables. EIA-485 also is used in Building automation as the simple bus wiring and long cable length is ideal for joining remote devices. EIA-485 also is used to control theatrical and disco lighting where it is used as the communications protocol for DMX signals.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

40 DE 133

EIA-485 is used to control video surveillance cameras. Typically wiring runs from a central controller to a number of cameras which have stepper motors for pan, tilt and zoom. One or more joysticks are connected to the controller and each camera is assigned an address. There appear to be a number of vendor defined protocols for communication of the actual movement requests. This standard is now administered by the TIA and is titled TIA-485-A, Electrical Characteristics of Generators and Receivers for Use in Balanced Digital Multipoint Systems (ANSI/TIA/EIA-485-A-98) (R2003), indicating that the standard was reaffirmed without technical changes in 2003.
Connectors

EIA-485 does not specify any connector. Pin labelling The RS485 differential line consists of two pins: A aka '' aka TxD-/RxD- aka inverting pin which is negative (compared to B) when the line is idle (ie data is 1). B aka '+' aka TxD+/RxD+ aka non-inverting pin which is positive (compared to A) when the line is idle (ie data is 1). These names are all in use on various equipment, but the actual standard released by EIA only uses the names A and B. However, despite the unambiguous standard there is much confusion about which is which: The RS485 signalling specification states that signal A is the inverting or '-' pin and signal B is the non-inverting or '+' pin. [1] The same naming is specified in the NMEA standards. This is in conflict with the A/B naming used by a number of differential transceivers manufacturers, including the Texas Instruments application handbook on RS422/485 communications (A=non-inverting, B=inverting). These manufacturers are incorrect, but their practice is in a widespread use. Therefore, care must be taken when using A/B naming. In addition to the A and B connections, the EIA standard also specifies a third interconnection point called C, which is the common ground.
Waveform example

The graph below shows potentials of the '+' and '' pins of an RS-485 line during transmission of an RS-485 byte:

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

41 DE 133

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS References

42 DE 133

^ Why you need 3 wires for 2 (two) wire RS485


See also

Wikibooks has a Programming:RS-485 Technical Manual RS-232 RS-422 RS-423 Modbus Profibus Fieldbus
External links

book

on

the

topic

of

Serial

Guidelines for Proper Wiring of an RS-485 (TIA/EIA-485-A) Network Technical library of RS-485 articles and application notes RS232 to RS485 cable scheme RS422 and RS485 Standards Overview Practical information about implementing RS485

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

43 DE 133

Interface Converter RS232 to RS485 cable pinout


Electrically isolated RS485 communication interface to the PC serial port

EIA-485 cable usually made with twisted pair (like EIA-422) and may span up to 1200 metres. The recommended arrangement of the wires is as a connected series of point-to-point nodes, a line or bus. Ideally, the two ends of the cable will have a termination resistor connected across the two wires and two powered resistors to bias the lines apart when the lines are not being driven. The value of each termination resistor should be equal to the cable impedance (typically, 120 ohms for twisted pairs). ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

44 DE 133

PC RS485 Interface
This interface circuit provides electrically isolated RS485 communication inteface to the PC serial port the isolation circuit protect the PC from direct connection to hazardous voltages.

M Asim Khan, asimkhan@sat.net.pk

Figure 1: Circuit Diagram of Isolated RS485 Interface

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

45 DE 133

Figure 1 shows the circuit diagram of RS485 interface. Connector K1 is linked to the serial port of the PC, power to the PC side of the circuit is derived from the signal lines DTR and RTS. Positive supply is derived from RTS and negative supply from the DTR line. The RTS line is also used to control the data direction of RS485 driver IC U4. Optical isolation is achieved by optocouplers U1, U2 and U3. Opto U1 is used to control the data direction of U4 opto U2 provide RXD line isolation while opto U3 provide TXD line isolation. The other side of the isolator carries TTL levels. This side is powered by an unregulated dc supply between 9V and 18V dc. IC U5 provide 5V regulated output and IC U4 provide the RS485 bus interface. The TXD and RXD lines status are provided by data indicating LEDs. The interface has been tested at the baud rate of 19.2k baud. For Data Reception RTS = 1 (at +ve level) For Data Transmition RTS = 0 (at -ve level) DTR line is always set to 0 (at -ve level) Figure 2 & 3 shows the component layout of the isolator pcb and the track patterns respectively.

Figure 2: Component layout of the Isolator PCB


ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

46 DE 133

Figure 3: Track patterns of the Isolator PCB

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

47 DE 133

Component details of the project.


No 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 QUANTIT Y 4 1 1 3 2 2 1 1 1 3 2 2 3 1 2 1 2 1 1 1 DESIGNATOR C1,C2,C3,C6 C4 C5 D1,D2,D3 D4,D5 D7,D6 D8 K1 K2 R1,R2,R3 R7,R4 R5,R8 R9,R12 R6 R11,R10 R13 U3,U1 U2 U4 U5 DESCRIPTION 100nF 10uF 16V 470uF 25V 1N4148 LED RED 3mm TRANSIL 6.8V 1N4003 DB9 R/A PCB PLUG PCB TERMINAL BLOCK 4 WAY 1K8 4K7 1K 150R 680R 10R 120R H11L1 OPTO-ISOLATOR CNY17-3 OPTO-ISOLATOR MAX487, SN75176B LM7805

2 July 2001

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

48 DE 133

IEEE-488
From Wikipedia, the free encyclopedia Retrieved from "http://en.wikipedia.org/wiki/IEEE-488"

IEEE-488 is a short-range, digital communications bus specification that has been in use for over 30 years. Originally created for use with automated test equipment, the standard is still in wide use for that purpose. IEEE-488 is also commonly known as HP-IB (Hewlett-Packard Instrument Bus) and GPIB (General Purpose Interface Bus). IEEE-488 allows up to 15 devices to share a single 8-bit parallel electrical bus by daisy chaining connections. The slowest device participates in control and data transfer handshakes to determine the speed of the transaction. The maximum data rate is about one Mbyte/s in the original standard, and about 8 Mbyte/s with later extensions. The IEEE-488 bus employs 16 signal lines eight bi-directional used for data transfer, three for handshake, and five for bus management plus eight ground return lines.
IEEE-488 / HP-IB / GPIB Type Designer Designed Manufactur er Produced External Data signal General purpose data bus Production history Hewlett-Packard late 1960s standardized in 1975 Hewlett-Packard 1960s to present Specifications yes Parallel data bus with handshaking Width Bandwidth 8 bits 1 Mbyte/s (later extended to 8 Mbyte/s) 15 Parallel IEEE-488 stacking connectors

Max devices Protocol Cable Pins Connector 20 meters max

24 (8 data, 5 bus management, 3 handshake, 8 ground) 24-pin Amphenol-designed micro ribbon

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

49 DE 133

Pin out

A female IEEE-488 connector Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Pin 6 Pin 7 Pin 8 Pin 9 Pin 10 Pin 11 Pin 12 Pin 13 Pin 14 Pin 15 Pin 16 Pin 17 Pin 18 Pin 19 Pin 20 Pin 21 Pin 22 Pin 23 Pin 24 DIO1 DIO2 DIO3 DIO4 EOI DAV NRFD NDAC IFC SRQ ATN SHIELD DIO5 DIO6 DIO7 DIO8 REN GND GND GND GND GND GND Logic ground Data input/output bit. Data input/output bit. Data input/output bit. Data input/output bit. Remote enable. (wire twisted with DAV) (wire twisted with NRFD) (wire twisted with NDAC) (wire twisted with IFC) (wire twisted with SRQ) (wire twisted with ATN) Data input/output bit. Data input/output bit. Data input/output bit. Data input/output bit. End-or-identify. Data valid. Not ready for data. Not data accepted. Interface clear. Service request. Attention.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS History

50 DE 133

In the late 1960s, Hewlett-Packard (HP), a manufacturer of test and measurement instruments[1], such as digital multimeters and logic analyzers, developed the HP Interface Bus (HP-IB) to enable easier interconnection between instruments and controllers such as computers. Early HP 9800 series[2] desktop computers used HP-IB to connect peripherals (printers, plotters, disk drives etc.). The bus was relatively easy to implement using the technology at the time, using a simple parallel electrical bus and several individual control lines; the interface functions could be implemented in simple TTL logic[3] Other manufacturers copied HP-IB, calling their implementation the General Purpose Interface Bus (GPIB). In 1975 the bus was standardized by the Institute of Electrical and Electronics Engineers as the IEEE Standard Digital Interface for Programmable Instrumentation, IEEE-488-1975 (now 488.1). IEEE-488.1 formalized the mechanical, electrical, and basic protocol parameters of GPIB, but said nothing about the format of commands or data. The IEEE-488.2 standard, Codes, Formats, Protocols, and Common Commands for IEEE-488.1 (June 1987), provided for basic syntax and format conventions, as well as device-independent commands, data structures, error protocols, and the like. IEEE-488.2 built on -488.1 without superseding it; equipment can conform to -488.1 without following -488.2. While IEEE-488.1 defined the hardware, and IEEE-488.2 defined the syntax, there was still no standard for instrument-specific commands. Commands to control the same class of instrument (e.g., multimeters) would vary between manufacturers and even models. A standard for device commands, SCPI, was introduced in the 1990s. Due to the late introduction, it has not been universally implemented. National Instruments introduced a backwards-compatible extension to IEEE-488.1, originally known as HS-488. It increased the maximum data rate to 8 Mbyte/s, although the rate decreases as more devices are connected to the bus. This was incorporated into the standard in 2003, as IEEE-488.1-2003. In addition to the IEEE, several other standards committees have adopted HP-IB. The American National Standards Institute's corresponding standard is known as ANSI Standard MC 1.1, and the International Electrotechnical Commission has its IEC Publication 625-1.
Applications

At the outset, HP-IB's designers did not specifically plan for IEEE-488 to be a standard peripheral interface for general-purpose computers. By 1977 the Commodore PET/CBM range of educational/home/personal computers connected their disk drives, printers, modems, etc, by IEEE-488 bus. All of Commodore's post-PET/CBM 8-bit machines, from the VIC-20 to the C128, utilized a proprietary 'serial IEEE-488' for peripherals, with round DIN connectors instead of the heavy-

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

51 DE 133

duty HP-IB plugs or a card-edge connector plugging into the motherboard (for PET computers). Hewlett-Packard and Tektronix also used IEEE-488 as a peripheral interface to connect disk drives, tape drives, printers, plotters etc. to their workstation products and HP's HP 2100[4] and HP 3000[5] minicomputers. While the bus speed was increased to 10 MB/s for such applications, the lack of command protocol standards limited third-party offerings and interoperability, and later, faster, open standards such as SCSI eventually superseded IEEE-488 for peripheral access. Additionally, some of HP's advanced pocket calculators/computers of the 1980s, such as the HP-41 and HP-71B series, could work with various instrumentation via an optional HP-IB interface. The interface would connect to the calculator via an optional HP-IL module.
Signals bus line DIO1DIO8 description Data input/output bits. These 8 lines are used to read and write the 8 bits of a data or command byte that is being sent over the bus. Not ready for data. NRFD is a handshaking line asserted by listeners to indicate they are not ready to receive a new data byte. Data valid. This is a handshaking line, used to signal that the value being sent with DIO1-DIO8 is valid. During transfers the DIO1-DIO8 lines are set, then the DAV line is asserted after a delay called the 'T1 delay'. The T1 delay lets the data lines settle to stable values before they are read. Not data accepted. NDAC is a handshaking line asserted by listeners to indicate they have not yet read the byte contained on the DIO lines. Attention. ATN is asserted to indicate that the DIO lines contain a command byte (as opposed to a data byte). Also, it is asserted with EOI when conducting parallel polls. End-or-identify. This line is asserted with the last byte of data during a write, to indicate the end of the message. It can also be asserted along with the ATN line to conduct a parallel poll. Interface clear. The system controller can assert this line (it should be asserted for at least 100 microseconds) to reset the bus and make itself controller-in-charge. Remote enable. Asserted by the system controller, it enables devices to enter remote mode. When REN is asserted (low), a device will enter remote mode when it is addressed by the controller. When REN is false (high), all devices will immediately return to local mode.

NRFD

DAV

NDAC

ATN

EOI

IFC

REN

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS SRQ

52 DE 133

Service request. Devices on the bus can assert this line to request service from the controller-in-charge. The controller can then poll the devices until it finds the device requesting service, and perform whatever action is necessary.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS Connectors IEEE-488

53 DE 133

IEEE-488 uses 24-pin Amphenol-designed micro ribbon connectors (often incorrectly termed Centronics-type), most commonly in a stackable male/female combination that allows for easy daisy-chaining by stacking cables. Mechanical considerations limit the number of stacked connectors to four or less. They are held in place by screws, which come in UTS (now largely obsolete) or metric (M3.50.6) threads. By convention, metric screws are colored black, as the two threads do not mate. Total cable length is limited to 20 metres, although nonstandard "bus extender" devices are available.
IEC-625

The IEC-625 standard prescribes the use of 25-pin D-subminiature connectors (the same are used for parallel ports on PCs). This standard did not gain significant market acceptance against the established 24-pin connector. See also HP series 80 Rocky Mountain BASIC References ^ This portion of the company was later spun-off as Agilent Technologies ^ HP 9815 98135A HP-IB Interface ^ Examples: HP 59501 Power Supply Programmer, HP 59306A Relay Actuator ^ HP 2100 59310A HP-IB Interface ^ HP 3000 27113A CIO HP-IB Interface IEEE Standards IEEE-488.1: Standard Digital Interface for Programmable Instrumentation IEEE-488.2: Standard Codes, Formats, Protocols, and Common Commands for Use With IEEE-488.1 Press release on IEEE 488.1-2003, which allows for higher speeds External links A GPIB tutorial (mirror) from TransEra Corporation Explanation of connector stacking GPIB (<1Mb PDF) from L-com Connectivity Products Tutorials, application notes, and sample programs from ICS Electronics (index is HTML; content is PDF) Linux GPIB drivers and libraries KE5FX GPIB Toolkit, several freeware GPIB applications for Windows From http://www.bitsavers.org:
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

54 DE 133

Tutorial description of HP-IB (5Mb PDF) CS/80 (5Mb PDF) Subset/80 (SS/80) (8Mb PDF) Python Wrapper for NI GPIB Tcl Extension for NI GPIB This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

55 DE 133

2.2 El lazo de corriente 4-20 Ma y HART HART Protocol


From Wikipedia, the free encyclopedia Retrieved from "http://en.wikipedia.org/wiki/HART_Protocol"

HART Protocol Information Type of Device Bus (Process Network Automation) Legacy 4-20 mA analog Physical instrumentation wiring or Media 2..4GHz Wireless Network One-on-One, Multidrop, Topology Wireless Mesh Maximum 64 in multidrop Devices Maximum Depends on Physical Layer Speed employed Device Hardware/Software Addressing Governing HART Communication Body Foundation Website www.hartcomm.org

The HART Communications Protocol (Highway Addressable Remote Transducer Protocol) is an early implementation of Fieldbus, a digital industrial automation protocol. Its claim to fame is that it can communicate over legacy 420 mA analog instrumentation wiring, sharing the pair of wires used by the older system. According to some, due to the huge installed base of 4-20 mA systems throughout the world, the HART Protocol is one of the most popular industrial protocols today. The protocol was developed by Rosemount Inc., built off the Bell 202 early communications standard,in the mid-1980s as proprietary digital communication protocol for their smart field instruments. Soon it evolved into HART. In 1986, it was made an open protocol. Since then, the capabilities of the protocol have been enhanced by successive revisions to the specification. There are two main operational modes of HART instruments: analog/digital mode, and multidrop mode.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS Analog/digital mode

56 DE 133

Here the digital signals are overlayed on the 4-20 mA loop current. Both the 4-20 mA current and the digital signal are valid output values from the instrument. The polling address of the instrument is set to "0". Only one instrument can be put on each instrument cable signal pair.
Multidrop mode

In this mode only the digital signals are used. The analog loop current is fixed at 4 mA. In multidrop mode it is possible to have up to 15 instruments on one signal cable. The polling addresses of the instruments will be in the range 1-15. Each meter needs to have a unique address.
Packet Structure

The HART Packet has the following structure Field Name Preamble Start Byte Address Command Length (Bytes) Purpose 5-20 1 1-5 1 Synchronization and Carrier Detect Specifies Master Number Specifies slave, Specifies Master and Indicates Burst Mode Numerical Value for the command to be executed Indicates the size of the Data Field

Number of Data 1 Bytes Status Data Checksum


Preamble

Master (0) Slave Execution and Health Reply (2) 0-253 1 Data associated with the command XOR of all bytes from Start Byte to Last byte of Data

Currently the all newer devices implement 5 byte preamble, since anything greater reduces the communication speed. However, masters are responsible for backwards support. Master communication to a new devices starts with the maximum preamble length (20 bytes) and is later reduced once the preamble size for the current device is determined.
Start Delimiter

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS

57 DE 133

This byte contains the Master number and specifies the communication packet is starting

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 2 LAYERS FISICOS Address

58 DE 133

Specifies the destination address as implemented in one of the HART schemes. The original addressing scheme used only 4 bits to specify the device address, which limited the number of devices to 16 including the master. The newer scheme utilizes 38 bits to specify the device address. This address is requested from the device using either Command 0, or Command 11
Command

This is a 1 byte numerical value representing which command is to be executed. Command 0 and Command 11 are used to request the device number
Number of Data Bytes

Specifies the number of communication data bytes to follow


Status

The status field is absent for the master and is 2 bytes for the slave. This field is used by the slave to inform the master whether it completed the task and what its current health status is.
Data

Data contained in this field depends on the command to be executed.


Checksum

Checksum is composed of an XOR of all the bytes starting from the Start Byte and Ending with the last byte of the data field, including those bytes. External links The HART Book directory of products and suppliers HART Communications Foundation HART Software Development and Consulting Detailed HART protocol description; waveforms, message structure, etc

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

59 DE 133

UNIDAD 3 FIELDBUS
3.1 INTRODUCCION. ANALISIS DEL ESTADO DEL ARTE DE LOS BUSES DE CAMPO APLICADOS AL CONTROL DE PROCESOS INDUSTRIALES
Dr.-Ing. Hctor Kaschel C hkaschel@lauca.usach.cl Universidad de Santiago de Chile Avda Ecuador 3519, Santiago, CHILE Estacin Central. Ing. Ernesto Pinto L. e.pinto@ieee.org Fac. de Ingeniera, Depto. de Ingeniera Elctrica Fonos: (56) 2-77866417 (56) 2-6762452 Fax.(56) 2-6819079, Santiago, CHILE

RESUMEN

El desarrollo del control distribuido que est formado por una gran variada de campos va paralelo al de las comunicaciones. Esto esta evocado a diferentes niveles de abstraccin sobre integracin y produccin de acuerdo a la filosofa de la "Computer lntegrated Manufacturing" -CIM. Cada vez es ms necesario disponer de dispositivos inteligentes para realizar el control o la supervisin remota. Un bus de campo transfiere informacin secuencial y serial por un nmero limitados de lneas o cables. Hay muchos tipos diferentes de buses en uso y muchos son altamente dependientes de las aplicaciones. Este artculo se analiza el estado de avance en la tecnologa de la comunicacin de los buses de campo aplicados al control de procesos industriales.
1. INTRODUCCIN

Un bus de campo es un sistema de transmisin de informacin (datos) que simplifica enormemente la instalacin y operacin de mquinas y equipamientos industriales utilizados en procesos de produccin. El objetivo de un bus de campo es sustituir las conexiones punto a punto entre los elementos de campo y el equipo de control a travs del tradicional bucle de corriente de 4-20mA. Tpicamente son redes digitales, bidireccionales, multipunto, montadas sobre un bus serie, que conectan dispositivos de campo como PLCs, transductores, actuadores y sensores. Cada dispositivo de campo incorpora cierta capacidad de proceso, que lo convierte en un dispositivo inteligente, manteniendo siempre un costo bajo. Cada uno de estos elementos ser capaz de ejecutar funciones simples de diagnstico, control o mantenimiento, as como de comunicarse bidireccionalmente a travs del bus. El objetivo es reemplazar los sistemas de control centralizados por redes de control distribuido mediante el cual permita mejorar la calidad del producto, reducir los costos y mejorar la eficiencia. Para ello se basa en que la informacin que envan y/o reciben los dispositivos de campo es digital, lo que resulta mucho ms preciso que si se recurre a mtodos analgicos. Adems, cada dispositivo de
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

60 DE 133

campo es un dispositivo inteligente y puede llevar a cabo funciones propias de control, mantenimiento y diagnstico. De esta forma, cada nodo de la red puede informar en caso de fallo del dispositivo asociado, y en general sobre cualquier anomala asociada al dispositivo. Esta monitorizacin permite aumentar la eficiencia del sistema y reducir la cantidad de horas de mantenimiento necesarias.
2. VENTAJAS DE LOS BUSES DE CAMPO

La principal ventaja que ofrecen los buses de campo, y la que los hace ms atractivos a los usuarios finales, es la reduccin de costos. El ahorro proviene fundamentalmente de tres fuentes: ahorro en costo de instalacin, ahorro en el costo de mantenimiento y ahorros derivados de la mejora del funcionamiento del sistema. Una de las principales caractersticas de los buses de campo es su significativa reduccin en el cableado necesario para el control de una instalacin. Cada componente slo requiere un cable para la conexin de los diversos nodos. Se estima que puede ofrecer una reduccin de 5 a 1 en los costos de cableado. En comparacin con otros tipos de redes, dispone de herramientas de administracin del bus que permiten la reduccin del nmero de horas necesarias para la instalacin y puesta en marcha. El hecho de que los buses de campo sean ms sencillos que otras redes de uso industrial como por ejemplo MAP, hace que las necesidades de mantenimiento de la red sean menores, de modo que la fiabilidad del sistema a largo plazo aumenta. Adems, los buses de campo permiten a los operadores monitorizar todos los dispositivos que integran el sistema e interpretar fcilmente las interacciones entre ellos. De esta forma, la deteccin de las fuentes de problemas en la planta y su correccin resulta mucho ms sencilla, reduciendo los costos de mantenimiento y el tiempo de parada de la planta. Los buses de campo ofrecen mayor flexibilidad al usuario en el diseo del sistema. Algunos algoritmos y procedimientos de control que con sistemas de comunicacin tradicionales deban incluirse en los propios algoritmos de control, radican ahora en los propios dispositivos de campo, simplificando el sistema de control y sus posibles ampliaciones. Tambin hay que tener en cuenta que las prestaciones del sistema mejoran con el uso de la tecnologa de los buses de campo debido a la simplificacin en la forma de obtener informacin de la planta desde los distintos sensores. Las mediciones de los distintos elementos de la red estn disponibles para todos los dems dispositivos. La simplificacin en la obtencin de datos permitir el diseo de sistemas de control ms eficientes. Con la tecnologa de los buses de campo, se permite la comunicacin bidireccional entre los dispositivos de campo y los sistemas de control, pero tambin entre los propios dispositivos de campo. Otra ventaja de los buses de campo es que slo incluyen 3 capas (Fsica, Enlace y Aplicacin), y un conjunto de servicios de administracin. El usuario no tiene que
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

61 DE 133

preocuparse de las capas de enlace o de aplicacin. Slo necesita saber cual es funcionalidad. Al usuario slo se le exige tener un conocimiento mnimo de los servicios de administracin de la red, ya que parte de la informacin generada por dichos servicios puede ser necesaria para la reparacin de averas en el sistema. De hecho, prcticamente, el usuario slo debe preocuparse de la capa fsica y la capa de usuario.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS 3. BUSES DE CAMPO EXISTENTES

62 DE 133

Debido a la falta de estndares, diferentes compaas han desarrollado diferentes soluciones, cada una de ellas con diferentes prestaciones y campos de aplicacin. En una primera clasificacin tenemos los siguientes grupos:
3.1. Buses de alta velocidad y baja funcionalidad

Estn diseados para integrar dispositivos simples como finales de carrera, fotoclulas, rels y actuadores simples, funcionando en aplicaciones de tiempo real, y agrupados en una pequea zona de la planta, tpicamente una mquina. Bsicamente comprenden las capas fsica y de enlace del modelo OSI, es decir, seales fsicas y patrones de bits de las tramas. Algunos ejemplos son: CAN: Diseado originalmente para su aplicacin en vehculos. SDS: Bus para la integracin de sensores y actuadores, basado en CAN ASI: Bus serie diseado por Siemens para la integracin de sensores y actuadores.
3.2. Buses de alta velocidad y funcionalidad media

Se basan en el diseo de una capa de enlace para el envo eficiente de bloques de datos de tamao medio. Estos mensajes permiten que el dispositivo tenga mayor funcionalidad de modo que permite incluir aspectos como la configuracin, calibracin o programacin del dispositivo. Son buses capaces de controlar dispositivos de campo complejos, de forma eficiente y a bajo costo. Normalmente incluyen la especificacin completa de la capa de aplicacin, lo que significa que se dispone de funciones utilizables desde programas basados en PCs para acceder, cambiar y controlar los diversos dispositivos que constituyen el sistema. Algunos incluyen funciones estndar para distintos tipos de dispositivos (perfiles) que facilitan la inter-operbilidad de dispositivos de distintos fabricantes. Algunos ejemplos son: DeviceNet: Desarrollado por Allen-Bradley, utiliza como base el bus CAN, e incorpora una capa de aplicacin orientada a objetos. LONWorks: Red desarrollada por Echelon. BitBus: Red desarrollada por INTEL. DIN MessBus: Estndar alemn de bus de instrumentacin, basado en comunicacin RS-232. InterBus-S: Bus de campo alemn de uso comn en aplicaciones medias.
3.3. Buses de altas prestaciones

Son capaces de soportar comunicaciones a nivel de todos los niveles de la produccin CIM. Aunque se basan en buses de alta velocidad, algunos presentan problemas debido a la sobrecarga necesaria para alcanzar las caractersticas funcionales y de seguridad que se les exigen. La capa de aplicacin tiene un gran nmero de servicios a la capa de usuario, habitualmente un subconjunto del
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

63 DE 133

estndar MMS (Manufacturing Message Specification). Entre sus caractersticas incluyen: Redes multi-maestro con redundancia. Comunicacin maestro-esclavo segn el esquema pregunta-respuesta. Recuperacin de datos desde el esclavo con un lmite mximo de tiempo Capacidad de direccionamiento unicast, multicast y broadcast, Peticin de servicios a los esclavos basada en eventos. Comunicacin de variables y bloques de datos orientada a objetos. Descarga y ejecucin remota de programas. Altos niveles de seguridad de la red, opcionalmente con procedimientos de autentificacin. Conjunto completo de funciones de administracin de la red. Algunos ejemplos son: Profibus WorldFIP Fieldbus Foundation
3.4. Buses para reas de seguridad intrnseca

Incluyen modificaciones en la capa fsica para cumplir con los requisitos especficos de seguridad intrnseca en ambientes con atmsferas explosivas. La seguridad intrnseca es un tipo de proteccin por la que el componente en cuestin no tiene posibilidad de provocar una explosin en la atmsfera circundante. Un circuito elctrico o una parte de un circuito tienen seguridad intrnseca, cuando alguna chispa o efecto trmico en este circuito producidos en las condiciones de prueba establecidas por un estndar (dentro del cual figuran las condiciones de operacin normal y de fallo especficas) no puede ocasionar una ignicin. Algunos ejemplos son HART, Profibus PA o WorldFIP.
4. ALGUNOS BUSES ESTANDARIZADOS 4.1 PROFIBUS

Profibus se desarroll bajo un proyecto financiado por el gobierno alemn. Est normalizado en Alemania por DIN E 19245 y en Europa por EN 50170. El desarrollo y posterior comercializacin ha contado con el apoyo de importantes fabricantes com ABB, AEG, Siemens, Klckner-Moeller, ... Est controlado por la PNO (Profibus User Organisation) y la PTO (Profibus Trade Organisation). Existen tres perfiles: Profibus DP (Decentralized Periphery). Orientado enlazados a procesadores (PLCS) o terminales. a sensores/actuadores

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

64 DE 133

Profibus PA (Process Automation). Para control de proceso y cumpliendo normas especiales de seguridad para la industria qumica (IEC 1 1 15 8-2, seguridad intrnseca). Profibus FMS (Fieldbus Message Specification). Para comunicacin entre clulas de proceso o equipos de automatizacin. La evolucin de Profibus hacia la utilizacin de protocolos TCP/IP para enlace al nivel de proceso hace que este perfil est perdiendo importancia. Utiliza diferentes capas fsicas. La ms importante, en PROFIBUS DP, est basada en ElA RS-485. Profibs PA utiliza la norma IEC 11158-2 (norma de comunicacin sncrona entre sensores de campo que utiliza modulacin sobre la propia lnea de alimentacin de los dispositivos y puede utilizar los antiguos cableados de instrumentacin 4-20 mA) y para el nivel de proceso se tiende a la utilizacin de Ethernet. Tambin se contempla la utilizacin de enlaces de fibra ptica. Existen puentes para enlace entre diferentes medios, adems de gateways que permiten el enlace entre perfiles y con otros protocolos. Se distingue entre dispositivos tipo maestro y dispositivos esclavo. El acceso al medio entre maestros se arbitra por paso de testigo, el acceso a los esclavos desde un maestro es un proceso de interrogacin cclico (polling). Se pueden configurar sistemas multimaestro o sistemas ms simples maestro-esclavo. En Profibus DP se distingue entre: maestro clase 1 (estaciones de monitorizacin y diagnstico), maestro clase 2 (elementos centralizadores de informacin como PLCS, PCs, etc.), esclavo (sensores, actuadores). El transporte en Profibus-DP se realiza por medio de tramas segn IEC 870-5-1. La comunicacin se realiza por medio de datagramas en modo broadcast o multicast. Se utiliza comunicacin serie asncrona por lo que es utilizable una UART genrica. Profibus DP prescinde de los niveles ISO 3 a 6 y la capa de aplicacin ofrece una amplia gama de servicios de diagnstico, seguridad, protecciones etc. Es una capa de aplicacin relativamente compleja debido a la necesidad de mantener la integridad en el proceso de paso de testigo (un y slo un testigo) Profibus FMS es una compleja capa de aplicacin que permite la gestin distribuida de procesos al nivel de relacin entre clulas don posibilidad de acceso a objetos, ejecucin remota de procesos etc. Los dispositivos de definen como dispositivos de campo virtuales, cada uno incluye un diccionario de objetos que enumera los objetos de comunicacin. Los servicios disponibles son un subconjunto de los definidos en MMS (ISO 9506) Las plataformas hardware utilizadas para soportar Profibus se basan en microprocesadores de 16 bits ms procesadores de comunicaciones especializados o circuitos ASIC como el LSPM2 de Siemens. La PNO se encarga de comprobar y certificar el cumplimiento de las especificaciones PROFIBUS.
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

65 DE 133

Entre sus perspectivas de futuro se encuentra la integracin sobre la base de redes Ethernet al nivel de planta y la utilizacin de conceptos de tiempo real y filosofa productor-consumidor en la comunicacin entre dispositivos de campo. Las distancias potenciales de bus van de 100 m a 24 Km (con repetidores y fibra ptica). La velocidad de comunicacin puede ir de 9600 bps a 12 Mbps. Utiliza mensajes de hasta 244 bytes de datos. Profibus se ha difundido ampliamente en Europa y tambin tiene un mercado importante en Amrica y Asia. El conjunto Profibus DP- Profibus PA cubre la automatizacin de plantas de proceso discontinuo y proceso continuo cubriendo normas de seguridad intrnseca.
4.2. INTERBUS

Protocolo propietario, inicialmente, de la empresa Phoenix Conctact GmbH, aunque posteriormente ha sido abierta su especificacin. Normalizado bajo DIN 19258, norma europea EN 50 254. Fue introducido en el ao 1984. Utiliza una topologa en anillo y comunicacin mediante un registro de desplazamiento en cada nodo. Se pueden enlazar buses perifricos al principal. Capa fsica basada en RS-485. Cada dispositivo acta como repetidor. As se puede alcanzar una distancia entre nodos de 400 m para 500Kbps y una distancia total de 12 KM. Es posible utilizar tambin enlaces de fibra ptica. Capa de transporte basada en una trama nica que circula por el anillo (trama de suma) La informacin de direccionamiento no se incluye en los mensajes, los datos se hacen circular por la red. Alta eficiencia. Para aplicaciones de pocos nodos y un pequeo conjunto de entradas/salidas por nodo, pocos buses pueden ser tan rpidos y eficientes como INTERBUS. Fsicamente tiene la impresin de seguir una topologa en estrella, pero realmente cada nodo tiene un punto de entrada y otro de salida hacia el siguiente nodo. Es muy sensible a corte completo de comunicacin al abrirse el anillo en cualquiera de los nodos. Por otra parte, la estructura en anillo permite una fcil localizacin de fallos y diagnstico. Es muy apropiado para comunicacin determinista a alta velocidad, es muy difcil una filosofa de comunicacin orientada a eventos.
4.3. DeviceNet

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

66 DE 133

Bus basado en CAN. Su capa fsica y capa de enlace se basan en ISO 11898, y en la especificacin de Bosh 2.0. DeviceNet define una de las ms sofisticadas capas de aplicaciones industriales sobre bus CAN. DeviceNet fue desarrollado por Allen-Bradley a mediados de los noventa, posteriormente pas a ser una especificacin abierta soportada en la ODVA (Open DeviceNet Vendor Association), Cualquier fabricante puede asociarse a esta organizacin y obtener especificaciones, homologar productos, etc. Es posible la conexin de hasta 64 nodos con velocidades de 125 Kbps a 500 Kbps en distancias de 100 a 500 m. Utiliza una definicin basada en orientacin a objetos para modelar los servicios de comunicacin y el comportamiento externo de los nodos. Define mensajes y conexiones para funcionamiento maestro-esclavo, interrogacin cclica, "strobing" o lanzamiento de interrogacin general de dispositivos, mensajes espontneos de cambio de estado, comunicacin uno-uno, modelo productor-consumidor, carga y descarga de bloques de datos y ficheros etc. DeviceNet ha conseguido una significativa cuota de mercado. Existen ms de 300 productos homologados y se indica que el nmero de nodos instalados superaba los 300.000 en 1998, Est soportado por numerosos fabricantes: Allen-Bradley, ABB, Danfoss, Crouzet, Bosh, Control Techniques, Festo, Omron, .etc.
4.4. FOUNDATION FIELDBUS

Un bus orientado sobre todo a la interconexin de dispositivos en industrias de proceso continuo. Su desarrollo ha sido apoyado por importantes fabricantes de instrumentacin (Fisher-Rosemount, Foxboro,...). En la actualidad existe una asociacin de fabricantes que utilizan este bus, que gestiona el esfuerzo normalizador, la Fieldbus Foundation. Normalizado como ISA SP50, IEC-ISO 61158 (ISA es la asociacin internacional de fabricantes de dispositivos de instrumentacin de proceso). En su nivel H1 (uno) de la capa fsica sigue la norma IEC 11158-2 para comunicacin a 31,25 Kbps, es por tanto, compatible con Profibs PA, su principal contendiente. Presta especial atencin a las versiones que cumplen normas de seguridad intrnseca para industrias de proceso en ambientes combustibles o explosivos. Se soporta sobre par trenzado y es posible la reutilizacin de los antiguos cableados de instrumentacin analgica 4-20 mA. Se utiliza comunicacin sncrona con codificacin Manchester Bifase-L. La capa de aplicacin utiliza un protocolo sofisticado, orientado a objetos con mltiples formatos de mensaje. Distingue entre dispositivos con capacidad de arbitracin (Link Master) y normales. En cada momento un solo Link master arbitra el bus, puede ser sustituido por otro en caso de fallo. Utiliza diversos mensajes para gestionar comunicacin por paso de testigo, comunicacin clienteservidor, modelo productor-consumidor etc. Existen servicios para configuracin,
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

67 DE 133

gestin de diccionario de objetos en nodos, acceso a variables, eventos, carga descarga de ficheros y aplicaciones, ejecucin de aplicaciones, etc. La codificacin de mensajes se define segn ASN.1 El nivel H2 (dos) est basado en Ethernet de alta velocidad (100 Mbps) y orientado al nivel de control de la red industrial.
4.5. FIP- WorldFIP

Desarrollado en Francia a finales de los ochenta y normalizado por EN 50170, que tambin cubre Profibus. Sus capas fsica y de aplicacin son anlogas a las de Foundation Fieldbus H1 y Profibus PA. La divisin Norteamrica de WorldFIP se uni a mediados de los noventa a la Fieldbus Foundation en el esfuerzo por la normalizacin de un bus industrial comn. Utiliza un modelo productor-consumidor con gestin de variables cclicas, eventos y mensajes genricos.
4.6. LONWORKS

La empresa Echelon, localizada en California, fue fundada en 1988. Comercializa el bus de campo LonWorks basado en el protocolo LonTalk y soportado sobre el NeuronChip. Alrededor de estas marcas ha construido toda una estructura de productos y servicios, hbilmente comercializados, dirigidos al mercado del control distribuido en domtica, edificios inteligentes, control industrial etc. Asegura que varios miles de empresas trabajan con LonWorks, que cientos de empresas comercializan productos basados en su bus y que se han instalado millones de nodos. El protocolo LonTalk cubre todas las capas OSI. El protocolo se soporta en hardware y firmware sobre el NeuronChip. Se trata de un microcontrolador que incluye el controlador de comunicaciones y toda una capa de firmware que, adems de implementar el protocolo, ofrece una serie de servicios que permiten el desarrollo de aplicaciones en el lenguaje Neuron C, una variante de ANSI C. Motorola y Toshiba fabrican el NeuronChip, adems Echelon ofrece la posibilidad de abrir la implementacin de LonWorks a otros procesadores. La red Lonworks ofrece una variada seleccin de medios fsicos y topologas de red: par trenzado en bus, anillo y topologa libre, fibra ptica, radio, transmisin sobre red elctrica etc. El soporte ms usual es par trenzado a 38 o 78 Kbps. Se ofrece una amplia gama de servicios de red que permiten la construccin de extensas arquitecturas con multitud de nodos, dominios y grupos, tpicas de grandes edificios inteligentes. El mtodo de comparacin de medio es acceso CSMA predictivo e incluye servicios de prioridad de mensajes.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

68 DE 133

Echelon ofrece herramientas de desarrollo, formacin, documentacin y soporte tcnico. Echelon basa su negocio en la comercializacin del bus, medios, herramientas y soporte,
4.7. SDS

SDS ("Smart Distributed System") es, junto con DeviceNet y CANOpen, uno de los buses de campo basados en CAN ms extendidos. Fue desarrollado por el fabricante de sensores industriales Honeywell en 1989. Se ha utilizado sobre todo en aplicaciones de sistemas de almacenamiento, empaquetado y clasificacin automtica. Se define una capa fsica que incluye alimentacin de dispositivos en las conexiones. La capa de aplicacin define autodiagnstico de nodos, comunicacin por eventos y prioridades de alta velocidad.
4.8. CANOpen

Bus de campo basado en CAN. Fue el resultado de un proyecto de investigacin financiado por la Comunidad Europea y se est extendiendo de forma importante entre fabricantes de maquinaria e integradores de clula de proceso. Est soportado por la organizacin CiA (CAN In Automation), organizacin de fabricantes y usuarios de CAN que tambin apoya DeviceNet, SDS etc. Al final de este trabajo se describir con ms detalle este bus, como ejemplo de bus de campo normalizado soportado sobre CAN.
4.9.- MODBUS

En su definicin inicial Modbus era una especificacin de tramas, mensajes y funciones utilizada para la comunicacin con los PLCs Modicon. Modbus puede implementarse sobre cualquier lnea de comunicacin serie y permite la comunicacin por medio de tramas binarias o ASCII con un proceso interrogacinrespuesta simple. Debido a que fue incluido en los PLCs de la prestigiosa firma Modicon en 1979, ha resultado un estndar de facto para el enlace serie entre dispositivos industriales. Modbus Plus define un completo bus de campo basado en tcnica de paso de testigo. Se utiliza como soporte fsico el par-trenzado o fibra ptica. En la actualidad Modbus es soportado por el grupo de automatizacin Schneider (Telemechanique, Modicon,...).
4.10.- INDUSTRIAL ETHERNET

La norma IEEE 802.3 basada en la red Ethernet de Xerox se ha convertido en el mtodo ms extendido para interconexin de computadores personales en redes de proceso de datos. En la actualidad se vive una autntica revolucin en cuanto
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

69 DE 133

a su desplazamiento hacia las redes industriales. Es indudable esa penetracin. Diversos buses de campo establecidos como Profibus, Modbus etc. han adoptado Ethernet como la red apropiada para los niveles superiores. En todo caso se buscan soluciones a los principales inconvenientes de Ethernet como soporte para comunicaciones industriales: El intrnseco indeterminismo de Ethernet se aborda por medio de topologas basadas en conmutadores. En todo caso esas opciones no son gratuitas. Se han de aplicar normas especiales para conectores, blindajes, rangos de temperatura etc. La tarjeta adaptadora Ethernet empieza a encarecerse cuando se la dota de robustez para un entorno industrial Parece difcil que Ethernet tenga futuro a nivel de sensor, aunque puede aplicarse en nodos que engloban conexiones mltiples de entrada-salida. Como conclusin Ethernet est ocupando un rea importante entre las opciones para redes industriales, pero parece aventurado afirmar, como se ha llegado a hacer, que pueda llegar a penetrar en los niveles bajos de la pirmide CIM.
4.11. ASi

AS-I (Actuator Sensor Interface) es un bus de campo desarrollado inicialmente por Siemens, para la interconexin de actuadores y sensores binarios. Actualmente est recogido por el estndar IEC TG 17B. A nivel fsico, la red puede adoptar cualquier tipo de topologa: estructura en bus, en rbol, en estrella o en anillo. Permite la interconexin de un mximo de 31 esclavos. La longitud mxima de cada segmento es de 100 metros. Dispone de repetidores que permiten la unin de hasta tres segmentos, y de puentes hacia redes Profibus. Como medio fsico de transmisin, emplea un nico cable que permite tanto la transmisin de datos como la alimentacin de los dispositivos conectados a la red. Su diseo evita errores de polaridad al conectar nuevos dispositivos a la red. La incorporacin o eliminacin de elementos de la red no requiere la modificacin del cable. El cable consta de dos hilos sin apantallamiento. Para lograr inmunidad al ruido, la transmisin se hace basndose en una codificacin Manchester Cada esclavo dispone de hasta 4 entradas/salidas, lo que hace que la red pueda controlar hasta 124 E/S digitales. La comunicacin sigue un esquema maestro esclavo, en la cual el maestro interroga a las estaciones envindoles mensajes (llamados telegramas) de 14 bits y el esclavo responde con un mensaje de 7 bits. La duracin de cada ciclo pregunta respuesta es de 150 s. En cada ciclo de comunicacin se deben consultar todos los esclavos, aadiendo dos ciclos extras para operaciones de administracin del bus (deteccin de fallos). El resultado es un tiempo de ciclo mximo de-5ms.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS 4.12 BITBUS

70 DE 133

Introducido por Intel a principios de los 80. Es un bus maestro-esclavo soportado sobre RS485 y normalizado en IEEE- 1118. Debido a su sencillez ha sido adoptado en redes de pequeos fabricantes o integradores. En su capa de aplicacin se contempla la gestin de tareas distribuidas, es decir es, en cierto modo, un sistema multitarea distribuido. Existe una organizacin europea de soporte (Bitbus European User's Group).
4.13 ARCNet

Originalmente desarrollada como red para proceso de datos en los aos 70 ARCNet ha encontrado aplicacin en el mundo industrial. Su tcnica de paso de testigo hace que sea predecible, determinista y robusta. Est normalizada como ANSI/ATA 878. 1. La velocidad de comunicacin es de 2,5 Mbps con paquetes del 0 a 512 bytes. Soporta topologa en bus y estrella y diversos medios fsicos (cable coaxial, par trenzado, fibra ptica). Es una red muy apropiada para un nivel intermedio en la jerarqua CIM. Algunos fabricantes proponen como jerarqua ideal para control industrial una basada en Ethernet en el nivel superior, ArcNET en el intermedio y CAN al nivel de celda de fabricacin.
4.14 CONTROLNET

Bus de alta velocidad (5 Mbps) y distancia (hasta 5 Km), muy seguro y robusto promovido por Allen-Bradley. Utiliza cable RG6/U (utilizado en televisin por cable) y se basa en un controlador ASIC de Rockwell. No es soportado por muchos fabricantes y resulta de elevado precio por nodo. Se ha utilizado para interconexin de redes de PLCs y computadores industriales en aplicaciones de alta velocidad y ambientes muy crticos.
4.15. HART

Es un protocolo para bus de campo soportado por la HART Communication Foundation y la Fieldbus Foundation, Su campo de aplicacin bsico es la comunicacin digital sobre las lneas analgicas clsicas de los sistemas de instrumentacin, manteniendo stas en servicio. Sus prestaciones como bus de campo son reducidas. Utiliza el bus analgico estndar 4-20 mA sobre el que transmite una seal digital modulada en frecuencia (modulacin FSK 1200-2200 Hz). Transmite a 1200 bps manteniendo compatibilidad con la aplicacin analgica inicial y sobre distancias de hasta 3 Km. Normalmente funciona en modo maestro-esclavo.
5. LA GUERRA DE LOS BUSES. ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

71 DE 133

Ante la variedad de opciones existente, parece razonable pensar que fabricantes y usuarios hicieran un esfuerzo en la bsqueda de normativas comunes para la interconexin de sistemas industriales. Lo que ha venido llamndose "la guerra de los buses" tiene que ver con la permanente confusin reinante en los entornos normalizadores en los que se debate la especificacin del supuesto "bus de campo universal". Desde mediados de los aos 80 la Comisin Electrotcnica Internacional (IEC-CEI) y la Sociedad de Instrumentacin Americana (ISA) ha sido escenario del supuesto esfuerzo de los fabricantes para lograr el establecimiento de una norma nica de bus de campo de uso general. En 1992 surgieron dos grupos, el ISP (Interoperable Systems Project) y WorldFIP cada uno promoviendo su propia versin del bus de campo. En el primer grupo estaban fabricantes como Siemens, Fisher-Rosemount, Foxboro y Yokogawa. En el segundo Allen-Bradley, HoneyWell, Square D y diversas empresas francesa. En 1994 ambos grupos se unieron en la Fieldbus Foundation. El debate se traslad luego, y continua en la actualidad, a la conjuncin de Fieldbus y el mundo Profibus. Los aos pasan, la norma del supuesto bus universal nunca se acaba de generar y en el camino aparecen nuevas opciones como CAN, LonWorks, Ethernet. Incluso el debate es confuso y totalmente incomprensible, otras empresas participantes en el debate generaban en paralelo soluciones propias, es el caso de Allen-Bradley con DeviceNet y HoneyWell con SDS. La realidad es que slo los usuarios estn realmente interesados en la obtencin de normas de uso general. Los fabricantes luchan por su cuota de mercado y, en general, slo estn a favor de una norma cuando sta recoge las caractersticas de su propia opcin, lo cual es comprensible dadas las fuertes inversiones necesarias para el desarrollo de un bus industrial normalizado. El debate sigue abierto.
6. CONCLUSIONES

Se han presentado algunas caractersticas funcionales de los Buses de Campo detallando algunos de mayor uso en diferentes modalidades de ambiente de trabajo. Adems, se incluyeron criterios tiles de la estructuracin dentro del concepto CIM-OSI. Estos antecedentes pueden ayudar a los profesionales para encontrar soluciones racionales y bien encaminadas para los problemas de comunicaciones a los niveles de produccin, a pesar la falta de normas internacionales definitivas, dentro de la gama de buses de campo existentes.
BIBLIOGRAFIA

[1] Tindell K, Calculating CAN response times, University of York, England 1995. [2] Mc Farlane Andy, Tutorial: Fieldbus review, Sensor Review, Vol 17, Num 3, 1997. [3] Sirgo J.A., Redes locales en entornos industriales: Buses de campo, Universidad de Oviedo, 1997.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

72 DE 133

[4] Quezada J., Bus CAN: Estado de buses industriales y aplicaciones Escuela Tcnica Superior de Ingenieros Industriales, 1999. [5] www.fieldbus,org, Fieldbus Organization. [6] www.bosh.de/KB/can, Pgina de la Bosh dedicada a CAN. [7] www.Kvaser.se. .KingDom CAN apllications.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 3 FIELDBUS

73 DE 133

3.2 ESPECIFICACION. 3.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

74 DE 133

UNIDAD 4 BITBUS
4.1 INTRODUCCION. Cableado y terminaciones El cableado puede estar formado por uno o dos pares de cables trenzados y apantallados, siendo el apantallamiento comn para todos los cables. Normalmente se emplea un par de cables para la lnea de datos semidplex y el segundo par para una de las siguientes aplicaciones: Transmisin del reloj en modo sncrono. Conmutacin de la lnea en repetidores en modo autoreloj. La impedancia caracterstica de cada par de cables debe ser 120 ohmios. Las terminaciones sern resistencias de 120 ohmios para evitar el efecto de reflexin. Conectores El estndar especifica que los conectores deben ser del tipo sub-D9. El patillaje es el mismo que para un conector RS-232, pero slo se emplean las seales RxD, TxD y masa. Estructura La estructura de la red BITBUS puede ser de varios tipos: Bsica: estructura maestro-esclavo. lgica del tipo

Arbol: se emplean repetidores para largas distancias, se considera todo un nico bus y se opera en modo autoreloj (debido a que los repetidores no transmiten la seal de reloj). Arbol multinivel: se emplean uniones esclavo-maestro para formar sub-buses en varios niveles. Cada nivel puede operar a una velocidad propia y posee sus propias direcciones. Ejemplo:

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

75 DE 133

En la siguiente tabla se muestran las distintas posibilidades de nodos y repetidores: Modo Autoreloj Autoreloj Autoreloj Autoreloj Sncrono N mx. nodos 28 28 250 250 28 de N mx. de Velocidad repetidores (bits/s) Ninguno 62,5 K Ninguno 375 K 10 62,5 K 2 Ninguno 375 K 62,5 K o 375 K Distancia mx. (m) 1200 300 1200 entre repetidores (4800 mx) 300 entre repetidores (900 mx) 300 o 1200 (segn velocidad)

Tipos de nodos Todo bus BITBUS se compone de elementos bsicos denominados nodos. Un nodo es cualquier dispositivo que contenga al menos una interfaz con el bus. Los nodos posibles son: Maestro: permite controlar el acceso a un bus de cualquier nivel mediante un protocolo de comunicacin del tipo pregunta-respuesta. En cada nivel slo existe un maestro, aunque es posible la existencia de un maestro flotante (desaconsejado por el estndar). Esclavo: es un bloque controlado por el maestro, el cual slo transmite si el maestro lo indica. El esclavo puede estar conectado a su vez con un maestro o un bloque de E/S Repetidor: se encarga de regenerar la seal de datos del bus (no el reloj). Se emplea para aumentar la longitud del bus. Expansin E/S: es cualquier dispositivo de E/S que se quiera conectar al bus o a un esclavo. Modos de sincronizacin Existen dos modos de sincronizacin de bits: Sncrono: en este modo los datos se transmiten por un par trenzado y el reloj mediante otro par adicional. No se admiten repetidores y la estructura del bus es completamente lineal (slo hay un nivel).
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

76 DE 133

Autoreloj: en este modo cada nodo genera su propio reloj, sincronizando con la lnea de datos. Los datos se codifican en formato NRZI. Se permiten repetidores (obligatorio para ms de 28 nodos). Las derivaciones a partir del repetidor requieren una lnea de control adems de la lnea de datos, por lo que se emplean dos pares trenzados. Codificacin Nivel de bits: Modo sncrono: la codificacin se realiza mediante el procedimiento NRZ (0 es nivel bajo y 1 es nivel alto). Modo autoreloj: la codificacin se realiza mediante el procedimiento NRZI (0 es cambio de nivel y 1 es un NO cambio de nivel). A nivel de byte se emplea un juego reducido del protocolo SDLC de IBM. Este protocolo inserta un "0" despus de cinco "1" consecutivos. Este sistema, combinado con la codificacin de bit por NRZI, permite sincronizar el reloj en el receptor en modo autoreloj cada 6 bits como mnimo. El controlador de Intel 8044 proporciona la insercin y eliminacin de ceros del protocolo SDLC de forma automtica. Trama del mensaje La comunicacin entre nodos se realiza mediante mensajes. Dicha comunicacin siempre se efecta a peticin del maestro y consta siempre de un mensaje de pregunta al esclavo y de un mensaje de respuesta del mismo. La trama de mensaje se compone de entre 6 y 255 bytes, siendo su estructura la siguiente: Flag (7Eh) Direccin esclavo Control Informacin (funciones/dat os) CRC bits) (16 Flag (7Eh)

Flag

Longitud: 1 byte. Todo mensaje debe estar delimitado mediante dos Flag al comienzo y al final del mismo. Se denomina Flag a un caracter de valor fijo e igual a 7E (hexadecimal).
Direccin esclavo

Longitud: 1 byte.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

77 DE 133

En todos los mensajes este campo indica la direccin del esclavo, entre 1 y 250. Las direcciones 0 y 251 a 255 estn reservadas.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS Control

78 DE 133

Longitud: 1 byte Este campo clasifica las tramas en tres tipos: Control. Supervisin. Informacin. De los tres tipos slo la trama de informacin contiene un campo de informacin dentro del mensaje. En el resto todos los mensajes se componen de 6 bytes (no incluyen el campo de informacin). A continuacin se muestra una tabla con todas la funciones:
Funcin Modo de respuesta normal (SNRM) Desconexin (DISC) Reconocimiento numerado (UA) Trama (FRMR) Consulta (polling) no Tipo de trama Control M > E Control M > E Control E > M Control E > M Supervisin M >E Cdigo (campo de control) 93h 53h 53h 97h RRR10001 (binario) Descripcin Se ordena al esclavo pasar al estado de respuesta normal (NRM) Se ordena al esclavo pasar al estado de desconexin (NDM) Respuesta del esclavo indicando que ha recibido una orden vlida estando en estado de desconexin. Respuesta del esclavo indicando que ha recibido una orden incorrecta estando en estado normal (NRM) RRR=n de secuencias anteriores recibidas como correctasEl maestro indica que el esclavo debe contestar como consulta o test, respondiendo con RR o RNR. RRR=n de secuencias anteriores recibidas como correctas Respuesta del esclavo indicando que la consulta es correcta y que no tiene datos que transmitir. RRR=n de secuencias anteriores recibidas como correctas Respuesta del esclavo indicando que la consulta es correcta pero que no puede aceptarla por tener el buffer lleno. RRR=n de secuencias anteriores recibidas como correctas EEE=n de secuencias enviadas Tramas normales de intercambio de informacin. En cada trama se comprueba los nmeros de secuencia para evitar duplicidad de mensajes y detectar la prdida de tramas o errores de transmisin.

rechazada o test

Receptor (RR)

dispuesto

Supervisin E >M

RRR10001 (binario)

Receptor no dispuesto (RNR)

Supervisin E >M

RRR10101 (binario)

Informacin (I)

Informacin M >EE>M

RRR1EEE0 (binario)

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS Informacin

79 DE 133

Longitud: mximo 250 bytes Este campo es de longitud variable y slo existe en las tramas de informacin. En el siguiente epgrafe se explica con profundidad esta parte de la trama.
CRC

Longitud: 2 bytes El CRC es un conjunto de 16 bits que sirven para detectar errores de transmisin. Los dos bytes se obtienen mediante un polinomio H4 del tipo (XE16 + XE12 + XE5 + 1). Trama del campo de informacin El campo de informacin de la trama obedece a un formato que especifica un mnimo de 7 bytes y un mximo de 250 (aunque se acepta como dispositivo estndar aquel que permite entre 7 y 20 bytes de longitud). Los bytes se corresponden con el siguiente formato: Byte Descripcin 1 2 3 4 5 6 en adelante (hasta byte 250)
Longitud de informacin

Longitud de informacin MT - SE - DE - TR - 4 bits de reserva Direccin esclavo Tarea fuente - Tarea destino Tareas usuario / Errores Otros datos (Mnimo 2 bytes)

Indica la longitud del campo de informacin (entre 7 y 250).


Tipo de mensaje (MT)

0 = orden 1 = respuesta
Fuente de la orden (SE)

Indica si la fuente de una orden o el destino de una respuesta es: 0 = bloque maestro 1 = bloque de expasin E/S de ste

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS Destino de la orden (DE)

80 DE 133

Indica si el destino de una orden o la fuente de una respuesta es: 0 = bloque esclavo 1 = bloque de expasin E/S de ste
Pista (TR)

0 = mensaje de maestro a esclavo 1 = respuesta de esclavo a maestro


4 bits reservados

Se reservan para futuras ampliaciones, deben ser puestos a 0 al enviar el mensaje.


Direccin esclavo

El valor debe estar comprendido entre 1 y 250 (como ya se ha comentado anteriormente).


Codificacin de tareas

Este byte se compone de dos grupos de 4 bits: tarea fuente (4 bits altos): las tareas 12 a 15 estn libres y pueden ser definidas por el usuario. La tarea 0 est reservada a los servicios RAC (ver tabla adjunta) y las tareas 1 a 11 estn reservadas por Intel. tarea destino (4 bits altos): definibles por el usuario (salvo que la tarea fuente sea la 0). La tarea 0 o RAC (Remote Acces and Control) proporciona una serie de funciones que todo dispositivo BITBUS debe soportar:
Cdigo 00h 01h 02h 03h 04h 05h 06h 07h 08h 09h 0Ah 0Bh 0Ch 0Dh 0Eh Tipo Control Control Control Control Control Acceso Acceso Acceso Acceso Acceso Acceso Acceso Acceso Acceso Acceso Tarea Reset esclavo Llamar tarea programada en un esclavo Finalizar tarea Obtener identificador/puntero de la funcin. Habilitar/deshabilitar el resto de tareas (excepto RAC) en un esclavo. Leer 1 byte de E/S Escribir 1 byte de E/S Actualizar lneas de E/S Leer n bytes de la memoria del esclavo Grabar n bytes en la memoria del esclavo Operacin O (OR) con byte de E/S Operacin Y (AND) con byte de E/S Operacin O-exclusiva (XOR) con byte de E/S Leer registro de estado Escribir registro de estado INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

ING. ALFONSO PEREZ GARCIA

UNIDAD 4 BITBUS 0Fh a BFh C0h a FFh Funciones reservadas por INTEL Funciones definibles por el usuario

81 DE 133

Tareas usuario/Errores

Este byte, en los mensajes de rdenes de maestro a esclavo, contendr los datos necesarios para las subfunciones definidas por el usuario. En los mensajes de respuesta contendr los cdigos de error. La siguiente tabla muestra los cdigos de error que contempla el estndar y seala aquellos definibles por el usuario:
Cdigo 00h 01h a 7Fh 80h 81h 82h 83h 84h 85h a 90h 91h 92h 93h 94h 95h 96h 97h a FFh Datos Error No hay error Errores definidos por el usuario No se encuantra la tarea destino Imposible iniciar tarea debido a que se est realizando otra Imposible crear tarea por falta de banco de registros Solicitud de tarea ya activa Imposible iniciar tarea por falta de memoria Reservado por Intel Error de protocolo Reservado por Intel El nodo de destino no responde Reservado por Intel Tareas deshabilitadas por RAC Orden RAC desconocida Reservado por Intel

Estos bytes estn libres para uso general, pero al menos deben existir los bytes 6 y 7 en cualquier trama que tenga campo de informacin. Registros de estado y contadores de secuencia Todo esclavo posee un registro que indica su estado dentro de los dos posibles: Modo de respuesta normal (NRM): en este modo el esclavo puede intercambiar mensajes con el maestro normalmente. Modo de desconexin (NDM): en este modo el esclavo no puede intercambiar mensajes con el maestro. Un esclavo pasa a este modo tras un reset (inicio) del sistema o cuando detecta un error de sincronizacin o una trama que no puede interpretar. Para pasar al modo NRM se requiere una inicializacin por parte del maestro. Cada esclavo dispone, adems, de un contador de intercambios que es comprobado con cada intercambio (excepto en tramas de control) y permite detectar errores de interpretacin o prdida de una trama. El maestro mantiene una tabla con los registro de estado y los contadores de intercambio de todos los esclavos.
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

82 DE 133

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

83 DE 133

Bibliografa Bitbus European Users Group web pages ELZET80: BITBUS overview "Autmatas programables" Josep Balcells, Jos Luis Romeral Serie Mundo Electrnico Ed. Marcombo, Boixareu editores, Barcelona.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

84 DE 133

BITBUS*

Last updated: Sat Jan 22 2005 1:03 PM PST.

Distributed Control Modules

Web Site

What is BITBUS?
BITBUS is a serial interconnect for distributed control modules. Serial means it sends data down the interconnect cable one bit after another. The 9-conductor interconnect cable consists of a differential data pair, a differential clock pair, and signal grounds. The clock speeds supported are self-clocked mode (crystal provided) at 62.5 kb/s and 375 kb/s and synchronous mode (you supply the crystal) from 500 kb/s to 2.4 Mb/s. Conductors are also reserved for low voltage power (+12V) and chassis ground. The electical transmission standard used is RS-485, which is a variant of synchronous RS-232. The datalink protocol is SDLC (Synchronous Data Link Control) developed by IBM.* SDLC requires that one module be designated as the master and all other modules respond as slaves. Distributed means that the multiple controllers attached to the BITBUS can be physically distant from one another. The SDLC protocol allows up to 250 controllers to be daisy-chained up to a maximum of 13.2 km. Distance is inversely dependent upon clock speed (the farther you go, the slower it has to be). Control Modules means small microprocessor-based digital and/or analog I/O cards, designed for the purpose of controlling mechanical equipment, e.g., the typical application is the management of a conveyor assembly line. Control module printed circuit boards are 3U high (100 mm) and 220 mm deep Eurocard DIN rack-mount form factor.
What is the History of BITBUS?

The BITBUS hardware and software architecture was developed by the OEM Modules Operation of Intel* Corporation during 1982 and 1983. The first products were launched in February of 1984. They were:
o o o o o

iSBX* 344 -- daughter card (typically master) for mounting on Multibus SBC's (Single Board Computers) iRCB* 44/10 -- remote controller board (typically slave) digital I/O points 3U Eurocard iDCX* 51 -- Real Time operating system for the Intel 8051 family microcontrollers iDCM* 44 -- preconfigured iDCX 51 task allowing easy digital I/O programming iRMX* 510 -- SDK (Software Development Kit) for host operating systems run on SBC's

BITBUS was approved as IEEE standard 1118 during 1984. Additional BITBUS products launched by Intel were:
INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

ING. ALFONSO PEREZ GARCIA

UNIDAD 4 BITBUS o o o o o o o

85 DE 133

iRCB 44/20 -- remote controller board (typically slave) analog I/O points 3U Eurocard iRCX* 910 -- digital I/O point conditioning/wiring rack-mount panel iRCX 920 -- analog I/O point conditioning/wiring rack-mount panel iPCX* 344 -- ISA adapter card for PC-compatibles (typically master) iDCS* 100 -- (also known as the BITBUS Toolbox) expanded SDK iDCS 101 -- source code to SDK interface libraries, in C language BITBUS Starter Kit -- teaching / orientation tool

Due to financial considerations, Intel decided to discontinue development and support of the BITBUS product line in 1988. In 1990, the BITBUS software was placed by Intel into the public domain so that existing users, hobbyists, and academic institutions could continue to benefit from the technology. In 2000, I finally got around to creating this web site. You can get some information and download some of the software from here. tested on the 8051,

What are the Features of the iDCX 51 real time operating system? Runs on Intel 8051 family microcontrollers. It had been

8044, 80152, 80252, and 80452. Multitasking real time operating system. Up to 8 concurrent tasks. If the iDCM 44 Remote Access and Control task is configured, that counts as Task 0 of tasks 0 through 7. Very compact. It's written in 8051 assembler and fits in 2.2 kB. Supports interprocess communication, both between on-board tasks, and from on-board tasks to host application software connected to the master module.

Can I still get BITBUS software?

Yes. Much of the BITBUS software was saved for posterity by me. Some of the popular software can be downloaded from this web site: dcx51.zip, 603 kB -- ZIP archive of iDCX 51 materials (the OS) dcm44.zip, 433 kB -- ZIP archive of iDCM 44 materials (the "RAC Task") dcs101.zip, 99 kB -- ZIP archive of iDCS 101 materials (host interface code) If there are sufficient requests, I will make additional downloads available. Also, I have a CD-ROM containing approximatley 50 MB of software that I can duplicate for you. Contact me by e-mail at "flamer at alfirin.net" (change the word "at" to a real "@" sign) or drop me a letter, and let me know what you want. Go see my personal web page at http://www.alfirin.net/flamer/ to find my current Snail-mail address.
Can I still get BITBUS hardware?

Yes. Intel discontinued manufacture of the 8044 BEM (BITBUS Enhanced Microcontroller, a variant of the 8051 with the iDCX 51 operating system and the iDCM 44 I/O task fabricated in masked ROM), boards, and software. However, ....

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

86 DE 133

The 8044 is now being produced by Rochester Electronics, http://www.rocelec.com. Boards are being produced by various manufacturers. Check out InBus Engineering, http://www.inbus.com for a great source. For some reason, BITBUS still seems to be very popular in Europe, check out the BITBUS European User's Group at http://www.bitbus.org.

Can I still get BITBUS documentation?

Intel Technical Publications discontinued production of BITBUS user manuals. Some documentation is available on the CD-ROM, most notably the iDCX 51 user's manual. I hope this helps all you BITBUS die-hards still out there! Sincerely, --Jim Trethewey Thanks go to Pieter Hoeben of Hoeben Electronics, http://www.hoeben.com, for information on European activities. * Trademarks and brands are the property of their respective owners.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

87 DE 133

BITBUS Basics
Type: Master-slave network exchanging SDLC message frames. 248 bytes max. net data length per message. Stucture: Bus, terminated at both ends. Stubs and prolongation possible with the use of repeaters. Media: Twisted pair cable (one pair, 120 Ohms characteristic impedance) with ground wire and screen. Second pair necessary only with passive repeaters - not with selfdirecting repeaters. Electrial: Differential pair 0/5V as defined in RS485. Protocol: SDLC bitsynchronous self-clocked NRZI with opening and closing flags, address checking and 16bit CRC check word. Data rate: 62,5kBit/s, 375kBit/s or 1,5MBit/s. Slaves: 28 per segment with repeaters after one segment, 250 maximum. More stations per segment with modern RS485-transceivers (ALS/LBC). Data rate with more than one repeater: 62,5kBit/s only Extension: 300m per Segment at 375kBit/s, 1200m at 62,5kBit/s - higher rates with modern RS485 transceivers. Connector: 9pin Sub-D-connector

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

88 DE 133

There are 250 participants (nodes) allowed in a BITBUS network. Depending on hardware and manufacturer, the address needs to be set using jumpers, rotary switches or it might be programmed into EEPROM. Addresses 0 and 250..254 are reserved, 255 addresses the local network board processor from the master processor (source extension) and is used as broadcast address, a new IEEE1118 feature. To keep things simple, there is only one master who originates all requests and gets replies from the slave nodes. A slave cannot transmit without being polled so there are no bus arbitration problems. As soon as the master has sent a request, it starts polling for an answer. Special very short messages are exchanged while waiting for a reply. More than one request can be sent to a slave before having a reply on the first one. Unanswered requests are called outstanding messages. A typical slave can handle 8 outstanding messages. Messages can be sent to 16 (8 on i8044) different tasks in a slave with task 0 being reserved for the RAC task (remote access and control interface), now named GBS (generic bus services) in IEEE1118. RAC and real-time-kernel are the layer 7 of BITBUS and support basic i/o functionality and remote user task control. A BITBUS message basically is an SDLC message containing the BITBUS specific data as information field. SDLC is a bitsynchronous protocol defined by IBM and used very widely in all areas where data integrity is mandatory (HDLC, ISDN). The
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

89 DE 133

SDLC frame is handled in hardware by the serial line controller, i.e. address checking and CRC generation/detection need no processor overhead. In many implementations, the message is transferred into memory in the background (DMA) and the processor is interrupted if the transfer is complete. Bitbus message structure: While the outer SDLC frame is filled by system software, it is the users responsability to fill the BITBUS message (the double framed part in the drawing) with the following information:

Length: Data field length + 7 Routing flags: MT differentiates master requests (MT=0) from slave replies (MT=1). SE (source extension) indicates that not the network processor is the originator of the message but a processor controlling it (for example the PC processor on a PC master board). DE (destination extension) routes the message to a processor behind the receiving network node TR is a transmit/receive flag. Used internally in the i8044 only. Set to "0".
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

90 DE 133

Node address: specifies the destination (slave) 1..249 Source / destination task:4 bits each specify the task number (0..15) of the source application (i.e. visualization app. or BITBUS-monitor or ... on the master PC) and the task number at the destination (0 for RAC, other for different user tasks). Command / response byte: tells the slave what to do. For RAC/GBS the commands are predefined, user task commands are application specific. Contains error code on reply: 0 = no error, 80..9F are RAC error codes, others are user error codes. The data field has a variable length from 0 to 248 bytes (0..13 on i8044). Usually the length of the expected reply is sent with the request to ease buffer management in the slave. For some RAC commands (i.e. Read I/O) there is a sequence of address/dummy bytes where the dummy bytes are filled with the data read on the given i/o address in the slave. The CRC16 bytes and the ending flag are not part of the BITBUS message but are added by the SDLC-controller hardware. For all standard applications, the user does not need to know more about the BITBUS internals. It is his duty to fill a buffer with the message information and to hand the buffer over to BAPI ( the BITBUS Application Programmers Interface) or the respective proprietary operating system function. BITBUS Layer 7: RAC/GBS One of the many advantages of BITBUS is it's definition of a standard command set called RAC "Remote Access and Control interface". With the extension of the commands under IEEE1118, they have been renamed to GBS "Generic Bus Services". These commands can be used on BITBUS slaves of all vendors. RAC/GBS is addressed as task 0 on a slave and the desired command is selected in the command byte. I/O access structure For the example of an i/o-command, the BITBUS message buffer has to be filled with length, routing flags, node address, S/D task numbers and the RAC command number followed by a sequence of port addresses and data bytes: Add1, Data1, Add2, Data2,.. When it returns, the command byte is filled with an error code and the data bytes contain updated port data.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

91 DE 133

Memory access structure In the case of memory commands the begin of the buffer structure is like with the i/o access structure, however the data field starts with an address pointer (high byte, then low byte) followed by the memory data to be written or dummy bytes with read commands. The length field is memory data bytes plus 9 (standard 7 + 2). IEEE1118 address extension: To allow for memories greater than 64K (essential for processors like TLCS900 or MC68xxx with a large linear address space), address pointers can be extended as follows: Use BFH as command byte, then put into the first two bytes of the data field the address extension the upper 16 bits of a 32bit address. The third byte of the data field gets the command byte followed by the LSW of the memory address (for memory com-mands). Address extension also works on i/o-commands, as these are based on a 256 byte i/o address space, the extension is the upper 16 bits of a 24 - bit address, however. Function IDs To allow for tasks to be independent of a certain task number they are assigned by the system, function IDs are supported. In the task header (for iDCX51 and mCAT tasks) there's an entry for a function ID. The RAC/GBS-function GBS_GET_FUNC returns a list of 8 or 16 bytes with function IDs (sometimes even 32 as the 'DE'-bit is used by some manufacturers to extend the possible number of tasks). The first byte is the ID of task 0 (usually it contains 01, as this is the ID of the RAC/GBS-task), the second that of task 1 and so on. If FF is returned, there's a task with no function IDs, while a '0' means there is no task. BITBUS/IEEE1118 allows codes 80 to FE for user function IDs. Using slave tasks Most BITBUS slaves are equipped with a real time multitasking kernel where messages can be sent from the master to specified slave tasks. These tasks are addressed exactly like the RAC/GBS task except that the destination task number isn't 0 but the number of the desired user task (which can be found out from the master using the mechanism described above. In the table below, the function type specifies the structure of the data field with I for the I/ O-type structure and M for memory accesses as described above. C are control commands that have their specific data explained in the command description.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

92 DE 133

RAC/GBS Befehle
Command Code 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 11 12 15 16 17 1A 21 BF Command Type C M C C C I I I M M I I I I I C M M C C C C M M Command description GBS_RESET Resets the slave. (Only function with no reply) GBS_CREATE Creates and starts a task. Data field contains a pointer to the task header, MSB first. (16 bit + BF extension) GBS_DELETE Deletes a Task. Data: task number as only data byte. GBS_GET_FUNC Get function ID (see "Function IDs") GBS_PROTECT Disables remote access commands Data: 0= no protection, 1= protect memory, 2= write protect. GBS_READ_IO Reads from port addresses. GBS_WRITE_IO Writes to port addresses. GBS_UPDATE_IO Writes and re-reads the port addresses specified. GBS_UP_DATA Uploads a random memory block from the slave. GBS_DOWN_DATA Downloads a memory block GBS_OR_IO Logically ORs data in i/o ports with the mask given as data bytes. Re-reads the port. Used to set some bits. GBS_AND_IO Logical AND used to reset bits. GBS_XOR_IO Logical XOR used to toggle bits. GBS_WRITE_IRAM Writes to internal RAM (hardware specific memory block). In the case of mCAT, these commands cover a predefined memory block. GBS_READ_IRAM Reads from internal memory. GBS_GET_INFO Returns hardware and task information (see below) GBS_UP_CODE Uploads code from the slaves memory. Same as UP_DATA with processors that do not distinguish between code and data spaces. GBS_DOWN_CODE Downloads code to slaves using special EEPROM/Flash-Eprom memory write procedure GBS_GET_TIME Returns data structure (see GbsTime) with date and time info. GBS_SET_TIME Sets time (see bitbus.h) GBS_SUSPEND_TASK Suspends the task with the number given as only data byte. GBS_GET_TASK_ID Returns task id for function id entered (similar to GBS_GET_FUNC but for one id only). GBS_FLASH_GET_ID Returns 32bit Flash-EPROM type code in ext. addressing message. GBS_EXTEND_ADDR Address pointer extension. See memory structure text for details.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

93 DE 133

RAC/GBS Fehlercodes 00 80 81 82 83 84 86 87 90 91 93 95 96 97 GBS_ERR_OK No error GBS_ERR_NO_DEST_TASK Task does not exist GBS_ERR_TASK_OV No space for more tasks GBS_ERR_REGISTER_OV No register bank available GBS_ERR_DUPLICATE_TID New task has function ID that already has been assigned. GBS_ERR_NO_BUFFERS Buffer pool exhausted GBS_ERR_BAD_TASK_DESC Task descriptor (ITD) is not valid GBS_ERR_NO_MEMORY No more memory available GBS_ERR_TIME_OUT IEEE1118 Node not available GBS_ERR_PROTOCOL Unspecified error GBS_ERR_NO_DEST_DEVICE No extension available (see "Routing flags") GBS_ERR_PROTECTED RAC/GBS command protected (see command 04) GBS_ERR_NO_GBS Unknown RAC/GBS command GBS_ERR_BAD_COMMAND_LEN Command length does not match command specification.

GBS Time Services typedef struct { BYTE zone, offset, day_of_week, year, month, day, hour, min, sec; } GbsTime; System Info Struktur Data bytes 0..5 6, 7 8 9 13..n Contents 6 character ASCII node name ("i8044","mCAT") ASCII version number ("3.1") i8044 memory info or baudrate BITBUS message length supported by this node Manufacturer specific data /* /* /* /* /* /* /* /* /* TIME ZONE : 0 = GMT, 8 = PST */ TIME OFFSET : 0..59 MINUTES */ 1..7, MONDAY = 1. */ 1980 = 0, 2235 = 255. */ 1..12, JANUARY = 1. */ 1..31. */ 0..23. */ 0..59. */ 0..59. */

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

94 DE 133

BITBUS INSTALLATION

Although BITBUS has proved to be rather tolerant about cabling, RS485 definitions require some precautions that should be obeyed for optimum performance: Cable RS485 uses a balanced differential signal pair where one wire (usually named Data+) is on 5V (nominal) to signal TRUE data while the inverted wire (Data -) is on 0V and vice versa for FALSE data. The advantage of using a differential line is that a spike induced to the line ideally shifts both wires with the same voltage amount resulting in no change in the voltage difference between the two wires. For good operation the two wires have to be twisted. The cable is available as so called "twisted pair cable". The voltages are allowed to float for a certain amount (-7 to +12V) against ground. Nevertheless there should be a possibility to reference against ground which calls for a third wire SIGNAL GROUND. There are many RS485 installations that just use the twisted pair but nobody would guarantee a groundless cabling. Usually a cable with two twisted pairs is used with on pair used for ground. A third pair is necessary in BITBUS nets using repeaters for the slave segments (the segments on the slave side of the repeater). This pair (RTS+/RTS- ) drives the amplifier signal direction input to switch from the standard (out to all slaves) to input if a slave in the segment wants to transmit Termination RS485 calls for termination of the signal lines at the extreme ends of the cable. A 120Ohm resistor between the wires of each pair gives the proper termination for the RS485 drivers. The cable should match this value as good as possible, i.e. have a characteristic impedance of 120Ohm or more. DB9 connectors with termination resistors are available from most manufacturers. An even better way to terminate is to connect separate resistors from the supply voltage to the RS485 lines like described in the BITBUS book to take the lines to a defined idle state. This, however, can only be done inside the board where supply voltage is available. Thus many manufacturers supply switchable termination on their boards.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

95 DE 133

Shielding and earthing Although shielding is not required by the BITBUS specification, all industrial applications should use a shielded cable. The cable screen should be connected to earth (foreign ground) on one side of the cable only (to prevent ground currents flowing through the BITBUS cable). The resulting recommended cable is a 3 pair 0,25mm twisted pair stranded wire with overall screen. It is called LiYCY(B) 3x2x0,25mm in Germany. Repeater operation A standard RS485 driver like the 75176 drives 31 receivers on the twisted pair (there are advanced designs like the 75LBC176 that drive more than 50 receivers). BITBUS conservatively specifies 28 slaves. They all have to be within the cable length specified for the given bus speed (300m for 375kBit/s and 1200m for 62,5kBit/s, also specified well on the safe side). There are no stubs allowed for a node (i.e. it must be connected immediately to the bus line and not with a long cable to the bus. To allow for stubs or more slave devices (BITBUS logically addresses 250 nodes), repeaters can be used. A repeater is an amplifier, usually using a standard RS485 receiver and transmitter. It is part of the network just as any other BITBUS node (usually with electrically parallel input and output connectors) and has a third connector on the amplified side (which is the far side as seen from the master), the so called slave side. As an amplifier cannot drive both data directions at the same time (BITBUS is halfduplex, i.e. uses the same wire pair to transmit to the slave and to receive from the slave), the transmit enable signal of the slave (RTS) is used to invert the amplifier direction that usually is outward only (master to all slaves). This signal is necessary only in the slave segments as the master doesn't need to know about it, just the repeaters on the way to the master. BITBUS allows two repeaters in line between the master and any slave (but up to 28 with their master side in one segment) at 375kBit/s. Repeaters can thus be used to establish many stub lines. Accessing a BITBUS slave A BITBUS network is made up of many slaves that are controlled by a single master. To start with BITBUS, it might be the easiest way to use a master based on a PC. This requires a board (ISA, PC/104, PCI) to be plugged into the PC but it also requires some driver software. Most manufacturers provide a BAPI driver with their board, which is the BITBUS Application Programmers Interface introduced in 1999 as a BEUG standard. BAPI opens the possibility to access different manufacturers boards or different boards of one manufacturer using the same master software. BAPI can be
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

96 DE 133

accessed by several PC applications (like a control program, a visualization, a debugger) concurrently and usually can address more than one BITBUS-board at a time. Working with BAPI requires working knowledge of how to access a DLL from a controlling application on the PC. Apart from that, usage starts straightforward with a call to open one of the master boards (BitbusOpenMaster). A message to a slave is then assembled in a local structure and sent to the slave using the BitbusSendMsg call. Then the application can wait for the reply using BitbusWaitMsg. Its as easy as that - no configuration or project tools, no slave description files to load. To read or write i/o, just use the built-in RAC/GBS commands. However, if you like to make full use of the philosophy behind BITBUS use distributed control - not distributed i/o! Write a task that runs on the slave and deals with as many problems as can be addressed locally, then download this task to RAM or FlashEprom - again RAC/GBS provides all the mechanism to do so. That way you end up with a system that behaves reliable even if the master fails - and isnt that the most essential in industrial control?

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 4 BITBUS

97 DE 133

4.2 ESPECIFICACION. 4.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 5 ASi

98 DE 133

UNIDAD 5 ASi
5.1 INTRODUCCION. AS-interface
De Wikipedia, la enciclopedia libre Obtenido de "http://es.wikipedia.org/wiki/AS-interface"

AS-Interface o AS-i es un Bus de Sensores y Actuadores (bus de campo), estndar internacional IEC62026-2 y europeo EN 50295 para el nivel de campo ms bajo. Fue diseado en 1990 como una alternativa econmica al cableado tradicional. La idea original fue crear una red simple para sensores y actuadores binarios, capaz de transmitir datos y alimentacin a travs del mismo bus, manteniendo una gran variedad de topologas que faciliten la instalacin de los sensores y actuadores en cualquier punto del proceso con el menor esfuerzo posible. Las especificaciones de AS-i se encuentran actualmente en su versin 2.1 (aunque los estndares actualmente reflejan la versin 2.04). stas son de carcter abierto, lo que significa que cualquier fabricante puede obtener una copia de las mismas para elaborar sus productos.
Caractersticas principales

AS-i se sita en la parte ms baja de la pirmide de control, conectando los sensores y actuadores con el maestro del nivel de campo. Los maestros pueden ser autmatas o PCs situados en los niveles bajos de control, o pasarelas que comuniquen la red AS-Interface con otras redes de nivel superior, como Profibus o DeviceNet. Las Caractersticas Principales de AS-Interface son:

Ideal para la interconexin de sensores y actuadores binarios. A travs del cable AS-i se transmiten datos y alimentacin. Cableado sencillo y econmico. Se puede emplear cualquier cable bifilar de 2 x 1.5 mm2 no trenzado ni apantallado. El cable especfico para AS-i, el Cable Amarillo, es autocicatrizante y est codificado mecnicamente para evitar su polarizacin incorrecta. Gran flexibilidad de topologas, que facilita el cableado de la instalcin. Sistema monomaestro, con un protocolo de comunicacin con los esclavos muy sencillo. Ciclo del bus rpido. Mximo tiempo de ciclo 5 ms con direccionamiento estndar y 10 ms con direccionamiento extendido. Permite la conexin de sensores y actuadores No AS-i mediante mdulos activos. Hasta 124 sensores y 124 actuadores binarios con direccionamiento estndar.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 5 ASi

99 DE 133

Enlaces externos Curso Interactivo

Hasta 248 sensores y 186 actuadores binarios con direccionamiento extendido. Longitud mxima de cable de 100 m uniendo todos los tramos, o hasta 300 m con repetidores. La revisin 2.1 del estndar facilita la conexin de sensores y actuadores analgicos. Transmisin por modulacin de corriente que garantiza un alto grado de seguridad. Deteccin de errores en la transmisin y supervisin del correcto funcionamiento de los esclavos por parte del maestro de la red. Cables auxiliares para la transmisin de energa: Cable Negro (24 V DC) y Rojo (220 V AC). Grado de Proteccin IP-65/67 para ambientes exigentes. Cumple la normativa IP-20 para aplicaciones en cuadro. Temperaturas de funcionamiento entre -25C y +85C.

AS-i Autor Original

AS-Interface
From Wikipedia, the free encyclopedia Retrieved from "http://en.wikipedia.org/wiki/AS-Interface"

AS-Interface (AS-i) is the simplest of the industrial networking protocols used in PLC, DCS and PC-based automation systems. It is designed for connecting simple field I/O devices (e.g. binary (ON/OFF) devices such as actuators and sensors, rotary encoders, analog inputs and outputs, push buttons, valve position sensors ...) in discrete manufacturing and process applications using a single 2-conductor cable. It is an 'open' technology supported by leading automation vendors. Well over 14 Million AS-i field devices are installed and proven globally. AS-Interface is a highly efficient networking alternative to the hard wiring of field devices. It is an excellent partner network for fieldbus networks such as *Profibus, *DeviceNet, Interbus and *Industrial Ethernet, for whom it offers a low-cost remote I/O solution. It is proven in hundreds of thousands of applications, including conveyors, process control valves, bottling plants, electrical distribution systems, airport carousels, elevators, bottling lines and food production lines. AS-i provides the ideal basis for Functional Safety in machinery safety/emergency stop applications. A special profile called Safety as Work (sometimes called ASiSafe) is used. Safety devices are connected on the same cable as the control system and can provide Safety support up to SIL (Safety Integrity Level) 3 according to IEC 61508 as well as CAT 4 according to EN954-1.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 5 ASi

100 DE 133

The AS-Interface specification is managed by AS-International, a member funded organization located in Germany. Several international daughter organizations exist around the world.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 5 ASi

101 DE 133

Components An AS-Interface network requires only a few basic components. They are: Scanner/Gateway (also called master) Power supply Modules (also called slaves) Network cable Scanner/Gateway The Scanner/Gateway performs two functions. With respect to the AS-Interface network is a master, performing the data exchange with the Modules. Any given network can only have one Scanner/Gateway. With respect to a connected PLC/DCS or PC the Scanner/Gateway is a slave. The AS-Interface community typically uses the word Gateway when the AS-Interface master connects to an upper-level network. On the other hand, if it resides on the backplane of a PLC it is usually referred to as a Scanner. Since AS-Interface communication uses the Master-Slave communication method, any network must have only one Master at a time. Power supply Any AS-Interface segment must be powered. This is typically accomplished connecting an AS-Interface power supply. These supplies have certain unique characteristics regarding internal circuitry and output voltage. Standard 24VDC power supplies can not be used to directly power a segment Modules This is by far the largest group of components and includes binary and analog I/O modules, stack lights, pushbuttons, sensors with integrated ASIC, valve control boxes, E-stops, light curtains; in general any device that can exchange data with the PLC. Each module on the network must have a unique address. For ASInterface the address space ranges from 0 to 31, where 0 cannot be used, but is reserved for automatic single-node replacement. Since adoption of specification 2.1 this address space is further divided into A and B extended addresses. As a result, using a module designed to support this addressing mode, it possible to have two modules at each address; one at the A half and one at the B half. (Ex. 1A and 1B, 17A and 17B) The current specification is revision 3.0 and adds many the ability to construct many new types of I/O combinations, including binary modules with 4 inputs and 4 outputs supporting A/B addressing. Network cable The vast majority of AS-Interface installations utilize the AS-Interface flat cable, defined as part of the AS-Interface specifications. While the shape of the cable does not matter (any other cable can be used) the electrical characteristics of the
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 5 ASi

102 DE 133

selected cable matters greatly. To prevent problems due to improper cable, most professional suggest the AS-Interface flat cable. External links AS-International AS-Interface UK Expert Alliance AS-Interface Instrumentation The AS-interface Master Company Wide range of AS-i products

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 5 ASi

103 DE 133

5.2 ESPECIFICACION. 5.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN

104 DE 133

UNIDAD 6 CAN
6.1 INTRODUCCION. Controller Area Network
From Wikipedia, the free encyclopedia

Controller Area Network (CAN or CAN-bus) is a computer network protocol and bus standard designed to allow microcontrollers and devices to communicate with each other and without a host computer. It was designed specifically for automotive applications but is now also used in other areas.
Origins

CAN-bus was originally developed in 1988 by Intel Corporation and Robert Bosch GmbH[1]
Applications Automotive applications

A modern automobile may have as many as 50 such control units for various subsystems. Typically the biggest processor is the Engine Control Unit; others are used for transmission, airbags, antilock braking, cruise control, audio systems, windows, mirror adjustment, etc. Some of these form independent subsystems, but communications among others is essential. A subsystem may need to control actuators or receive feedback from sensors. The CAN standard was devised to fill this need. The CAN bus may be used in vehicles to connect engine control unit and transmission, or (on a different bus) to connect the door locks, climate control, seat control, etc. Today the CAN bus is also used as a fieldbus in general automation environments: this is especially because of the cheap prices of some CAN Controllers and processors. On the other hand any official use of CAN requires that a fee for the CAN Protocol License is to be paid to Bosch who developed the protocol and hold patents.
CAN Network Testing

Unforeseen problems incorporated into CAN based system are often contributed from the design methods used for the system and the individual component implementations. Scheduling methods which take into account the timing related to ECU software and hardware architecture, communication driver performance, and the network arbitration are required for minimizing the effort of testing required prior to manufacturing. The development of distributed network based systems often utilizes multiple suppliers for the prototyping of different modules and sub-systems. In order to
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN

105 DE 133

best control the complexities incorporated from such a distributed developmental process, the Original Equipment Manufacturer usually requires a set of standard tests and procedures to be run on the prototypes prior to delivery. These tests usually require the prototype ECU to be connected to a simulated system where performance measurements can be made for consideration of the physical layer, communication layer, and application layer. The standard tests are run repeatedly until the Device Under Test (DUT) passes all necessary tests. The requirements for testing vary depending on the Original Equipment Manufacturers focus and may include portions of the following sample test sequence: Voltage Characteristic Protection Tests: Hardware Immunity to Ground Short, Hardware Damage Immunity to Source Voltage Short, Hardware under voltage operation characteristics Communication Waveform Characteristics: Transceiver tests (short to GND, short to VBAT, ect.), Signal Integrity (I-diagrams), Signal Jitter Analysis, Noise Injection Tests Software Recovery from Error Conditions: Bus Off Conditions Response Times: Functional Ages, Publisher Delays, Subscriber Delays, Gateway Delays Communication: First Frame Timing, Wakeup Sequence, Periodic Frame Times, Event Frames Network Management: Startup, Participation, Modes, Shutdown Diagnostics: Recognition of faults, Module Reflashing The supplier module level testing cleans up a majority of issues, however the greatest task of identifying and troubleshooting issues is often confronted during the integration testing phase. The integration testing phase requires that the live ECUs be interconnected for the first time and the ultimate goal of this phase is to eliminate all causes of system behavior which may negatively impact the manufactured products reliability. Time constraints require efficient use of test processes, available resources and tools to ensure the highest levels of product quality are delivered at the conclusion of the integration testing phase. Testing teams must possess a means for identification and isolation of faults, along with the experience needed for quickly assessing possible root causes. The time required for actually tracking down and solving the root failure mode can often be extremely difficult and not time effective in widely distributed processes. Testing tools must be scalable, flexible, and integrate able to provide test coverage for all pertinent levels of the OSI model. The ideal test tools themselves must provide the knowledge and know-how of skilled engineers by identifying questionable conditions, and then using reasoning to guide the test engineer in solving the issue. The tool should also be easily configurable, comprehensive, include predefined test libraries, and provide extremely reliable measurements
Technology

CAN is a broadcast (bus), differential serial bus standard for connecting electronic control units (ECUs). Each node is able to send and receive messages, but not simultaneously: a message (consisting primarily of an ID usually chosen to identify the messagetype/sender and up to 8 message bytes) is transmitted serially onto the bus,
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN

106 DE 133

one bit after another this signal-pattern codes the message (in NRZ) and is sensed by all nodes. The devices that are connected by a CAN network are typically sensors, actuators and control devices. A CAN message never reaches these devices directly, but instead a host-processor and a CAN Controller is needed between these devices and the bus. If the bus is free, any node may begin to transmit. If two or more nodes begin sending messages at the same time, the message with the more dominant ID (which has more dominant bits) will overwrite other nodes' less dominant IDs, so that eventually (after this arbitration on the ID) only the dominant message remains and is received by all nodes. Each node requires

a host-processor o The host-processor decides what received messages mean, and which messages it wants to transmit itself o Sensors, actuators and control devices can be connected to the hostprocessor (if desired) a CAN Controller (hardware with a synchronous clock) o Receiving: the CAN Controller stores received bits (one by one) from the bus until an entire message is available, that can then be fetched by the host processor (usually after the CAN Controller has triggered an interrupt) o Sending: the host-processor stores its transmit-messages into a CAN Controller, which transmits the bits serially onto the bus a Transceiver (possibly integrated into the CAN Controller) o Receiving: it adapts signal levels from the bus, to levels that the CAN Controller expects and has protective circuitry that protect the CAN Controller o Sending: it converts the transmit-bit signal received from the CAN Controller into a signal that is sent onto the bus

Bit rates up to 1 Mbit/s are possible at network lengths below 40 m. Decreasing the bit rate allows longer network distances (e.g. 125 kbit/s at 500 m). The CAN data link layer protocol is standardized in ISO 11898-1 (2003). This standard describes mainly the data link layer composed of the Logical Link Control (LLC) sublayer and the Media Access Control (MAC) sublayer and some aspects of the physical layer of the OSI Reference Model. All the other protocol layers are left to the network designer's choice.
Data transmission

CAN features an automatic 'arbitration free' transmission. A CAN message that is transmitted with highest priority will 'win' the arbitration, and the node transmitting the lower priority message will sense this and back off and wait. This is achieved by CAN transmitting data through a binary model of "dominant" bits and "recessive" bits where dominant is a logical 0 and recessive is a logical 1. This means open collector, or 'wired or' physical implementation of the bus (but
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN

107 DE 133

since dominant is 0 this is sometimes referred to as wired-AND). If one node transmits a dominant bit and another node transmits a recessive bit then the dominant bit "wins" (a logical AND between the two).

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN

108 DE 133

Truth tables for dominant/recessive and logical AND

Bus state with two nodes transmitting dominan t dominan t recessiv e dominant recessiv e dominant Logical AND 0 0 1 dominant recessive 0 0 1 0 1

So, if you are transmitting a recessive bit, and someone sends a dominant bit, you see a dominant bit, and you know there was a collision. (All other collisions are invisible.) The way this works is that a dominant bit is asserted by creating a voltage across the wires while a recessive bit is simply not asserted on the bus. If anyone sets a voltage difference, everyone sees it, hence, dominant. Thus there is no delay to the higher priority messages, and the node transmitting the lower priority message automatically attempts to re-transmit 6 bit clocks after the end of the dominant message. When used with a differential bus, a Carrier Sense Multiple Access/Bitwise Arbitration (CSMA/BA) scheme is often implemented: if two or more devices start transmitting at the same time, there is a priority based arbitration scheme to decide which one will be granted permission to continue transmitting. The CAN solution to this is prioritised arbitration (and for the dominant message delay free), making CAN very suitable for real time prioritised communications systems. During arbitration, each transmitting node monitors the bus state and compares the received bit with the transmitted bit. If a dominant bit is received when a recessive bit is transmitted then the node stops transmitting (i.e., it lost arbitration). Arbitration is performed during the transmission of the identifier field. Each node starting to transmit at the same time sends an ID with dominant as binary 0, starting from the high bit. As soon as their ID is a larger number (lower priority) they'll be sending 1 (recessive) and see 0 (dominant), so they back off. At the end of ID transmission, all nodes but one have backed off, and the highest priority message gets through unimpeded
Bit Timing

Each node in a CAN network has its own clock, and no clock is sent during data transmission. Synchronization is done by dividing each bit of the frame into a
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN

109 DE 133

number of segments: Synchronisation, Propagation, Phase 1 and Phase 2. The Length of each phase segment can be adjusted based on network and node conditions. The sample point falls between Phase Buffer Segment 1 and Phase Buffer Segment 2, which helps facilitate continuous synchronization. Continuous synchronization in turn enables the receiver to be able to properly read the messages.

CAN Bit Timing


Layers

Based on levels of abstraction, the structure of the CAN protocol can be described in terms of the following layers:

Application Layer Object Layer o Message Filtering o Message and Status Handling Transfer Layer The Transfer Layer represents the kernel of the CAN protocol. It presents messages received to the object layer and accepts messages to be transmitted from the object layer. The transfer layer is responsible for bit timing and synchronization, message framing, arbitration, acknowledgement, error detection and signaling, and fault confinement. It performs: o Fault Confinement o Error Detection o Message Validation o Acknowledgement o Arbitration o Message Framing o Transfer Rate and Timing o Information Routing

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN

110 DE 133

Physical Layer The physical layer defines how the signals are actually transmitted. Tasks include: o Signal Level and Bit Representation o Transmission Medium

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN Frames

111 DE 133

A CAN network can be configured to work with two different message (or "frame") formats: the standard or base frame format (or CAN 2.0 A), and the extended frame format (or CAN 2.0 B). The only difference between the two formats is that the CAN base frame supports a length of 11 bits for the identifier, and the CAN extended frame supports a length of 29 bits for the identifier, made up of the 11bit identifier (base identifier) and an 18-bit extension (identifier extension). The distinction between CAN base frame format and CAN extended frame format is made by using the IDE bit, which is transmitted as dominant in case of an 11-bit frame, and transmitted as recessive in case of a 29-bit frame. CAN controllers that support extended frame format messages are also able to send and receive messages in CAN base frame format. All frames begin with a start-of-frame (SOF) bit that, obviously, denotes the start of the frame transmission. CAN has four frame types:

Data frame: a frame containing node data for transmission Remote frame: a frame requesting the transmission of a specific identifier Error frame: a frame transmitted by any node detecting an error Overload frame: a frame to inject a delay between data and/or remote frames

Data frame The data frame is the only frame for actual data transmission. There are two message formats:

Base frame format: with 11 identifier bits Extended frame format: with 29 identifier bits

The CAN standard requires the implementation must accept the base frame format and may accept the extended frame format, but must tolerate the extended frame format.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN

112 DE 133

Base frame format The frame format is as follows:


Field name Start-of-frame Identifier Remote transmission request (RTR) Identifier extension bit (IDE) Reserved bit (r0) Data length code (DLC) Data field CRC CRC delimiter ACK slot ACK delimiter End-of-frame (EOF) Length (bits) 1 11 1 1 1 4 0-8 bytes 15 1 1 1 7 Purpose Denotes the start of frame transmission A (unique) identifier for the data Must be dominant (0)Optional Must be dominant (0)Optional Reserved bit (it must be set to dominant (0), but accepted as either dominant or recessive) Number of bytes of data (0-8 bytes) Data to be transmitted (length dictated by DLC field) Cyclic redundancy check Must be recessive (1) Transmitter sends recessive (1) and any receiver can assert a dominant (0) Must be recessive (1) Must be recessive (1)

One restriction placed on the identifier is that the first 7 bits cannot be all recessive bits. (I.e., the 16 identifiers 1111111xxxx are invalid.) Extended frame format The frame format is as follows:
Field name Start-of-frame Identifier A Substitute remote request (SRR) Identifier extension bit (IDE) Identifier B Remote transmission request (RTR) Reserved bits (r0, r1) Data length code (DLC) Data field 1 11 1 1 18 1 2 4 0-8 bytes Length (bits) Purpose Denotes the start of frame transmission First part of the (unique) identifier for the data Must be recessive (1)Optional Must be recessive (1)Optional Second part of the (unique) identifier for the data Must be dominant (0) Reserved bits (it must be set dominant (0), but accepted as either dominant or recessive) Number of bytes of data (0-8 bytes) Data to be transmitted (length dictated by DLC field) INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

ING. ALFONSO PEREZ GARCIA

UNIDAD 6 CAN CRC CRC delimiter ACK slot ACK delimiter End-of-frame (EOF) 15 1 1 1 7

113 DE 133 Cyclic redundancy check Must be recessive (1) Transmitter sends recessive (1) and any receiver can assert a dominant (0) Must be recessive (1) Must be recessive (1)

The two identifier fields (A & B) combined form a 29-bit identifier. Remote frame Generally data transmission is performed on an autonomous basis with the data source node (e.g. a sensor) sending out a Data Frame. It is also possible, however, for a destination node to request the data from the source by sending a Remote Frame. There are 2 differences between a Data Frame and a Remote Frame. Firstly the RTR-bit is transmitted as a dominant bit in the Data Frame and secondly in the Remote Frame there is no Data Field. i.e. RTR = 0 ; DOMINANT in data frame RTR = 1 ; RECESSIVE in remote frame In the very unlikely event of a Data Frame and a Remote Frame with the same identifier being transmitted at the same time, the Data Frame wins arbitration due to the dominant RTR bit following the identifier. In this way, the node that transmitted the Remote Frame receives the desired data immediately. Error frame Error frame consists of two different fields The first field is given by the superposition of ERROR FLAGS contributed from different stations. The following second field is the ERROR DELIMITER. There are two types of error flags Active Error Flag Transmitted by a node detecting an error on the network that is in error state "error active". Passive Error Flag Transmitted by a node detecting an active error frame on the network that is in error state "error passive". Overload frame The overload frame contains the two bit fields Overload Flag and Overload Delimiter. There are two kinds of overload conditions that can lead to the transmission of an overload flag: 1. The internal conditions of a receiver, which requires a delay of the next data frame or remote frame. 2. Detection of a dominant bit during intermission.
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN

114 DE 133

The start of an overload frame due to case 1 is only allowed to be started at the first bit time of an expected intermission, whereas overload frames due to case 2 start one bit after detecting the dominant bit. Overload Flag consists of six dominant bits. The overall form corresponds to that of the active error flag. The overload flags form destroys the fixed form of the intermission field. As a consequence, all other stations also detect an overload condition and on their part start transmission of an overload flag. Overload Delimiter consists of eight recessive bits. The overload delimiter is of the same form as the error delimiter. Interframe spacing Data frames and remote frames are separated from preceding frames by a bit field called interframe space. Overload frames and error frames are not preceded by an interframe space and multiple overload frames are not separated by an interframe space. Interframe space contains the bit fields intermission and bus idle and, for error passive stations, which have been transmitter of the previous message, suspend transmission. Bit stuffing In CAN frames, a bit of opposite polarity is inserted after five consecutive bits of the same polarity. This practice is called bit stuffing, and is due to the "Non Return to Zero" (NRZ) coding adopted. The "stuffed" data frames are destuffed by the receiver. Since bit stuffing is used, six consecutive bits of the same type (111111 or 000000) are considered an error. Bit stuffing implies that sent data frames could be larger than one would expect by simply enumerating the bits shown in the tables above. Standards There are several CAN physical layer standards:

ISO 11898-2: CAN high-speed ISO 11898-3: CAN fault-tolerant (low-speed) ISO 11992-1: CAN fault-tolerant for truck/trailer communication ISO 11783-2: 250 kbit/s, Agricultural Standard SAE J1939-11: 250 kbit/s, Shielded Twisted Pair (STP) SAE J1939-15: 250 kbit/s, UnShielded Twisted Pair (UTP) (reduced layer) SAE J2411: Single-wire CAN (SWC)

ISO 11898-2 uses a two-wire balanced signaling scheme. It is the most used physical layer in car powertrain applications and industrial control networks. ISO 11898-4 standard defines the time-triggered communication on CAN (TTCAN). It is based on the CAN data link layer protocol providing a system clock for the scheduling of messages.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN

115 DE 133

SAE J1939 standard uses a two-wire twisted pair, -11 has a shield around the pair while -15 does not. SAE 1939 is widely used in agricultural & construction equipment. ISO 11783-2 uses four unshielded twisted wires; two for CAN and two for terminating bias circuit (TBC) power and ground. This bus is used on agricultural tractors. This bus is intended to provide interconnectivity with any implementation adhering to the standard. Higher layer implementations As the CAN standard does not include tasks of application layer protocols, such as flow control, device addressing, and transportation of data blocks larger than one message, many implementations of higher layer protocols were created. Among these are DeviceNet, CANopen, SDS (Smart Distributed System), CANaerospace, J1939, NMEA 2000, CAN Kingdom, SafetyBUS p, and MilCAN. An ARINC technical working group develops the ARINC 825 standard with special requirements for the aviation industry. See also

FlexCAN - An alternative implementation. CANopen - A higher-layer protocol. Local Interconnect Network - A low cost alternative. FlexRay - A possible future direction GMLAN - A customized version by GM

References 1. ^ Bus System Troubleshooting. BMW E38 www.e38.org. External links


Controller Area Network Discussion Forum Agilent Network Testing Discussion Forum CAN in Automation (CiA) international users' and manufacturers' group A Comprehensible Guide to Controller Area Network CAN educational page (1) CAN educational page (2) CAN educational page (3) CAN-bus over vehicle power-line CAN FAQ CAN - The bits and bytes Bosch specification (old document slightly ambiguous/unclear in some points, superseded by the standard ISO 11898) MilCAN working group
INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

ING. ALFONSO PEREZ GARCIA

UNIDAD 6 CAN

116 DE 133

J1939 Forum J1939 Documentation Project On-Board Electronics related papers (Portuguese) CANaerospace Example No.1 of CAN Network Testing Tools Example No.2 of CAN Network Testing Tools CAN Engine Discussions

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 6 CAN

117 DE 133

6.2 ESPECIFICACION. 6.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 7 DEVICENET

118 DE 133

UNIDAD 7 DEVICENET
7.1 INTRODUCCION DeviceNet
From Wikipedia, the free encyclopedia Retrieved from "http://en.wikipedia.org/wiki/DeviceNet"

DeviceNet is a communication protocol used in the automation industry to interconnect control devices for data exchange. It uses Controller Area Network as the backbone technology and defines an application layer to cover a range of device profiles. Typical applications include information exchange, safety devices, and large I/O control networks. [1][2]
History

DeviceNet was originally developed by American company Allen-Bradley (now owned by Rockwell Automation). It is layered on top of the CAN (Controller Area Network) protocol, developed by Bosch.[3] In order to promote the use of DeviceNet worldwide, Rockwell Automation has adopted the "open" concept and decided to share the technology to third party vendors. Hence, it is now managed by the Open DeviceNet Vendors Association (ODVA), an independent organization located in North America. ODVA maintains specifications of DeviceNet and oversees advances to DeviceNet. In addition, ODVA ensures compliance to DeviceNet standards by providing conformance testing and vendor conformity.[4]
Technical Snapshot

1. Defines the Media, Physical, Data-Link, and Application layers of the ISO/OSI 7layer model (see Open Systems Interconnection) 2. Incorporates trunkline topology with separate buses for signal and power (Typical configuration: two twisted pairs and a single shield) 3. Baudrates defined: 125 kbit/s, 250 kbit/s, and 500 kbit/s 4. Trunk length is inversely proportional to the speed, i.e. 500, 250 and 100 meters respectively 5. A not-so new flat cable was added to the specification to allow the use of the quick-fix connector 6. Up to 64 nodes on a single logical network. (Node addresses range from 0 - 63) 7. Supports master/slave as well as peer-to-peer communication, although majority of the devices work in the master/slave configuration 8. Allows multiple masters on a single logical network

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 7 DEVICENET

119 DE 133

9. Network cable can supply device power along same cable as communication cable (Generally smaller devices such as photo-eyes, limit switches, and proximity switches). 10.Networked devices can be simultaneously controlled and configured 11.Engineered to withstand noisy environments References
Architecture
[5][6]

Physical Layer

Nodes are distributed along a DeviceNet network by the means of a trunklinedropline topology. This topology allows for ease in wiring and access to the network from multiple taps. In addition, nodes can be easily removed and added to reduce production downtime, increase network flexibility, and decrease troubleshooting time. Since the physical layer is optically isolated from device, communication power and device power can shared the same bus (Further reducing the complexity of the network and components within). [7] DeviceNet supports 125 kbit/s, 250 kbit/s and 500 kbit/s data rates. Depending on the chosen cable type, DeviceNet can support communication up to 500 meters (Round thick cable). Typical round cable supports up to 100 meters. While flat style cable supports up to 380 meters at 125 kbit/s and 75 meters at 500 kbit/s.[8] Data Link Layer DeviceNet uses a differential serial bus (Controller Area Network) as its Data Link Layer. Using CAN as a backbone, DeviceNet requires minimal bandwidth to transmit and package messages. In addition, a smaller processor may be selected in the design of device thanks to data frame format and the ease at which the processor can parse through the data. See below for full format.[9] CAN Data 1 Bit 11 Bits 1 Bit 6 Bits 0-8 Bytes 15 Bits 1 Bit 1 Bit 1 Bit 7 Bits >2 Bits
ING. ALFONSO PEREZ GARCIA

> > > > > > > > > > >

>Frame Format Start of Frame Identifier RTR Bit Control Field Data Field CRC Sequence CRC Delimiter Acknowledge Ack Delimiter End of Frame Interframe Space

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 7 DEVICENET Reference[10]

120 DE 133

Upon transmitting the first packet of data, the "Start of Frame" bit is sent to synchronize all receivers on the network. The CAN identifier (denoted from 0-63) and RTR bit combine to set priority at which the data can be accessed or changed. Lower identifiers have priority over higher identifiers. In addition to transmitting this data to other devices, the device also monitors the data sent. This redundancy validates the data transmitted and eliminates simultaneous transmissions. If a node is transmitting at the same time as another node, the node with the lower 11 bit identifier will continue to transmit while the device with the higher 11 bit identifier will stop.[11] The following 6 bits contain information for specifying the Control Field. The initial two bits are fixed, while the last four are used to specify length field of the Data Field. The Data Field contains from zero to eight bytes of usable data.[12] The following data frame is the CRC (Cyclic Redundancy Check) Field. The frame consists of 15 bits to detect frame errors and maintains numerous format delimiters. Due to ease of implementation and immunity to most noisy networks, CAN provides a high level of error checking and fault confinement.[13]
Network

DeviceNet incorporates a connection-based network. A connection must initially be established by either an UCMM (Unconnected Message Manager) or a Group 2 Unconnected Port. From there, Explicit and Implicit messages can be sent and received. Explicit messages are packets of data that general require a response from another device. Typical messages are configurations or non-time sensitive data collection. Implicit messages are packets of data that are time critical and generally communicate real-time data over the network. An Explicit Message Connection has to be used to established first before an Implicit Message Connection is made. Once the connection is made, the CAN identifier routes data to the corresponding node.[14]
Conformance Test

To declare your product as DeviceNet conformant, a vendor needs to send their product to the ODVA test lab for the certification. ODVA used to have a few other test labs around the world, i.e. UK, Japan, and China. Is has now been consolidated into one that is in North America.[15] A full-test version is called the Composite test. It consists of:[16]
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 7 DEVICENET

121 DE 133

1. Conformance test. Test against the protocol specification. 2. Interoperability test. Test against devices from various vendors on a single, fully populated, network.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 7 DEVICENET Conformance Test Procedure

122 DE 133

The following procedure shows you how to get your product certified. 1. Register as vendor with ODVA. You will be given a vendor ID. 2. Puchase a copy of the DeviceNet specification. A hard and soft copy will be sent to you. 3. Puchase the conformance test software and corresponding hardware interface card. Note that only selected interface cards from a few vendors can be used. 4. Develop and test product in-house. You would probably need help from the discussion group, see the External links below. 5. Submit your product to ODVA test lab for independent verification. 6. Repeat the above two steps until your product successfully pass the independent test. Reference[17]
Sources

ODVA website DeviceNet discussion forum Introduction to DeviceNet Notes 1. ^ [1] Controller Area Network Solutions FAQ (Frequently Asked Questions). 2. ^ [2], DeviceNet Technology Overview, URL accessed 2007-02-13. 3. ^ [3] Controller Area Network Solutions FAQ (Frequently Asked Questions)], What is DeviceNet?, URL accessed 2007-02-13. 4. ^ [4] Controller Area Network Solutions FAQ (Frequently Asked Questions)], What is DeviceNet?, URL accessed 2007-02-13. 5. ^ [5] Controller Area Network Solutions FAQ (Frequently Asked Questions)], Basic DeviceNet Concepts?, URL accessed 2007-02-13. 6. ^ [6], DeviceNet Technology Overview, URL accessed 2007-02-13. 7. ^ [7], Introduction, URL accessed 2007-02-13. 8. ^ [8], Physical Layer, URL accessed 2007-02-13. 9. ^ [9], The Data Link Layer, URL accessed 2007-02-13. 10.^ [10], Table: Data Frame Format, URL accessed 2007-02-13. 11.^ [11], Introduction & Physical Layer, URL accessed 2007-02-13. 12.^ [12], Physical Layer, URL accessed 2007-02-13. 13.^ [13], Physical Layer, URL accessed 2007-02-13. 14.^ [14], The Network and Transport Layers, URL accessed 2007-02-13. 15.^ [15], Conformance Testing, URL accessed 2007-02-13. 16.^ [16], Conformance Testing, URL accessed 2007-02-13. 17.^ [17], Conformance Testing, URL accessed 2007-02-13.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 7 DEVICENET

123 DE 133

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 7 DEVICENET

124 DE 133

7.2 ESPECIFICACION. 7.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 8 PROFIBUS

125 DE 133

UNIDAD 8 PROFIBUS
8.1 INTRODUCCION. Profibus
De Wikipedia, la enciclopedia libre Obtenido de "http://es.wikipedia.org/wiki/Profibus"

Profibus (Process Field Bus) es posiblemente el bus de campo industrial con mayor nmero de nodos instalados, en el ao 2004 se calculaban un total de 12,6 millones de nodos. Se trata de una red abierta, estndar e independiente de cualquier fabricante, cuenta con varios perfiles y se adapta a las condiciones de las aplicaciones de automatizacin industrial. Fue desarrollada en el ao 1987 por las empresas alemanas Bosch, Klckner Mller y Siemens. En 1989 la adopt la norma alemana DIN19245 y fue confirmada como norma europea en 1996 como EN50170. En el ao 2002 se actualizaron incluyendo la versin para Ethernet llamada Profinet. Este tipo de red trabaja con nodos maestros y nodos esclavos. Los nodos maestros se llaman tambin activos y los esclavos pasivos. Adems junto con las especificaciones de otros buses de campo se recoge en las normas internacionales IEC61158 e IEC61784. Velocidades de transmisin: Nmero estaciones: mximo Caractersticas: 9.6, 19.2, 93.75, 187.5, 500, 1500, 3000, 6000 y 12000 Mbit/s. de 127 (32 sin utilizar repetidores).

Distancias mximas alcanzables (cable de 0.22 mm de dimetro) hasta 93.75 KBaudios 1200 metro 187.5 KBaudios 600 metros 500 KBaudios 200 metros Estaciones pueden ser activas (maestros) o pasivas (esclavos). Conexiones de tipo bidireccionales, multicast o broadcast. Vase tambin

Modbus AS-interface

Enlaces externos

www.profibus.com www.procentec.com

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 8 PROFIBUS

126 DE 133

Profibus
From Wikipedia, the free encyclopedia Retrieved from "http://en.wikipedia.org/wiki/Profibus"

Type of Network Physical Media Network Topology Device Addressing Governing Body Website

PROFIBUS Protocol Information Device Bus, Process Control Twisted pair, fiber Bus DIP Switch or hardware/software PROFIBUS&PROFINET International (PI) www.profibus.com

PROFIBUS (Process Field Bus) is a standard for field bus communication in automation technology and was first promoted (1989) by BMBF (german department of education and research). It should not be confused with the PROFINET standard for industrial Ethernet.
Origin

The history of PROFIBUS goes back to a publicly promoted plan for an association started in Germany in 1987 and for which 21 companies and institutes devised a master project plan called "field bus". The goal was to implement and spread the use of a bit-serial field bus based on the basic requirements of the field device interfaces. For this purpose, respective member companies agreed to support a common technical concept for production and process automation. First, the complex communication protocol PROFIBUS FMS (Field bus Message Specification), which was tailored for demanding communication tasks, was specified. Subsequently in 1993, the specification for the simpler and thus considerably faster protocol PROFIBUS DP (Decentralized Peripherals) was completed. It replaced FMS.
Use

There are two variations of PROFIBUS, whereby DP is used most often:

PROFIBUS DP (Decentralized Peripherals) is used to operate sensors and actuators via a centralized controller in production technology. The many standard diagnostic options, in particular, are focused on here. Other areas of use include the connection of "distributed intelligence", i.e. the networking of multiple controllers to one another (similar to PROFIBUS FMS). Data rates up to 12 Mbps on twisted pair cables and/or fiber optics are possible. PROFIBUS PA (Process Automation) is used to monitor measuring equipment via a process control system in process engineering. This PROFIBUS variant is ideal for explosion-hazardous areas (Ex-zone 0 and 1). Here, a weak current flows through bus lines in an intrinsically safe circuit so
INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

ING. ALFONSO PEREZ GARCIA

UNIDAD 8 PROFIBUS

127 DE 133

that explosive sparks are not created, even if a malfunction occurs. The disadvantage of this variant is the slower data transmission rate of 31.25 Kbps. PROFIBUS is the only field bus that can be used in equal measure in production automation and process automation and has since become a global market leader. Worldwide, over 20 million PROFIBUS devices are in use (as of 2007).
Technology

PROFIBUS Protocol (OSI reference model) 7 6 5 4 3 2 1 OSI-Layer Applicatio n Presentati on Session Transport Network Data Link Physical DPV0 -PROFIBUS DPV1 DPV2 Manageme nt

FDL EIA-485

Optical

MBP

Application layer

To utilize these functions, various service levels of the DP protocol were defined: DP-V0 for cyclic exchange of data and diagnosis DP-V1 for acyclic and cyclic data exchange and alarm handling DP-V2 for isochronous mode and data exchange broadcast (slave-to-slave communication)
Security layer

The security layer FDL (Field bus Data Link) works with a hybrid access method that combines token passing with a master-slave method. In a PROFIBUS DP network, the controllers or process control systems the masters and the sensors and actuators are the slaves. Various telegram types are used. They can be differentiated by their start delimiter (SD): No data: SD1 = 0x10 SD1 DA SA FC FCS ED

Variable length data: SD2 = 0x68 SD2 LE LEr SD2 DA SA FC PDU FCS ED

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 8 PROFIBUS

128 DE 133

Fixed length data: SD3 = 0xA2 SD3 DA SA FC PDU FCS ED

Token: SD4 = 0xDC SD4 Brief acknowledgement: SC = 0xE5 SC SCSD: Start Delimiter LE: Length of protocol data unit, (incl. DA,SA,FC,DSAP,SSAP) LEr: Repetition of protocol data unit, (Hamming-Distanz =4 !) FC: Function Code DA: Destination Address SA: Source Address DSAP: Destination Service Access Point SSAP: Source Service Access Point PDU: Protocol Data Unit (protocol data) FCS: Frame Checking Sequence ED: End Delimiter (= 0x16 !) The FCS is calculated by simply adding up the bytes within the specified length. An overflow is ignored here. Each byte is saved with an even parity and transferred asynchronously with a start and stop bit. There may not be a pause between a stop bit and the following start bit when the bytes of a telegram are transmitted. The master signals the start of a new telegram with a SYN pause of at least 33 bits (logical "1" = bus idle).
Bit-transmission layer

DA

SA

Three different methods are specified for the bit-transmission layer: With electrical transmission pursuant to EIA-485, twisted pair cables with a wave impedances of 150 ohms are used in a bus topology. Bit rates from 9600 bps to 12 Mbps can be used. The cable length between two repeaters is limited to 100 to 1,200 meters, depending on the bit rate used. This transmission method is primarily used with PROFIBUS DP. With optical transmission via fiber optics, star-, bus- and ring-topologies are used. The distance between the repeaters can be up to 15 km. The ring topology can also be executed redundantly.
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 8 PROFIBUS

129 DE 133

With MBP (Manchester Bus Powered) transmission technology, data and field bus power are fed through the same cable. The power can be reduced in such a way that use in explosion-hazardous environments is possible. The bus topology can be up to 1,900 meters long and permits branching to field devices (max. 60-meter branches). The bit rate here is a fixed 31.25 kbps. This technology was specially established for use in process automation for PROFIBUS PA.

For data transfer via sliding contacts for mobile devices or optical or radio data transmission in open spaces, products from various manufacturers can be obtained, however they do not conform to any standard.
Standardization

PROFIBUS was defined in 1991/1993 in DIN 19245, was then included in EN 50170 in 1996 and, since 1999, established in IEC 61158/IEC 61784.
Organization

The PROFIBUS Nutzerorganisation e.V. (PROFIBUS User Organization) (PNO) was created in 1989. This group is comprised of manufacturers and users from Germany. In 1992, the first regional PROFIBUS organization was founded (PROFIBUS Schweiz in Switzerland). In the following years, additional RPAs (Regional PROFIBUS & PROFINET Associations) were added. Today, PROFIBUS is represented by 25 RPAs around the world. In 1995, all the RPAs joined together into the international umbrella association PROFIBUS & PROFINET International (PI). References [1] PROFIBUS system description External links

PROFIBUS & PROFINET International AGILiCOM - Profibus France

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 8 PROFIBUS

130 DE 133

8.2 ESPECIFICACION. 8.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 9 ETHERNET

131 DE 133

UNIDAD 9 ETHERNET
9.1 INTRODUCCION. PROFINET
From Wikipedia, the free encyclopedia Retrieved from "http://en.wikipedia.org/wiki/PROFINET"

PROFINET is a standard covering the use of industrial Ethernet in automation systems and is not to be confused with the Profibus standard for fieldbus systems. There are two versions of PROFINET:

PROFINET CBA (Component Based Automation) for distributed systems interconnection PROFINET IO (Input Output) for controlling sensors and actuators using a central controller in production engineering

Technology

To achieve these functions, three different protocol levels are defined: TCP/IP for PROFINET CBA and the commissioning of a plant with reaction times in the range of 100ms RT (Real-Time) protocol for PROFINET CBA and PROFINET IO applications up to 10 ms cycle times IRT (Isochronous Real-Time) for PROFINET IO applications in drive systems with cycles times of less than 1ms The PROFINET protocol can be recorded and displayed using any Ethernet analysis tool. In the current version, Wireshark/Ethereal also decodes the PROFINET message frames.
PROFINET CBA

A PROFINET CBA system consists of various automation components. One component covers all mechanical, electrical and IT variables. The component can be generated using the standard programming tools. A component is described using a PROFINET Component Description (PCD) file in XML. A planning tool loads these descriptions and enables the logical interconnections between the individual components to be generated for implementing a plant. This model was largely inspired by the IEC 61499 standard.
PROFINET IO

A PROFINET IO system consists of the following devices: IO Controller controls the automation task. IO Device is a field device, which is monitored and controlled by an IO Controller. An IO Device comprises several modules and submodules.
ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 9 ETHERNET

132 DE 133

IO Supervisor is an engineering tool typically based on a PC for parameterizing and diagnosing the individual IO Devices. An Application Relation (AR) is established between an IO Controller and an IO Device. These ARs are used to define Communication Relations (CR) with different characteristics for the transfer of parameters, cyclic exchange of data and handling of alarms. The characteristics of an IO Device are described by the device manufacturer in a General Station Description (GSD) file. The language used for this purpose is the GSDML (GSD Markup Language) - an XML based language. The GSD file provides an engineering system with a basis for planning the configuration of a PROFINET IO system.
Organization

PROFINET is supported by PROFIBUS International and the INTERBUS Club and, since 2003, is part of the IEC 61158 and IEC 61784 standards.
Weblinks

Industrial IT Technical Information: Information about PROFINET, Siemens AG Information about PROFINET Organization: PROFIBUS International

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

UNIDAD 9 ETHERNET

133 DE 133

9.2 ESPECIFICACION. 9.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA

INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

You might also like