Difference between revisions of "Matlab to Fanuc Robot Communication"
Line 1: | Line 1: | ||
− | We couldn't figure out a way to get Matlab to talk directly to the Fanuc robot. However, we have a toolkit (NI Ethernet/IP toolkit) that allows us to communicate from a LabVIEW program to the robot. So, the solution is to open a network socket to allow communication between the a Matlab and a LabVIEW | + | We couldn't figure out a way to get Matlab to talk directly to the Fanuc robot. However, we have a toolkit (NI Ethernet/IP toolkit) that allows us to communicate from a LabVIEW program to the robot. So, the solution is to open a network socket to allow communication between the a Matlab and a LabVIEW program, running simultaneously. The Matlab program computes the new coordinates for the robot. It transmits that message to the LabVIEW program which is listening for traffic on the agreed upon network port. The LabVIEW program does not need to be running on the same computer but it does need LabVIEW 2012-SP1-32bit and the Ethernet I/P toolkit installed. Once the LabVIEW program receives the message from the Matlab program, it sends the coordinates to the Fanuc robot and the robot will move to the new location. To make this work, you need the following downloads: |
* [[media:MatlabLabVIEWFanucComm.zip|MatlabLabVIEWFanucComm.zip]] | * [[media:MatlabLabVIEWFanucComm.zip|MatlabLabVIEWFanucComm.zip]] | ||
** LabVIEW program that will receive a TCP/IP message, extract the X, Y, Z, Roll, Pitch and Yaw coordinates and pass them to the Fanuc robot. | ** LabVIEW program that will receive a TCP/IP message, extract the X, Y, Z, Roll, Pitch and Yaw coordinates and pass them to the Fanuc robot. |
Latest revision as of 22:22, 30 January 2015
We couldn't figure out a way to get Matlab to talk directly to the Fanuc robot. However, we have a toolkit (NI Ethernet/IP toolkit) that allows us to communicate from a LabVIEW program to the robot. So, the solution is to open a network socket to allow communication between the a Matlab and a LabVIEW program, running simultaneously. The Matlab program computes the new coordinates for the robot. It transmits that message to the LabVIEW program which is listening for traffic on the agreed upon network port. The LabVIEW program does not need to be running on the same computer but it does need LabVIEW 2012-SP1-32bit and the Ethernet I/P toolkit installed. Once the LabVIEW program receives the message from the Matlab program, it sends the coordinates to the Fanuc robot and the robot will move to the new location. To make this work, you need the following downloads:
- MatlabLabVIEWFanucComm.zip
- LabVIEW program that will receive a TCP/IP message, extract the X, Y, Z, Roll, Pitch and Yaw coordinates and pass them to the Fanuc robot.
- This is dependent on both:
- LabVIEWMatlabComm.zip
- Communication from Matlab to LabVIEW to send the Fanuc Coordinates
- FanucLabVIEW.zip
- Communication from LabVIEW to the Fanuc robot using the Ethernet/IP protocol
- LabVIEWMatlabComm.zip