### RailDriver OCU Data Report | Main Page

General Information

VID | 05f3h
PID | 0161h or 353
Consumer Usage Page | 1
Usage Page | 000Ch or 12

RailDriver OCU Input Report

The following types of input reports are available; General Incoming Data.

Figure 1: OCU reference.

Endpoint: 1, consumer usage page

Report Length: 18 bytes.

1. General incoming data

Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9 | Byte 10 | Byte 11 | Byte 12 | Byte 13 | Byte 14 | Byte 15 | Bytes 16-17 | Byte 18
Constant | Right Knob MSB | Right Knob LSB | Left Knob MSB | Left Knob LSB | Right Joystick X MSB | Right Joystick X LSB | Right Joystick Y MSB | Right Joystick Y LSB | Left Joystick X MSB | Left Joystick X LSB | Left Joystick Y MSB | Left Joystick Y LSB | Digital Input | Digital Input | Reserved | Unit ID (0-255)
0 | A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 | D1 | D2 | value | <data>

A1: Right knob MSB or high order byte. Combine with A2 to get Right Knob value=A1*256+A2.
A2: Right knob LSB or low order byte. Combine with A1 to get Right Knob value=A1*256+A2.
A3: Left knob MSB or high order byte. Combine with A4 to get Left Knob value=A3*256+A4.
A4: Left knob LSB or low order byte. Combine with A3 to get Left Knob value=A3*256+A4.
A5: Right Joystick X MSB or high order byte. Combine with A6 to get Right Joystick X value=A5*256+A6.
A6: Right Joystick X LSB or low order byte. Combine with A5 to get Right Joystick X value=A5*256+A6.
A7: Right Joystick Y MSB or high order byte. Combine with A8 to get Right Joystick Y value=A7*256+A8.
A8: Right Joystick Y LSB or low order byte. Combine with A7 to get Right Joystick Y value=A7*256+A8.
A9: Left Joystkck X MSB or high order byte. Combine with A10 to get Left Joystick X value=A9*256+A10.
A10: Left Joystick X LSB or low order byte. Combine with A9 to get Left Joystick X value=A9*256+A10.
A11: Left Joystkck Y MSB or high order byte. Combine with A12 to get Left Joystick Y value=A11*256+A12.
A12: Left Joystick Y LSB or low order byte. Combine with A11 to get Left Joystick Y value=A11*256+A12.
D1: Bit 1=SW4 up, bit 2=SW4 down, bit 3=SW3 up, bit 4=SW3 down, bit 5=SW2 up, bit 6=SW2 down, bit 7=SW1 up, bit 8=SW1 down.
D2: Bit 1=Tilt Sensor upright, bit 2=Right Black Button, bit 3=Green Button, bit 4=Left Black Button, bit 5=SW6 up, bit 6=SW6 down, bit 7=SW5 up, bit 8=SW5 down.

RailDriver OCU Output Reports

The following types of output reports are available; Set LEDs 1, Set LEDs 2, Clear LCD, Initialize LCD, Write Characters to LCD.

Endpoint: 2, vendor defined usage page

Report Length: 9 bytes.

1. Set LEDs 1 - Turn on or off LEDs.

Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9
Constant | LED Command | Group 1 | Group 2 | Group 3 | Group 4 | Group 5 | Group 6 | LED Control
0 | 93h | G1 | G2 | G3 | G4 | G5 | G6 | 11h

G1: For all bits 0=ON, 1=OFF. Bits 1-4=na, bit 5=Ind. REL red, bit 6=Ind. REL yellow, bit 7=LOW red, bit 8=LOW yellow.
G2: For all bits 0=ON, 1=OFF. Bit 1=Ind. MED red, bit 2= Ind. MED yellow, bit 3=Ind. FULL red, bit 4=Ind. FULL yellow, bit 5=EMERG red, bit 6=EMERG yellow, bits 7-8=na.
G3: For all bits 0=ON, 1=OFF. Bit 1=STOP red, bit 2= STOP yellow, bit 3=COAST B/H1 red, bit 4=COAST B/H1 yellow, bit 5=COAST/H2 red, bit 6=COAST/H2 yellow, bit 7=COUPLE/H3 red, bit 8=COUPLE/H3 yellow.
G4: For all bits 0=ON, 1=OFF. Bit 1=4 red, bit 2= 4 yellow, bit 3=7 red, bit 4=7 yellow, bit 5=10 red, bit 6=10 yellow, bit 7=15 red, bit 8=15 yellow.
G5: For all bits 0=ON, 1=OFF. Bit 1=Auto REL yellow, bit 2= Auto REL red, bit 3=MIN yellow, bit 4=MIN red, bit 5=LIGHT yellow, bit 6=LIGHT red, bit 7=Auto MED yellow, bit 8=Auto MED red.
G6: For all bits 0=ON, 1=OFF. Bit 1=Auto FULL yellow, bit 2= Auto FULL red, bit 3=CHARGE yellow, bit 4=CHARGE red, bit 5=HEADLIGHT, bit 6=na, bit 7=REV red, bit 8=REV yellow.

2. Set LEDs 2 - Turn on or off LEDs.

Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9
Constant | LED Command | Group 7 | Constant | Constant | Constant | Constant | Constant | LED Control
0 | 93h | G7 | 0 | 0 | 0 | 0 | 0 | 22h

G7: For all bits 0=ON, 1=OFF. Bit 1=N red, bit 2= N yellow, bit 3=FWD red, bit 4=FWD yellow, bit 5=hidden blue LED in the Independent section, bit 6=hidden blue LED in the Auto section, bit 7=hidden blue LED near REV, bit 8=hidden blue LED near HEADLIGHT.

3. Clear LCD - Clears the LCD screen.

Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9
Constant | Clear LCD Command | Constant | Constant | Constant | Constant | Constant | Constant | Constant
0 | 90h | 0 | 0 | 0 | 0 | 0 | 0 | 0

4. Initialize LCD - Writes RailDriver OCU to the LCD screen.

Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9
Constant | Initialize LCD Command | Constant | Constant | Constant | Constant | Constant | Constant | Constant
0 | 97h | 0 | 0 | 0 | 0 | 0 | 0 | 0

5. Write Characters to LCD - Write characters to the LCD screen.

Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9
Constant | Write to LCD Command | Start Character Pos | 1st Character | 2nd Character | 3rd Character | 4th Character | 5th Character | 6th Character
0 | LCD | Pos | Val | Val | Val | Val | Val | Val

LCD: The command is either d1h to send 1 character, d2h to send to characters, d3h to send 3 characters, d4h to send 4 characters, d5h to send 5 characters, d6h to send 6 characters.
Pos: Position at which to begin writing the 6 characters. Line 1 starts at Pos=0. Line 2 starts at Pos=64.
Val: The ASCII value for the desired character. Special characters are a1h-ffh and can be found in WH1602B-Y-JCS.pdf, page 10, Table 2.

Example: To write completely on both lines send the following reports, values in hex.

0, d6, 00, 41, 42, 43, 44, 45, 46 //write A, B, C, D, E, F starting at Pos=00
0, d6, 06, 47, 48, 49, 4A, 4B, 4C //write G, H, I, J, K, L starting at Pos=06
0, d4, 0C, 4D, 4E, 4F, 50 // writeM, N, O, P starting at Pos=0C (12)
0, d6, 40, 51, 52, 53, 54, 55, 56 //write Q, R, S, T, U, V starting at Pos=40, start of line 2
0, d6, 46, 57, 58, 59, 5A, 5B, 5C //write W, X, Y, Z, 0, 1 starting at Pos=46
0, d4, 4C, 32, 33, 34, 35 //write 2, 3, 4, 5 starting at Pos=4C