Skip to content

Command 16 Temp Basal

Sebastian Holmqvist edited this page Apr 4, 2018 · 42 revisions

The 0x16 command is a follow-on command for the Command 0x1A Table 1 case to set a fixed or percentage temporary basal rate.

16 LL SS 00 AAAA BBBBBBBB AAAA BBBBBBBB CCCC 
  • LL (1 byte): Length of command.
  • SS (1 byte): Unknown. 3c or 7c.
  • AAAA (2 bytes): Total insulin to deliver for complete period. Example: 1.10U/H for 1.5 hours = 1.10*3*100 = 330 = 0x014a
  • BBBBBBBB (4 bytes): Delay between pulses, expressed in counts of a 100kHz timer. Example: 3.0U/hr = 60 pulses per hour = 60s between pulses = 6000000 counts = 0x5b8d80
  • CCCC (2 bytes): Checksum?

Temp basal subcommand 0x16 looks quite consistent with a numbering, corresponding with for what is seems the hours and a specific following byte c, 18, a4, 30, 48

The 16 command's data is 8 bytes followed by 6-byte chunks (just one chunk in this case). Each chunk is a word followed by a dword. In this case $0bb8 (= decimal 3000) followed by $000927c0 (decimal 600000). Note the nice round decimal values in the command. I've found the code that parses the chunks and puts them into tables Tab9 and Tab11 (presumably for processing elsewhere).

It could be the time when the beep sounds when the temp basal is done?

       16 0e 3c 00 AAAA 00c4 2f
0,5hr: 16 0e 3c 00 008c 00c4 2f : 008c = 1.40U
1,0hr: 16 0e 3c 00 0118 00c4 2f : 0118 = 2.80U
1,5hr: 16 0e 3c 00 01a4 00c4 2f : 01A4 = 4.20U 
2,0hr: 16 0e 3c 00 0230 00c4 2f : 0230 = 4.6U
3,0hr: 16 0e 3c 00 0348 00c4 2f : 0348 = 8.4U

An other example : +5% for 30 minutes / (basal = 0.55)

1a 0e 154b8080 01 0083 01 3840 0005 0005 16 0e 00 0000 3901e1db43003901e1db43
CRC16=01d4/01d4#2 PDM 1a(14)->Insulin Schedule:Nonce:154b8080(-1) Type:01 Temp Basal 
#2 PDM 16(14)->Submessage not parsed :16(14) 0000 0039 01e1 db 43 0039 01e1 db 43 : 0039=0.57U -> 0.55+5%

1d2802469000002fbbff CRC16=03fc/03fc
#3 POD 1d(10)->Resp Status:Temp Basal running PODState:Normal running Insulin(total):58.25u PODMsg#2 Insulin not delivered:0.00u Alert:Normal POD Active for 2 days 2 hours 54 minutes 

Examples

30U/H for 0.5 hrs:

16 LL SS 00 AAAA BBBBBBBB AAAA BBBBBBBB CCCC 
16 0e 7c 00 0bb8 000927c0 0bb8 000927c0 001e
    0bb8 = 3000 = 30*1*100
    000927c0 = 600,000

0.05U/H for 0.5 hrs:

16 LL SS 00 AAAA BBBBBBBB AAAA BBBBBBBB CCCC 
16 0e 7c 00 0005 15752a00 0005 15752a00 000b 
16 0e 7c 00 0005 15752a00 0005 15752a00 819e 
16 0e 7c 00 0005 15752a00 0005 15752a00 828e
    0005 = 5 = 0.05*1*100
    15752a00 = 360,000,000

1.0U/H for 0.5 hours:

16 LL SS 00 AAAA BBBBBBBB AAAA BBBBBBBB CCCC 
16 0e 3c 00 0064 0112a880 0064 0112a880 83e7
    0064 = 100 = 1.0*1*100
    0112a880 = 18,000,000

1.10U/H for 1.5 hours:

16 LL SS 00 AAAA BBBBBBBB AAAA BBBBBBBB CCCC 
16 0e 7c 00 014a 00f9b074 014a 00f9b074 0175 
16 0e 7c 00 014a 00f9b074 014a 00f9b074 0096
    014a = 330 = 1.10*3*100
    00f9b074 = 16,363,636

Truncated examples (missing the CON message)

0.5H examples:

16 0e SS 00 AAAA BBBBBB
16 0e 3c 00 008c 00c42f (1,40U/H)  008c = 140 = 1.4*1*100
16 0e 3c 00 0046 01885e (0.7U/H)   0046 = 70 = 0.7*1*100
16 0e 3c 00 0046 01885e (0.7U/H new pod)
16 0e 3c 00 0064 0112a8 (1.0U/H)   0064 = 100 = 1.0*1*100

1H examples:

16 0e 3c 00 0118 00c42f (1,40U/H)  0118 = 280 = 1.4*2*100
16 0e 3c 00 00c8 0112a8 (1,00U/H)  00c8 = 200 = 1.0*2*100

1.5H examples:

16 0e 3c 00 01a4 00c42f (1,40U/H)  01a4 = 420 = 1.4*3*100
16 0e 3c 00 01c2 00b71b (1,50U/H)  01c2 = 450 = 1.5*3*100 

2H example:

16 0e 3c 00 0230 00c42f (1,40U/H)  0200 = 560 = 1.4*4*100

2.5H example:

16 0e 3c 00 02bc 00c42f (1,40U/H)  02bc = 700 = 1.4*5*100

3H examples:

16 0e 3c 00 0348 00c42f (1,40U/H)  0348 = 840 = 1.4*6*100
16 0e 3c 00 0348 00c42f (1,40U/H new pod)

3.5H example:

16 0e 3c 00 03d4 00c42f (1,40U/H)  03d4 = 980 = 1.4*7*100

4H example:

16 0e 3c 00 0460 00c42f (1,40U/H)  0460 = 1120 = 1.4*8*100
Clone this wiki locally