Commit 9db20186 authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

bogenparameter

parent b2de4471
......@@ -17,13 +17,14 @@ classdef itaMotorNanotec_HRTFarc < itaMotorNanotec
sArgs_default_motor = struct( ...
'wait', true, ...
'speed', 3, ...
'speed', 2, ...
'VST', 'adaptiv', ...
'limit', true, ...
'continuous', false, ...
'absolut', true, ...
'closed_loop', false, ...
'acceleration_ramp',800, ...
'acceleration_ramp',20, ...
'decceleration_ramp',20, ...
'gear_ratio', 80, ...
'current', 100, ...
'ramp_mode', 2, ...
......@@ -161,6 +162,9 @@ classdef itaMotorNanotec_HRTFarc < itaMotorNanotec
% Calculate and set upper speed:
stepspersecond = round(this.sArgs_default_motor.speed/0.9*this.sArgs_default_motor.gear_ratio);
motorControl.add_to_commandlist(sprintf('#%do=%d\r' , this.motorID, stepspersecond));
% set decel to a high value so the switch is not overrun
motorControl.add_to_commandlist(sprintf('#%d:decel1%.0f\r' , this.motorID,100));
% Start reference move:
motorControl.add_to_commandlist(sprintf('#%dA\r' , this.motorID));
......@@ -337,9 +341,9 @@ classdef itaMotorNanotec_HRTFarc < itaMotorNanotec
% Choose ramp mode: (0=trapez, 1=sinus-ramp, 2=jerkfree-ramp):
motorControl.add_to_commandlist(sprintf('#%d:ramp_mode=%d\r', this.motorID, this.sArgs_motor.ramp_mode));
% % Set maximum acceleration jerk:
motorControl.add_to_commandlist(sprintf('#%d:b=80\r' , this.motorID));
motorControl.add_to_commandlist(sprintf('#%d:b=4\r' , this.motorID));
% % Use acceleration jerk as braking jerk:
motorControl.add_to_commandlist(sprintf('#%d:B=20\r' , this.motorID));
motorControl.add_to_commandlist(sprintf('#%d:B=0\r' , this.motorID));
% Closed_loop?
%this.sArgs_motor.closed_loop = true; % DEBUG!
if this.sArgs_motor.closed_loop == true
......@@ -454,7 +458,7 @@ classdef itaMotorNanotec_HRTFarc < itaMotorNanotec
% Set acceleration ramp directly
motorControl.add_to_commandlist(sprintf('#%d:accel%.0f\r' , this.motorID, this.sArgs_motor.acceleration_ramp));
% Brake ramp:
motorControl.add_to_commandlist(sprintf('#%d:decel10\r' , this.motorID));
motorControl.add_to_commandlist(sprintf('#%d:decel1%.0f\r' , this.motorID,this.sArgs_motor.decceleration_ramp));
% Zero menas equal to acceleration ramp!
ret = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment