ARMBASIC Lab Automation Example

I feel there is no better way to understand a particular concept than using an example. Now we will program a lab automation device in ARMBASIC to accomplish the picking up of a vile and emptying it into a test tube. The first thing we need to do is to define a variable to hold the stepper count for each axis used by the robot. The stepper count is the number of motor steps needed by a given axis to reach a given point. This number is taken from the home position set using the @RESET command and configured as follows:

  • A1 will be used for the pick-up point of axis j
  • B1 will be used for the place point of axis i
  • C1 will be used for the axis I approach to A
  • D1 will be used for the axis I approach to B

Let’s say we have a robot with six axes where the sixth axis is the gripper. This would give us four points with five axes which will give us twenty variables. These twenty variables must have a stepper count defined for each one. The lab automation device has now learned every single point, including the point relating to C, as this was defined as the home position. You are probably wondering if the @READ command will specify five axes or six. The answer is five because axis six will keep the same degree of closure in every move. Due to this we will have to save only sixteen variables as opposed to twenty, with fifteen used for the locations and one relating to the steps for the gripper closure.

Gripper Robot

Now it’s time to execute the program and see how it works. But first things first, the robot must drop the vile picked up during the teach phase and return to its ready state. The automated machine can now begin the pick and place functional sequence, controlled by the ARMBASIC commands. Additionally, we must configure the stepper count variation between the open gripper and the closed gripper.

The most efficient way to enter these variables into the commanding computer is to manually move the robot into the desired positions and then use the @SET command in conjunction with the @READ command. This is referred to as the manual teach phase, discussed in depth on other articles on this website. This approach greatly reduces the number of variables needed to save the different positions of the axes which leads to less data processing over all. It will also cut down the amount of arithmetic required when using the @STEP commands. The approach point for C which is the position at which the gripper’s jaws are wide open, is a good point to set as the home reference. This point will be the starting and end position for the execution of each command in our program. Using this language the operator uses keyboard input to position the robot at the home reference point which has the jaw open at its widest point, perfect for picking up an object.


From the programming example the reader can probably see that some of the statements are identical to one another. Regardless of statement duplicity, as soon as the robot teach phase has finished the robot will go immediately into action. To make this software more efficient, we must:

  • Have program prompts that interact with the user, requesting they enter points during the teach phase.
  • Include a pause between manually teaching the robot and then executing the code. This will make the robot wait until the operator is ready to execute the program.
  • Insert a function which allows the operator to control how many times the program must execute.

To add these features we could use the conventional structure of the BASIC programming language. It is clear that this sub-routine does nothing except insert a variable to track time. The amount of time that had actually passed would be shown by the internal clock of the computer but it may also be shown by the program itself, using an execution second counter. Programming an external device robot or lab automated tool to turn on and off, can be done using the BASIC programming structure. These two languages are based on each other and therefor integrate with each other seamlessly.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>