Code covered by the BSD License
-
cal_cp_ptp(cp_name, ts, l1, l...
CP + PTP Trajectory Calculation
-
cal_eta(eta_s, eta_f, vec_max...
Basic Trajectory Calculation using 5-1-5 Polynomial
-
cal_ptp(cp, pos_s, pos_f, ts,...
PTP Trajectory Calculation
-
cal_time_data(cp_ptp, ts, tim...
Finish Time and Pen Time Table Calculation
-
cat_cp_ptp(cp, ptp)
Concatenate CP and PTP trajectory
-
chk_limit(thetas, thetas_max,...
Theta and Omega Limitation Check
-
cp_circle(ts)
CP Trajectory (Circle)
-
cp_ml_logo
CP Trajectory (MATLAB Logo)
-
cp_smile(ts)
CP Trajectory (Smile Mark)
-
cp_spiral(ts)
CP Trajectory (Spiral)
-
theta2xy(theta1, theta2, l1, ...
Angle to Position Conversion for 2 link SCARA robot
-
xy2theta(x, y, l1, l2)
Position to Angle Conversion for 2 link SCARA robot
-
param_controller.m
-
param_nxtscara.m
-
param_plant.m
-
param_ref.m
-
param_sim.m
-
post_sdo_codegen.m
-
pre_sdo_codegen.m
-
nxtscara
-
nxtscara_controller
-
nxtscara_vr
-
View all files
from
NXT SCARA (Two-Link Planar Robot Arm) Controller Design
by Yorihisa Yamamoto
NXT SCARA Model-Based Design based on Embedded Coder Robot NXT.
|
| param_controller.m |
% Controller Parameters
% Number of Operation Mode & Motor
num_mode = 2; % number of operation mode
num_motor = 3; % number of motor
% Task Sample Rates
ts1 = 50; % ts1 sample time [msec]
ts2 = 100; % ts2 sample time [msec]
ts3 = 200; % ts3 sample time [msec]
% Times
time_wait = 10 * ts1; % time to wait [msec]
time_pwm3 = 30 * ts1; % time to run motor3 [msec]
time_pen = 2 * time_wait + time_pwm3; % time to bring up/down pen [msec]
% PWMs
pwm1_adjst = 50; % motor1 pwm value for position adjustment [%]
pwm2_adjst = 50; % motor2 pwm value for position adjustment [%]
pwm3_adjst = 50; % motor3 pwm value for position adjustment [%]
pwm3_pen = 50; % motor3 pwm value to bring up/down pen [%]
% Motor Angle Initial Value
[theta1_iv, theta2_iv] = xy2theta(l1 + l2, 0, l1, l2);
theta1m_iv = g1 * theta1_iv; % motor1 angle initial value [deg]
theta2m_iv = g2 * theta2_iv; % motor2 angle initial value [deg]
% Motor Angle Limitations
theta1_max = 90; % maximum angle1 [deg]
theta2_max = 140; % maximum angle2 [deg]
theta1m_max = g1 * theta1_max; % maximum motor1 angle [deg]
theta2m_max = g2 * theta2_max; % maximum motor2 angle [deg]
% Gear Backlash/Engage Parameters
backlash1 = 440; % gear1 backlash compensation value [deg]
backlash2 = 140; % gear2 backlash compensation value [deg]
engage1_iv = 1; % gear1 initial engage state (1/-1: positive/negative direction)
engage2_iv = 1; % gear2 initial engage state (1/-1: positive/negative direction)
time_en1 = 800; % gear1 time to engage (time to remove gear1 backlash) [msec]
time_en2 = 600; % gear2 time to engage (time to remove gear2 backlash) [msec]
dthetam_bl = 3; % motor angle variation threshold to detect backlash [deg]
% Sound Parameters
sound_freq_mode_chg = 440; % mode change sound frequency [Hz]
sound_dur_mode_chg = 600; % mode change sound duration [msec]
sound_freq_motor_chg = 880; % motor change sound frequency [Hz]
sound_dur_motor_chg = 200; % motor change sound duration [msec]
clear theta1_iv theta2_iv
|
|
Contact us at files@mathworks.com