Difference between revisions of "Matlab Fanuc Robot Control"

From ESE497 Wiki
Jump to navigationJump to search
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:IMG_1188.JPG|400px]]
+
 
 +
 
 +
{{#widget:Iframe
 +
|url=https://wustl.app.box.com/embed/s/3dxalu5cy0q7sqtv7tejfakbeagqxd7w
 +
|width=800
 +
|height=550
 +
|border=0
 +
}}
 +
 
 +
Example of moving the robot to a specific location from Matlab:
 
* Place marker and metal can exactly as shown above
 
* Place marker and metal can exactly as shown above
 
* Turn on Robot
 
* Turn on Robot
Line 5: Line 14:
 
*** Verify Tool Frame 1 is set to [0,0,0]
 
*** Verify Tool Frame 1 is set to [0,0,0]
 
*** Verify Tool Frame 2 is set to [0,0,95.3] so that the TCP is at the end of the gripper
 
*** Verify Tool Frame 2 is set to [0,0,95.3] so that the TCP is at the end of the gripper
** Select -> LV_COM_FRM to select the Teaching Pendant Program to run the robot to PC communication program
+
** Launch LV_COM_FRM on Teaching Pendant following instructions at [[Fanuc_How_Tos,_FAQ,_etc.#FAQ|Fanuc_How_Tos,_FAQ,_etc.#FAQ]]
** Turn Teaching Pendant to OFF
+
** Download FanucLabviewKinect.zip from [[Matlab Fanuc Kinect|Matlab Fanuc Kinect]]
** Insert key into Controller and turn to T1 position
+
* Run Matlab2Fanuc.m
** Press Shift -> Reset on Teaching Pendant to clear any errors
+
 
** Press Green Start button on Controller
+
 
* Download and extract [[media:MatlabLabVIEWFanuc.zip|MatlabLabVIEWFanuc.zip]]
+
Sample values to run in Matlab2Fanuc.m; demonstrates how to use Tool Frame 2:
* Open and run LabVIEW\MatlabLabVIEWFanuc.vi
+
: values_to_send = [ [392.5 88.4 -236.3 -90 0 -90 1 0]; ...  % Go to X,Y,Z but 3" from marker
* Open and run matlab\MatlabLabVIEWFanuc.m
+
::::: [0 0 0 -63.6 -135 0 1 2]; ...          % Orient Tool
<mediaplayer width=720 height=504>FILE:2015-10-02_16.53.54-1.flv</mediaplayer>
+
::::: [0 0 3*25.4 0 0 0 1 2]; ...            % Move In
 +
::::: [0 0 0 0 0 0 0 2]; ...                 % Close Gripper
 +
::::: [0 0 -3*25.4 0 0 0 0 2]; ...           % Move Out
 +
::::: [350 -200 0 -90 0 -90 1 0]; ...         % Move to trash can and open gripper
 +
::::: ];

Latest revision as of 16:57, 3 August 2017


Error in widget Iframe: unable to write file /project/class-www/engineering/2017/fall/ese497/extensions/Widgets/compiled_templates/wrt672f62f326fde5_87703154

Example of moving the robot to a specific location from Matlab:

  • Place marker and metal can exactly as shown above
  • Turn on Robot
    • Menu -> Setup -> Frames
      • Verify Tool Frame 1 is set to [0,0,0]
      • Verify Tool Frame 2 is set to [0,0,95.3] so that the TCP is at the end of the gripper
    • Launch LV_COM_FRM on Teaching Pendant following instructions at Fanuc_How_Tos,_FAQ,_etc.#FAQ
    • Download FanucLabviewKinect.zip from Matlab Fanuc Kinect
  • Run Matlab2Fanuc.m


Sample values to run in Matlab2Fanuc.m; demonstrates how to use Tool Frame 2:

values_to_send = [ [392.5 88.4 -236.3 -90 0 -90 1 0]; ... % Go to X,Y,Z but 3" from marker
[0 0 0 -63.6 -135 0 1 2]; ... % Orient Tool
[0 0 3*25.4 0 0 0 1 2]; ... % Move In
[0 0 0 0 0 0 0 2]; ... % Close Gripper
[0 0 -3*25.4 0 0 0 0 2]; ... % Move Out
[350 -200 0 -90 0 -90 1 0]; ... % Move to trash can and open gripper
];