User manual

LabelTest('Time')
for count in range(numCycles):
startTime = time.time()
NumberTest(pause)
elapsedTime = time.time()-startTime
elapsedTime -= pause*10
print " elapsed time (sec): %.3f" % elapsedTime
########################################################################
#
# Horizontal Graph Testing Routines
#
def ClearHBar(row,startCol):
#remove all elements on horizontal bar
GotoXY(row,startCol)
for col in range(12):
SendByte(0x20,True)
def HBar(length,row):
#creates a horizontal bar on the specified row
#expects length of 1 (min) to 80 (max)
#Must load horizontal bar symbols prior to calling
fullChars = length / 5
bars = length % 5
col = 3
ClearHBar(row,col)
for count in range(fullChars):
ShowBars(row,col,5)
col += 1
if bars>0:
ShowBars(row,col,bars)
def HBarTest(numCycles=8):
LoadSymbolBlock(horizontalBars)
LabelTest('Horz')
for count in range(numCycles):
for row in range(4):
length = random.randint(1,60)
GotoXY(row,0)
ShowMessage("%2d" % length)
HBar(length,row)
time.sleep(1)
def DecrementHBar(row,startCol,length):
#reduce the number of horizontal bars by one
length -= 1
fullChars = length / 5
bars = length % 5
col = startCol + fullChars
ShowBars(row,col,bars)
def IncrementHBar(row,startCol,length):
#increase the number of horizontal bars by one
fullChars = length / 5
bars = length % 5
col = startCol + fullChars
ShowBars(row,col,bars+1)
def AnimatedHBar(row,startCol,newLength,oldLength=0):
diff = newLength - oldLength
for count in range(abs(diff)):