C-Bus Lighting Control via the C-Bus PCI Quick Start Guide. Document Number: CBUS-QS Issue: 2.0 Date: 8 December 2008

Similar documents
C-Bus Interface Requirements

CMSC 2833 Lecture 18. Parity Add a bit to make the number of ones (1s) transmitted odd.

Computer Organization

Elotech Standard Protocol. for Single R8200 SC

Groups of two-state devices are used to represent data in a computer. In general, we say the states are either: high/low, on/off, 1/0,...

C-Gate Server Application What s New CG Series

Digital Fundamentals

Final Labs and Tutors

MYcsvtu Notes DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes

Meteosat Second Generation Interface Control Document Station Key Unit

TOSVERT VF-S15 Series RS485 Communication Function Instruction Manual

CC411: Introduction To Microprocessors

C-Gate Server Application Command Interface CG Series

BINARY SYSTEM. Binary system is used in digital systems because it is:

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation

data within a computer system are stored in one of 2 physical states (hence the use of binary digits)

HDV100A3 Command Response Protocol

Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2

Microframe Corporation

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Computer Number Systems Supplement

COMLI. System Description

Number codes nibble byte word double word

It is the installer's responsibility to follow all instructions in this manual and to follow correct electrical practice.

C-Gate Server Application CGI User s Guide CG Series

7-Series Serial Communications User Manual

TOSVERT VF-AS1 Series RS485 Communication Function Instruction Manual

Syntax and Variables

TOSVERT VF-S9 Communications Function Instruction Manual

Introduction to Numbering Systems

Comments and/or suggestions concerning this document are welcome and should be directed to:

15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

Number Representations

TOSVERT VF-nC3 Series RS485 Communication Function Instruction Manual

BASE STATION CONFIGURATION 4

Chapter 2. Data Representation in Computer Systems

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr

TOSVERT VF-A7/P7 Serial Communication Function Manual

Using the MODBUS Protocol with Athena Series C (1ZC, 16C, 18C, and 25C) Controllers

Digital Fundamentals

C-BUS MODULE LINUX USAGE GUIDE

CHAPTER 2 (b) : AND CODES

Chapter 10 Error Detection and Correction 10.1

Positional Number System

B Interface description 12.01/

Experiment 6: S-Record Loader

MODBUS Network Communication

BMV Text Protocol. Table of contents

UNIT 7A Data Representation: Numbers and Text. Digital Data

Lecture (02) Operations on numbering systems

Variables and Data Representation

UNIT- 3 Introduction to C++

Chapter 10 Error Detection and Correction. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 2. Data Representation in Computer Systems

Review of Data Representation & Binary Operations Dhananjai M. Rao CSA Department Miami University

Digital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes

Lufkin Modbus Serial Driver Help Kepware Technologies

TOSVERT VF-nC1 Communications Function Instruction Manual

Definition of PLR on the RS485-bus. Version 1.06

DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM

OPTRIS CT communication interface

N.B. These pastpapers may rely on the knowledge gained from the previous chapters.

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude

Chapter 2 Bits, Data Types, and Operations

11 Serial Communications

Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee

Signed umbers. Sign/Magnitude otation

A Issue A Original. Instruction Manual. nxds Serial Comms Interface

MIDI CPU Firmware V User Manual

Signal Isolators & Conditioners

Number Systems. Dr. Tarek A. Tutunji Philadelphia University, Jordan

PART III. Data Link Layer MGH T MGH C I 204

Course Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation

Maciej Sobieraj. Lecture 1

What Is It? Instruction Register Address Register Data Register

Programmable Logic Devices. PAL & Jedec Programming

Data Representation 1

Numeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects:

Chapter 2. Data Representation in Computer Systems. Objectives (1 of 2) Objectives (2 of 2)

Lecture (01) Introduction Number Systems and Conversion (1)

Application Note: Using Modbus With the Conext CL Series. Important Safety Instructions

1.1. INTRODUCTION 1.2. NUMBER SYSTEMS

Electronic Data and Instructions

Manual Electronic Identification Systems BIS Processor BIS C-6_0 RS 232 C-6_ _836905_E_0704.p65 Deutsch bitte wenden!

Chapter 2 Bits, Data Types, and Operations

EX9017H-M is a analog input module with 8 input channels. Eight channels are differential type and individual channel configuration support.

Manual DTM Digital Pressure Transmitter

Specification. Current Consumption Range 8m * Rotational Angle +/- 50 degrees * Shear Angle +/- 40 degrees *

Instruction manual CIU Prime type 880 (CIU858 emulation)

PM290 POWERMETER. Communication Protocols ASCII & Modbus Reference Guide

Russound Controllers. RNET Protocol & Specifications RS-232 Communication. Document version

Manual 09/11 MN Z-EN. NZM-XATS-C Automatic Transfer Switch-Controller Modbus Communication Protocol

Modbus Protocol. for VASCO, VASCO Solar and MIDA devices. manmodbus_eng_00

CHAPTER 2 Data Representation in Computer Systems

CMPE223/CMSE222 Digital Logic Design. Positional representation

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 1: Basic Concepts. Chapter Overview. Welcome to Assembly Language

Digital Electronics A Practical Approach with VHDL William Kleitz Ninth Edition

Transcription:

C-Bus Lighting Control via the C-Bus PCI Quick Start Guide Document Number: CBUS-QS Issue: 2.0

CHANGE HISTORY Date Change Reference Comments 31 Jan 03 -Draft 0.1 Original 5 Jun 03 1 Addition of Licence warning 5 Jun 03 1.1 Formatting update 23 Sep 03 1.2 Added e-mail address. Parts of commands that are substituted made more consistent. 30 Oct 03 1.3 Add Safety / Life Support Policy Statement 30 Oct 03 1.4 Correction to Table Of Contents re previous addition 8 Dec 03 2.0 Was previously the Public Release Copyright 2008 Clipsal Australia Pty Ltd Page 2 of 15

TABLE OF CONTENTS 1 Scope...4 1.1 Purpose...4 1.2 C-Bus Interface Compatibility...4 1.3 Assumptions...4 2 Terms Used...5 2.1 Abbreviations...5 2.2 Definitions...5 2.3 Notation...5 3 Safety / Life Support Policy...6 4 C-Bus Concepts...6 4.1 Groups...6 4.2 Acknowledgment...6 4.3 Checksums...7 5 Initialisation...8 5.1 Default PCI Properties...8 5.2 PCI Setup...8 5.2.1 MMI Messages Not Required...8 5.2.2 MMI Messages Required...8 6 Transmitting C-Bus Lighting Control Commands...9 6.1 Transmit an ON Command...9 6.2 Transmit an OFF Command...9 6.3 Transmit a RAMP TO LEVEL Command...9 7 Receiving C-Bus Lighting Control Commands...11 7.1 Receiving an ON Command...11 7.2 Receiving an OFF Command...11 7.3 Receiving a RAMP to LEVEL Command...12 7.4 Receiving other Commands...12 8 Interpreting the MMI...13 9 Example...15 9.1 Control Examples...15 9.2 Monitor Examples...15 Copyright 2008 Clipsal Australia Pty Ltd Page 3 of 15

1 SCOPE 1.1 Purpose This document is a quick guide to allow third parties to achieve simple control of C-Bus lighting devices, without reading the full protocol document set. This describes the messages to exchange with a Clipsal C-Bus PC Interface (PCI) to achieve simple control of lighting devices, on the C-Bus Lighting Application. The C-Bus messages described in this publication are a subset of the complete definition, sufficient for most common types of lighting control. Complete definitions of all C-Bus messages, along with required behaviour of devices, is published in the full protocol document set. 1.2 C-Bus Interface Compatibility The C-Bus Enabled Program defines six (6) levels of C-Bus compliant interface. The information presented here meets all of the requirements for a level 1 interface and most of the requirements for a level 2 interface. 1.3 Assumptions In the description of C-Bus messages that follows, Lighting Applications are assumed to use the C-Bus Lighting Application Address ($38). If the installation uses a different Lighting Application Address, the value 38 that appears in the examples can be changed to the address used in the installation. C-Bus APPLICATION ADDRESSES ARE NOT ARBITRARY. Lighting devices MUST use Application Addresses in the range $30 to $5F only. Use of addresses outside this range may cause some C-Bus equipment to malfunction and may void warranties. Copyright 2008 Clipsal Australia Pty Ltd Page 4 of 15

2 TERMS USED 2.1 Abbreviations MMI PCI Multi-point to Multi-point Information. (A highly efficient status reporting technique used in C-Bus.) PC Interface. (Clipsal catalogue number 5100PC or 5500PC) 2.2 Definitions The following terms, when used in this document, have the meanings shown below: Application Network Variable Unit A well-defined set of behaviours for one or more devices connected to a C-Bus network. A network wide control variable maintained and/or controlled by C-Bus units. Within the Lighting Application, a Network Variable is called a Group Address Variable (GAV), and its value is called a Group Address Level. Something attached to a C-Bus network that performs an end-user function. 2.3 Notation Information is shown in several different typefaces: Helvetica Helvetica Bold Helvetica Bold Italic Courier Courier Italic Courier Bold Courier Italic Bold <Courier In Braces> $nn The descriptive text of this document Headings in this document Important notes as part of this document Data received FROM the C-Bus PC Interface Data received FROM the C-Bus PC Interface showing something that will vary depending on circumstances Data transmitted TO the C-Bus PC Interface Data transmitted TO the C-Bus PCI Interface that is to be substituted with values that depend on the users requirement A token naming a common ASCII character, for example <cr> means the Carriage Return character A number prefixed by $ indicates that the number is hexadecimal Copyright 2008 Clipsal Australia Pty Ltd Page 5 of 15

3 SAFETY / LIFE SUPPORT POLICY Clipsal Australia Pty Ltd does not support or recommend use of C-Bus as the primary means of communicating safety related information. Notification of safety related information using C-Bus, as a secondary function, is acceptable provided the source of the information has some other means of alerting personnel to the safety related condition. In this context, safety related information means any information, alarm, alert or similar which if not presented could result in a hazard to personnel. 4 C-BUS CONCEPTS 4.1 Groups C-Bus loads are arranged into logical groups in the C-Bus Lighting Application. Each Lighting Group: Has a unique address, in the range $00 to $FE, known as the Group Address; Can be controlled from anywhere in the network; Can have zero or more associated keys, spread across any of the key input units; and Can have zero or more associated electrical loads, spread across any of the output units. The value of the Group Address is referred to as a Level. There are only three (3) commands used to control C-Bus Lighting groups: a. On: A shorthand that sets the level of the group to $FF b. Off: A shorthand that sets the level of the group to $00 c. Ramp: Changes the level of the group to a target level, at a given rate. 4.2 Acknowledgment Each command sent to the C-Bus PCI is acknowledged. To allow decoupling of serial receive and transmit processing, the PCI provides a simple means of tagging a command: At the end of each command sent to the PCI, and just before the <cr>, place any single lower case alphabetic character, in the range g to z. The PCI will acknowledge the command by returning the lower case letter used, followed by a confirmation character. Possible confirmation characters, and their meanings are: Copyright 2008 Clipsal Australia Pty Ltd Page 6 of 15

. Positive acknowledgment. The command was successfully transmitted into the C-Bus network. # Negative acknowledgment too many retries The PCI was not able to successfully transmit the command into the C-Bus network, because there were too many retries. $ Negative acknowledgment corruption The PCI did not attempt to transmit the command into the C-Bus network, because it was corrupted. The PCI found that the calculated checksum did not match the supplied checksum. % Negative acknowledgment loss of C-Bus clock The PCI was not able to successfully transmit the command into the C-Bus network, because the C-Bus synchronising clock disappeared at some time during the transmission attempt. 4.3 Checksums Checksums are used throughout C-Bus to provide an error detection capability. All C-Bus checksums are calculated as the 2 s complement of the modulo 256 sum of the preceding bytes. In other words: a. Sum all of the bytes (the hex character pairs); b. Find the remainder when the sum is divided by 256; c. Take the 2 s complement (invert the bits and then add 1) of the remainder. This checksum has the property that when the bytes including the checksum are summed modulo 256, the result will always be zero if the check passes, and non-zero indicates the presence of an error in the data stream. The PCI checksums are performed on the hexadecimal data (the ASCII character pairs). For example, suppose the following Lighting command is to be sent to the PCI: \0538007988 Summing the bytes: $05 + $38 + $79 + $88 = $13E. Modulo 256 ($100), this is $3E. The checksum (2 s complement and add 1) = $C2. Checking: $05 + $38 + $79 + $88 + $C2 = $200, which is $00 modulo 256 ($100). This command would be sent as: \0538007988C2g<cr> Copyright 2008 Clipsal Australia Pty Ltd Page 7 of 15

5 INITIALISATION 5.1 Default PCI Properties By default, the PCI operates with the following serial communication properties: Data Rate: 9600 bits / second Data Bits: 8 Parity: None Start bits: 1 Stop bits: 1 It is possible to change the data rate of the C-Bus PCI, though normal Clipsal products never make this change. However, some third party devices (eg security systems or automation controllers) are known to change the PCI data rate. If this has occurred, the ONLY reliable method of resetting the data rate is to power cycle the PCI. 5.2 PCI Setup Before information can be sent to and from C-Bus, via the PCI, a small amount of initialisation of the PCI must be performed. This initialisation sets up the PCI for appropriate error checking and data validation modes, and allows monitoring of C-Bus messages. This initialisation assumes that the C-Bus installation uses the default C-Bus Lighting Application address of $38. 5.2.1 MMI Messages Not Required If C-Bus MMI reports are not needed, the following command lines must be sent to initialise the PCI, where <cr> is the Carriage Return character (ASCII character 13). Inputs are shown bold, responses normal. ~~~<cr> A3210038g<cr> g.322100ad<cr> A3420002g<cr> g.3242008c<cr> A3300059g<cr> g.86xxxx00323000yy<cr> If the C-Bus lighting application is not $38, substitute the correct address in place of the 38 in the second line shown above. 5.2.2 MMI Messages Required If C-Bus MMI reports are needed, send the first 3 command lines, and replace the last command line shown above (in bold) with the following: A3300079g<cr> Copyright 2008 Clipsal Australia Pty Ltd Page 8 of 15

6 TRANSMITTING C-BUS LIGHTING CONTROL COMMANDS 6.1 Transmit an ON Command Issue the following command string to the C-Bus PCI: \05380079ggzzc<cr> Where gg is replaced by the hexadecimal group number to turn on, zz is replaced by the hexadecimal checksum, calculated as described in section 4.3, and c is the confirmation character to be returned in the acknowledge. 6.2 Transmit an OFF Command Issue the following command string to the C-Bus PCI: \05380001ggzzc<cr> Where gg is replaced by the hexadecimal group number to turn off, zz is replaced by the hexadecimal checksum, calculated as described in section 4.3, and c is the confirmation character to be returned in the acknowledge. 6.3 Transmit a RAMP TO LEVEL Command Issue the following command string to the C-Bus PCI: \053800rrggttzzc<cr> Where gg is replaced by the hexadecimal group number to ramp, tt is replaced by the hexadecimal level to ramp to (the terminal level), zz is the checksum, calculated as described in section 4.3, and c is the confirmation character to be returned in the acknowledge. The rr byte codes the ramp rate, and is chosen from: $02 Instantaneous $0A 4 s ramp rate from min to max or max to min $12 8 s ramp rate from min to max or max to min $1A 12 s ramp rate from min to max or max to min $22 20 s ramp rate from min to max or max to min $2A 30 s ramp rate from min to max or max to min $32 40 s ramp rate from min to max or max to min $3A 1 min sec ramp rate from min to max or max to min $42 1.5 min ramp rate from min to max or max to min $4A 2 min ramp rate from min to max or max to min $52 3 min ramp rate from min to max or max to min $5A 5 min ramp rate from min to max or max to min $62 7 min ramp rate from min to max or max to min $6A 10 min ramp rate from min to max or max to min $72 15 min ramp rate from min to max or max to min $7A 17 min ramp rate from min to max or max to min Copyright 2008 Clipsal Australia Pty Ltd Page 9 of 15

C-Bus levels are given as a byte in the range $00 to $FF (0 to 255 decimal). The C-Bus installation software refers to levels as a percentage. The following algorithms can be used to convert between raw levels (range 0 to 255) and percentage levels: Convert from percent (0-100) to decimal (0-255) Decimal = truncate ( (percent * 255) / 100 ) Convert from decimal (0-255) to percent (0-100) Percent = 100 * truncate ( decimal + 2) / 255 ) Copyright 2008 Clipsal Australia Pty Ltd Page 10 of 15

7 RECEIVING C-BUS LIGHTING CONTROL COMMANDS 7.1 Receiving an ON Command If the C-Bus PCI detects a lighting ON command on its local network, it will forward this from its serial port. The information received will be either: or 05ss380079ggzz<cr> 05ss38010079ggzz<cr> In this message, the component bytes have the following meanings: 05 Indicates a lighting message has been received. ss The unit address of originator. Can be ignored. 38 The lighting application address. If a non-default lighting application is being used this may have a different value. 00 or 0100 This byte should always be 00. In the alternate format, the first byte could be 01, followed by 00. If the first byte is not 00 or 01, DISCARD the message. 79 Lighting ON command. gg zz 7.2 Receiving an OFF Command The Lighting Group Address number being switched on. The checksum of the preceding bytes, calculated according to section 4.3. If the C-Bus PCI detects a lighting OFF command it will forward this from its serial port. The information received will be: or 05ss380001ggzz<cr> 05ss38010001ggzz<cr> In this message, the component bytes have the following meanings: 05 Indicates a lighting message has been received. ss The unit address of originator. Can be ignored. 38 The lighting application address. If a non-default lighting application is being used this may have a different value. 00 or 0100 This byte should always be 00. In the alternate format, the first byte could be 01, followed by 00. If the first byte is not 00 or 01, DISCARD the message. 01 Lighting OFF command. gg zz The Lighting Group Address number being switched on. The checksum of the preceding bytes, calculated according to section 4.3. Copyright 2008 Clipsal Australia Pty Ltd Page 11 of 15

7.3 Receiving a RAMP to LEVEL Command If the C-Bus PCI detects a lighting RAMP to LEVEL command it will forward this from its serial port. The information received will be: or 05ss3800rrggttzz<cr> 05ss380100rrggttzz<cr> In this message, the component bytes have the following meanings: 05 Indicates a lighting message has been received. ss The unit address of originator. Can be ignored. 38 The lighting application address. If a non-default lighting application is being used this may have a different value. 00 or 0100 rr gg tt zz 7.4 Receiving other Commands This byte should always be 00. In the alternate format, the first byte could be 01, followed by 00. If the first byte is not 00 or 01, DISCARD the message. Lighting Ramp command, chosen from the set shown in section 6.3. The Lighting Group Address number being ramped. The level being ramped to (the terminal level). The checksum of the preceding bytes, calculated according to section 4.3. It is possible in some circumstances for other commands to be received. There are two cases: Case 1. 05ss38nn...zz<cr> If the nn byte is NOT 00 or 01, then the entire message should be discarded. Case 2. or 05ss3800cc...zz<cr> 05ss380100cc...zz<cr> If the cc byte is NOT the ON, OFF or a valid Ramp code, then the entire message should be discarded. Copyright 2008 Clipsal Australia Pty Ltd Page 12 of 15

8 INTERPRETING THE MMI The C-Bus PCI will also forward regular lighting MMI messages. These messages show, in brief form, the state of all lighting groups in the network. By default MMI messages will appear about every 3 seconds, though this interval can be changed when the C-Bus network is commissioned. MMI messages can be ignored if desired. The format reported is known as Standard Format, and the information returned looks like: D8380068AA0140550550001000000014000000000000000000CF D838580000000000000000000000000000000000000000000098 D638B000000000FF00000000000000000000000000000043 This reply codes the binary status of all 256 possible groups in application 38, the standard C-Bus Lighting Application. Each line of the MMI starts with a byte of value ($C0 + the number of character pairs to follow). If MMI messages are to be ignored, then any line from the PCI that has the first byte with value $C0 can be ignored. In this example reply, the line is interpreted as: D8: Indicates that there are $D8 - $C0 = $18 = 24 character pairs (ie 48 characters) to follow. 38: The Application Address being reported. 00: The starting group number for this line of the report (this changes for the subsequent lines of the report) The subsequent bytes code the group values. Each byte codes 4 consecutive groups, using 2 bits per group, in order from least to the most significant bit pairs: Bit Number 7 6 5 4 3 2 1 0 Grp N+3 Grp N+2 Grp N+1 Grp N Copyright 2008 Clipsal Australia Pty Ltd Page 13 of 15

The bit coding used is: 00 = This Group Address does not exist in the network 01 = This Group Address is ON (Level is > 0) 10 = This Group Address is OFF (Level = 0) 11 = This Group Address is in the ERROR state Therefore, continuing the bytes in the example: 68: group 0 does not exist, group 1 = OFF, group 2 = OFF, group 3 = ON AA: group 4 = OFF, group 5 = OFF, group 6 = OFF, group 7 = OFF 01: group 8 = ON, and groups 9, 10, 11 do not exist etc The second line of output for the status report has exactly the same format, but starts the report group 58 (hex). The third line is a slightly shorter, but is otherwise the same, and starts reporting from group B0 (hex). Copyright 2008 Clipsal Australia Pty Ltd Page 14 of 15

9 EXAMPLE An example is given for controlling several lights on a C-Bus system. The lights are arranged in groups, controlled by standard C-Bus key input units. The network configuration is shown below. Each lighting circuit, and each switch, is labelled with the lighting group number. 20 21 22 23 24 20 23 25 1 2 3 4 1 2 3 4 C-Bus 22 25 21 24 To C-Bus PCI 23 20 25 20 This diagram shows that Lighting Group Addresses can span multiple C-Bus key units and output units. Keys and output circuits can be allocated to any available Lighting Group Address. The same Lighting Group Address number can be used in many places, and everything under the control of that Group Address will remain synchronised. 9.1 Control Examples To turn on Lighting Group Address $21, issue the command: \053800792129g<cr> To turn off Lighting Group Address $21, issue the command: \0538000121A1g<cr> To ramp Lighting Group Address $21 to level $7F (50%), using the 4 second ramp rate, issue the command: \0538000A217F19g<cr> 9.2 Monitor Examples Unit $0B transmits an ON command on group $20, PCI returns: 050B380079201F<cr> Unit $0B transmits an OFF command on group $20, PCI returns: 050B3800012097<cr> Unit $0B transmits a RAMP instantaneously to level $48 on group $20, PCI returns: 050B38000220484E<cr> Copyright 2008 Clipsal Australia Pty Ltd Page 15 of 15