# Calcomp 9500  Binary format 23
#
# Originally build and tested by 
#  Terry Baker and David Gerdes  USA-CERL  1992

setup
{
    digname = Calcomp
    description = Calcomp digitizer, binary format 23
    buttonoffset = 1
    buttonstart = 0
    buttons = 16
    baud = 9600
    units_per_inch = 1000
    stop_bits = 1
    data_bits = 8
    parity  = none
}

startrun
{
    send = \027%^23\013
    send = \027%R\013
}
startpoint
{
    send = \027%^23\013
    send = \027%P\013
}
startquery
{
    send = \027%^23\013
    send = \027%R\013
    send = \027%Q!\013
}

query
{
    send = !\013
}

stop
{
    send = \027%H\013
}

format 
{
    byte1 = 1   p  b3  b2  b1  b0 x15 x14
    byte2 = 0 x13 x12 x11 x10  x9  x8  x7
    byte3 = 0  x6  x5  x4  x3  x2  x1  x0
    byte4 = 0   ?   ?   ? x16 y16 y15 y14
    byte5 = 0 y13 y12 y11 y10  y9  y8  y7
    byte6 = 0  y6  y5  y4  y3  y2  y1  y0
}
