You are on page 1of 1

Parallel Robot motion control from MATLAB. 1. Run MATLAB. 2. From the MATLAB prompt or script h=actxcontrol('RobotControl.RobotControlCtrl.

1') this string provides connection with ActiveX control and returns h as a handle. Use this handle for calling functions from ActiveX control. 3. invoke(h, 'PrescaleX', 1); - Sets prescale value for X axis. invoke(h, 'PrescaleY', 1); - Sets prescale value for Y axis. (possible values 1,2,4,8) invoke(h, 'TimerX', 65534); - Sets timer frequency for X axis; invoke(h, 'TimerY', 65534); - Sets timer frequency for Y axis; 4. Set amount of pulses for each motor: invoke(h, invoke(h, invoke(h, invoke(h, invoke(h, invoke(h, 'Motor1X', 'Motor1Y', 'Motor2X', 'Motor2Y', 'Motor3X', 'Motor3Y', 10000); 0); 0); -10000); 10000); 0); - Motor 1, axis X; - Motor 1, axis Y; - Motor 2, axis X; - Motor 2, axis Y; - Motor 3, axis X; - Motor 3, axis Y;

5. invoke(h2, 'SendData');

- Starts robot motion.

You might also like