Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

308-F Driver Board Communication Protocol v1.

Format definition of serial transmission:

The baud rate is 38400 bps, the data bit is 8 bits, the stop bit is 1 bit, and there is no check.

Communication format:

Machine Type (1 byte) +Machine Address (1 byte) +Command Word (1 byte) +Packet Length (1 byte) +Packet (X)

Bytes) +Checknum (1 bytes)

Machine type: 0x70;

Machine address: 0x00

Check Code = Machine Type ^ Machine Address ^ Command Word ^ Packet Length ^ Packet

Note: Return code = Command + A0

I. COMPREHENSIVE ORDER

Command 0x01 (read machine status) return code: 0XA1

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), check code (1Byte).

Return: Machine Type (1Byte), Machine Number (1Byte), Return Code (1Byte), Packet Length (1Byte), Error Code (1Byte),
Current Operation (1Byte), Drink Making Results (1Byte), Configuration Parameters (1Byte), Cup State (1Byte), Current
Water Temperature (1Byte), Maximum Water Temperature (1By) Te), minimum water temperature (1Byte), residual water
(2Byte), check code (1Byte).

1. Error code: see table below.

Error Error
Part type (4 code
fault
name digits (low 4
high) bits)
0 no
1 Wastewater barrel full
2 heating
other 0x10 3 Water tank pumping overtime
4 Moving nozzle overtime
5 Overtime of falling rod
6 Overtime of falling cover
Boiler 0 Temperature sensor failure
assembl 0x20 1 Flow Meter Fault
y 2 No Change in Opening Temperature of Heater
0 No cup
Cup 1 The cup was not removed.
0x30
dropper 2 Dropping overtime
3 Cup change timeout
0 Powder Fault
Grindin 1 Overtime operation of grinding bean motor
0x40
g coffee 2 brewer switch broken
3 Brewer timeout
Electro 0 Motorized door movement timeout
0x51
nic door 1 The door was not closed when it was locked.

1. Current operation action: 0-20.

numer denomination of dive numerical denomination of dive


ical value
value
0 Machine idle 1 Move nozzle in
2 Move the mouth out 3 Drop cup
4 Open the cup door 5 Close the cup door
6 Brewing Motor Upward Move 7 Brewing Motor Downward
8 grinding 9 Powder out
10 Bean coffee coming out 11 Instant powder 1comes out
12 Instant powder 2 comes out 13 Instant powder 3 comes out
14 Instant powder 4 comes out 15 Instant powder5 comes out
16 Clean powder1 17 Clean powder 2
18 Clean powder3 19 Clean powder 4
20 Clean brewer 21 Sugar out
22 Drop stick 23 Drop cover

3. The results of beverage preparation: 0, 1, 2, 3, 11, 12.

0: Wait idly

1:Drinks are being made.

2: Successful Manufacturing

3: Failure in manufacturing

11:Dropping the cup

12:Drop your glass and wait for a drink.

21:Cleaning in progress

22:Cleaning completed
23:Self-checking on boot-up

24:Start-up self-check completed

4. Configuration parameters: 0, 1.

Bit1 = 0: Electric door mode

Bit1 = 1: No Electric Door Mode

Bit0 = 0: Infrared mode

Bit0 = 1: Non-infrared mode

5. Machine status: (high to low)

7b X X X X X X X X 0b
有无杯 0:无杯; 1:有杯。
电动门开关 0:关闭; 1:打开。
大门开关 0:关闭; 1:打开。
0
0
0
0
0
1、 Current temp:0-150℃。
2、 Highest temp:0-150℃。
3、 Lowest temp:0-150℃。
9、water left:0-65535ml。

Example: Read the current state of the machine

Send: 70 000 01 00 71

Receiving: 70 00 A1 0A 00 00 00 00 00 60 64 5F 00 00 80

Command 0x02 (beverage making) return code: 0XA2

Note: 380-C and 380-D must first issue the drop instruction, which will be executed only after the drop is successful.

Send: machine type (1Byte), machine number (1Byte), command (1Byte), data packet length (1Byte), sugar content (1Byte),
{X material number (1Byte), X discharging time (1Byte), water output (2Byte), stirring duration (1Byte)}*5, configuration
parameter (1Byte) +flowing water number (2Byte), check code (1Byte) Te).

1. Sugar content: range 0-255, unit 0.1 seconds.

2. Material number: indicating the order of discharging, increasing in turn according to the array; range (0-4 or 9), 0 means
that this position does not need discharging, 1-5 instant soluble, 9 abrasive beans. (Note: When material number is not 1-5
or 9, it will be set to 0)

3. Discharge time: range 0-255, unit 0.1 seconds; material number 9, indicating the amount of grinding beans,
configuration of this parameter is invalid, need to manually adjust the limiting valve, control the amount of grinding beans.

4. Output: range 0-65535, unit ml.

5. Stirring duration: After the water is out, stirring duration (0-255, 0.1 seconds).

6. Configuration parameters: not yet in use.

7. Pipeline number: range 0-65535, units for the next, sent by the host computer, each command can not be repeated.

Block X Explain
1 Beverage first
2 Second Made Beverage
3 third Made Beverage
4 fourth Made Beverage
5 Fifth Made Beverage

Note: 1 data block = material number + discharging time + discharging water quantity + stirring continuation time.

The same drink can be repeated up to five times.

Return: machine type, machine number, return code, packet length, check code.

Example 1: Drink 1, powder 5S, water 50ml + drink 2, powder 5S, water 50ml

Send: 70 00 02 1D 00 01 32 00 32 00 02 32 00 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6C
Receive: 70 00 A2 00 D2

Example 2: grinding beans, effluent 100 + grinding beans, effluent 100 + material 1, effluent 5S, effluent 50ml + material 4,
effluent 10S, effluent 100ml

Send:70 00 02 1D 00 09 00 00 64 00 09 00 00 64 00 01 32 00 32 00 04 64 00 64 00 00 00 00 00 00 00 00 00 6A
Receive: 70 00 A2 00 D2

Command 0x03 (highest and lowest water temperature configuration) return code: 0XA3

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), maximum water
temperature (1Byte), minimum water temperature (1Byte), check code (1Byte).

1. Maximum water temperature: range (0-150, unit temperature).


2. Minimum water temperature: range (0-150, unit temperature).

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example: Set the highest water temperature of 100 C and the lowest water temperature of 95 C.

Send: 70 00 03 02 64 5F 4A
Receive: 70 00 A3 00 D3

Command 0x04 (with or without infrared mode) return code: 0xA4

Note: Machine defaults to infrared mode.

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), infrared mode (1Byte),
check code (1Byte).

1. Infrared mode: 0, 1.

0: Infrared mode.

1: No infrared mode.

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example 1: The machine is configured in non-infrared mode.

Send: 70 00 04 01 01 74
Receive: 70 00 A4 00 D4

Example 2: The machine is equipped with infrared mode.

Send: 70 00 04 01 00 75
Receive: 70 00 A4 00 D4

Command 0x05 (cleaning) return code: 0xA5

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), cleaning pipe number
(1Byte), check code (1Byte).

1. Cleaning Pipeline Number: Values 1, 2, 3, 4, 9, 10.

1: Clean the instant solution channel 1.

2: Clean instant channel 2.

3: Clean instant channel 3.


4: Clean the instant channel 4.

9: Clean the roasted bean coffee channel.

10:Clean all passages.

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example 1: Clean instant channel 1.

Send: 70 00 05 01 01 75
Receive: 70 00 A5 00 D5

Example 2: Clean all channels.

Send: 70 00 05 01 0A 7E
Receive: 70 00 A5 00 D5

Command 0x06 (Clear run result) return code: 0XA6

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), check code (1Byte).

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example: Clear up operation results

Send: 70 00 06 00 76
Receive: 70 00 A6 00 D6

Command 0x07 (read machine version number) return code: 0XA7

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), check code (1Byte).

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), version number
(nByte), check code (1Byte).

Note: The version number is Ascii code.

Example: Clear up operation results

Send: 70 00 07 00 77
Receiving: 70 00 A7 18 79 69 6C 65 5F 33 30 38 44 5F 76 73 31 2E 30 5F 32 30 31 37 30 34 32 39 D7

Command 0x08 (restart the lower computer) return code is: 0XA8

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), check code (1Byte).
Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example: Clear up operation results

Send: 70 00 08 00 78
Receive: 70 00 A8 00 D8

Command 0x09 (with or without electric door mode) return code: 0xA9

Note: Machine defaults to infrared mode.

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), with or without electric
gate mode (1Byte), check code (1Byte).

1. With or without electric door mode: value 0, 1.

0: Electric door mode.

1: No electric door mode.

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example 1: The machine is equipped with no electric door mode.

Send:70 00 09 01 01 79
Receive: 70 00 A9 00 D9

Example 2: The machine is equipped with electric door mode.

Send: 70 00 09 01 00 78

Receive: 70 00 A9 00 D9

Command 0x0A (self-detection) return code: 0XAA

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), check code (1Byte).

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example: Self-test

Send: 70 00 0A 00 7A

Receive: 70 00 AA 00 DA
Part Order

Command 0X11 (effluent) return code: 0xB1

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), channel (1Byte) +water
output (2Byte) +check code (1Byte).

1. Channel: Values of 1, 2, 3, 4 correspond to specific pipeline effluent, other values are invalid.

2. Output: range 0-65535, unit ml.

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example: The outlet water of channel 3 is 100ml.

Send:70 00 11 03 03 00 64 05

Receive: 70 00 B1 00 C1

Command 0x12 (drop cup) return code: 0xB2

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), check code (1Byte).

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example: Drop the glass.

Send: 70 00 12 00 62
Receive: 70 00 B2 00 C2

Command 0x13 (drop bar) return code: 0xB3

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), check code (1Byte).

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example: Drop the glass.

Send: 70 00 13 00 63

Receive: 70 00 B3 00 C3

Command 0x14 (Move Mouth) Return Code: 0xB4

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), nozzle position (1Byte),
check code (1Byte).
2. Moving position: 1 and 2.

1: Moving mouth built-in.

2: Move the mouth out.

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example 1: Moving mouth outside.

Send: 70 00 14 01 01 64

Receive: 70 00 B4 00 C4

Example 2: Moving mouth built-in.

Send: 70 00 14 01 02 67

Receive: 70 00 B4 00 C4

Command 0x15 (Brewer) return code: 0xB5

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), bubble location (1Byte),
check code (1Byte).

1. brewer position: value 1, 2.

1:brewer down.

2: The brewer is mounted.

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example 1: Put down the bubble maker.

Send: 70 00 15 01 01 65
Receive: 70 00 B5 00 C5

Example 2: The brewer is mounted.

Send: 70 00 15 01 02 66
Receive: 70 00 B5 00 C5

Command 0x16 (grinding beans) return code: 0xB6

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), check code (1Byte).
Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example: Grinding beans.

Send: 70 00 16 00 66

Receive: 70 00 B3 00 C3

Command 0x17 (powder) return code: 0xB7

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), check code (1Byte).

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example: Powder production.

Send: 70 00 17 00 67

Receive: 70 00 B7 00 C7

Command 0x18 (electromagnetic lock) return code: 0xB8

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), time to open
electromagnetic lock (1Byte), check code (1Byte).

1. Opening time of electromagnetic lock: 0-255 (0.1 seconds).

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example 1: Open the electromagnetic lock for 1 second.

Send: 70 00 18 01 0A 63

Receive: 70 00 B8 00 C8

Command 0x19 (blank) return code: 0xB9

Send: machine type (1Byte), machine number (1Byte), command (1Byte), packet length (1Byte), check code (1Byte).

Return: machine type (1Byte), machine number (1Byte), return code (1Byte), packet length (1Byte), check code (1Byte).

Example: Cover falling.

Send: 70 00 19 00 69

Receive: 70 00 B9 00 C9

3. Construction design process


308-B Design Process

Note: Read the state first, then start the command; it is recommended to read the state of the machine as often as
possible. Only when the return value of the machine status command is normal, idle and not in the "making beverage"
state can other commands be executed.

Turn on power:

1. Send command 0x01 (read machine status).

2. Send command 0x03 (configure the highest and lowest water temperature).

3. Send the command 0x01 (read machine status) to see if the highest and lowest water temperatures are configuration
values.

Making drinks:

1. Send command 0x01 (read machine status).

2. Send the command 0x07, (Clear the beverage production results).

3. Send command 0x01 (read machine status).

4. Send the command 0x02 (beverage making).

5. Send command 0x01 (read machine status).

6. If the result of beverage making is "successful in making", the beverage making is successful and the corresponding
successful treatment is done.

If the result of beverage preparation is "Failure in making beverages"

You might also like