In today's world of electronic measurement processes, it is often desirable to automate the process with a computer. Most electronic balances have an RS232 serial port which is easily connected to a computer. The "C" programming language with its modularity is ideally suited to this task. I will show how the balance input/output commands can be grouped into three basic functions. These functions can then be used to develop a sophisticated control program to setup the balance, take weighings and perform analysis of the data and store the data to disk in a retrievable format. This paper will cover the details of breaking the problem down into simple distinct functions, and then putting the functions to work. This will be accomplished by writing a demonstration program. The program will be used to setup the balance, take a series of weighings, calculate the cost of the material weighed and store the results into a file which can be read by most spread sheets.
展开▼