beautypg.com

Measurement Computing TempBook rev.3.0 User Manual

Page 121

background image

TempBook User’s Manual

Enhanced API Programming Models (TempBook) 10-25

Calculate and write out the voltage value:

voltage! = buf%(i& * channels& + j&) * 5! / 32768!
Print #2, Format$(voltage!, ".000") + termChar$;
Next j&
Next i&

Print something so the program does not appear to be locked:

Print ".";
Loop While (byteCount& > 0) ' A byteCount of 0 indicates end-of-file
' Close the input and output files
Close 1
Close 2
Print "complete."

After program execution: data has been collected directly to disk in a binary file format, the TempBook
device closed, the binary file was then opened, the data unpacked, and then written to a text file.