Author Topic: Melfa RV-2aj matlab control using Rs-232 communiacation  (Read 754 times)

0 Members and 1 Guest are viewing this topic.

Offline theyolo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
Melfa RV-2aj matlab control using Rs-232 communiacation
« on: September 09, 2017, 06:58:50 AM »
Hello everyone...!!! I am currently working on robot(RV-2AJ)... I am trying to connect this robot RV-2AJ with matlab(version 2015) using Rs-232 communication.But i am unable to communicate with the robot(does not respond to any command)..The robot is fully functional with default software(Cosirop) ...Below is the code.. I would be very thankful for the help..
 

    t=serial('COM8')
    set(t,'BaudRate',9600);
    fopen(t)
    fwrite(t,['1;1;EXECJOVRD 50.0']); %  Set the robot speed 50%
    fwrite(t,'1;1;RSTALRM');          % reset alarm   
    pause(0.2);
    fwrite(t,'1;1;CNTLON');             
    pause(0.2);
    fwrite(t,'1;1;SRVON');            %turn the servo on of the robot
    pause(10);