0% found this document useful (0 votes)
6 views

QArm - Lab 0 - Lab Procedure

Uploaded by

brendsriverasy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

QArm - Lab 0 - Lab Procedure

Uploaded by

brendsriverasy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

QArm Lab Procedure

Basic I/O
Setup
1. It is recommended that you run this lab in teams of at least 2 students.

2. Move the QArm manipulator to the home position as outlined in the Concept Review, and turn ON
the unit using the power switch located on the rear side of the base. Once powered, the manipulator
should hold this position.

3. Launch MATLAB and browse to the working directory for Lab 0 – Basic I/O.

Position Mode
1. Open the Simulink model BasicIO_position_mode.slx (Figure 1). You will use the model to apply
position commands to the base, shoulder, elbow, and wrist joints, in addition to controlling the
gripper. The model also acquires and displays a variety of sensor feedback.

Figure 1: Simulink model that controls the QArm in position mode

2. Prior to running the model, open the model’s Configuration Parameters and verify that they are
configured as follows:

a. Solver type: Fixed-step

b. Solver: ode4 (Runge-Kutta)

c. Fixed-step size (fundamental sample time): 500 Hz

3. Ensure Default Cmd is set to [0 0 0 0] and the manual switch labelled MAIN is set to pass the vector
Default Cmd to the Hardware Plant P(s) subsystem.

1
4. Build and deploy the model using the Monitor & Tune action button under the Hardware Tab of
the model. This will automatically build a standalone application and deploy it. Once started, the
model will command 0 rad angles to all four of the manipulator’s joints.

5. Using the Default Cmd vector, command small positive angles (e.g. +0.5 rad) to each of the joints and
determine the positive convention/direction of the manipulator's joints.

6. Using Table 1 from the Concept Review section as a reference, you will now verify the maximum and
minimum joint angles that you can command the manipulator with the aid of the Measurements
scope. To avoid damaging the arm due to collisions with the working area, follow the steps below
carefully.

7. Ensure that the Base, Shoulder, Elbow and Wrist manual switches are all set to the 0 position. Toggle
the manual switch labelled MAIN away from Default Cmd to enable commanding each of the joints.
Change the Base constant from 0 to its maximum and minimum values. Set it back to 0.

8. Set the Elbow constant to it’s minimum value. Keeping this minimum, set the Shoulder to to its
maximum and minimum. Set the shoulder back to 0. Now set the elbow back to 0.

9. Set the Shoulder to -pi/4 rad. Now set the Elbow to its maximum and minimum. Once verified, set
the Elbow to 0, and then, set the Shoulder back to 0 as well.

10. Set the Wrist to its maximum and minimum. Now set it back to 0.

11. Using the Gripper constant, operate the gripper and verify that a command of 0 fully opens and a
command of 1 fully closes the gripper.

12. Using the Color constant, verify that you can command different colors to the base LED.

13. With the Base, Shoulder, Elbow and Wrist all at 0, toggle the four switches away from 0 towards the
square waveform. The QArm should move between 2 sample positions. Using the Measurements
scope verify that each joint follows the commanded setpoint. Sample results are shown in Figure 2.

Figure 2: Sample results showing the base and shoulder joints following commanded setpoints

2
14. Finally, monitor the output of the Sample Time block to verify that your model can maintain the fixed-
step size that you defined earlier for your model.

15. If no further experiment is required, toggle the manual switch labelled MAIN to move the
manipulator back to its home position.

16. Stop the model.

PWM Mode
1. Open the Simulink model BasicIO_pwm_mode.slx (Figure 3). You will use this model to experience
the PWM signal being sent to each joint.

Figure 3: Simulink model that controls the QArm in PWM mode

Caution: When a model is not running, the QArm stays in position mode, holding the last
position by default. When running a model in position mode, the arm goes to a desired
position. Terminating the model keeps the arm in position mode, maintaining the hold.

When operating the manipulator in PWM mode though, the arm will no longer hold firmly
in place. Ask your team mate or lab instructor to hold the arm in the home position when
you launch the PWM mode model.

2. Prior to running the model, open the model’s Configuration Parameters and verify that they are
configured as follows:

a. Solver type: Fixed-step

b. Solver: ode4 (Runge-Kutta)

c. Fixed-step size (fundamental sample time): 500 Hz

3. Discuss with your teammates and decide who will hold the QArm and who will work on the
computer. You may alternate after to ensure a hands-on experience.

4. Student A approaches the QArm and holds the gripper motor (under the gripper). Student B will then
build and deploy the model using the Monitor & Tune action button under the Hardware Tab.

5. Once the model is running, have Student B monitor the output of the “What is about to move?”
subsystem. By pressing the space key, Keyboard I/O block will send a signal that starts actuating
3
each joint sequentially. Student B should see ± 1 on the display for each joint, while Student A will
experience the QArm trying to move in the corresponding direction. Communicate with your team
mate to verify that the intended directions match. Also note the positive/negative directions and
take notes on them to ensure that they match those from the Position Mode lab.

6. Once all the joints have moved, release the space key and stop the model. The QArm will hold its
last position and Student A will be able to let go the manipulator. Trade places and try again if
required.

7. With all models stopped, hold the arm, turn OFF the manipulator using the power switch at the rear
end of the base unit and gently move it to the rest position as outlined in the Concept Review.

You might also like