Process Data Connection Channels in uLan Network for Home Automation - - PowerPoint PPT Presentation

process data connection channels in ulan network for home
SMART_READER_LITE
LIVE PREVIEW

Process Data Connection Channels in uLan Network for Home Automation - - PowerPoint PPT Presentation

LAN Protocol Data Exchange in Home Control Application Process Data Connection Channels in uLan Network for Home Automation and Other Distributed Applications Pavel P sa pisa@cmp.felk.cvut.cz Petr Smol k petr@smoliku.cz


slide-1
SLIDE 1

µLAN Protocol Data Exchange in Home Control Application

Process Data Connection Channels in uLan Network for Home Automation and Other Distributed Applications

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – bohacma8@fel.cvut.cz Jan ˇ Stefan – honza.stefan@gmail.com Pavel Nˇ emeˇ cek – pavel.nemecek1@gmail.com

Czech Technical University in Prague Faculty of Electrical Engineering

13th Real-Time Linux Workshop – October 20 2011

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-2
SLIDE 2

institution-logo µLAN Protocol Data Exchange in Home Control Application

Presentation Contents

1

µLAN Protocol Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

2

Data Exchange in Home Control Application Is uLAN Protocol an Option? uLan Connection Network (uLCN) Devices Designed for DAMIC Home Automation System

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-3
SLIDE 3

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

HPLC Project by PiKRON Ltd.

next generation of High Pressure Liquid Chromatography (HPLC) design in 1992 need of control and data acquisition solution for instrument sets instruments do not require so fast command/data exchange for basic setups data types – simple one scalar variable setup (wavelength, flow rate) but even gradient time program and detector data stream (25 Hz in our case) sampled data grouping possible examination of instrument type and available properties/variables

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-4
SLIDE 4

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

Requirements on the Protocol Selection

connection to data acquisition/chromatography system on PC multimaster/direct device to device communication/coordination

direct analysis start mark distribution forming high pressure gradient by two pumps etc.

simple design without need to collect list of next devices to pass token possibly deterministic media access physical link layer well known and much spread RS-485 no mo vendor lock-in or lawyers intentionally introduced minefield

  • ption to have open implementation and“standard”definition

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-5
SLIDE 5

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

The First Generation Design Limitations

Intel-8051 based controllers due to its availability and price

  • nly single UART hardware for communication

low computational power but offer multi-drop (9-bit per character) – Intel µLAN net (see i82C510 UART) allows to interrupt only only on address characters if not selected

D0 D1 D2 D3 D4 D5 D6 D7 D8

start bit stop bit char begin

Transfered character Figure: 9-bit Character Format

character transfer takes 11 bit times

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-6
SLIDE 6

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

Character Values Mapping

data characters (address bit clear / bit 8 = 0) address and control characters (bit 8 = 1)

0 · · · 0x64 to address target module/device/instrument

0 broadcast/general address

0x75 · · · 0x7F range have control and data delimiters above 0x80 used used by master to inform about bus control release

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-7
SLIDE 7

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

µLAN Frame Format

SAdr DAdr

  • r

uL_Beg Com 0 to MaxBlock

  • f data bytes

uL_End, uL_Arq, uL_Prq

  • r

uL_Aap XorSum

Data frame format

Figure: µLAN Frame Format

initial frame send by master after media allocation but one or more frames can directly follow

allows immediate“slave”device reply without media arbitration special control and synchronization sequence frame can request single character acknowledge

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-8
SLIDE 8

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

More Detailed Control Characters Codes

Name Value Description DAdr 100h General address DAdr 101h .. 164h Destination node address uL Beg 175h Begin of unaddressed frame uL END 17Ch End of frame uL ARQ 17Ah End with acknowledge request uL PRQ 179h End with proceed request uL AAP 176h End with acknowledge and proceed request uL ERR 17Fh Error without release of bus LAdr 181h .. 1E4 Release of bus by node uL ERR 1FFh Error, abort and release bus

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-9
SLIDE 9

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

Media Access Arbitration

determinism required, distributed arbitration RS-485 does not allow dominant-recessive based solution at full bit rate intended at least partial bandwidth distribution influence by Philips/NXP IIC solution but in arbitration phase

  • nly

Bus request and release

LAdr delay (LAdr-Adr-1) mod 16 + 4 first connect mark delay Adr +1 delay and 3 +1 and 3 delay (Adr shr 2) (Adr shr 4) and 3 +1 release with DAdr of first frame transfer of data frames beginning

  • f bus by

LAdr=Adr

  • r 80h

Figure: uLan Media Access Arbitration

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-10
SLIDE 10

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

The Protocol Overhead

10 nodes with addresses 1 · · · 11 considered full Tx saturation from all nodes supposed message length of 256 B and communication speed of 19200 Bd 1.6122 s to send 10 messages (one from each station) arbitration and control characters overhead 10 % (50 % if start, B8 and stop bit counted) but for 8 byte messages overhead is 300 % (550 %) but could provide advantage to can for data bitrate/bus length

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-11
SLIDE 11

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

Overview of uLAN Higher Level Protocols

Network Control Messages (uLNCS) – check and change module/node assigned network address, identification and production serial number Dynamic Address Assignment (uLDY) the mechanism to unveil newly attached nodes from new serial product number appearance, assign them free network address and detect node disconnection or switching off uLan Object Interface Layer (uLOI) the mechanism to retrieve list

  • f device supported readable and writable

variables/properties, their names and data types

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-12
SLIDE 12

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

uLan Object Interface

serialize objects (properties/variables) identification and their values in transferred messages asynchronous reply to request as further master transfer multiple queries and set commands for objects values and/or their description in a single message length limited by buffers size – max. message 1000 B for actual products 16 bit Object Identification Number no type, name nor data length for plain types is included in regular data transfers but full device model can be build from descriptive objects reply allows to identify which objects data it contains from OIDs and metadata

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-13
SLIDE 13

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

The List of Product Utilizing the Protocol

HPLC devices developed by PiKRON company team CHROMuLAN HPLC control system developed by Jindrich Jindrich and PiKRON Ltd Agrosoft T´ abor FASTOP and FASTOS systems

automatic batch distribution of feed to pigs, cows cow milking data collection

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-14
SLIDE 14

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

Our Second Generation Instruments Setup Example

The instruments are designed as independent units which for chromatographic apparatus for given analysis after interconnection – by wires and tubes

LCS 5040 autosampler LCP 5020 pump LCT 5100 column

  • ven/cooler

LCD 5000 detector

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-15
SLIDE 15

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

CHROMuLAN System and Devices Model Reflection

uLan driver RS485 buffer UART chip UART RS485 UART RS485 uLan API and MCU support libraries uLan API and MCU support libraries interface

  • bject

uLan interface

  • bject

uLan model Dev 2 model Dev 1 Interface User Graphic Local and UI keyboard display cation appli− function Device Operating System Linux/Windows DOS Control Computer Hardware (PC)

Control System Device 1 Device 2 CHROMuLAN

uLan API more HW uLan net. model ULD files ULF, ULC storage (mem) storage Temp. Persistent Control logic IFPS interpretter User scripts parameters and acquired data Object tree browser and handler Object tree of branches, properties and process variables sensors etc. llers Contro− meters variables and device para− Process

  • ver uLan objects

comunicating and application Device logic Local display keyboard, UI and time program

Figure: CHROMuLAN System Architecture and Properties of Connected Instruments

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-16
SLIDE 16

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

The Third Generation Development

ARM based but price constrains require to use single chip solution – i.e. pump based on LPC1768

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-17
SLIDE 17

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

Agrosoft T´ abor Cow Milking System

Figure: Milking Data Collection at ˇ Cerven´ e Janovice

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-18
SLIDE 18

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

Agrosoft T´ abor Pig Feeding System

Figure: Automatic Feeding Boxes

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-19
SLIDE 19

institution-logo µLAN Protocol Data Exchange in Home Control Application Origin and Initial Target Applications uLAN Protocol Overview Higher Level Protocol Layers

TheµLan Project Code Base Growth

Figure: Ohloh Lines Count of µLan Core Project without Companies Applications

The protocol is used from 1992, the driver code has been reimplemented in“C”in 1996 but systematic code visioning starts at 2004. The 2008 displays growth caused by unification and publishing of many embedded system support routines developed by PiKRON and Agrosoft T´ abor

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-20
SLIDE 20

institution-logo µLAN Protocol Data Exchange in Home Control Application Is uLAN Protocol an Option? uLan Connection Network (uLCN) Devices Designed for DAMIC Home Automation System

The Advantages to Use uLAN

multi-master capability of uLan very low cost interconnection with use of a phone line grade cables free bus topology support for more low cost microcontrollers and stable drivers for PC operating systems not for high speed communication or hard real-time data exchange – but enough for heating monitoring and control (HVAC), lights switching and ring-bells selected by group around DAMIC project at Department of Control Engineering.

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-21
SLIDE 21

institution-logo µLAN Protocol Data Exchange in Home Control Application Is uLAN Protocol an Option? uLan Connection Network (uLCN) Devices Designed for DAMIC Home Automation System

Need of the Direct Process Data Connection

uLOI layer for devices configuration and their state monitoring by higher level systems but use of polling cycle by higher level system is significant disadvantage for home automation define way how to configure state and command delivery between devices without need to build full model in each device

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-22
SLIDE 22

institution-logo µLAN Protocol Data Exchange in Home Control Application Is uLAN Protocol an Option? uLan Connection Network (uLCN) Devices Designed for DAMIC Home Automation System

The PDO Message Format

Format of process data (PDO) messages defined no information about OIDs – their values are mapped to device dictionary independent CIDs - channels IDs

Res Lo Res Hi Ext len (el) Ext CID data len (dl) data CID ... 1 byte 1 byte 1 byte 0..el bytes 2 bytes LE 1 (2) byte dl bytes

mapping tables to connect Rx and Tx CIDs to properties defined by OIDs and metadata in

PDO incoming CID to OID(s) mapping table (PICO) PDO outgoing CID to OID(s) mapping table (PICO) PDO incoming/outgoing extended length (> 4)metadata table (PIOM) PDO by event triggering table (PEV2C)

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-23
SLIDE 23

institution-logo µLAN Protocol Data Exchange in Home Control Application Is uLAN Protocol an Option? uLan Connection Network (uLCN) Devices Designed for DAMIC Home Automation System

uLAN PDO Connection Channels

Demonstration on virtual devices

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-24
SLIDE 24

institution-logo µLAN Protocol Data Exchange in Home Control Application Is uLAN Protocol an Option? uLan Connection Network (uLCN) Devices Designed for DAMIC Home Automation System

uACT (010)

actuator and temperature sensor available in more variants of

  • utput and input channels count and power stages

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-25
SLIDE 25

institution-logo µLAN Protocol Data Exchange in Home Control Application Is uLAN Protocol an Option? uLan Connection Network (uLCN) Devices Designed for DAMIC Home Automation System

uLSW (010)

not an only light wall switch which allows to map four contacts (left, right x up, down), their combinations and pres duration and “double click”to different events

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-26
SLIDE 26

institution-logo µLAN Protocol Data Exchange in Home Control Application Is uLAN Protocol an Option? uLan Connection Network (uLCN) Devices Designed for DAMIC Home Automation System

uDIM 010

multiple channels dimming controller for 8-230 VAC lights control

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network

slide-27
SLIDE 27

institution-logo µLAN Protocol Data Exchange in Home Control Application Is uLAN Protocol an Option? uLan Connection Network (uLCN) Devices Designed for DAMIC Home Automation System

uLTH 010

room temperature controller equipped by local multi-setpoint week program and user interface logic for program visualization and editing

Pavel P´ ıˇ sa – pisa@cmp.felk.cvut.cz Petr Smol´ ık – petr@smoliku.cz Frantiˇ sek Vacek – fanda.vacek@volny.cz Martin Boh´ aˇ cek – Process Data Connections in uLan Network