Example Programs

The example programs that follow are only to illustrate some features of the EasyLab language coupled to the command and variable terms in this glossary. They are not intended to be an exhaustive treatment of all of the commands available in the EasyLab language.

They do however give some insight into how the EasyLab commands can be creatively linked to complete a lab objective. This is the kind of programming that is done in the Instrumental Analysis laboratory.


 

THREEVOLS

This program fills a single 25 mm. test tube with one ml. of solution, weighs it, and then prints out and saves to a file on the disk the weight of the test tube, the test tube plus solution, and the solution. It does this three times. It illustrates how to write to a disk file, and how to handle the weights that are obtained from the analytical balance.

The commands needed to execute the program are shown in bold. They alone should be entered into the program. The comments preceded by the"-" character and set in italics are explanatory remarks. They need not be entered.

- Initialize the robot:

INITIALIZE.SYSTEM

DISPLAY OFF

- Open a file to write the data into:

OPEN "volwts.prn" FOR APPEND AS #1

- Get a test tube from RACK.3 and put it into the balance:

RACK.3.INDEX = 1

GET.FROM.RACK.3

PUT.INTO.BALANCE

- Get the tare weight of the test tube and print it to the screen just to make sure it has been read properly:

OBTAIN.WEIGHT

TUBE.WEIGHT = WEIGHT.VALUE

PRINT TUBE.WEIGHT

GET.FROM.BALANCE

- Set up the loop to add one ml. of solution from syringe reservoir A to the test tube, three times:

DO THREE TIMES

MLS.1.VOLUME.A = 1

NOZZLE.INDEX =1

DILUTE

- Put the filled test tube in the balance and get its weight:

PUT.INTO.BALANCE

OBTAIN.WEIGHT

GET.FROM.BALANCE

- Turn on the printer and print out the gross and net weights:

PRINTER.ON

PRINT WEIGHT.VALUE

PRINT TUBE.WEIGHT

READOUT = WEIGHT.VALUE - TUBE.WEIGHT

PRINT READOUT

PROMPT

PRINTER.OFF

- Print out the weights to the disk file:

PRINT #1, WEIGHT.VALUE, TUBE.WEIGHT, READOUT TUBE.WEIGHT = WEIGHT.VALUE

ENDDO

- Close the file, put the test tube back into RACK.3, and park the hand. It's over.

CLOSE 1

PUT.INTO.RACK.3

PARK.HAND

 


SPEC1

This program takes each of the 40 test tubes in RACK.3 and puts them into the Sequoia-Turner colorimeter one at a time. When one of them is in the cell compartment, and the "top hat" cover on, a five second wait is done to allow the reading to stabilize. The test tube transmittance is measured and the tube put back into RACK.3. The test tube number and the transmittance are printed to the printer.

This program shows how to use an "if/then" statement to determine how many times an action is repeated. It also shows how to use the colorimeter. The commands needed to execute the program are shown in bold. They alone should be entered into the program. The comments preceded by the "-" character and set in italics are explanatory remarks. They need not be entered.

- Turn off the display and format the printer image:

DISPLAY OFF

PFORMAT ## ####.#

PRINTER ON

- Set the RACK.3 index to point to the first test tube:

RACK.3.INDEX = 1

- Set up a return address ("line number") of "10":

10 GET.FROM.RACK.3

PUT.INTO.SPEC

- Set up a timer to wait for 5 seconds before anything else is done (a "tight loop count"):

TIMER(1) = 5

WAIT FOR TIMER(1)

- Print the reading in spec.out to the printer, in columns:

PRINTC RACK.3.INDEX, SPEC.OUT

- Get the testube out of the colorimeter and put it back into RACK.3 in the same position it came from. Note that the tube will not be rotated:

GET.FROM.SPEC

PUT.INTO.RACK.3

- Increment the rack index up one test tube location, and test to see if the last test tube measured was the 40th test tube or not. If it was, then don't do any more. If it wasn't, then repeat the measurement:

RACK.3.INDEX = RACK.3.INDEX + 1

IF RACK.3.INDEX <= 40 THEN GOTO 10

Finish up by turning off the printer and parking the hand:

PRINTER.OFF

PARKER.HAND

END


 

Disclaimer