Cab Bus Communications Protocol

Similar documents
CAB-05. Intermediate Cab

CAB-05. Intermediate Cab. Operations Manual. For Cab version 3.1

Model IR5500. Infrared Open-Path Detector for Hydrocarbon Gases Modbus programming guide

MCW Application Notes 24 th February 2017

CTT MODBUS-RTU COMMUNICATION PROTOCOL TEMPERATURE MONITOR DEVICE

Model IR700. Infrared Point Detector for Carbon Dioxide Gas Applications. Modbus Programming Guide

USB. $49.95 USB interface for NCE Cab Bus. Interface board. Use of this product requires Internet access to download the latest USB drivers

MTR-4. C8 Command to MODBUS Bridge User Manual F-1, No. 631, Chung Der Road, Sec 1, Taichung Taiwan.

DMTME Multimeters. Communication protocol. Technical specification V1.2 ABB

GNetPlus Communication Protocol

Sender Receiver Sender

Input Channels: 4 differential or four single-ended. Address / Baud rate / range configurable by the user

Tongta Inverter TDS-F8

Logosol Joystick Node LS-731

Mini-Panel. Accy and Macro Controller

1. Implemented CM11 protocol

M2M/DMTME Instruments Communication protocol. Technical specification V.2.1 2CSG445011D0201

RS-232 Control of the Advantage DRI

RS 232 PINOUTS. 1. We use RJ12 for all of our RS232 interfaces (Link-2-Modbus & Link-2-PC- Serial/RS232). The diagram below shows our pin out.

Blaupunkt ( DMS?? ) Page 1 of 13

The RS-485 user manual for B800 series communication

Mini Panel. Accy and Macro Controller. Build the kind of control panels you ve always wanted without complicated wiring!

Technical Specification. Third Party Control Protocol. AV Revolution

on a 35 mm top-hat rail (in accordance with DIN EN TH35) Ambient temperature Operation: C Storage: C

University of Texas at El Paso Electrical and Computer Engineering Department

EMBEDDED HARDWARE DESIGN. Tutorial Interfacing LCD with Microcontroller /I

FnIO S Series: NA MODBUS/TCP(UDP) Adapter. with Two RJ-45

JMY504M User's Manual

Computer Control of the Advantage DRC 4+4

RS-232 Control of the Advantage EQ281/8, EQ282/8 and Advantage SMS200

Application Note BDLxxxx RS232 SERIAL INTERFACE COMMUNICATION PROTOCOL (SICP V1.82)

ModBus Communication protocol. The ModBus protocol is an industrial communications and distributed control system

ALESIS M20. System Exclusive

Modbus Protocol Guide for ZP2 Series Control Panels

RS232/LAN Serial Communication Control. Specification for A3112 (MDT701S/LDT701V)

TBS Unify Pro / SmartAudio

SRS501 User s manual

2. Terminal arrangement TEMPERATURE CONTROLLER KT2 COMMUNICATION INSTRUCTION MANUAL. (Fig. 2-1)

N700E Inverter RS485 Interface Instruction Manual

TOA IC-100 Institutional Intercom. Remote Control and Monitoring Programmer's Guide

Motors I Automation I Energy I Transmission & Distribution I Coatings. Modbus RTU CFW701. User s Manual

Communication protocols description of. Hx4xx and Hx3xx regulators with RS485 and RS232 communication interface

JMY607H User's Manual

Eaton E32 3-switch modules

Motors I Automation I Energy I Transmission & Distribution I Coatings. Modbus RTU CFW500. User s Manual

8051 Interfacing: Address Map Generation

LCDs. Embedded Systems Interfacing. 20 September 2011

VPGate Manual PROFIBUS to serial

RS-232 Serial Communication Control

Ethernet to Digital I/O and Analog Input. (Model: IP-IO)

Positional Number System

Modbus RTU CFW100. User s Manual. Phone: Fax: Web: -

Venstar Thermostat Adapter

ATID UHF RFID READER Protocol. July 2009 ATID900F - V0.0.3

Custom Installation Notes: Serial programming interface and IR remote commands for Arcam UDP411 BD Player

Touch Encoder. Interface Control Document (CANBUS J1939 Protocol)

NORITAKE ITRON VFD MODULES GU192x16H-K612C5

Specification E2 Interface

RS 232 protocol for CTOUCH Runner, CTOUCH Leddura, CTOUCH Leddura xt,

Technovision TecMP3(-R) Operating Guide (firmware version 2.5 and later) 01/2013

GPD 506 / Modbus RTU Technical Manual

PCD1.W5200-A20. E-Line S-Serie RIO 8AO. Features. General technical data. Dimensions and installation

Micro Module Shutter. Micro Module Shutter

IS-Dev Kit-5 and IS-Dev Kit-6 Users Manual

FnIO S-Series. FnIO MODBUS Adapter Specification Rev 1.00 NA-9473 (MODBUS/RS485) Page 1 of 30. NA-9473 (MODBUS/RS485) Adapter

UPB US2-40 Series Quad Rocker Wall Switch with Dimmer Firmware Specification

E2 Modbus RTU Register Map Revision History Version Comments Author Date 1.02 Previous version PAE 11/06/ Revised to new format PAE 09/03/09

Motors I Automation I Energy I Transmission & Distribution I Coatings. Modbus RTU CFW300. User s Manual

Sequential Event Recorder

TABLE OF CONTENTS. Communication Functions

Custom Installation Notes: Serial programming interface for Arcam A/V processors & receivers

BENCHTOP INSTRUMENT. Digital AC/DC Power Meter. Operation Manual V1.0

Conto D2 COMMUNICATION PROTOCOL CONTENTS 1.0 INTRODUCTION

POWERHOUSE. -- the finest in Digital Command Control -- PRODUCT MANUAL FOR PB-205a DUAL 5AMP POWER STATION

Technovision TecMP3A Operating Guide (firmware version 1.7) 11/2017

IS-Dev Kit-6, 6D, 6C, 6HB User s Manual

Back to. Communication Products Group. Technical Notes. Local/Remote Control and Functional Description, 1:1 Redundant Switching Unit, One Rack Unit

C1098 JPEG Module User Manual

LK Technical Manual. Revision: 2.0

PIC-I/O Multifunction I/O Controller

FANUC PLC Parts. GE Fanuc Automation. Series 15i / 150i Model A Remote Buffer. Computer Numerical Control Products. Descriptions Manual

LCD05 datasheet 1.0

1:N REDUNDANT SWITCHING UNIT REMOTE CONTROL TERMINAL

TEAM DIGITAL. DCCBreak DCC Circuit Breaker

USB-ASC232. ASCII RS-232 Controlled USB Keyboard and Mouse Cable. User Manual

DIN-rail mountable relay unit for commercial control, power switching and home automation applications

DCP - Interface. Dynavert L. Technical Description July 2010 (Draft) Dynavert

Vorne Industries. 2000S Series Serial Input Alphanumeric Display User's Manual

Developer Notes INSTEON Thermostat v012. Developer Notes. INSTEON Thermostat. Revision History

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

TOSVERT VF-S9 Communications Function Instruction Manual

IF96017 MODBUS COMMUNICATION PROTOCOL

Serial Communication Control Interface User s Manual

I 2 C Application Note in Protocol B

Desktop Reader and Wall Reader Adaptor USER MANUAL DOCUMENT REVISIONS

SERIES PM130EH POWERMETERS COMMUNICATIONS REFERENCE GUIDE

INT-RS module - short technical description

Phone: Fax: Web:

MOS INTEGRATED CIRCUIT

JMY501H User's Manual

Transcription:

Page 1 Overview of Controller Bus The controller bus connects up to 63 Hand-Held Cab Controllers to the Command Station. Data on the bus runs at 9600 bps with 8 data bits, no parity, 2 stop bits and meets RS-485 specifications. Controllers are continually in receive unless specifically addressed by the command station at which time the command station relinquishes the bus to allow the controller to respond. All communications sent from the command station to the Hand-Held Controllers must have bit 7 =1. A "ping" has bit 6 = 0 and all other commands or data have bit 6 = 1. All communications from the cab controllers to the command station have bit 7 = 0. The maximum length of the bus is 1000 feet and should be a continuous daisy chain without "branches" of any significant length (longer than 20 feet). An RJ-1 1 (6-4 or 6-6) is the recommended "basic" connector of the cab bus for cost reasons. Only the center 4 wires of the bus are normally used. A 5 pin 180 degree DIN connector is also acceptable when wired to be compatible with the Lenz/Atlas pinout. DIN Wiring is as follows PIN 1 +12 Volts (nominal) PIN 2 Ground PIN 3 "A" lead of RS-485 signal PIN 4 "B" lead of RS-485 signal 3 4 5 1 2 View looking into female DIN jack : RJ-11 Wiring: PIN 1 PIN 2 PIN 3 PIN 4 PIN 5 PIN 6 Reserved - currently unused +12 Volts DC "A" lead of RS-485 (to pin 6 of 75176 chip) "B" lead of RS-485 (to pin 7 of 75176 chip) Ground Reserved - currently unused 1 2 3 4 5 6 View looking into female RJ11 jack In normal operation up to sixty-three controllers are polled (pinged) for changes of status. A cab, when addressed, will answer with either a two byte response indicating button press (1st byte) followed by speed (2nd byte) or a five byte response indicating device address (1st two bytes), operation (2nd two bytes) and a one byte xor checksum. The cab starts sending it's response approximately 780 Sec. after the end of the last stop bit from the command station. Cab 0 is the "broadcast" address from command station to cab. Cab #1 is reserved for future applications (such as linking two command stations). Cabs are not necessarily polled in numerical order. This is to provide very active cabs with more (temporary) bandwidth for intensive operations. Active cabs are polled on a continuous basis. Periodically, inactive cab addresses are polled to find new cabs on the bus. Cabs. Cabs respond to the command station with key codes for any buttons pressed on the cab and the command station responds with information for the cabs user interface display(if any). This display can be either simple LEDs with on/off indications or full featured 2 or 4 line x 16 character displays. This type cab uses two byte responses to the command station.

Page 2 Normal Bus Operation 1. Base "pings" a cab address. 2. Cab answers with a 2 or 5 byte response. In the case of a 2 byte response the first byte is a key press (key code) and the second byte is speed. In the case of a 5 byte response the first 2 bytes are a device address (locomotive, accessory, signal, etc.) the next two bytes indicate the action to be performed and the last byte is an xor checksum of the first 4 bytes. If there is no controller response, jump to step 1. It is not necessary for a cab to answer if there is nothing to send. Cabs cannot change their response method from 2 to 5 or 5 to 2 bytes. 3. If the command station has any commands or data for the controller it will send the command/data immediately after receiving a ping response from the controller. Data will start within 300us of last stop bit from cab. 4. Jump back to step 1 to ping next address. Power Up Operation of Command Station 1. Command station sends nothing for 1-2 seconds to allow Hand-Held controllers to 'settle down' (and user time to read address or other information on LCD) 2. Command station "pings" cab address zero. 3. Command station "pings" a cab address (valid range 1-63). 4. If a cab is present with that address it will return two or five bytes of data. If it returns 5 bytes the comand station will assume that this cab will always respond with 5 bytes and is a type c cab. If it returns two bytes the command station will then query the cab for its cab type 5. The cab will answer the query with a one byte cab type ('a' for cabs with LCD displays, 'b' for cabs without display capabilities, type 'd' is for Auxiliary Input Units, e is reserved, f is for Cab-Bus/X-bus Bridge Units, g for Cab Bus/Loconet bridge unit. 6. Start normal operations. Power Up Operation of Cab Cabs fall in to two basic types, those with LCD displays (type a ) and those without (other types, typically type b ). A cab without an LCD operates in essentially the same manner as a cab with a display except it ignores commands to display information. It is a good idea to incorporate an LED or other indicator that responds to cursor on and off commands to indicate when a display-less cab that has data input capability is in data entry mode. The command station transmit display data only to type a cabs. 1. Wait for ping to cab number 0. By waiting to hear a ping for cab 0 you will be able to easily "sync up" with the cab bus. 2. Wait for ping this cab, then return a key press code of 0x7E (refresh LCD command) to the command station followed by 0x7f (no speed command). If this is a total system power up for the system the command station will ignore the request. The command station keeps an image of each cab's LCD screen in memory so the cab LCD can be refreshed as the cab is moved from location to location on the cab bus. 3. Respond to commands from the command station. 4. Goto step 1 of normal bus operation.

Page 3 Description of Command Station Transmissions NOTE: all transmissions from command station must begin with the most significant bit set to 1. Cabs are not required to support all of the following commands. Ping (1 byte, but a multi-byte command may follow after cab answers) 10aaaaaa aaaaaa=6 bit cab address. 1-63 = normal cab addresses, 0 is the broadcast address. A ping is the only transmission from the command station with bit 6 = 0. Commands (multi-byte) for all dumb cabs All bytes of the command from base to cab must have bits 6 and 7 of a multi-byte command set to 1. Only ASCII characters in the range of 20h-5Fh may be printed. The command station sets bit 6 if bit 5 is set before transmitting it, the cab is expected to adjust the bits back [ie. if bit 5=1 then clear bit 6, if bit 5=0 don t clear bit 6] The LCD display of type A cabs is assumed to be a 2x16 or 4x16 character display. 0xc0 print next 8 chars to 1st line left LCD (addr = 80h) 0xc1 print next 8 chars to 1st line right of LCD (addr = 88h) Note: this is where the clock prints 0xc2 print next 8 chars to 2nd line left of LCD (addr = C0h) 0xc3 print next 8 chars to 2nd line right of LCD (addr = C8h) 0xc4 print next 8 chars to 3rd line left of LCD (addr = 90h) 0xc5 print next 8 chars to 3rd line right of LCD (addr= 98h) 0xc6 print next 8 chars to 4th line left of LCD (addr = D0h) 0xc7 print next 8 chars to 4th line right of LCD (addr = D8h) 0xc8 move cursor to LCD address in following byte <C8h> <80h> move cursor to address 80 (home) 0xc9 print char TTY fashion to LCD, back up cursor to same spot <C9h> <B9h> print "9" and return cursor to same position 0xca print char TTY fashion to LCD, move cursor to next location <CAh><B9h> print "9" to LCD, let cursor advance to next spot 0xcb upload 1st following byte graphic location with next 8 bytes. Bits 5,6,7 must be reset in the controller. Ex: program graphic location 00 with a vertical line. Note: the graphic char value (0-7) is last. <CBh><D0h><D0h><D0h><D0h><D0h><D0h><D0h><D0><C0h> 0xcc print graphic char indicated by following byte (bits 6,7 are set in the second byte to comply with bits 7 and 6 must be set rule) <CCh><C3h> 0xcd clear display and home cursor <CDh> 0xce cursor off <CEh> (LED OFF in basic cabs) 0xcf cursor on <CFh> (LED ON in basic cabs) 0xd0 shift LCD to display the 'right half' of the screen on a two line display. <D0h> 0xd1 non-destructive home screen back to 'left half' <D1h> 0xd2 cab returns a one byte cab type starting at 60h ('a' for cabs with LCD displays, 'b' for cabs without display capabilities, type 'c' is reserved, 'd' is for Auxillary Input Units, f is for Cab-Bus/X-bus Bridge Units, g for Cab Bus/Loconet bridge unit. 0xd3 cab enters it's own setup mode (to set it's address) <D3h> 0xd4 <reserved> light up green cab signal on cab (clears yellow and red) 0xd5 <reserved>light up yellow cab signal on cab (clears green and red) 0xd6 <reserved>light up red cab signal on cab (clears yellow and green) 0xd7 <reserved>activate buzzer or other attention getting device on cab ( Beep operator) 0xd8 two byte result of an operation performed type c cab (has no meaning for type a,b and d cabs) <D8><byte 1>< byte 2> Byte 1 format - 11cc 00dd (dd=2 msb to be combined with 6 lsb of following byte 2) if cc=00 then operation is successful if cc=01 then operation has failed rr = 10,11 is undefined 0xd9 Reserved

0xda 0xdb 0xdc through 0xff Cab Bus Communications Protocol Reserved 4 bytes following this byte contain information about the currently controlled locomotive Byte 1 <DBh> (4 bytes of loco info follow) Byte 2 bit 5 = direction (1=forward, 0=reverse) bit 4 = \ bit 3 = \ bit 2 = > 5 most sig. bits of current speed bit 1 = / bit 0 = / Byte 3 bit 5 = \ 2 least sig. bits of current speed bit 4 = / bit 3 = \ bit 2 = \ 4 most sig. bits of loco addr high byte. bit 2 (bit 6 of addr hi byte) =1 if in bit 1 = / 128 speed mode, bit 2=0 if 14/28 bit 0 = / Byte 4 bit 5 = \ bit 4 = \ bit 3 = / 4 least sig. bits of loco address high byte bit 2 = / bit 1 = \ bit 0 = / 2 most sig. bits of loco address low byte Byte 5 bit 5 = \ bit 4 = \ bit 3 = \ 6 least sig bits of loco address low byte bit 2 = / bit 1 = / bit 0 = / reserved for factory test modes Page 4 NOTE: commands c0-cd, d0, and d1 are ignored by cabs with no LCD display (type a ). command d8 has no meaning for any cab except type c so it is ignored by all but type c cabs.

Description of Hand-Held Controller Transmissions NOTE: All transmissions from Hand-Held controller begin with 0. Dumb cabs always respond with two bytes, the first byte corresponding to the key code of any button pressed and the second byte correcponds to the position of any speed control pot on the cab. Ping Response for type a through type d dumb cabs FIRST BYTE (key press or other information. NOTE: 7Fh never sent in 1st byte): Type a, and b cabs: 010xxxxx Key press info (40h-7Ch) 01111101 No key to report <7Dh> 01111110 Repeat current screen <7Eh> Type d cabs: 0xxxxxxx Type 'd' auxillary input units bit map for inputs 1-7, bit 0 is input 1, bit 6 is input 7. SECOND BYTE (speed when using knob): Type a, and b cabs: 0xxxxxxx Speed control from knob (range 0-126, 127 = knob not used) 01111111 No speed to report, keys are being used <7Fh> Type d cabs: 0xxxxxxx Type 'd' auxillary input units bit map for inputs 8-14, bit 0 is input 8, bit 6 is input 14 KEY CODES for Type and b cabs (hex/decimal): 40 (64) - Enter 60 (96) - Assign Cab -> loco 41 (65) - "Program" Key 61 (97) - Program on Mainline 42 (66) - Recall 62 (98) - Set Clock 43 (67) - Direction Toggle 63 (99) - Program on Setup track 44 (68) - Setup Consist 64 (100) - Setup command station 45 (69) - Add Loco to Consist 65 (101) - Setup cab (cab enters its own setup mode) 46 (70) - Delete Loco 66 (102) - Setup macros 47 (71) - Kill Consist 67 (103) - Setup brute force consist 48 (72) - Select Loco 68 (104) - Setup advanced consist 49 (73) - Horn key down 69 (105) - Toggle LCD between left/right half 4A (74)- 1 step faster 6A (106) - Set direction to forward 4B (75) - 1 step slower 6B (107) - Set direction to reverse 4C (76) - Emergency stop 6C (108) - Select Signal 4D (77) - Bell 6D (109) - reserved 4E (78) - Select Accessory 6E (110) - reserved 4F (79) - Expansion key 6F (111) - Momentum 50 (80) - Headlight Toggle/0 70 (112) - F10 51 (81) - F1 Toggle/1 71 (113) - F11 52 (82) - F2 Toggle/2 72 (114) - F12 53 (83) - F3 Toggle/3 73 (115) - reserved 54 (84) - F4 Toggle/4 74 (116) - reserved 55 (85) - F5 Toggle/5 75 (117) - reserved 56 (86) - F6 Toggle/6 76 (118) - reserved 57 (87) - F7 Toggle/7 77 (119) - reserved 58 (88) - F8 Toggle/8 78 (120) - reserved 59 (89) - F9 Toggle/9 79 (121) - reserved 5A (90) - 5 steps faster 7A (122) - Sticky Shift Key (F10-F28) 5B (91) - 5 steps slower 7B (123) - Alternate momentary key pressed 5C (92) - Macro select 7C (124) - Alternate momentary key up 5D (93) - 28/128 speed toggle 7D (125) - report that no key is pressed 5E (94) - Brake 7E (126) - repeat last LCD display (also requests info on current loco) 5F (95)- Horn/Whistle key up 7F (127) - Using buttons for speed control Page 5

Page 6 Timing Of Cab Bus At 9600,N,8,2 each byte takes 1.144 ms HARD AND FAST RULE: Hand-Held Controller must start to respond within 800 us (but not before 100uS) to a ping or not respond at all. Therefore a complete round of 64 pings with simple responses will take: ( 1.140 ms +0.78 ms + 2.280 ms +.1 ms ) * 64pings = 275 ms (3 to 4 pings/second) --- delay to start of next ping --------------- normal length of cab response (2 bytes) ------------------------------ normal delay to start of cab response ---------------------------------------- base ping (length of 1 byte at 9600bps) This is worst case assuming 64 cabs in use (and answering each ping). A normal load of about 10 Cabs comes out to about 23 pings/second per cab. NOTE: If a cab does not start to respond within 800uS the command station will not waite for subsequent byte(s) and will ping the next cab. This has the effect of speeding up the ping process to remaining cabs. NOTES: Starting with command station software dated 7/29/95 and later: Cabs are not necessarily pinged in numerical order. If a cab is off the bus for several pings the command station may drop the cab from it's "ping list". That cab will then only be pinged on an occasional basis until it again responds to a ping. NOTES: Starting with command station software dated 1/3/04 and later: Type c smart cabs are supported. A type c cab always responds with 5 bytes.