WLP CID-16 BMS/CTS protokol

spacer

Contents

spacer

Communication-
Ports

COM1

Type: 2-wire half duplex RS-485
Connector: 3-pole screw terminal (internal)

Connections:
1: (rightmost in WLP) Noninverted Signal
2: (center) Complementary Signal
3: (leftmost in WLP) Screen

Hosts connected to this port must change transmission direction as soon as transmission of the last character frame is complete, since a response may arrive within milliseconds hereof.

COM2
Type: full duplex RS-232
Connector: 9-pole D-sub male connector

Connections:
  1. DCD
  2. RxD
  3. TxD
  4. DTR
  5. GND
  6. DSR
  7. RTS
  8. CTS
  9. RI

Hosts connected to this port must pull the DSR line low; otherwise the WLP assumes an external modem is attached, and persists in initializing this until successful. Contents

Communication
Parameters

115200,N,8,1

Timing
Constraints

Character frames are transmitted with no spacing by the WLP; attached hosts must be capable of handling this.
Following 20ms of Rx inactivity, the WLP terminates reception of a commenced telegram.
RS-485 interface direction must switch to Receive when transmission of final character's stop bit is complete.
Multi-line responses have at least 1.25ms line separation. Multi-line responses should not be routed through channels of lower bandwidth than 115,200bps. Contents

Telegram and
Buffer Sizes

The telegrams of the CID-16 BMS/CTS protocol are line-oriented.
Each line can hold a maximum of 95 characters; of these, 14 comprise the header; up to 80 characters comprise the payload, and 1 character is terminator (CR).
Note! If the BMS/CTS is attached as an independent host on an RS-485 bus connecting several WLPs, the communications port of the BMS/CTS will confront network traffic employing other protocols and with packet sizes up to 2kB. Contents

CID-16 Addressing
and Encapsulation

CID-16 addressing employs one octet for identification of a network, and one octet for identification of a host on this network. The network octet may range from 0 to 255, whereas the host octet ranges from 1 to 254, 0 being the generic subnet address, and 255 being the broadcast address of the subnet.
Network octet (MSB) and host octet (LSB) appear together as a big-endian word comprising a CID-16 address.
A CID-16 telegram header looks like this:
Name   Ofs Siz Function
dg_typ  0   1  Tel.type: '?' = query, '!' = response
dest    1   4  Hex destination address (word) (ASCII)
ndg_typ 5   1  Neg. tel.type: '?' for dg_typ '!' and vv.
src     6   4  Hex source address (word) (ASCII)
src_tc 10   1  Separator '.'
cksum  11   2  Hex 2's compl. of telegr. bytesum (ASCII)
hdr_tc 13   1  Separator '.'

All hexadecimal representation employs capital letters A-F.
The checksum encompasses the entire telegram from header up to and including terminator.
During checksum calculation, the checksum field must contain 0x0000.
A telegram which has been forced complete by time-out, and which does consequently not contain a terminator cannot have a valid checksum. Contents

Payload:
BMS/CTS Protocol
Commands

The CID-16 telegram payload consists of ASCII characters ranging from 0x20 to 0xFF plus the character 0x0A (LF), which cannot be the payload's first character.
Refer to separate document describing implemented protocol commands for BMS/CTS

Contents

Connecting BMS/CTS
to WLP controller

The BMS/CTS is assigned an available CID-16 address on the relevant subnet, e.g. 2.254 (0x02FE).

The recommended method of connecting BMS/CTS is via COM2 on a WLP which is not a gateway (i.e. it has no modem).
On this WLP (called peephole) an extra 16-bit host route to COM2 for the BMS/CTS address is entered into the routing table. Telegrams from BMS/CTS will either have peephole as destination, or be routed by peephole onto the WLP network. Responses to BMS/CTS will be seen by all hosts. All except peephole will ignore them; peephole will route them back to BMS/CTS.

When connecting BMS/CTS to a single modem-equipped WLP, the attachment port must be COM1, and on the WLP an extra 16-bit host route must be made to COM1 for the BMS/CTS host address. It is particularly important to avoid making 32-bit net routes to COM1 in this configuration, to avoid irrelevant network traffic hitting the BMS/CTS.

If two WLPs are networked, and COM2 is in use on both (e.g. by a modem on one and by a local PC on the other), BMS/CTS may be attached via a half-duplex RS-485 interface to the DCN bus.

Note! The BMS/CTS receiver thus confronts all network traffic. Be aware of the following circumstances:

Reception

  1. Any character arriving after interface timeout, after the 0x04 character, or after a correctly terminated and valid CID-16 telegram represents the beginning of a new telegram ("start character").
  2. If the start character is neither "!" nor "?" the incoming telegram is not CID-16, and subsequent characters up to 0x04 or interface timeout must be ignored.
  3. A new telegram may commence immediately after the 0x04 character.
  4. The 95-byte limit for telegram size only applies to CID-16 telegrams. Other WLP protocols may transmit telegrams up to 2kB size. Unless the BMS/CTS employs buffers of sufficient size, the receiver will need to be capable of discarding received irrelevant characters on-the-fly.
  5. CID-16 telegrams destined for other hosts than the BMS/CTS may be received. The MBS/CTS must ignore these.

Transmission

Since in this configuration the BMS/CTS telegrams are not routed by a WLP, packets may collide on the network if BMS/CTS and a WLP transmit simultaneously. The WLP receivers have no qualms with this; they will merely discard the resulting corrupt telegrams. BMS/CTS should try to avoid contention by awaiting 300 msec line inactivity before initiating a packet transmission. Contents