dbx Controlling DriveRack User Manual

Controlling DriveRack™ products with RS- 232: A quick start guide.
If you are using an AMX panel with a NetLinx control module , you are in luck. There is NetLinx sample code available for the DriveRack 400 series processors. This code can be used as a te mplate to create your application. The 200 series and 400 series us the same message format, and share all of the most often used messages. Adapting the sample code to control a 240 or a 260 should be an easy task.
If you are not using an AMX NetLinx co ntrol module, you will need to perform a little more programming on your chosen controller.
There are two modes of sending messages. Guaranteed Delivery and Data Gram. The full handshake protocol for resynch and guaranteed delivery is described in a separate document. A full implementation of the protocol is recommended to provide fault tolerant communication with DriveRack products. Generating and responding to Resynch Requests, acknowledging received guaranteed frames and resending frames that have not been acknowledged will provide a control interface that is robust. You will not have to tell your customer “if it didn’t work, just hit the control button again to resend the command….”.
Many times, however, a simple open loop message system is adequate for the application. This quick start guide will allow you to control some common parameters in the DriveRack series of products using the “canned” strings provided below. This guide is not intended to replace the “Full Duplex Network and Data Link Layer Specification”, but is intended to help send a few commands to a DriveRack to get started working on a control application.
Baud Rate: 38.4 kbps, 8N1
Reysnc:
Whenever the controller begins operation, resynch to the DriveRack. This ensures that the communications protocol is flushed and ready to receive a message frame.
First send 16 <0xff> characters to the DriveRack. Then send 261 <0xf0> characters to the DriveRack.
Now as long as the co ntroller sends valid frames, the controller and DriveRack will stay in Synch.
Ping: If a ping is received <0x8c>, send a ping back <0x8c>.
The Message Frame:
The commands to the frame is an SDLC packet frame. The packet frame for a Data Gram is as follows.
<Dest><Src><Length><data[Length]><CCIT byte>
note: there must be at least one byte in the data section. A length of zero will indicate that 256 bytes are in the message frame.
Acknowledging a guaranteed message: Even if you are not decoding received messages, if a guaranteed delivery message is sent to a controller, the controller must acknowledge the message to keep the protocol running.
A guaranteed message will have the format: <0x77><0x80 | src><frame_count><len><data[len]><ccit> <0x7b><0x80 | src><frame_count><len><data[len]><ccit>
After the ccit is received, send an ACK (0xA5) to the DriveRack.
Addresses: 400 series DriveRack units can be assigned addresses 0-99. A device address 0 will indicate that this DriveRack can be an access point to control multiple DriveRack devices though the multidrop 485 bus that attaches 400 series processors into a single network. A 232 connection to the master provides access to the entire DriveRack network.
The control panel may use either address 0x7b or address 0x77. If you are attached to a network master (device address 0) use an address of 0x7b. If you are attached to a network slave (device address 1-99) use address 0x77 as the controllers address.
200 series DriveRacks are assigned the address 1.
The ccitt checksum:
The ccitt checksum has some advantages over a standard checksum.
Standard sum of bytes checksum. The string: <0x00><0x00><0x00> has a checksum of <0x00>. The string: <0x00><0x00> also has a checksum of <0x00>. The string: <0x00><0x01><0x02><0x03> has a checksum of <0x06>. The string <0x01><0x00><0x03><0x02> also has a checksum of <0x06>.
The ccitt checksum of the above 4 strings are: <0xd2>, <0x81>, <0x33>, <0x8d>.
Some common com faults such as dropped bytes or reversed bytes are effectively checked using the ccitt checksum where a sum of bytes would fail to detect a fault.
The 8 bit ccitt checksum used by the DriveRack series can be caculated with a table lookup and an exclusive OR logic function – so it is relatively easy to calculate.
Loading...
+ 2 hidden pages