Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to realize the alternating output of two motors which share one feedback?
#1
Two linear motors share one feedback and move vertically. We want only #1 motor to be in position close loop for the acceleration and deceleration's part, and only #2 motor be in position close loop for the constant velocity's part.How to realize it?


Attached Files Image(s)
   
Reply
#2
There is no standard way of doing this, so you will have to employ some "tricks".

You will want to set up both motors to close their loops using the position encoder. They will need to be enabled and technically closed loop in all sections of the sequence. Both will be commanded with the same trajectory (you may want to use the leader/follower gantry method).

When you want to effectively disable a motor, set Motor[x].Servo.MaxPosErr to 0 and Motor[x].MaxDac to 0. It is still technically in closed-loop enabled control, but it is always outputting a zero command.

To switch modes at the right time, you will need to build your moves out of PVT sections, and set these element values with synchronous assignments. For example:

inc; // Specify distance
Motor[1].Servo.MaxPosErr == 10000; // Default
Motor[1].MaxDac == 28000; // Default
Motor[2].Servo.MaxPosErr == 0; // Disabling
Motor[2].MaxDac == 0; // Disabling
pvt20;
X200:0.2; // Accel section
Motor[1].Servo.MaxPosErr == 0; // Disabling
Motor[1].MaxDac == 0; // Disabling
Motor[2].Servo.MaxPosErr == 10000; // Default
Motor[2].MaxDac == 28000; // Default
pvt30;
X600:0.2; // Constant speed section
Motor[1].Servo.MaxPosErr == 10000; // Default
Motor[1].MaxDac == 28000; // Default
Motor[2].Servo.MaxPosErr == 0; // Disabling
Motor[2].MaxDac == 0; // Disabling
pvt20;
X200:0; // Decel section
...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)