Dobbytron Protocol Information
Introduction
The "protocol" is the rules for how the Dobbytron communicates with a weaving software application running in a personal computer. This information will be of interest to software developers who wish to write a loom driver into their software.
If you are a weaver, and your sole interest in the Dobbytron is to use it for weaving, you may safely ignore the informaton here.
Protocol Overview
The Dobbytron uses a protocol which is a superset of the Macomber protocol. Because it fully supports the Macomber protocol, loom drivers written to the Macomber spec will work successfully with the Dobbytron (but will not have access to the full feature set of the Dobbytron).
The Dobbytron accepts additional commands which provide extra functionality. A mechanism is provided whereby a loom driver can determine whether it is connected to an original Macomber box or to a Dobbytron.
Macomber Protocol
The Macomber protocol consists of messages passed between the loom and the application software running in a personal computer. All messages have this general format:
The serial communications use 1200 baud, no parity, 8 data bits, and 1 stop bit.
Macomber Protocol Opcodes and Data
In the following table, names in blue are messages that are sent from the personal computer to the loom, while those in green are sent from the loom to the personal computer.
| Name | Opcode | Optional Data |
| Solenoids | # | 8 bytes of data. Each byte encodes
four bits of lift data, for four harnesses. The first byte encodes
harnesses 29-32 and the last 1-4. Send zeroes for unused harnesses. Encoding is
hexadecimal. The LSB encodes the lowest harness number within that group.
Example: 1010 0110 0111 1111 1100 0001 Encoded, this is the character string "00A67FC1", which is sent as the data portion of this message. |
| Enable | E | Causes the harnesses to lift (air dobby) or solenoids to engage (single pedal). |
| Disable | D | Causes the harnesses to drop (air dobby) or solenoids to disengage (single pedal). |
| Echo On | BEL (0x07, or control-G) | Causes subsequent characters sent to the Dobbytron to be echoed back to the personal computer. The echo starts with the next character following the carriage return character of this message. |
| Echo Off | NAK (0x15, or control-V) | Turns off echoing. This message is echoed in its entirety, up to and including the carriage return character. Nothing after this message is echoed. |
| Test | T | Solenoid test. The solenoids are engaged, one at a time, once per second, starting with #1, until another command is received. |
| Information Report | ACK (0x06) | Hexadecimal encoding of four bits, which are:
The terminology 'lower' and 'upper' refers to the position of the treadle in the single treadle loom. There are two switches. The lower switch detects the weaver pressing the pedal all the way down (forming the shed), while the upper switch detects the treadle being released. The coding of 0 in the information report means the treadle is in that position (that is, 'zero' means 'closed' which means the switch is detecting the treadle). On the air dobby, some looms have two switches, but most have just one, in which case the 'lower' switch isn't used. If there are two switches, they have the same meaning as for the single treadle, except the terms 'upper' and 'lower' are not meaningful, as the switch are on the beater which operates in a horizontal fashion. This message is sent when either of these conditions are met: 1. On a single treadle loom, when the lower switch has closed and then opened, and the upper switch subsequently closes. 2. On an air dobby, when the (so-called) upper switch opens and then closes. |
| Information Request | ? | Causes the loom to send an immediate Information Report message (see above). |
Notes on the Macomber Emulation:
1. The Dobbytron regulates the power sent to the solenoids such that overheating
of the solenoids is not a problem. Thus, there is no solenoid timeout built into the
Dobbytron, so the "Timeout" indication is never seen (see "Information Report" above).
2. If the Dobbytron sees an ESC (Escape) character, that is, the start of a message, but it does not see a CR (Carriage Return) character within three seconds, it clears its input buffer, flashes the red LED on the front panel, either drops all the harnesses (air dobby) or disengages the solenoids (single pedal), and resumes waiting for a message. The original Macomber box waits forever for a message to complete.
Dobbytron Extra Opcodes and Data
| Name | Opcode | Optional Data | |||||||||
| Back | p | A message the Dobbytron sends
to the personal computer, triggered by the user pressing the Back
button on the Dobbytron.
The data consists of the single character '-' (minus sign). The application should disable the solenoids, move backwards one pick, send new lift information, and re-enable the solenoids. |
|||||||||
| System Info | q | Causes the Dobbytron to send an informational message
to the personal computer.
The data consists of a single character (the secondary opcode) which determines what information is sent to the personal computer: Secondary Opcodes:
|
|||||||||
| System Info | q | An informational message the Dobbytron sends
to the personal computer, triggered by sending a
System Info message to the Dobbytron.
The data starts with a single character (the secondary opcode) followed by a string: Secondary Opcodes (Op2) and Strings:
|
|||||||||
| Read Solenoids | b | Causes the dobbytron to read the voltage currently applied to each solenoid and decide, solenoid by solenoid, if it's on or off. The 32-bit result is returned to the personal computer (see next message, below). This only works in a Dobbytron with extra hardware for reading the solenoid voltages. It's used at Dobbytron in our automated tester. Absent the special hardware, the results are unpredictable. | |||||||||
| Solenoid Settings | b | An opcode of 'b', followed by 8 bytes of data, which is the current setting of the solenoids (see previous message, above). The encoding is the same as the encoding used to transmit solenoid data to the Dobbytron (see the '#' opcode). |
