3. Open the Simulink model called Hexapod_Joint_Control.mdl, shown in Figure 2.3.
4. Run setup_hexapod.m in MATLAB (note: script is ran automatically when Simulink model is ran).
5. Click on QUARC | Build to generate the controller.
6. Run the QUARC controller by going to QUARC | Start.
7. Change the values of the Slider Gain blocks in in the Figure 2.4b gradually to begin commanding a sine wave
to the linear actuators.
Caution: PRESS DOWN on the RED BUTTON of the E-Stop switch to stop the Hexapod.
This
deactivates the amplifier and cuts off the DC motor power.
8. Open the
Joint Position Tracking
and
Joint Speed Tracking
scopes, located in the
Performance Tracking
sub-
system, to examine the position or speed response of the Hexapod. The yellow trace is the measured posi-
tion/speed and the purple plot is the desired position/speed. To change which joint position/speed is being
displayed, set the
Joint Index
block between 1 and 6 accordingly. See Section 2.8.5 for more information.
9. Before stopping the controller, it is recommended to set position commands back to the home reference. That
is, set the Slider Gain blocks in the
Periodic Wave Commands
subsystem in Figure 2.4b all to 0 and the Constant
block in Figure 2.4a to 140 mm to bring the stage back to HOME position and ready for the next experimental
run.
Note:
The Constant and Slider Gain block values for the setpoint commands are automatically reset to the
home reference
automatically
when the controller is stopped. However, because this is performed after the
controller is stopped, it does not physically move the platform back to HOME. This must be done manually as
the controller is still running.
10. Click on Stop button in the Simulink diagram tool bar to stop running the controller.
11. Shut off the Hexapod power switch if no more experiments will be conducted.
Note:
As explained in the Hexapod User Manual [2], if a limit switch is triggered the amplifier automatically stops
accepting any motor/joint commands in that direction. However, position commands in the opposite direction are still
accepted (e.g., joint can be moved back to home).
The forward and inverse kinematics are included in Hexapod_Joint_Control.mdl to provide a comparison between
the measured joint positions, and those obtained using the derived kinematics. The
World Position
display block can
be used to monitor this world coordinate position. The
Inverse Kinematics
block is used to find the six joint positions
given the measured world coordinate position of the end-effector (i.e., the output from the
Forward Kinematics
block).
This joint space position vector can be monitored in the
Hexapod Joints (From Inverse Kin)
display and compared
to the actual joint positions shown in the
Hexapod Joints
display. See Section 2.8.4 for more information about the
kinematic blocks.
2.4
WORLD-SPACE POSITION CONTROL
This Hexapod_World_Control.mdl controller shown in Figure 2.5 controls the position of the upper stage, i.e., the
end-effector. The amplitude and frequency of the sine or square wave can be adjusted for each of the end-effector’s
axes: X, Y, Z, Pitch, Roll, and Yaw.
HEXAPOD Laboratory Guide
v 1.3