redes_ind

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

Upload: api-3725139

Post on 14-Nov-2014

110 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: REDES_IND

REDES INDUSTRIALES.ING. ALFONSO PEREZ GARCIA.

INSTITUTO TECNLOGICO DE SAN LUIS POTOSI.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 2: REDES_IND

INDICE 2 DE 133

INDICE.

PROGRAMA 6Prácticas. 7BIBLIOGRAFIA. 7UNIDAD 1 MODELO OSI 8

1.1 El modelo OSI. 8Modelo OSI 8

Historia 8Modelo de referencia OSI 9Capa Física (Capa 1) 9Codificación de la señal 10Topología y medios compartidos 10Equipos adicionales 10Capa de enlace de datos (Capa 2) 11Capa de red (Capa 3) 11Capa de transporte (Capa 4) 11Capa de sesión (Capa 5) 12Capa de presentación (Capa 6) 12Capa de aplicación (Capa 7) 13Unidades de datos 13Transmisión de los datos 14Formato de los datos 15Operaciones sobre los datos 16Bloqueo y desbloqueo 16Concatenación y separación 16

Véase también 16Enlaces externos 161.2 Su relación con las redes industriales 17Red industrial 17

INTRODUCCIÓN 17LA TECNOLOGÍA DE BUSES DE CAMPO 17ALGUNOS TIPOS DE BUS 18CLASIFICACION DE LAS REDES INDUSTRIALES. 19COMPONENTES DE LAS REDES INDUSTRIALES. 19TOPOLOGIA DE REDES INDUSTRIALES 20BENEFICIOS DE UNA RED INDUSTRIAL 20REDES INDUSTRIALES CON PLC 20SOLUCIONES CON ETHERNET 20CONCLUSION 21

Enlaces externos 21UNIDAD 2 LAYERS FISICOS 22

2.1 Los estandares RS232, IEEE-488 y RS485 22RS-232 22

Scope of the standard 22History 22Limitations of the standard 23Role in modern personal computers 24Standard details 24Conventions 29RTS/CTS handshaking 293-wire and 5-wire RS-232 29

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 3: REDES_IND

INDICE 3 DE 133

Seldom used features 29Signal rate selection 30Loopback testing 30Timing signals 30Secondary channel 30Related standards 31

See also 31References 32External links 32

EIA-485 33Waveform example 35References 36See also 36External links 36

Interface Converter RS232 to RS485 cable pinout 37IEEE-488 42

History 44Applications 44Signals 45Connectors 46

See also 46References 46External links 462.2 El lazo de corriente 4-20 Ma y HART 48HART Protocol 48

Analog/digital mode 49Multidrop mode 49Packet Structure 49

External links 50UNIDAD 3 FIELDBUS 51

3.1 INTRODUCCION. 51ANALISIS DEL ESTADO DEL ARTE DE LOS BUSES DE CAMPO APLICADOS AL CONTROL DE PROCESOS INDUSTRIALES 51

RESUMEN 511. INTRODUCCIÓN 512. VENTAJAS DE LOS BUSES DE CAMPO 523. BUSES DE CAMPO EXISTENTES 534. ALGUNOS BUSES ESTANDARIZADOS 545. LA GUERRA DE LOS BUSES. 616. CONCLUSIONES 62BIBLIOGRAFIA 62

3.2 ESPECIFICACION. 633.3 APLICACIONES. 63

UNIDAD 4 BITBUS 644.1 INTRODUCCION. 64Cableado y terminaciones 64Conectores 64Estructura 64Tipos de nodos 65Modos de sincronización 65Codificación 66Trama del mensaje 66

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 4: REDES_IND

INDICE 4 DE 133

Flag 66Dirección esclavo 66Control 67Información 68CRC 68

Trama del campo de información 68Longitud de información 68Tipo de mensaje (MT) 68Fuente de la orden (SE) 68Destino de la orden (DE) 69Pista (TR) 694 bits reservados 69Dirección esclavo 69Codificación de tareas 69Tareas usuario/Errores 70Datos 70

Registros de estado y contadores de secuencia 70Bibliografía 71

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

BITBUS Basics 754.2 ESPECIFICACION. 854.3 APLICACIONES. 85

UNIDAD 5 ASi 865.1 INTRODUCCION. 86AS-interface 86

Características principales 86Enlaces externos 87

AS-Interface 87External links 895.2 ESPECIFICACION. 905.3 APLICACIONES. 90

UNIDAD 6 CAN 916.1 INTRODUCCION. 91Controller Area Network 91

Origins 91Applications 91CAN Network Testing 91Technology 92

See also 100References 101External links 1016.2 ESPECIFICACION. 1026.3 APLICACIONES. 102

UNIDAD 7 DEVICENET 1037.1 INTRODUCCION 103DeviceNet 103

History 103

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 5: REDES_IND

INDICE 5 DE 133

Technical Snapshot 103Architecture 104Conformance Test 105Sources 106

7.2 ESPECIFICACION. 1077.3 APLICACIONES. 107

UNIDAD 8 PROFIBUS 1088.1 INTRODUCCION. 108Profibus 108Véase también 108Enlaces externos 108Profibus 109

From Wikipedia, the free encyclopedia 109Retrieved from "http://en.wikipedia.org/wiki/Profibus" 109Origin 109Use 109Technology 109Standardization 112Organization 112

References 112External links 1128.2 ESPECIFICACION. 1138.3 APLICACIONES. 113

UNIDAD 9 ETHERNET 1149.1 INTRODUCCION. 114PROFINET 114

From Wikipedia, the free encyclopedia 114Contents 114

Technology 114PROFINET CBA 114PROFINET IO 114Organization 115Weblinks 115

9.2 ESPECIFICACION. 1169.3 APLICACIONES. 116

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 6: REDES_IND

PROGRAMA 6 DE 133

PROGRAMA

S.E.P. DIRECCIÓN GENERAL DE INSTITUTOS TECNOLÓGICOS S.E.l.T1. IDENTIFICACION DEL PROGRAMA DESARROLLADO POR UNIDADES DE APRENDIZAJE.

NOMBRE DE LA ASIGNATURA: REDES INDUSTRIALES (3-2-8).NIVEL: LICENCIATURA.CARRERA: INGENIERIA ELECTRONICA.CLAVE: ECM 0705

NUMERO

TEMA SUBTEMAS: DURACION

EVAL.

1 MODELO OSI 1.1 El modelo OSI.1.2 Su relación con las redes industriales

1 SEMANAS

100% EE

2 LAYERS FISICOS 2.1 Los estandares RS232, RS488 y RS4852.2 El lazo de corriente 4-20 Ma y HART

1 SEMANAS

100% EE

3 FIELDBUS 3.1 INTRODUCCION.3.2 ESPECIFICACION.

3.3 APLICACIONES. 2 SEMANAS

100% EE

4 BITBUS 4.1 INTRODUCCION.4.2 ESPECIFICACION.

4.3 APLICACIONES. 2 SEMANA

100% EE

5 ASi 5.1 INTRODUCCION.5.2 ESPECIFICACION.

5.3 APLICACIONES. 2 SEMANAS

100% EE

6 CAN 6.1 INTRODUCCION.6.2 ESPECIFICACION.

6.3 APLICACIONES. 2 SEMANAS

100% EE

7 DEVICENET 7.1 INTRODUCCION7.2 ESPECIFICACION.

7.3 APLICACIONES. 2 SEMANA

100% EE

8 PROFIBUS 8.1 INTRODUCCION.8.2 ESPECIFICACION.

8.3 APLICACIONES. 2 SEMANA

100% EE

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 7: REDES_IND

PROGRAMA 7 DE 133

NUMERO

TEMA SUBTEMAS: DURACION

EVAL.

9 ETHERNET 9.1 INTRODUCCION.9.2 ESPECIFICACION.

9.3 APLICACIONES. 2 SEMANA

100% EE

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 8: REDES_IND

PROGRAMA 8 DE 133

Prácticas.

NUMERO DE PRACTICA.

DESCRIPCION (TEMA). UNIDAD.

1 Red simple con protocolo HART 22 Red simple de actuadores y sensores digitales con ASi. 53 Red simple con protocolo Ethernet. 9

BIBLIOGRAFIA.

AUTOR TITULO EDITORIAL1 Steve Mackay, Edwin Wright, Deon Reynders, John Park

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

Newnes (July 2003)

2 Franco Davoli, Sergio Palazzo, Sandro Zappatore

Distributed Cooperative Laboratories: Networking, Instrumentation, and Measurements (Signals and Communication Technology)

Springer; 1 edition (April 5, 2006)

3 N. P. Mahalik Fieldbus Technology: Industrial Network Standards for Real-Time Distributed Control (Hardcover)

Springer; 1 edition (October 19, 2005)

NOMBRE DIRECCION TEMASHOW STUFF WORKS WWW.HOWSTUFFWORKS.COM TODOSESNIPS PAGINA DEL PROFE

WWW.ESNIPS.COM/WEB/REDESINDUSTRIALES

TODOS

FAIRCHILD SEMICONDUCTORS

WWW.FAIRCHILDSEMI.COM OPTOACOPLADORES

B&B ELECTRONICS. WWW.BB-ELEC.COM RS232, RS488 Y RS485WWW.HARTCOMM.ORG HART PROTOCOLWWW.FIELBUS.ORG FIELDBUS ORGANIZATION

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 9: REDES_IND

PROGRAMA 9 DE 133

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 10: REDES_IND

UNIDAD 1 MODELO OSI 10 DE 133

UNIDAD 1 MODELO OSI

1.1 El modelo OSI.

Modelo OSIDe Wikipedia, la enciclopedia libre

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

Historia

A principios de la década de 1980 el desarrollo de redes sucedió con desorden en muchos sentidos. Se produjo un enorme crecimiento en la cantidad y el tamaño de las redes. A medida que las empresas tomaron conciencia de las ventajas de usar tecnología de networking, las redes se agregaban o expandían a casi la misma velocidad a la que se introducían las nuevas tecnologías de red.Para mediados de la década de 1980, estas empresas comenzaron a sufrir las consecuencias de la rápida expansión. 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 tenían dificultades para intercambiar información. El mismo problema surgía con las empresas que desarrollaban tecnologías de networking privadas o propietarias. "Propietario" significa que una sola empresa o un pequeño grupo de empresas controla todo uso de la tecnología. Las tecnologías de networking que respetaban reglas propietarias en forma estricta no podían comunicarse con tecnologías que usaban reglas propietarias diferentes.Para enfrentar el problema de incompatibilidad de redes, la Organización Internacional para la Estandarización (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 investigación, 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

Page 11: REDES_IND

UNIDAD 1 MODELO OSI 11 DE 133

Modelo de referencia OSI

Siguiendo el esquema de este modelo se crearon numerosos protocolos, por ejemplo X.25, que durante muchos años ocuparon el centro de la escena de las comunicaciones informáticas. El advenimiento de protocolos más flexibles donde las capas no están 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 enseñanza 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 Física (Capa 1)

Artículo principal: Nivel físicoLa Capa Física del modelo de referencia OSI es la que se encarga de las conexiones físicas de la computadora hacia la red, tanto en lo que se refiere al medio físico (medios guiados: cable coaxial, cable de par trenzado, fibra óptica y otros tipos de cables; medios no guiados: radio, infrarrojos, microondas, láser y otras redes inalámbricas); características 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 información (codificación de señal, niveles de tensión/intensidad de corriente eléctrica, modulación, tasa binaria, etc.)Es la encargada de transmitir los bits de información a través del medio utilizado para la transmisión. Se ocupa de las propiedades físicas y características eléctricas de los diversos componentes; de la velocidad de transmisión, si ésta es uni o bidireccional (símplex, dúplex o full-dúplex). También de aspectos mecánicos de las conexiones y terminales, incluyendo la interpretación de las señales eléctricas/electromagnéticas.Se encarga de transformar una trama de datos proveniente del nivel de enlace en una señal adecuada al medio físico utilizado en la transmisión. Estos impulsos pueden ser eléctricos (transmisión por cable) o electromagnéticos (transmisión sin cables). Estos últimos, dependiendo de la frecuencia / longitud de onda de la señal pueden ser ópticos, de micro-ondas o de radio. Cuando actúa en modo recepción el trabajo es inverso; se encarga de transformar la señal transmitida en tramas de datos binarios que serán entregados al nivel de enlace.

Sus principales funciones se pueden resumir como:

Definir el medio o medios físicos por los que va a viajar la comunicación: cable de pares trenzados (o no, como en RS232/EIA232), coaxial, guías de onda, aire, fibra óptica.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 12: REDES_IND

UNIDAD 1 MODELO OSI 12 DE 133

Definir las características materiales (componentes y conectores mecánicos) y eléctricas (niveles de tensión) que se van a usar en la transmisión de los datos por los medios físicos. Definir las características funcionales de la interfaz (establecimiento, mantenimiento y liberación del enlace físico). Transmitir el flujo de bits a través del medio. Manejar las señales eléctricas/electromagnéticas Especificar cables, conectores y componentes de interfaz con el medio de transmisión, polos en un enchufe, etc. Garantizar la conexión (aunque no la fiabilidad de ésta).

Codificación de la señal

El nivel físico recibe una trama binaria que debe convertir a una señal eléctrica, electromagnética u otra dependiendo del medio, de tal forma que a pesar de la degradación que pueda sufrir en el medio de transmisión vuelva a ser interpretable correctamente en el receptor.En el caso más 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 señal, en los casos más sencillos la codificación puede ser por pulsos de tensión (PCM o Pulse Code Modulatión) (por ejemplo 5 V para los "unos" y 0 V para los "ceros"), es lo que se llaman codificación 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 más partido al medio se usan técnicas de modulación más complejas, y suelen ser muy dependientes de las características del medio concreto.En los casos más complejos, como suelen ser las comunicaciones inalámbricas, se pueden dar modulaciones muy sofisticadas, este es el caso de los estándares Wi-Fi, con técnicas de modulación complejas de espectro ensanchado

Topología y medios compartidos

Indirectamente, el tipo de conexión que se haga en la capa física puede influir en el diseño de la capa de Enlace. Atendiendo al número 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 más de dos equipos pueden usar el medio.

Así por ejemplo la fibra óptica no permite fácilmente conexiones multipunto (sin embargo, véase FDDI) y por el contrario las conexiones inalámbricas son inherentemente multipunto (sin embargo, véanse los enlaces infrarrojos). Hay topologías como el anillo, que permiten conectar muchas máquinas a partir de una serie de conexiones punto a punto.

Equipos adicionales

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 13: REDES_IND

UNIDAD 1 MODELO OSI 13 DE 133

A la hora de diseñar una red hay equipos adicionales que pueden funcionar a nivel físico, se trata de los repetidores, en esencia se trata de equipos que amplifican la señal, pudiendo también regenerarla. En las redes Ethernet con la opción de cableado de par trenzado (la más común hoy por hoy) se emplean unos equipos de interconexión llamados concentradores (repetidores en las redes 10Base-2) más conocidos por su nombre en inglés (hubs) que convierten una topología física en estrella en un bus lógico y que actúan exclusivamente a nivel físico, a diferencia de los conmutadores (switches) que actúan a nivel de enlace.

Capa de enlace de datos (Capa 2)

Artículo principal: Nivel de enlace de datosCualquier medio de transmisión debe ser capaz de proporcionar una transmisión sin errores, es decir, un tránsito de datos fiable a través de un enlace físico. Debe crear y reconocer los límites de las tramas, así como resolver los problemas derivados del deterioro, pérdida o duplicidad de las tramas. También puede incluir algún mecanismo de regulación del tráfico que evite la saturación de un receptor que sea más lento que el emisor.La capa de enlace de datos se ocupa del direccionamiento físico, de la topología de la red, del acceso a la red, de la notificación de errores, de la distribución ordenada de tramas y del control del flujo.Se hace un direccionamiento de los datos en la red ya sea en la distribución adecuada desde un emisor a un receptor, la notificación de errores, de la topología de la red de cualquier tipo. La tarjeta NIC (Network Interface Card, Tarjeta de Interfaz de Red en español o Tarjeta de Red) que se encarga que tengamos conexión, posee una dirección MAC (control de acceso al medio) y la LLC (control de enlace lógico).La PDU de la capa 2 es la trama.

Capa de red (Capa 3)

Artículo principal: Nivel de redEl cometido de la capa de red es hacer que los datos lleguen desde el origen al destino, aún cuando ambos no estén conectados directamente. Los dispositivos que facilitan tal tarea se denominan en castellano encaminadores, aunque es más frecuente encontrar el nombre inglés routers y, en ocasiones enrutadores.Adicionalmente la capa de red debe gestionar la congestión de red, que es el fenómeno que se produce cuando una saturación 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 también pueden trabajar en esta capa dependiendo de la función que se le asigne.

Capa de transporte (Capa 4)

Artículo principal: Nivel de transporteSu función básica es aceptar los datos enviados por las capas superiores, dividirlos en pequeñas partes si es necesario, y pasarlos a la capa de red. En el caso del modelo OSI, también se asegura que lleguen correctamente al otro lado

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 14: REDES_IND

UNIDAD 1 MODELO OSI 14 DE 133

de la comunicación. Otra característica a destacar es que debe aislar a las capas superiores de las distintas posibles implementaciones de tecnologías de red en las capas inferiores, lo que la convierte en el corazón de la comunicación. En esta capa se proveen servicios de conexión para la capa de sesión que serán utilizados finalmente por los usuarios de la red al enviar y recibir paquetes. Estos servicios estarán asociados al tipo de comunicación empleada, la cual puede ser diferente según el requerimiento que se le haga a la capa de transporte. Por ejemplo, la comunicación puede ser manejada para que los paquetes sean entregados en el orden exacto en que se enviaron, asegurando una comunicación punto a punto libre de errores, o sin tener en cuenta el orden de envío. Una de las dos modalidades debe establecerse antes de comenzar la comunicación para que una sesión determinada envíe paquetes, y ése será el tipo de servicio brindado por la capa de transporte hasta que la sesión finalice. De la explicación 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 sesión desea establecer una comunicación. 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 máquina origen a la destino, independizándolo del tipo de red física que se esté utilizando. La PDU de la capa 4 se llama Segmentos.

Capa de sesión (Capa 5)

Artículo principal: Nivel de sesiónEsta capa Establece, gestiona y finaliza las conexiones entre usuarios (procesos o aplicaciones) finales. Ofrece varios servicios que son cruciales para la comunicación, como son:

Control de la sesión a establecer entre el emisor y el receptor (quién transmite, quién escucha y seguimiento de ésta). Control de la concurrencia (que dos comunicaciones a la misma operación crítica no se efectúen al mismo tiempo). Mantener puntos de verificación (checkpoints), que sirven para que, ante una interrupción de transmisión por cualquier causa, la misma se pueda reanudar desde el último punto de verificación en lugar de repetirla desde el principio.

Por lo tanto, el servicio provisto por esta capa es la capacidad de asegurar que, dada una sesión establecida entre dos máquinas, la misma se pueda efectuar para las operaciones definidas de principio a fin, reanudándolas en caso de interrupción. En muchos casos, los servicios de la capa de sesión son parcialmente, o incluso, totalmente prescindibles.En conclusión esta capa es la que se encarga de mantener el enlace entre los dos computadores que estén trasmitiendo archivos.

Capa de presentación (Capa 6)

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 15: REDES_IND

UNIDAD 1 MODELO OSI 15 DE 133

El objetivo de la capa de presentación es encargarse de la representación de la información, de manera que aunque distintos equipos puedan tener diferentes representaciones internas de caracteres (ASCII, Unicode, EBCDIC), números (little-endian tipo Intel, big-endian tipo Motorola), sonido o imágenes, los datos lleguen de manera reconocible.Esta capa es la primera en trabajar más el contenido de la comunicación que cómo se establece la misma. En ella se tratan aspectos tales como la semántica 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 representación de datos necesarias para la correcta interpretación de los mismos.Esta capa también permite cifrar los datos y comprimirlos. En pocas palabras es un traductor

Capa de aplicación (Capa 7)

Ofrece a las aplicaciones(de usuario o no) la posibilidad de acceder a los servicios de las demás capas y define los protocolos que utilizan las aplicaciones para intercambiar datos, como correo electrónico (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 número de protocolos crece sin parar.Cabe aclarar que el usuario normalmente no interactúa directamente con el nivel de aplicación. Suele interactuar con programas que a su vez interactúan con el nivel de aplicación pero ocultando la complejidad subyacente. Así por ejemplo un usuario no manda una petición "HTTP/1.0 GET index.html" para conseguir una página en html, ni lee directamente el código html/xml.Entre los protocolos (refiriéndose a protocolos genéricos, no a protocolos de la capa de aplicación de OSI) más 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) envío y distribución de correo electrónico 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 transmisión. Telnet otro terminal remoto, ha caído en desuso por su inseguridad intrínseca, ya que las claves viajan sin cifrar por la red.

Hay otros protocolos de nivel de aplicación que facilitan el uso y administración 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

Page 16: REDES_IND

UNIDAD 1 MODELO OSI 16 DE 133

El intercambio de información entre dos capas OSI consiste en que cada capa en el sistema fuente le agrega información de control a los datos, y cada capa en el sistema de destino analiza y remueve la información de control de los datos como sigue:

Si un ordenador (host A) desea enviar datos a otro (host B), en primer término los datos deben empaquetarse a través de un proceso denominado encapsulamiento, es decir, a medida que los datos se desplazan a través de las capas del modelo OSI, reciben encabezados, información final y otros tipos de información.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 17: REDES_IND

UNIDAD 1 MODELO OSI 17 DE 133

N-PDU (Unidad de datos de protocolo)Es la información intercambiada entre entidades pares,es decir,dos entidades pertenecientes a la misma capa pero en dos sistemas diferentes, utilizando una conexión(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 (Información de control del protocolo) Información intercambiada entre entidades (N) utilizando una conexión (N-1) para coordinar su operación conjunta.

N-IDU (Unidad de datos del interface)Es la información transferida entre dos niveles adyacentes,es decir, dos capas contiguas. Esta compuesta por: N-ICI (Información de control del interface) Información intercambiada entre una entidad (N+1) y una entidad (N) para coordinar su operación conjunta. Datos de Interface-(N) Información transferida entre una entidad-(N+1) y una entidad-(N) y que normalmente coincide con la (N+1)-PDU.

Transmisión de los datos

La capa de aplicación recibe el mensaje del usuario y le añade una cabecera constituyendo así la PDU de la capa de aplicación. La PDU se transfiere a la capa de aplicación 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 presentación para ello hay que añadirla la correspondiente cabecera ICI y transformarla así en una IDU, la cual se transmite a dicha capa.2-La capa de presentación recibe la IDU, le quita la cabecera y extrae la información, es decir, la SDU, a esta le añade su propia cabecera (PCI) constituyendo así la PDU de la capa de presentación.3- Esta PDU es transferida a su vez a la capa de sesión mediante el mismo proceso, repitiéndose así para todas las capas.4-Al llegar al nivel físico se envían los datos que son recibidos por la capa física del receptor.5-Cada capa del receptor se ocupa de extraer la cabecera, que anteriormente había añadido su capa homóloga, interpretarla y entregar la PDU a la capa superior.6-Finalmente llegará a la capa de aplicación la cual entregará el mensaje al usuario.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 18: REDES_IND

UNIDAD 1 MODELO OSI 18 DE 133

Formato de los datos

Estos datos reciben una serie de nombres y formatos específicos en función de la capa en la que se encuentren, debido a como se describió anteriormente la adhesión de una serie de encabezados e información final. Los formatos de información son los que muestra el gráfico:

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 19: REDES_IND

UNIDAD 1 MODELO OSI 19 DE 133

APDU: Unidad de datos en la capa de aplicación.PPDU: Unidad de datos en la capa de presentación.SPDU: Unidad de datos en la capa de sesión.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 física.

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 pequeñas y estaríamos desaprovechando la capacidad del enlace.

Segmentación 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 están contenidas en una (N)-PDU.

Concatenación y separación

La concatenación es una función-(N) que realiza el nivel-(N) y que hace corresponder varias (N)-PDUs en una sola (N-1)-SDU.La separación identifica varias (N)-PDUs que están contenidas en una sola (N-1)-SDU.

Véase también Familia de protocolos de Internet

Enlaces externos Estándar 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 - Interconexión de Sistemas Abiertos Cátedra Sistemas de Comunicaciones. Universidad Tecnológica Nacional, Facultad Regional Mendoza, Argentina.

1.2 Su relación con las redes industriales

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 20: REDES_IND

UNIDAD 1 MODELO OSI 20 DE 133

Red industrialDe Wikipedia, la enciclopedia libreObtenido de "http://es.wikipedia.org/wiki/Red_industrial"

INTRODUCCIÓN

Las redes de comunicaciones industriales deben su origen a la fundación FieldBus (Redes de campo). La fundación FieldBus, desarrollo un nuevo protocolo de comunicación, para la medición 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 señales analógicas (neumáticas de 3 a 15 psi en las válvulas de control y electrónicas de 4 a 20 mA cc). Pero ya existen instrumentos digitales capaces de manejar gran cantidad de datos y guardarlos históricamente; su precisión es diez veces mayor que la de la señal típica 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 tecnología fieldbus (bus de campo) es un protocolo de comunicaciones digital de alta velocidad que esta creada para remplazar la clásica señal de 4-20 mA que aún se utiliza en muchos de los sistemas DCS (Sistema de Control Distribuido) y PLC (Controladores Lógicos Programables), instrumentos de medida y transmisión y válvulas de control. La arquitectura fieldbus conecta estos instrumentos con computadores que se usan en diferentes niveles de coordinación y dirección 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 tecnologías 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 comunicación es ahora posible reducir el tiempo necesitado para la transferencia de datos, asegurando la misma, garantizando el tiempo de sincronización y el tiempo real de respuesta determinística en algunas aplicaciones.

LA TECNOLOGÍA DE BUSES DE CAMPO

Físicamente podemos considerar a un bus como un conjunto de conductores conectando conjuntamente más circuitos para permitir el intercambio de datos. Contrario a una conexión punto a punto donde solo dos dispositivos intercambian información, un bus consta normalmente de un número de usuarios superior, además que generalmente un bus transmite datos en modo serial, a excepción de algún protocolo de bus particular como SCSI, o IEEE-488 utilizado para interconexión de instrumentos de medición, que no es el caso de los buses tratados como buses de campo.Para una transmisión serial es suficiente un número de cables muy limitado, generalmente son suficientes dos o tres conductores y la debida protección contra las perturbaciones externas para permitir su tendido en ambientes de ruido industrial.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 21: REDES_IND

UNIDAD 1 MODELO OSI 21 DE 133

Ventajas de un bus de campo

- El intercambio puede llevar a cabo por medio de un mecanismo estándar. - Flexibilidad de extensión. - Conexión de módulos diferentes en una misma línea. - Posibilidad de conexión de dispositivos de diferentes procedencias. - Distancias operativas superiores al cableado tradicional. - Reducción masiva de cables y costo asociado. - Simplificación de la puesta en servicio.

Desventajas de un bus de campo

- Necesidad de conocimientos superiores. - Inversión de instrumentación y accesorios de diagnóstico. - Costos globales inicialmente superiores.

Procesos de comunicación por medio de bus

El modo más sencillo de comunicación con el bus es el sondeo cliente/servidor. Más eficiente pero también más costoso es el Token bus ( IEEE 802.4), desde el punto de vista físico tenemos un bus lineal, desde el punto de vista lógico un token ring. El procedimiento token passing es una combinación entre cliente/servidor y token bus. Todo servidor inteligente puede ser en algún momento servidor.

ALGUNOS TIPOS DE BUS

La mayoría de los buses trabajan en el nivel 1 con interfaz RS 485.

ASI (Actuator Sensor Interface)

Es el bus más inmediato en el nivel de campo y más sencillo de controlar, consiste en un bus cliente/servidor con un máximo 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 máximo 100 m.

BITBUSEs el más difundido en todo el mundo, es cliente/servidor que admite como máximo 56 clientes, el paquete puede transmitir hasta 43 bytes de dato.

PROFIBUS (PROcess FIeld BUS)

Es el estándar europeo en tecnología de buses, se encuentra jerárquicamente por encima de ASI y BITBUS, trabaja según procedimiento híbrido token passing, dispone de 31 participantes hasta un máximo de 127. Su paquete puede transmitir un máximo 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

Page 22: REDES_IND

UNIDAD 1 MODELO OSI 22 DE 133

FieldBus en OSI

En la arquitectura OSI, fieldbus ocupa los niveles 1 (Físico), 2 (Enlace de Datos) y 7 (Aplicación); teniendo en cuenta que este último no solo se encarga de la interfaz de usuario sino de aplicaciones especificas dependiendo de cada aplicación.

CLASIFICACION DE LAS REDES INDUSTRIALES.

Si se clasifican las redes industriales en diferentes categorías basándose en la funcionalidad, se hará en:

Buses Actuadores y Sensores

Inicialmente es usado un sensor y un bus actuador en conexión simple, dispositivos discretos con inteligencia limitada, como un foto sensor, un switch limitador o una válvula solenoide, controladores y consolas terminales.

Buses de Campo y Dispositivos

Estas redes se distinguen por la forma como manejan el tamaño 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 diagnóstico y capacidad de configuración, generalmente al nivel del poder de procesamiento de los dispositivos más inteligentes. Son las redes más 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 topologías y diseños de redes para proveer un aislamiento y conocer los requerimientos de funcionamiento.

Bridge

Con un puente la conexión entre dos diferentes secciones de red, puede tener diferentes características eléctricas y protocolos; además puede enlazar dos redes diferentes.

Repetidor

El repetidor o amplificador es un dispositivo que intensifica las señales eléctricas para que puedan viajar grandes distancias entre nodos. Con este dispositivo se pueden conectar un gran número de nodos a la red; además se pueden adaptar a diferentes medios físicos como cable coaxial o fibra óptica.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 23: REDES_IND

UNIDAD 1 MODELO OSI 23 DE 133

Gateway

Un gateway es similar a un puente ya que suministra interoperabilidad entre buses y diferentes tipos de protocolos y además las aplicaciones pueden comunicarse a través de él.

Enrutadores

Es un switch "Enrutador" de paquetes de comunicación 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 topología de la red; las topologías más comunes son: La Red Bus, Red Estrella y Red Híbrida

BENEFICIOS DE UNA RED INDUSTRIAL

- Reducción de cableado (físicamente) - Dispositivos inteligentes (funcionalidad y ejecución) - Control distribuido (Flexibilidad) - Simplificación de cableado de las nuevas instalaciones - Reducción de costo en cableado y cajas de conexión - Aplicable a todo tipo de sistema de manufactura - Incremento de la confiabilidad de los sistemas de producción - Optimización de los procesos existentes.

REDES INDUSTRIALES CON PLC

Muchos sistemas están conformados por equipos de diferentes fabricantes y funcionan en diferentes niveles de automatización; además, 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 comunicación totalmente integrada en el sistema. Al usuario, esto le reporta la máxima flexibilidad ya que también puede integrar sin problemas productos de otros fabricantes a través de las interfaces software estandarizadas.En los últimos años, las aplicaciones industriales basadas en comunicación digital se han incrementado haciendo posible la conexión de sensores, actuadores y equipos de control en una planta de procesamiento.De esta manera, la comunicación entre la sala de control y los instrumentos de campo se han convertido en realidad. La Comunicación digital debe integrar la información provista por los elementos de campo en el sistema de control de procesos.

SOLUCIONES CON ETHERNET

Aunque los buses de campo continuarán dominando las redes industriales, las soluciones basadas en Ethernet se están utilizando cada vez más en el sector de las tecnologías de automatización, donde las secuencias de procesos y producción son controladas por un modelo cliente/servidor con controladores, PLC

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 24: REDES_IND

UNIDAD 1 MODELO OSI 24 DE 133

y sistemas ERP (Planificación de los recursos de la empresa), teniendo acceso a cada sensor que se conecta a la red.La implementación de una red efectiva y segura también 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 aplicación no necesariamente es software por lo general las aplicaciones son de audio (alarmas), vídeo (vigilancia), monitoreo y control (sensores), conversión análoga/digital y digital/analóga.Para la programación de gateway de alto nivel se utiliza el C++ y para la programación menos avanzada se hace con hojas de cálculo. 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 automático.

CONCLUSION

Hoy en día las tecnologías que triunfan en el mercado son aquellas que ofrecen las mejores ventajas y seguridad a los clientes, cada vez se está acabando con tecnologías cerradas; que en un mundo en proceso de globalización, 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 instrumentación y el control automático, sino que existe la necesidad de mantener históricamente información de todos los procesos, además que esta información este también 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 demás condiciones adversas; pero además requiere de personal capaz de ver globalmente el sistema de control y automatización industrial junto con el sistema de red digital de datos.

Enlaces externos

redes de comunicación industrial redes induatriales aplicaciones redes industruales con PLC

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 25: REDES_IND

UNIDAD 2 LAYERS FISICOS 25 DE 133

UNIDAD 2 LAYERS FISICOS

2.1 Los estandares RS232, IEEE-488 y RS485

RS-232From Wikipedia, the free encyclopediaRetrieved 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 supported RS-232. The C revision of the standard was issued in 1969 in part to accommodate the electrical characteristics of these devices.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 26: REDES_IND

UNIDAD 2 LAYERS FISICOS 26 DE 133

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 "RS-232 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-232-compatible 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 "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

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 27: REDES_IND

UNIDAD 2 LAYERS FISICOS 27 DE 133

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 portMain 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

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

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 28: REDES_IND

UNIDAD 2 LAYERS FISICOS 28 DE 133

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

Page 29: REDES_IND

UNIDAD 2 LAYERS FISICOS 29 DE 133

Voltage levels

Diagrammatic oscilloscope trace of voltage levels for ASCII "K" character (0x4b) with 1 start bit, 8 data bits, 1 stop bit

Main article: Serial portThe 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 RS-232C 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

Page 30: REDES_IND

UNIDAD 2 LAYERS FISICOS 30 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 RJ-45 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

Page 31: REDES_IND

UNIDAD 2 LAYERS FISICOS 31 DE 133

Pinouts (DTE relative)

The following table lists the commonly used RS-232 signals and common pin assignments

Signal Type

Abbr.

Dir.

DB-25

DE-9

(TIA-

574)

EIA/TIA 561

Yost

RJ-50

MMJ

Cisco

RJ-45

Hirschmann RJ-45

Alternates

Common Ground

G – 7 5 4 4,5 6 3,4 4,5 4

Transmitted Data

TxDOut

2 3 6 3 8 2 3 3

Received Data

RxD In 3 2 5 6 9 5 6 5

Data Terminal Ready

DTROut

20 4 3 2 7 1 2 -

Data Set Ready

DSR In 6 6 1 7 5 6 7 -

Request To Send

RTSOut

4 7 8 1 4 -1 (Aux only)

-

Clear To Send

CTS In 5 8 7 8 3 -8 (Aux only)

-

Carrier Detect

DCD In 8 1 2 7 10 - - -

Ring Indicator

RI In 22 9 1 - 2 - - -

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

Page 32: REDES_IND

UNIDAD 2 LAYERS FISICOS 32 DE 133

Signals

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 CableSince 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

Page 33: REDES_IND

UNIDAD 2 LAYERS FISICOS 33 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

Page 34: REDES_IND

UNIDAD 2 LAYERS FISICOS 34 DE 133

Conventions

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

Page 35: REDES_IND

UNIDAD 2 LAYERS FISICOS 35 DE 133

Signal rate selection

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

Page 36: REDES_IND

UNIDAD 2 LAYERS FISICOS 36 DE 133

Signal Pin

Common Ground7 (same as primary)

Secondary Transmitted Data (STD)

14

Secondary Received Data (SRD)

16

Secondary Request To Send (SRTS)

19

Secondary Clear To Send (SCTS)

13

Secondary Carrier Detect (SDCD)

12

Related standards

Other serial signaling standards may not interoperate with standard-compliant RS-232 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 RS-232 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)

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 37: REDES_IND

UNIDAD 2 LAYERS FISICOS 37 DE 133

See also Asynchronous start-stop List of device bandwidths

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 38: REDES_IND

UNIDAD 2 LAYERS FISICOS 38 DE 133

References1. ̂ 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

Page 39: REDES_IND

UNIDAD 2 LAYERS FISICOS 39 DE 133

EIA-485From Wikipedia, the free encyclopediaRetrieved from "http://en.wikipedia.org/wiki/EIA-485"

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-to-point (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 the physical end of the wires that would provide the termination. The master

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 40: REDES_IND

UNIDAD 2 LAYERS FISICOS 40 DE 133

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 "Multi-Repeaters" 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. 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

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 41: REDES_IND

UNIDAD 2 LAYERS FISICOS 41 DE 133

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 re-affirmed without technical changes in 2003.

ConnectorsEIA-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

Page 42: REDES_IND

UNIDAD 2 LAYERS FISICOS 42 DE 133

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 43: REDES_IND

UNIDAD 2 LAYERS FISICOS 43 DE 133

References

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

See also

Wikibooks has a book on the topic of Serial Programming:RS-485 Technical Manual

RS-232 RS-422 RS-423 Modbus Profibus Fieldbus

External links

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

Page 44: REDES_IND

UNIDAD 2 LAYERS FISICOS 44 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

Page 45: REDES_IND

UNIDAD 2 LAYERS FISICOS 45 DE 133

PC  RS485  Interface M Asim Khan,   [email protected]

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.

Figure 1: Circuit Diagram of Isolated RS485 Interface

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 46: REDES_IND

UNIDAD 2 LAYERS FISICOS 46 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.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 47: REDES_IND

UNIDAD 2 LAYERS FISICOS 47 DE 133

Figure 2: Component layout of the Isolator PCB

Figure 3: Track patterns of the Isolator PCB

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 48: REDES_IND

UNIDAD 2 LAYERS FISICOS 48 DE 133

Component details of the project.

No QUANTITY

DESIGNATOR DESCRIPTION

 1 4 C1,C2,C3,C6 100nF  2 1 C4 10uF 16V  3 1 C5 470uF 25V  4 3 D1,D2,D3 1N4148  5 2 D4,D5 LED RED 3mm  6 2 D7,D6 TRANSIL 6.8V  7 1 D8 1N4003  8 1 K1 DB9 R/A PCB PLUG  9 1 K2 PCB TERMINAL BLOCK 4

WAY 10 3 R1,R2,R3 1K8 11 2 R7,R4 4K7 12 2 R5,R8 1K 13 3 R9,R12 150R 14 1 R6 680R 15 2 R11,R10   10R 16 1 R13 120R 17 2 U3,U1 H11L1 OPTO-ISOLATOR 18 1 U2 CNY17-3 OPTO-ISOLATOR 19 1 U4 MAX487, SN75176B 20 1 U5 LM7805

2 July 2001

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 49: REDES_IND

UNIDAD 2 LAYERS FISICOS 49 DE 133

IEEE-488From Wikipedia, the free encyclopediaRetrieved 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 IEEE-488 stacking connectors

Type General purpose data bus

Production history

Designer Hewlett-Packard

Designed late 1960s standardized in 1975

Manufacturer

Hewlett-Packard

Produced 1960s to present

Specifications

External yes

Data signal Parallel data bus with handshaking

Width 8 bits

Bandwidth 1 Mbyte/s (later extended to 8 Mbyte/s)

Max devices 15

Protocol Parallel

Cable 20 meters max

Pins 24 (8 data, 5 bus management, 3 handshake, 8 ground)

Connector 24-pin Amphenol-designed micro ribbon

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 50: REDES_IND

UNIDAD 2 LAYERS FISICOS 50 DE 133

Pin out

A female IEEE-488 connector

Pin 1 DIO1 Data input/output bit.

Pin 2 DIO2 Data input/output bit.

Pin 3 DIO3 Data input/output bit.

Pin 4 DIO4 Data input/output bit.

Pin 5 EOI End-or-identify.

Pin 6 DAV Data valid.

Pin 7 NRFD Not ready for data.

Pin 8 NDAC Not data accepted.

Pin 9 IFC Interface clear.

Pin 10 SRQ Service request.

Pin 11 ATN Attention.

Pin 12 SHIELD

Pin 13 DIO5 Data input/output bit.

Pin 14 DIO6 Data input/output bit.

Pin 15 DIO7 Data input/output bit.

Pin 16 DIO8 Data input/output bit.

Pin 17 REN Remote enable.

Pin 18 GND (wire twisted with DAV)

Pin 19 GND (wire twisted with NRFD)

Pin 20 GND (wire twisted with NDAC)

Pin 21 GND (wire twisted with IFC)

Pin 22 GND (wire twisted with SRQ)

Pin 23 GND (wire twisted with ATN)

Pin 24 Logic ground

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 51: REDES_IND

UNIDAD 2 LAYERS FISICOS 51 DE 133

History

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

Page 52: REDES_IND

UNIDAD 2 LAYERS FISICOS 52 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 description

DIO1–DIO8 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.

NRFD Not ready for data. NRFD is a handshaking line asserted by listeners to indicate they are not ready to receive a new data byte.

DAV 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.

NDAC 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.

ATN 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.

EOI 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.

IFC 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.

REN 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.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 53: REDES_IND

UNIDAD 2 LAYERS FISICOS 53 DE 133

SRQ 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

Page 54: REDES_IND

UNIDAD 2 LAYERS FISICOS 54 DE 133

Connectors

IEEE-488

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.5×0.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 non-standard "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

Page 55: REDES_IND

UNIDAD 2 LAYERS FISICOS 55 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

Page 56: REDES_IND

UNIDAD 2 LAYERS FISICOS 56 DE 133

2.2 El lazo de corriente 4-20 Ma y HART

HART ProtocolFrom Wikipedia, the free encyclopediaRetrieved from "http://en.wikipedia.org/wiki/HART_Protocol"

HARTProtocol Information

Type of Network

Device Bus (Process Automation)

Physical Media

Legacy 4-20 mA analog instrumentation wiring or 2..4GHz Wireless

Network Topology

One-on-One, Multidrop, Wireless Mesh

Maximum Devices

64 in multidrop

Maximum Speed

Depends on Physical Layer employed

Device Addressing

Hardware/Software

Governing Body

HART Communication 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 4-20 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

Page 57: REDES_IND

UNIDAD 2 LAYERS FISICOS 57 DE 133

Analog/digital mode

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 NameLength (Bytes)

Purpose

Preamble 5-20 Synchronization and Carrier Detect

Start Byte 1 Specifies Master Number

Address 1-5Specifies slave, Specifies Master and Indicates Burst Mode

Command 1Numerical Value for the command to be executed

Number of Data Bytes

1 Indicates the size of the Data Field

StatusMaster (0) Slave (2)

Execution and Health Reply

Data 0-253 Data associated with the command

Checksum 1XOR of all bytes from Start Byte to Last byte of Data

Preamble

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

Page 58: REDES_IND

UNIDAD 2 LAYERS FISICOS 58 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

Page 59: REDES_IND

UNIDAD 2 LAYERS FISICOS 59 DE 133

Address

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

Page 60: REDES_IND

UNIDAD 3 FIELDBUS 60 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. Héctor Kaschel C Ing. Ernesto Pinto [email protected] [email protected] de Santiago de Chile Fac. de Ingeniería, Depto. de Ingeniería

EléctricaAvda Ecuador 3519, Estación Central. Santiago, CHILE

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 abstracción sobre integración y producción de acuerdo a la filosofía de la "Computer lntegrated Manufacturing" -CIM. Cada vez es más necesario disponer de dispositivos inteligentes para realizar el control o la supervisión remota. Un bus de campo transfiere información secuencial y serial por un número limitados de líneas o cables. Hay muchos tipos diferentes de buses en uso y muchos son altamente dependientes de las aplicaciones. Este artículo se analiza el estado de avance en la tecnología de la comunicación de los buses de campo aplicados al control de procesos industriales.

1. INTRODUCCIÓN

Un bus de campo es un sistema de transmisión de información (datos) que simplifica enormemente la instalación y operación de máquinas y equipamientos industriales utilizados en procesos de producción. 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 través del tradicional bucle de corriente de 4-20mA. Típicamente 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 diagnóstico, control o mantenimiento, así como de comunicarse bidireccionalmente a través 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 información que envían y/o reciben los dispositivos de campo es digital, lo que resulta mucho más preciso que si se recurre a métodos analógicos. Además, cada dispositivo de

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 61: REDES_IND

UNIDAD 3 FIELDBUS 61 DE 133

campo es un dispositivo inteligente y puede llevar a cabo funciones propias de control, mantenimiento y diagnóstico. De esta forma, cada nodo de la red puede informar en caso de fallo del dispositivo asociado, y en general sobre cualquier anomalía asociada al dispositivo. Esta monitorización 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 más atractivos a los usuarios finales, es la reducción de costos. El ahorro proviene fundamentalmente de tres fuentes: ahorro en costo de instalación, ahorro en el costo de mantenimiento y ahorros derivados de la mejora del funcionamiento del sistema. Una de las principales características de los buses de campo es su significativa reducción en el cableado necesario para el control de una instalación. Cada componente sólo requiere un cable para la conexión de los diversos nodos. Se estima que puede ofrecer una reducción de 5 a 1 en los costos de cableado. En comparación con otros tipos de redes, dispone de herramientas de administración del bus que permiten la reducción del número de horas necesarias para la instalación y puesta en marcha.

El hecho de que los buses de campo sean más 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. Además, los buses de campo permiten a los operadores monitorizar todos los dispositivos que integran el sistema e interpretar fácilmente las interacciones entre ellos. De esta forma, la detección de las fuentes de problemas en la planta y su corrección resulta mucho más 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 diseño del sistema. Algunos algoritmos y procedimientos de control que con sistemas de comunicación tradicionales debían incluirse en los propios algoritmos de control, radican ahora en los propios dispositivos de campo, simplificando el sistema de control y sus posibles ampliaciones.

También hay que tener en cuenta que las prestaciones del sistema mejoran con el uso de la tecnología de los buses de campo debido a la simplificación en la forma de obtener información de la planta desde los distintos sensores. Las mediciones de los distintos elementos de la red están disponibles para todos los demás dispositivos. La simplificación en la obtención de datos permitirá el diseño de sistemas de control más eficientes.

Con la tecnología de los buses de campo, se permite la comunicación bidireccional entre los dispositivos de campo y los sistemas de control, pero también entre los propios dispositivos de campo.

Otra ventaja de los buses de campo es que sólo incluyen 3 capas (Física, Enlace y Aplicación), y un conjunto de servicios de administración. El usuario no tiene que

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 62: REDES_IND

UNIDAD 3 FIELDBUS 62 DE 133

preocuparse de las capas de enlace o de aplicación. Sólo necesita saber cual es funcionalidad. Al usuario sólo se le exige tener un conocimiento mínimo de los servicios de administración de la red, ya que parte de la información generada por dichos servicios puede ser necesaria para la reparación de averías en el sistema. De hecho, prácticamente, el usuario sólo debe preocuparse de la capa física y la capa de usuario.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 63: REDES_IND

UNIDAD 3 FIELDBUS 63 DE 133

3. BUSES DE CAMPO EXISTENTES

Debido a la falta de estándares, diferentes compañías han desarrollado diferentes soluciones, cada una de ellas con diferentes prestaciones y campos de aplicación. En una primera clasificación tenemos los siguientes grupos:

3.1. Buses de alta velocidad y baja funcionalidad

Están diseñados para integrar dispositivos simples como finales de carrera, fotocélulas, relés y actuadores simples, funcionando en aplicaciones de tiempo real, y agrupados en una pequeña zona de la planta, típicamente una máquina. Básicamente comprenden las capas física y de enlace del modelo OSI, es decir, señales físicas y patrones de bits de las tramas. Algunos ejemplos son:

CAN: Diseñado originalmente para su aplicación en vehículos.SDS: Bus para la integración de sensores y actuadores, basado en CANASI: Bus serie diseñado por Siemens para la integración de sensores y actuadores.

3.2. Buses de alta velocidad y funcionalidad media

Se basan en el diseño de una capa de enlace para el envío eficiente de bloques de datos de tamaño medio. Estos mensajes permiten que el dispositivo tenga mayor funcionalidad de modo que permite incluir aspectos como la configuración, calibración o programación del dispositivo. Son buses capaces de controlar dispositivos de campo complejos, de forma eficiente y a bajo costo. Normalmente incluyen la especificación completa de la capa de aplicación, 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 estándar 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 aplicación orientada a objetos.LONWorks: Red desarrollada por Echelon.BitBus: Red desarrollada por INTEL.DIN MessBus: Estándar alemán de bus de instrumentación, basado en comunicación RS-232.InterBus-S: Bus de campo alemán de uso común en aplicaciones medias.

3.3. Buses de altas prestaciones

Son capaces de soportar comunicaciones a nivel de todos los niveles de la producción CIM. Aunque se basan en buses de alta velocidad, algunos presentan problemas debido a la sobrecarga necesaria para alcanzar las características funcionales y de seguridad que se les exigen. La capa de aplicación tiene un gran número de servicios a la capa de usuario, habitualmente un subconjunto del

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 64: REDES_IND

UNIDAD 3 FIELDBUS 64 DE 133

estándar MMS (Manufacturing Message Specification). Entre sus características incluyen:

Redes multi-maestro con redundancia.Comunicación maestro-esclavo según el esquema pregunta-respuesta.Recuperación de datos desde el esclavo con un límite máximo de tiempoCapacidad de direccionamiento unicast, multicast y broadcast,Petición de servicios a los esclavos basada en eventos.Comunicación de variables y bloques de datos orientada a objetos.Descarga y ejecución remota de programas.Altos niveles de seguridad de la red, opcionalmente con procedimientos de autentificación.Conjunto completo de funciones de administración de la red.

Algunos ejemplos son:ProfibusWorldFIPFieldbus Foundation

3.4. Buses para áreas de seguridad intrínseca

Incluyen modificaciones en la capa física para cumplir con los requisitos específicos de seguridad intrínseca en ambientes con atmósferas explosivas. La seguridad intrínseca es un tipo de protección por la que el componente en cuestión no tiene posibilidad de provocar una explosión en la atmósfera circundante. Un circuito eléctrico o una parte de un circuito tienen seguridad intrínseca, cuando alguna chispa o efecto térmico en este circuito producidos en las condiciones de prueba establecidas por un estándar (dentro del cual figuran las condiciones de operación normal y de fallo específicas) no puede ocasionar una ignición. 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 alemán. Está normalizado en Alemania por DIN E 19245 y en Europa por EN 50170. El desarrollo y posterior comercialización ha contado con el apoyo de importantes fabricantes com ABB, AEG, Siemens, Klóckner-Moeller, ... Está controlado por la PNO (Profibus User Organisation) y la PTO (Profibus Trade Organisation).

Existen tres perfiles:

Profibus DP (Decentralized Periphery). Orientado a sensores/actuadores enlazados a procesadores (PLCS) o terminales.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 65: REDES_IND

UNIDAD 3 FIELDBUS 65 DE 133

Profibus PA (Process Automation). Para control de proceso y cumpliendo normas especiales de seguridad para la industria química (IEC 1 1 15 8-2, seguridad intrínseca).

Profibus FMS (Fieldbus Message Specification). Para comunicación entre células de proceso o equipos de automatización. La evolución de Profibus hacia la utilización de protocolos TCP/IP para enlace al nivel de proceso hace que este perfil esté perdiendo importancia.

Utiliza diferentes capas físicas. La más importante, en PROFIBUS DP, está basada en ElA RS-485. Profibús PA utiliza la norma IEC 11158-2 (norma de comunicación síncrona entre sensores de campo que utiliza modulación sobre la propia línea de alimentación de los dispositivos y puede utilizar los antiguos cableados de instrumentación 4-20 mA) y para el nivel de proceso se tiende a la utilización de Ethernet. También se contempla la utilización de enlaces de fibra óptica. Existen puentes para enlace entre diferentes medios, además 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 interrogación cíclico (polling). Se pueden configurar sistemas multimaestro o sistemas más simples maestro-esclavo.

En Profibus DP se distingue entre: maestro clase 1 (estaciones de monitorización y diagnóstico), maestro clase 2 (elementos centralizadores de información como PLCS, PCs, etc.), esclavo (sensores, actuadores).

El transporte en Profibus-DP se realiza por medio de tramas según IEC 870-5-1. La comunicación se realiza por medio de datagramas en modo broadcast o multicast. Se utiliza comunicación serie asíncrona por lo que es utilizable una UART genérica.

Profibus DP prescinde de los niveles ISO 3 a 6 y la capa de aplicación ofrece una amplia gama de servicios de diagnóstico, seguridad, protecciones etc. Es una capa de aplicación relativamente compleja debido a la necesidad de mantener la integridad en el proceso de paso de testigo (un y sólo un testigo)

Profibus FMS es una compleja capa de aplicación que permite la gestión distribuida de procesos al nivel de relación entre células don posibilidad de acceso a objetos, ejecución 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 comunicación. 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 más 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

Page 66: REDES_IND

UNIDAD 3 FIELDBUS 66 DE 133

Entre sus perspectivas de futuro se encuentra la integración sobre la base de redes Ethernet al nivel de planta y la utilización de conceptos de tiempo real y filosofía productor-consumidor en la comunicación entre dispositivos de campo.

Las distancias potenciales de bus van de 100 m a 24 Km (con repetidores y fibra óptica). La velocidad de comunicación puede ir de 9600 bps a 12 Mbps. Utiliza mensajes de hasta 244 bytes de datos.

Profibus se ha difundido ampliamente en Europa y también tiene un mercado importante en América y Asia. El conjunto Profibus DP- Profibus PA cubre la automatización de plantas de proceso discontinuo y proceso continuo cubriendo normas de seguridad intrínseca.

4.2. INTERBUS

Protocolo propietario, inicialmente, de la empresa Phoenix Conctact GmbH, aunque posteriormente ha sido abierta su especificación. Normalizado bajo DIN 19258, norma europea EN 50 254. Fue introducido en el año 1984.

Utiliza una topología en anillo y comunicación mediante un registro de desplazamiento en cada nodo. Se pueden enlazar buses periféricos al principal.

Capa física basada en RS-485. Cada dispositivo actúa 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 también enlaces de fibra óptica.

Capa de transporte basada en una trama única que circula por el anillo (trama de suma)

La información 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 pequeño conjunto de entradas/salidas por nodo, pocos buses pueden ser tan rápidos y eficientes como INTERBUS.

Físicamente tiene la impresión de seguir una topología 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 comunicación al abrirse el anillo en cualquiera de los nodos. Por otra parte, la estructura en anillo permite una fácil localización de fallos y diagnóstico.

Es muy apropiado para comunicación determinista a alta velocidad, es muy difícil una filosofía de comunicación orientada a eventos.

4.3. DeviceNet

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 67: REDES_IND

UNIDAD 3 FIELDBUS 67 DE 133

Bus basado en CAN. Su capa física y capa de enlace se basan en ISO 11898, y en la especificación de Bosh 2.0. DeviceNet define una de las más sofisticadas capas de aplicaciones industriales sobre bus CAN.

DeviceNet fue desarrollado por Allen-Bradley a mediados de los noventa, posteriormente pasó a ser una especificación abierta soportada en la ODVA (Open DeviceNet Vendor Association), Cualquier fabricante puede asociarse a esta organización y obtener especificaciones, homologar productos, etc.

Es posible la conexión de hasta 64 nodos con velocidades de 125 Kbps a 500 Kbps en distancias de 100 a 500 m.

Utiliza una definición basada en orientación a objetos para modelar los servicios de comunicación y el comportamiento externo de los nodos. Define mensajes y conexiones para funcionamiento maestro-esclavo, interrogación cíclica, "strobing" o lanzamiento de interrogación general de dispositivos, mensajes espontáneos de cambio de estado, comunicación uno-uno, modelo productor-consumidor, carga y descarga de bloques de datos y ficheros etc.

DeviceNet ha conseguido una significativa cuota de mercado. Existen más de 300 productos homologados y se indica que el número 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 interconexión de dispositivos en industrias de proceso continuo. Su desarrollo ha sido apoyado por importantes fabricantes de instrumentación (Fisher-Rosemount, Foxboro,...). En la actualidad existe una asociación de fabricantes que utilizan este bus, que gestiona el esfuerzo normalizador, la Fieldbus Foundation. Normalizado como ISA SP50, IEC-ISO 61158 (ISA es la asociación internacional de fabricantes de dispositivos de instrumentación de proceso).

En su nivel H1 (uno) de la capa física sigue la norma IEC 11158-2 para comunicación a 31,25 Kbps, es por tanto, compatible con Profibús PA, su principal contendiente. Presta especial atención a las versiones que cumplen normas de seguridad intrínseca para industrias de proceso en ambientes combustibles o explosivos. Se soporta sobre par trenzado y es posible la reutilización de los antiguos cableados de instrumentación analógica 4-20 mA. Se utiliza comunicación síncrona con codificación Manchester Bifase-L.

La capa de aplicación utiliza un protocolo sofisticado, orientado a objetos con múltiples formatos de mensaje. Distingue entre dispositivos con capacidad de arbitración (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 comunicación por paso de testigo, comunicación cliente-servidor, modelo productor-consumidor etc. Existen servicios para configuración,

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 68: REDES_IND

UNIDAD 3 FIELDBUS 68 DE 133

gestión de diccionario de objetos en nodos, acceso a variables, eventos, carga descarga de ficheros y aplicaciones, ejecución de aplicaciones, etc. La codificación de mensajes se define según 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 también cubre Profibus. Sus capas física y de aplicación son análogas a las de Foundation Fieldbus H1 y Profibus PA. La división Norteamérica de WorldFIP se unió a mediados de los noventa a la Fieldbus Foundation en el esfuerzo por la normalización de un bus industrial común.

Utiliza un modelo productor-consumidor con gestión de variables cíclicas, eventos y mensajes genéricos.

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, hábilmente comercializados, dirigidos al mercado del control distribuido en domótica, 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, además 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, además Echelon ofrece la posibilidad de abrir la implementación de LonWorks a otros procesadores.

La red Lonworks ofrece una variada selección de medios físicos y topologías de red: par trenzado en bus, anillo y topología libre, fibra óptica, radio, transmisión sobre red eléctrica etc. El soporte más usual es par trenzado a 38 o 78 Kbps. Se ofrece una amplia gama de servicios de red que permiten la construcción de extensas arquitecturas con multitud de nodos, dominios y grupos, típicas de grandes edificios inteligentes.

El método de comparación de medio es acceso CSMA predictivo e incluye servicios de prioridad de mensajes.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 69: REDES_IND

UNIDAD 3 FIELDBUS 69 DE 133

Echelon ofrece herramientas de desarrollo, formación, documentación y soporte técnico. Echelon basa su negocio en la comercialización 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 más 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 clasificación automática. Se define una capa física que incluye alimentación de dispositivos en las conexiones. La capa de aplicación define autodiagnóstico de nodos, comunicación por eventos y prioridades de alta velocidad.

4.8. CANOpen

Bus de campo basado en CAN. Fue el resultado de un proyecto de investigación financiado por la Comunidad Europea y se está extendiendo de forma importante entre fabricantes de maquinaria e integradores de célula de proceso. Está soportado por la organización CiA (CAN In Automation), organización de fabricantes y usuarios de CAN que también apoya DeviceNet, SDS etc. Al final de este trabajo se describirá con más detalle este bus, como ejemplo de bus de campo normalizado soportado sobre CAN.

4.9.- MODBUS

En su definición inicial Modbus era una especificación de tramas, mensajes y funciones utilizada para la comunicación con los PLCs Modicon. Modbus puede implementarse sobre cualquier línea de comunicación serie y permite la comunicación por medio de tramas binarias o ASCII con un proceso interrogación-respuesta simple. Debido a que fue incluido en los PLCs de la prestigiosa firma Modicon en 1979, ha resultado un estándar de facto para el enlace serie entre dispositivos industriales.

Modbus Plus define un completo bus de campo basado en técnica de paso de testigo. Se utiliza como soporte físico el par-trenzado o fibra óptica.

En la actualidad Modbus es soportado por el grupo de automatización Schneider (Telemechanique, Modicon,...).

4.10.- INDUSTRIAL ETHERNET

La norma IEEE 802.3 basada en la red Ethernet de Xerox se ha convertido en el método más extendido para interconexión de computadores personales en redes de proceso de datos. En la actualidad se vive una auténtica revolución en cuanto

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 70: REDES_IND

UNIDAD 3 FIELDBUS 70 DE 133

a su desplazamiento hacia las redes industriales. Es indudable esa penetración. 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 intrínseco indeterminismo de Ethernet se aborda por medio de topologías 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 difícil que Ethernet tenga futuro a nivel de sensor, aunque puede aplicarse en nodos que engloban conexiones múltiples de entrada-salida.

Como conclusión 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 pirámide CIM.

4.11. ASi

AS-I (Actuator Sensor Interface) es un bus de campo desarrollado inicialmente por Siemens, para la interconexión de actuadores y sensores binarios. Actualmente está recogido por el estándar IEC TG 17B.

A nivel físico, la red puede adoptar cualquier tipo de topología: estructura en bus, en árbol, en estrella o en anillo. Permite la interconexión de un máximo de 31 esclavos. La longitud máxima de cada segmento es de 100 metros. Dispone de repetidores que permiten la unión de hasta tres segmentos, y de puentes hacia redes Profibus. Como medio físico de transmisión, emplea un único cable que permite tanto la transmisión de datos como la alimentación de los dispositivos conectados a la red. Su diseño evita errores de polaridad al conectar nuevos dispositivos a la red. La incorporación o eliminación de elementos de la red no requiere la modificación del cable.

El cable consta de dos hilos sin apantallamiento. Para lograr inmunidad al ruido, la transmisión se hace basándose en una codificación Manchester

Cada esclavo dispone de hasta 4 entradas/salidas, lo que hace que la red pueda controlar hasta 124 E/S digitales. La comunicación sigue un esquema maestro - esclavo, en la cual el maestro interroga a las estaciones enviándoles mensajes (llamados telegramas) de 14 bits y el esclavo responde con un mensaje de 7 bits. La duración de cada ciclo pregunta respuesta es de 150 s. En cada ciclo de comunicación se deben consultar todos los esclavos, añadiendo dos ciclos extras para operaciones de administración del bus (detección de fallos). El resultado es un tiempo de ciclo máximo de-5ms.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 71: REDES_IND

UNIDAD 3 FIELDBUS 71 DE 133

4.12 BITBUS

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 pequeños fabricantes o integradores. En su capa de aplicación se contempla la gestión de tareas distribuidas, es decir es, en cierto modo, un sistema multitarea distribuido. Existe una organización europea de soporte (Bitbus European User's Group).

4.13 ARCNet

Originalmente desarrollada como red para proceso de datos en los años ‘70 ARCNet ha encontrado aplicación en el mundo industrial. Su técnica de paso de testigo hace que sea predecible, determinista y robusta. Está normalizada como ANSI/ATA 878. 1. La velocidad de comunicación es de 2,5 Mbps con paquetes del 0 a 512 bytes. Soporta topología en bus y estrella y diversos medios físicos (cable coaxial, par trenzado, fibra óptica).

Es una red muy apropiada para un nivel intermedio en la jerarquía CIM. Algunos fabricantes proponen como jerarquía ideal para control industrial una basada en Ethernet en el nivel superior, ArcNET en el intermedio y CAN al nivel de celda de fabricación.

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 televisión 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 interconexión de redes de PLCs y computadores industriales en aplicaciones de alta velocidad y ambientes muy críticos.

4.15. HART

Es un protocolo para bus de campo soportado por la HART Communication Foundation y la Fieldbus Foundation, Su campo de aplicación básico es la comunicación digital sobre las líneas analógicas clásicas de los sistemas de instrumentación, manteniendo éstas en servicio. Sus prestaciones como bus de campo son reducidas.

Utiliza el bus analógico estándar 4-20 mA sobre el que transmite una señal digital modulada en frecuencia (modulación FSK 1200-2200 Hz). Transmite a 1200 bps manteniendo compatibilidad con la aplicación analógica 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

Page 72: REDES_IND

UNIDAD 3 FIELDBUS 72 DE 133

Ante la variedad de opciones existente, parece razonable pensar que fabricantes y usuarios hicieran un esfuerzo en la búsqueda de normativas comunes para la interconexión de sistemas industriales.

Lo que ha venido llamándose "la guerra de los buses" tiene que ver con la permanente confusión reinante en los entornos normalizadores en los que se debate la especificación del supuesto "bus de campo universal". Desde mediados de los años ‘80 la Comisión Electrotécnica Internacional (IEC-CEI) y la Sociedad de Instrumentación 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 versión 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 conjunción de Fieldbus y el mundo Profibus. Los años 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 sólo los usuarios están realmente interesados en la obtención de normas de uso general. Los fabricantes luchan por su cuota de mercado y, en general, sólo están a favor de una norma cuando ésta recoge las características de su propia opción, 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 características funcionales de los Buses de Campo detallando algunos de mayor uso en diferentes modalidades de ambiente de trabajo. Además, se incluyeron criterios útiles de la estructuración 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 producción, 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

Page 73: REDES_IND

UNIDAD 3 FIELDBUS 73 DE 133

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

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 74: REDES_IND

UNIDAD 3 FIELDBUS 74 DE 133

3.2 ESPECIFICACION.

3.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 75: REDES_IND

UNIDAD 4 BITBUS 75 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 común para todos los cables.

Normalmente se emplea un par de cables para la línea de datos semidúplex y el segundo par para una de las siguientes aplicaciones:

Transmisión del reloj en modo síncrono.

Conmutación de la línea en repetidores en modo autoreloj.

La impedancia característica de cada par de cables debe ser 120 ohmios. Las terminaciones serán resistencias de 120 ohmios para evitar el efecto de reflexión.

Conectores

El estándar especifica que los conectores deben ser del tipo sub-D9. El patillaje es el mismo que para un conector RS-232, pero sólo se emplean las señales RxD, TxD y masa.

Estructura

La estructura de la red BITBUS puede ser de varios tipos:

Básica: estructura lógica del tipo maestro-esclavo.

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 señal 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

Page 76: REDES_IND

UNIDAD 4 BITBUS 76 DE 133

En la siguiente tabla se muestran las distintas posibilidades de nodos y repetidores:

Modo Nº máx. de nodos

Nº máx. de repetidores

Velocidad (bits/s)

Distancia máx. (m)

Autoreloj 28 Ninguno 62,5 K 1200 Autoreloj 28 Ninguno 375 K 300 Autoreloj 250 10 62,5 K 1200 entre

repetidores (4800 máx)

Autoreloj 250 2 375 K 300 entre repetidores (900 máx)

Síncrono 28 Ninguno 62,5 K o 375 K 300 o 1200 (según velocidad)

Tipos de nodos

Todo bus BITBUS se compone de elementos básicos 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 comunicación del tipo pregunta-respuesta. En cada nivel sólo existe un maestro, aunque es posible la existencia de un maestro flotante (desaconsejado por el estándar).

Esclavo: es un bloque controlado por el maestro, el cual sólo 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 señal de datos del bus (no el reloj). Se emplea para aumentar la longitud del bus.

Expansión E/S: es cualquier dispositivo de E/S que se quiera conectar al bus o a un esclavo.

Modos de sincronización

Existen dos modos de sincronización de bits:

Síncrono: 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 (sólo hay un nivel).

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 77: REDES_IND

UNIDAD 4 BITBUS 77 DE 133

Autoreloj: en este modo cada nodo genera su propio reloj, sincronizando con la línea de datos. Los datos se codifican en formato NRZI. Se permiten repetidores (obligatorio para más de 28 nodos). Las derivaciones a partir del repetidor requieren una línea de control además de la línea de datos, por lo que se emplean dos pares trenzados.

Codificación

Nivel de bits:

Modo síncrono: la codificación se realiza mediante el procedimiento NRZ (0 es nivel bajo y 1 es nivel alto).

Modo autoreloj: la codificación 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" después de cinco "1" consecutivos. Este sistema, combinado con la codificación de bit por NRZI, permite sincronizar el reloj en el receptor en modo autoreloj cada 6 bits como mínimo. El controlador de Intel 8044 proporciona la inserción y eliminación de ceros del protocolo SDLC de forma automática.

Trama del mensaje

La comunicación entre nodos se realiza mediante mensajes. Dicha comunicación siempre se efectúa a petición 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) Dirección esclavo

Control Información (funciones/datos)

CRC (16 bits)

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).

Dirección esclavo

Longitud: 1 byte.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 78: REDES_IND

UNIDAD 4 BITBUS 78 DE 133

En todos los mensajes este campo indica la dirección del esclavo, entre 1 y 250. Las direcciones 0 y 251 a 255 están reservadas.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 79: REDES_IND

UNIDAD 4 BITBUS 79 DE 133

Control

Longitud: 1 byte

Este campo clasifica las tramas en tres tipos:

Control.

Supervisión.

Información.

De los tres tipos sólo la trama de información contiene un campo de información dentro del mensaje. En el resto todos los mensajes se componen de 6 bytes (no incluyen el campo de información). A continuación se muestra una tabla con todas la funciones:

Función Tipo de trama

Código (campo de control)

Descripción

Modo de respuesta normal (SNRM)

Control M > E 93h Se ordena al esclavo pasar al estado de respuesta normal (NRM)

Desconexión (DISC) Control M > E 53h Se ordena al esclavo pasar al estado de desconexión (NDM)

Reconocimiento no numerado (UA)

Control E > M 53h Respuesta del esclavo indicando que ha recibido una orden válida estando en estado de desconexión.

Trama rechazada (FRMR)

Control E > M 97h Respuesta del esclavo indicando que ha recibido una orden incorrecta estando en estado normal (NRM)

Consulta o test (polling)

Supervisión M > E

RRR10001 (binario)

RRR=nº de secuencias anteriores recibidas como correctasEl maestro indica que el esclavo debe contestar como consulta o test, respondiendo con RR o RNR.

Receptor dispuesto (RR)

Supervisión E > M

RRR10001 (binario)

RRR=nº de secuencias anteriores recibidas como correctas Respuesta del esclavo indicando que la consulta es correcta y que no tiene datos que transmitir.

Receptor no dispuesto (RNR)

Supervisión E > M

RRR10101 (binario)

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.

Información (I) Información M > E E > M

RRR1EEE0 (binario)

RRR=nº de secuencias anteriores recibidas como correctas EEE=nº de secuencias enviadas Tramas normales de intercambio de información. En cada trama se comprueba los números de secuencia para evitar duplicidad de mensajes y detectar la pérdida de tramas o errores de transmisión.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 80: REDES_IND

UNIDAD 4 BITBUS 80 DE 133

Información

Longitud: máximo 250 bytes

Este campo es de longitud variable y sólo existe en las tramas de información. En el siguiente epígrafe 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 transmisión. Los dos bytes se obtienen mediante un polinomio H4 del tipo (XE16 + XE12 + XE5 + 1).

Trama del campo de información

El campo de información de la trama obedece a un formato que especifica un mínimo de 7 bytes y un máximo de 250 (aunque se acepta como dispositivo estándar aquel que permite entre 7 y 20 bytes de longitud). Los bytes se corresponden con el siguiente formato:

Byte Descripción

1 Longitud de información 2 MT - SE - DE - TR - 4 bits de reserva 3 Dirección esclavo 4 Tarea fuente - Tarea destino 5 Tareas usuario / Errores 6 en adelante (hasta byte 250) Otros datos (Mínimo 2 bytes)

Longitud de información

Indica la longitud del campo de información (entre 7 y 250).

Tipo de mensaje (MT)

0 = orden1 = respuesta

Fuente de la orden (SE)

Indica si la fuente de una orden o el destino de una respuesta es:

0 = bloque maestro1 = bloque de expasión E/S de éste

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 81: REDES_IND

UNIDAD 4 BITBUS 81 DE 133

Destino de la orden (DE)

Indica si el destino de una orden o la fuente de una respuesta es:0 = bloque esclavo1 = bloque de expasión E/S de éste

Pista (TR)

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

4 bits reservados

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

Dirección esclavo

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

Codificación de tareas

Este byte se compone de dos grupos de 4 bits:

tarea fuente (4 bits altos): las tareas 12 a 15 están 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 están 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:

Código Tipo Tarea00h Control Reset esclavo 01h Control Llamar tarea programada en un esclavo 02h Control Finalizar tarea 03h Control Obtener identificador/puntero de la función. 04h Control Habilitar/deshabilitar el resto de tareas (excepto RAC) en un esclavo. 05h Acceso Leer 1 byte de E/S 06h Acceso Escribir 1 byte de E/S 07h Acceso Actualizar líneas de E/S 08h Acceso Leer n bytes de la memoria del esclavo 09h Acceso Grabar n bytes en la memoria del esclavo 0Ah Acceso Operación O (OR) con byte de E/S 0Bh Acceso Operación Y (AND) con byte de E/S 0Ch Acceso Operación O-exclusiva (XOR) con byte de E/S 0Dh Acceso Leer registro de estado 0Eh Acceso Escribir registro de estado

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 82: REDES_IND

UNIDAD 4 BITBUS 82 DE 133

0Fh a BFh - Funciones reservadas por INTEL C0h a FFh - Funciones definibles por el usuario

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 códigos de error.

La siguiente tabla muestra los códigos de error que contempla el estándar y señala aquellos definibles por el usuario:

Código Error00h No hay error 01h a 7Fh Errores definidos por el usuario 80h No se encuantra la tarea destino 81h Imposible iniciar tarea debido a que se está realizando otra 82h Imposible crear tarea por falta de banco de registros 83h Solicitud de tarea ya activa 84h Imposible iniciar tarea por falta de memoria 85h a 90h Reservado por Intel 91h Error de protocolo 92h Reservado por Intel 93h El nodo de destino no responde 94h Reservado por Intel 95h Tareas deshabilitadas por RAC 96h Orden RAC desconocida 97h a FFh Reservado por Intel

Datos

Estos bytes están libres para uso general, pero al menos deben existir los bytes 6 y 7 en cualquier trama que tenga campo de información.

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 desconexión (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 sincronización o una trama que no puede interpretar. Para pasar al modo NRM se requiere una inicialización por parte del maestro.Cada esclavo dispone, además, de un contador de intercambios que es comprobado con cada intercambio (excepto en tramas de control) y permite detectar errores de interpretación o pérdida 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

Page 83: REDES_IND

UNIDAD 4 BITBUS 83 DE 133

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 84: REDES_IND

UNIDAD 4 BITBUS 84 DE 133

Bibliografía

Bitbus European Users Group web pages

ELZET80: BITBUS overview

"Autómatas programables"Josep Balcells, José Luis RomeralSerie Mundo ElectrónicoEd. Marcombo, Boixareu editores, Barcelona.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 85: REDES_IND

UNIDAD 4 BITBUS 85 DE 133

BITBUS* Distributed Control Modules Web Site Last updated: Sat Jan 22 2005 1:03 PM PST.

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 iSBX* 344 -- daughter card (typically master) for mounting on Multibus SBC's (Single Board Computers)

o iRCB* 44/10 -- remote controller board (typically slave) digital I/O points 3U Eurocard

o iDCX* 51 -- Real Time operating system for the Intel 8051 family microcontrollers

o iDCM* 44 -- preconfigured iDCX 51 task allowing easy digital I/O programming

o 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:

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 86: REDES_IND

UNIDAD 4 BITBUS 86 DE 133

o iRCB 44/20 -- remote controller board (typically slave) analog I/O points 3U Eurocard

o iRCX* 910 -- digital I/O point conditioning/wiring rack-mount panel o iRCX 920 -- analog I/O point conditioning/wiring rack-mount panel o iPCX* 344 -- ISA adapter card for PC-compatibles (typically master) o iDCS* 100 -- (also known as the BITBUS Toolbox) expanded SDK o iDCS 101 -- source code to SDK interface libraries, in C language o 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.

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

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

Page 87: REDES_IND

UNIDAD 4 BITBUS 87 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 TretheweyThanks 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

Page 88: REDES_IND

UNIDAD 4 BITBUS 88 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 self-directing 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

Page 89: REDES_IND

UNIDAD 4 BITBUS 89 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

Page 90: REDES_IND

UNIDAD 4 BITBUS 90 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 user´s 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

Page 91: REDES_IND

UNIDAD 4 BITBUS 91 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

Page 92: REDES_IND

UNIDAD 4 BITBUS 92 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

Page 93: REDES_IND

UNIDAD 4 BITBUS 93 DE 133

RAC/GBS Befehle

Command Code

Command Type

Command description

00 C GBS_RESET Resets the slave. (Only function with no reply)

01 M GBS_CREATE Creates and starts a task. Data field contains a pointer to the task header, MSB first. (16 bit + BF extension)

02 C GBS_DELETE Deletes a Task. Data: task number as only data byte.

03 C GBS_GET_FUNC Get function ID (see "Function IDs")04 C GBS_PROTECT Disables remote access commands Data:

0= no protection, 1= protect memory, 2= write protect.05 I GBS_READ_IO Reads from port addresses.06 I GBS_WRITE_IO Writes to port addresses.07 I GBS_UPDATE_IO Writes and re-reads the port addresses

specified.08 M GBS_UP_DATA Uploads a random memory block from the

slave.09 M GBS_DOWN_DATA Downloads a memory block0A I 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.

0B I GBS_AND_IO Logical AND used to reset bits.0C I GBS_XOR_IO Logical XOR used to toggle bits.0D I GBS_WRITE_IRAM Writes to internal RAM (hardware

specific memory block). In the case of mCAT, these commands cover a predefined memory block.

0E I GBS_READ_IRAM Reads from internal memory.0F C GBS_GET_INFO Returns hardware and task information

(see below)11 M GBS_UP_CODE Uploads code from the slaves memory.

Same as UP_DATA with processors that do not distinguish between code and data spaces.

12 M GBS_DOWN_CODE Downloads code to slaves using special EEPROM/Flash-Eprom memory write procedure

15 C GBS_GET_TIME Returns data structure (see GbsTime) with date and time info.

16 C GBS_SET_TIME Sets time (see bitbus.h)17 C GBS_SUSPEND_TASK Suspends the task with the number

given as only data byte.1A C GBS_GET_TASK_ID Returns task id for function id

entered (similar to GBS_GET_FUNC but for one id only).21 M GBS_FLASH_GET_ID Returns 32bit Flash-EPROM type

code in ext. addressing message.BF M GBS_EXTEND_ADDR Address pointer extension. See

memory structure text for details.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 94: REDES_IND

UNIDAD 4 BITBUS 94 DE 133

RAC/GBS Fehlercodes

00 GBS_ERR_OK No error80 GBS_ERR_NO_DEST_TASK Task does not exist81 GBS_ERR_TASK_OV No space for more tasks82 GBS_ERR_REGISTER_OV No register bank available83 GBS_ERR_DUPLICATE_TID New task has function ID that

already has been assigned.84 GBS_ERR_NO_BUFFERS Buffer pool exhausted86 GBS_ERR_BAD_TASK_DESC Task descriptor (ITD) is not valid87 GBS_ERR_NO_MEMORY No more memory available90 GBS_ERR_TIME_OUT IEEE1118 Node not available91 GBS_ERR_PROTOCOL Unspecified error93 GBS_ERR_NO_DEST_DEVICE No extension available (see

"Routing flags")95 GBS_ERR_PROTECTED RAC/GBS command protected (see

command 04)96 GBS_ERR_NO_GBS Unknown RAC/GBS command97 GBS_ERR_BAD_COMMAND_LEN Command length does not

match command specification.

GBS Time Services

typedef struct {BYTE zone, /* TIME ZONE : 0 = GMT, 8 = PST */offset, /* TIME OFFSET : 0..59 MINUTES */day_of_week, /* 1..7, MONDAY = 1. */year, /* 1980 = 0, 2235 = 255. */month, /* 1..12, JANUARY = 1. */day, /* 1..31. */hour, /* 0..23. */min, /* 0..59. */sec; /* 0..59. */} GbsTime;

System Info Struktur

Data bytes Contents0..5 6 character ASCII node name ("i8044","mCAT")6, 7 ASCII version number ("3.1")8 i8044 memory info or baudrate9 BITBUS message length supported by this node13..n Manufacturer specific data

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 95: REDES_IND

UNIDAD 4 BITBUS 95 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

Page 96: REDES_IND

UNIDAD 4 BITBUS 96 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 B ITBUS A pplication P rogrammers I nterface 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

Page 97: REDES_IND

UNIDAD 4 BITBUS 97 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.

It´s 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 Flash-Eprom - 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 isn´t that the most essential in industrial control?

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 98: REDES_IND

UNIDAD 4 BITBUS 98 DE 133

4.2 ESPECIFICACION.

4.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 99: REDES_IND

UNIDAD 5 ASi 99 DE 133

UNIDAD 5 ASi

5.1 INTRODUCCION.

AS-interfaceDe Wikipedia, la enciclopedia libreObtenido de "http://es.wikipedia.org/wiki/AS-interface"

AS-Interface o AS-i es un Bus de Sensores y Actuadores (bus de campo), estándar internacional IEC62026-2 y europeo EN 50295 para el nivel de campo más bajo.Fue diseñado en 1990 como una alternativa económica al cableado tradicional. La idea original fue crear una red simple para sensores y actuadores binarios, capaz de transmitir datos y alimentación a través del mismo bus, manteniendo una gran variedad de topologías que faciliten la instalación 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 versión 2.1 (aunque los estándares actualmente reflejan la versión 2.04). Éstas son de carácter abierto, lo que significa que cualquier fabricante puede obtener una copia de las mismas para elaborar sus productos.

Características principales

AS-i se sitúa en la parte más baja de la pirámide de control, conectando los sensores y actuadores con el maestro del nivel de campo. Los maestros pueden ser autómatas 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 Características Principales de AS-Interface son:

Ideal para la interconexión de sensores y actuadores binarios. A través del cable AS-i se transmiten datos y alimentación. Cableado sencillo y económico. Se puede emplear cualquier cable bifilar

de 2 x 1.5 mm2 no trenzado ni apantallado. El cable específico para AS-i, el Cable Amarillo, es autocicatrizante y está

codificado mecánicamente para evitar su polarización incorrecta. Gran flexibilidad de topologías, que facilita el cableado de la instalción. Sistema monomaestro, con un protocolo de comunicación con los esclavos

muy sencillo. Ciclo del bus rápido. Máximo tiempo de ciclo 5 ms con direccionamiento

estándar y 10 ms con direccionamiento extendido. Permite la conexión de sensores y actuadores No AS-i mediante

módulos activos. Hasta 124 sensores y 124 actuadores binarios con direccionamiento

estándar.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 100: REDES_IND

UNIDAD 5 ASi 100 DE 133

Hasta 248 sensores y 186 actuadores binarios con direccionamiento extendido.

Longitud máxima de cable de 100 m uniendo todos los tramos, o hasta 300 m con repetidores.

La revisión 2.1 del estándar facilita la conexión de sensores y actuadores analógicos.

Transmisión por modulación de corriente que garantiza un alto grado de seguridad.

Detección de errores en la transmisión y supervisión del correcto funcionamiento de los esclavos por parte del maestro de la red.

Cables auxiliares para la transmisión de energía: Cable Negro (24 V DC) y Rojo (220 V AC).

Grado de Protección IP-65/67 para ambientes exigentes. Cumple la normativa IP-20 para aplicaciones en cuadro. Temperaturas de funcionamiento entre -25ºC y +85ºC. Enlaces externos Curso Interactivo AS-i Autor Original

AS-InterfaceFrom Wikipedia, the free encyclopediaRetrieved 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 ASi-Safe) 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

Page 101: REDES_IND

UNIDAD 5 ASi 101 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

Page 102: REDES_IND

UNIDAD 5 ASi 102 DE 133

ComponentsAn AS-Interface network requires only a few basic components. They are:Scanner/Gateway (also called master)Power supplyModules (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 supplyAny 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 AS-Interface 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

Page 103: REDES_IND

UNIDAD 5 ASi 103 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

Page 104: REDES_IND

UNIDAD 5 ASi 104 DE 133

5.2 ESPECIFICACION.

5.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 105: REDES_IND

UNIDAD 6 CAN 105 DE 133

UNIDAD 6 CAN

6.1 INTRODUCCION.

Controller Area NetworkFrom 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 best control the complexities incorporated from such a distributed developmental

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 106: REDES_IND

UNIDAD 6 CAN 106 DE 133

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 TestsSoftware Recovery from Error Conditions: Bus Off ConditionsResponse Times: Functional Ages, Publisher Delays, Subscriber Delays, Gateway DelaysCommunication: First Frame Timing, Wakeup Sequence, Periodic Frame Times, Event FramesNetwork Management: Startup, Participation, Modes, ShutdownDiagnostics: Recognition of faults, Module ReflashingThe 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” ECU’s 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 message-type/sender — and up to 8 message bytes) is transmitted serially onto the bus,

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 107: REDES_IND

UNIDAD 6 CAN 107 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 host-

processor (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 since dominant is 0 this is sometimes referred to as wired-AND). If one node

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 108: REDES_IND

UNIDAD 6 CAN 108 DE 133

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

Page 109: REDES_IND

UNIDAD 6 CAN 109 DE 133

Truth tables for dominant/recessive and logical AND

Bus state with two nodes transmitting

 dominan

trecessiv

e

dominant

dominant dominant

recessive

dominant recessive

Logical AND

  0 1

0 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 number of segments: Synchronisation, Propagation, Phase 1 and Phase 2. The

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 110: REDES_IND

UNIDAD 6 CAN 110 DE 133

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 LayerThe 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

Physical LayerThe physical layer defines how the signals are actually transmitted. Tasks include:

o Signal Level and Bit Representation

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 111: REDES_IND

UNIDAD 6 CAN 111 DE 133

o Transmission Medium

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 112: REDES_IND

UNIDAD 6 CAN 112 DE 133

Frames

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 11-bit 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

Page 113: REDES_IND

UNIDAD 6 CAN 113 DE 133

Base frame format

The frame format is as follows:

Field name Length (bits) PurposeStart-of-frame 1 Denotes the start of frame

transmissionIdentifier 11 A (unique) identifier for the

dataRemote transmission request (RTR)

1 Must be dominant (0)Optional

Identifier extension bit (IDE) 1 Must be dominant (0)OptionalReserved bit (r0) 1 Reserved bit (it must be set to

dominant (0), but accepted as either dominant or recessive)

Data length code (DLC) 4 Number of bytes of data (0-8 bytes)

Data field 0-8 bytes Data to be transmitted (length dictated by DLC field)

CRC 15 Cyclic redundancy checkCRC delimiter 1 Must be recessive (1)ACK slot 1 Transmitter sends recessive

(1) and any receiver can assert a dominant (0)

ACK delimiter 1 Must be recessive (1)End-of-frame (EOF) 7 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 Length (bits)

Purpose

Start-of-frame 1 Denotes the start of frame transmissionIdentifier A 11 First part of the (unique) identifier for the

dataSubstitute remote request (SRR)

1 Must be recessive (1)Optional

Identifier extension bit (IDE)

1 Must be recessive (1)Optional

Identifier B 18 Second part of the (unique) identifier for the data

Remote transmission request (RTR)

1 Must be dominant (0)

Reserved bits (r0, r1) 2 Reserved bits (it must be set dominant (0), but accepted as either dominant or recessive)

Data length code (DLC) 4 Number of bytes of data (0-8 bytes)Data field 0-8 bytes Data to be transmitted (length dictated by

DLC field)

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 114: REDES_IND

UNIDAD 6 CAN 114 DE 133

CRC 15 Cyclic redundancy checkCRC delimiter 1 Must be recessive (1)ACK slot 1 Transmitter sends recessive (1) and any

receiver can assert a dominant (0)ACK delimiter 1 Must be recessive (1)End-of-frame (EOF) 7 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

Page 115: REDES_IND

UNIDAD 6 CAN 115 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 flag’s 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.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.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 116: REDES_IND

UNIDAD 6 CAN 116 DE 133

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

References1. ̂ 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 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

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 117: REDES_IND

UNIDAD 6 CAN 117 DE 133

CAN Engine Discussions

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 118: REDES_IND

UNIDAD 6 CAN 118 DE 133

6.2 ESPECIFICACION.

6.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 119: REDES_IND

UNIDAD 7 DEVICENET 119 DE 133

UNIDAD 7 DEVICENET

7.1 INTRODUCCION

DeviceNetFrom Wikipedia, the free encyclopediaRetrieved 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 7-layer 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

Page 120: REDES_IND

UNIDAD 7 DEVICENET 120 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 [5][6]

Architecture

Physical Layer

Nodes are distributed along a DeviceNet network by the means of a trunkline-dropline 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 LayerDeviceNet 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 >Frame Format1 Bit > Start of Frame11 Bits > Identifier1 Bit > RTR Bit6 Bits > Control Field0-8 Bytes > Data Field15 Bits > CRC Sequence1 Bit > CRC Delimiter1 Bit > Acknowledge1 Bit > Ack Delimiter7 Bits > End of Frame>2 Bits > Interframe Space

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 121: REDES_IND

UNIDAD 7 DEVICENET 121 DE 133

Reference[10]

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]

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

Page 122: REDES_IND

UNIDAD 7 DEVICENET 122 DE 133

Conformance Test ProcedureThe 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 Notes1. ̂ [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

Page 123: REDES_IND

UNIDAD 7 DEVICENET 123 DE 133

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 124: REDES_IND

UNIDAD 7 DEVICENET 124 DE 133

7.2 ESPECIFICACION.

7.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 125: REDES_IND

UNIDAD 8 PROFIBUS 125 DE 133

UNIDAD 8 PROFIBUS

8.1 INTRODUCCION.

ProfibusDe Wikipedia, la enciclopedia libreObtenido de "http://es.wikipedia.org/wiki/Profibus"

Profibus (Process Field Bus) es posiblemente el bus de campo industrial con mayor número de nodos instalados, en el año 2004 se calculaban un total de 12,6 millones de nodos. Se trata de una red abierta, estándar e independiente de cualquier fabricante, cuenta con varios perfiles y se adapta a las condiciones de las aplicaciones de automatización industrial.Fue desarrollada en el año 1987 por las empresas alemanas Bosch, Klöckner Möller y Siemens. En 1989 la adoptó la norma alemana DIN19245 y fue confirmada como norma europea en 1996 como EN50170. En el año 2002 se actualizaron incluyendo la versión para Ethernet llamada Profinet.Este tipo de red trabaja con nodos maestros y nodos esclavos. Los nodos maestros se llaman también activos y los esclavos pasivos.Además junto con las especificaciones de otros buses de campo se recoge en las normas internacionales IEC61158 e IEC61784.

Características:Velocidades de transmisión: 9.6, 19.2, 93.75, 187.5, 500, 1500, 3000, 6000 y

12000 Mbit/s.Número máximo de estaciones:

127 (32 sin utilizar repetidores).

Distancias máximas alcanzables (cable de 0.22 mm de diámetro)hasta 93.75 KBaudios 1200 metro187.5 KBaudios 600 metros500 KBaudios 200 metrosEstaciones pueden ser activas (maestros) o pasivas (esclavos).Conexiones de tipo bidireccionales, multicast o broadcast.

Véase también Modbus AS-interface

Enlaces externos www.profibus.com www.procentec.com

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 126: REDES_IND

UNIDAD 8 PROFIBUS 126 DE 133

ProfibusFrom Wikipedia, the free encyclopediaRetrieved from "http://en.wikipedia.org/wiki/Profibus"

PROFIBUS Protocol InformationType of Network Device Bus, Process ControlPhysical Media Twisted pair, fiberNetwork Topology BusDevice Addressing DIP Switch or hardware/softwareGoverning Body PROFIBUS&PROFINET International (PI)Website 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

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 127: REDES_IND

UNIDAD 8 PROFIBUS 127 DE 133

so 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)

OSI-Layer PROFIBUS

Management

7 Application

DPV0 DPV1 DPV2

6 Presentation --

5 Session4 Transport3 Network2 Data Link FDL1 Physical 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

Page 128: REDES_IND

UNIDAD 8 PROFIBUS 128 DE 133

Fixed length data:SD3 = 0xA2

SD3 DA SA FC PDU FCS ED

Token:SD4 = 0xDC

SD4 DA SA

Brief acknowledgement:SC = 0xE5

SC

SCSD: Start DelimiterLE: Length of protocol data unit, (incl. DA,SA,FC,DSAP,SSAP)LEr: Repetition of protocol data unit, (Hamming-Distanz =4 !)FC: Function CodeDA: Destination AddressSA: Source Address

DSAP: Destination Service Access PointSSAP: Source Service Access Point

PDU: Protocol Data Unit (protocol data)FCS: Frame Checking SequenceED: 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

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

Page 129: REDES_IND

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

Page 130: REDES_IND

UNIDAD 8 PROFIBUS 130 DE 133

8.2 ESPECIFICACION.

8.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI

Page 131: REDES_IND

UNIDAD 9 ETHERNET 131 DE 133

UNIDAD 9 ETHERNET

9.1 INTRODUCCION.

PROFINETFrom Wikipedia, the free encyclopediaRetrieved 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

Page 132: REDES_IND

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

Page 133: REDES_IND

UNIDAD 9 ETHERNET 133 DE 133

9.2 ESPECIFICACION.

9.3 APLICACIONES.

ING. ALFONSO PEREZ GARCIA INSTITUTO TECNOLOGICO DE SAN LUIS POTOSI