Machine Translated by Google Subscribe to DeepL Pro to edit this document. For more information, visit www.DeepL.com/pro Siemens PLC to Fanuc Robot Communication v2023.12.13 DE Instructions for starting a Fanuc Robot program from a Siemens PLC Author: Claude Loullingen, The Engineer Contribution: Tom Coosemans, Fanuc Benelux Version history: v2023.12.13: • Information for Phoenix Profinet card added • Added an example of an FC function for communicating with the robot • Force table replaced by PLC program • Disclaimer added Material used: • Siemens S7-1500 • Fanuc training cell with ER-4iA robot, R-30iB Plus control and Phoenix Profinet card • Fanuc Educational Cell with ER-4iA robot, R-30iB Plus controller and Molex Profinet card Two solutions (there are others like RSR or Macro on DI): 1. One could connect a PLC output to a robot input (DI) and have the robot program wait for a signal at the corresponding input. The PLC could even select a program to run using additional inputs that would encode the program name as bits. This solution should be simple and will not be discussed in detail here. 2. You can connect the PLC to the optional Profinet card in the robot controller via Profinet and use the PNS (Program Number Select) and UOP (User Operator Panel) technology on the robot. In principle, this technology corresponds to point 1, except that no physical inputs or outputs are used, but only virtual fieldbus IOs. 1/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE Background information: UOP (User Operator Panel): Typically, you don't want the user of a robot system to use the teach pendant to start, stop, or reset a robot. The alternative is to build a custom operator panel that connects to the robot controller and allows the user to perform basic interactions with the robot, as well as provide basic feedback, such as whether an error has occurred, a program is running, or is paused. Fanuc calls this panel a UOP (User Operator Panel), as opposed to the SOP (Standard Operator Panel) on the robot controller door. Under Menu / I/O / UOP, you can monitor and configure the inputs and outputs intended for connecting the external control panel. By default, the UOP IOs are assigned to Rack 48. Racks: Most inputs and outputs in the robot controller's I/O menu can be assigned to so-called racks. Some of these racks are physical I/Os on the robot controller, but most relate to fieldbuses. Press CONFIG when monitoring I/O on the handheld pendant to see which I/Os are assigned to which rack. For more details, see chapter 13.2.2 "Configuring I/O" in the Fanuc HandlingTool manual. List of racks and their numbers:1 - 0 = Process I/O card, I/O link Connection unit - 1 to 15 = I/O unit MODEL A / B - 32 = I/O Link slave interface - 33 = PMC (internal I/O assignment) - 34 = Flags, markings - 35 = Always ON - 36 = DCS Safe I/O (non-safety function) - 48 = Mainboard R-30iB Mate (CRMA15&16) - 66 = PROFIBUS-DP (Master) - 67 = PROFIBUS-DP (Slave) - 68 = FL-net (Type 1) - 69 = FL network status (type 1) - 75 = FIPIO (slave) - 81 = DeviceNet (Karte 1) - 82 = DeviceNet (Karte 2) - 83 = DeviceNet (Karte 3) - 84 = DeviceNet (Karte 4) - 87 = RoboWeld - 88 = Global Ethernet data - 89 = EthernetIP - 90 = Arclink - 91 = WTC welder - 92 = CC-Link - 93 = InterBus (Master) - 94 = InterBus (Slave) - 95 = InterBus (CMD-Modus) - 96 = Modbus TCP - 98 = InterBus slave only - 99 = PROFINET I/O-Controller - 100 = PROFINET I/O device - 101 = Dual-channel PROFINET I/O controller - 102 = Dual-channel PROFINET I/O device - 103 = FL-net (Type 2) - 104 = FL network status (type 2) - 105 = CC-Link IE-Feld - 106 = EtherCAT - 107 = Tool interface For example, in the figure below you can see that the outputs DO[81] to DO[84] 1 Quelle: Kapitel 3.1 des Fanuc Basic Operator Manual B-83284DE_09 2/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE Rack 48 is assigned to the IO connector on the robot controller's main board. Start = 21 means that DO[81] is on pin 21 of the connector. 3/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE Configurations - Part 1 (Robot Side) Configuring the UOP on the programming pendant: • Menu / System / Config If you change position 42 to "Remote", the green "Cycle Start" button on the control door will be disabled. • Menu / Settings / Prog Select • By default, the UOP inputs and outputs are mapped to the physical IOs on the motherboard IO connector, just like the digital IOs. As already 4/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE As described above, this allows the connection of a custom control panel to perform basic manipulation of the robot. However, by assigning the UOP IOs to a rack corresponding to the Profinet card, the same can also be performed from a Siemens PLC. To test whether the robot's UOP configuration was successful without a PLC, we will first assign the UOP inputs to the Flags register (rack 34) on the robot controller. This is a workaround to manually enable or disable the UOP inputs, as this is not possible directly via Menu / I/O / UOP. However, in the same menu, you can assign the discussed rack by pressing CONFIG. Clear all assignments and set the following. Make sure you have switched to the UOP inputs and have not yet deleted the UOP output assignments. Restart the controller (turn it off and on again) to activate the upcoming changes. In the Roboguide, you can press the "Restart Controller" button and turn on the power. • Now you can set the flags as shown in the screenshot below. Due to the mapping above, you should see that the flag status is copied 1:1 to the UOP inputs. The usage of most UOP inputs can be deduced from their names. Just note that IMSTP stands for "Immediate Stop" and SFSPD stands for "Safety Speed." The latter is usually connected to the safety fence. 5/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE A detailed description of the 18 UOP inputs and 20 UOP outputs can be found in Chapter 13.9 "CONTROL PANEL" in the HandlingTool manual. Configuring PNS (Program Number Select) on the programming pendant: • The 8 bits UI[9] to UI[16] allow the preselection of one of the programs PNS0001 to PNS0255, where UI[9] is the LSB (least significant bit). For example, 0000 0101(2) = 5(10) . So if UI[16] to UI[9] are set to 0000 0101(2) are set, the program "PNS0005" is preselected. Fanuc calls this technology PNS. • The settings in the screenshot above preselect the program PNS0001, so you should now create a program named PNS0001. Your program could, for example, include a call to HAND_TOG. • To select the selected program, a pulse must be applied to the PNS strobe input UI[17]. Before manually applying a pulse to UI[17], select a program other than PNS0001, for example, AA-HOME. Now apply the pulse and check that PNS0001 appears at the top of the screen, just as if you had manually selected it. • After the program has been successfully selected, pulse UI[5] to reset any errors. Now pulse the UI[6] input, and the program should run. • If UOP control is working as expected, you can already assign the UOP inputs to Rack 100 (Phoenix) or 102 (Molex) to control the UOP via Profinet. Therefore, you should assign UI[1-18] to Rack 100/102, Slot 1, Start 1. Additional configuration in Roboguide in case you want to simulate the UOP: • Pull down the play button in the Roboguide and go to the Execution configuration • After each start, the system variable $RMT_MASTER must be reset to 0 see Menu / System / Variables. 6/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE Configuration of the Phoenix Profinet interface:2 A Profinet network must have a master device that controls all other devices, the slaves. The robot controller can act as either a master or a slave. Here, we will choose the most common situation, where the robot controller is the slave of the PLC master. The following configurations apply only to the Phoenix Profinet card and assume that the Profinet hardware and software have been installed on the controller. Please do not hesitate to contact the Fanuc Helpdesk in your region for assistance. • Create a file named device1.xml with the following content. Slot 0 remains untouched. Slot 1 is adjusted to what you want. ID="19" means we need 128 input bytes and 128 output bytes. For other data lengths, see Chapter 10 in the R-30iB Plus Profinet User Manual [B-82864EN_07]. <?xml version="1.0" encoding="utf-8"?> <Device> <Modul Slot="0" ID="0x00000300"> <Submodul API="0" Subslot="1" ID="0x00000001" Inputlen="0" Outputlen="0" IMCarrier="1" /> <Submodul API="0" Subslot="0x8000" ID="0x00008000" Inputlen="0" Outputlen="0" /> <Submodul API="0" Subslot="0x8001" ID="0x00008001" Inputlen="0" Outputlen="0" /> <Submodul API="0" Subslot="0x8002" ID="0x00008002" Inputlen="0" Outputlen="0" /> <Submodul API="0" Subslot="0x8003" ID="0x00008003" Inputlen="0" Outputlen="0" /> <Submodul API="0" Subslot="0x8004" ID="0x00008004" Inputlen="0" Outputlen="0" /> </Module> <Modul Slot="1" ID="19"> <Submodul API="0" Subslot="01" ID="0x00000001" Inputlen="128" Outputlen="128" /> </Module> </device> • ZIP the file device1.xml to device1.zip • Copy device1.zip to FR:\pnfb on the controller. The easiest way is via FTP, but also possible with USB stick. • Configure the Profinet card under MENU / SETUP / PROFINET. If you don't see this menu item, you don't have the Profinet software installed. 2 For the Molex Profinet card, see the next chapter. 7/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE • Disable the I/O controller as it corresponds to the master channel. • Enable the I/O device as it corresponds to the slave channel. • Go to the [Other] / Ethernet Address tab and set the IP Configuration and the Profinet device name of your robot. • [Other] / General • Set the startup mode to RUN. • Connect your PLC to one of the 4 ports on the Phoenix Profinet card. • Go to the [Other] / I/O Device tab and check that the number of digital inputs and outputs matches your settings in the XML file. 8/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE Configuration of the Molex Profinet interface:3 A Profinet network must have a master device that controls all other devices, the slaves. The robot controller can act as either a master or a slave. Here, we will choose the most common situation, where the robot controller is the slave of the PLC master. The following configurations apply only to the Molex Profinet card and require that the Profinet hardware and software have been installed on the controller. Please contact the Fanuc Helpdesk in your region for assistance. • Menu / I/O / Profinet A plug-in will be launched where you can configure the Profinet Molex interface. If you don't see this menu item, the Profinet software isn't installed. • Select channel 1 and deactivate it as it corresponds to the master channel. • Select Channel 2. Set the IP address and subnet mask according to your network plan by tapping the IP address on the screen. Make a note of the device name as you will need it in the TIA Portal • Expand channel 2 and, under IO Device, set the amount and type of data to be exchanged with the master. The same must be done later on the PLC side. To delete a row, tap it and change the slot type to "None." Click SAVE and restart the robot. With "DI/DO 8 Bytes," you can address two times 8 bytes x 8 bits/byte = 64 individual bits. This means you can address 64 inputs and 64 outputs. • Connect your PLC to port 1 or 2 of the Profinet using an Ethernet cable. Card in your robot controller. Ports 1 and 2 correspond to channel 2. 3 For the Phoenix Profinet card, see the previous chapter. 9/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE 4 4 Source: R-30iB_Plus_ProfiNet_User Manual_Two-Channel_[MAROBDCPN01141E_Rev.F] 10/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE Configurations - Part 2 (PLC side) • Contact the Fanuc helpdesk in your region to obtain the appropriate GSDML (Generic Station Description Markup Language) file for your Profinet card. • Import the GSDML description file in the TIA Portal via the menu Options/Management of general station description files. • Drag and drop the robot controller from the hardware catalog into the Devices & Networks window of your existing TIA project. Phoenix Molex • Click the "Unassigned" link and select the correct port on the PLC. After a few seconds, a connection should appear between the two devices. • In the device configuration of the robot controller in the TIA Portal, add the same Add input and/or output modules that you added to the robot controller in Part 1 11/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE defined. Adjust the I address and Q address if necessary. These are the addresses to be used in your PLC program. Phoenix: Molex: • In the same device overview window, click the "FANUC Robot Controller" line and set the IP address, subnet mask, and Profinet device name as you specified them on the robot controller. The latter is very important because Profinet relies not only on the IP address but also on the device name. 12/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE • If you have not yet connected your PLC to the robot controller with an Ethernet cable connected, you should do so now. • Check on the robot that the UOP inputs are correctly assigned to rack 100 (Phoenix) or 102 (Molex), otherwise see the end of the chapter "PNS configuration". • Now it's time to test whether the PLC's Profinet IOs are communicating correctly with the robot controller's Profinet IOs. One way to do this is to write a small PLC program that assigns any digital input to the first bit in Profinet. For example: 13/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE If your setup was successful, the IMSTP bit should turn ON when the selected digital input on the PLC is set high. So far we have mainly focused on the UOP inputs, but setting up the UOP outputs follows the same logic. Test program with a PLC function to control the UOP via Profinet: Of course, IMSTP and other inputs in a production program should not be "AlwaysTrue". 14/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE Test program with a PLC function for reading the UOP via Profinet: 15/16 Machine Translated by Google Siemens PLC to Fanuc Robot Communication v2023.12.13 DE Disclaimer: The information contained in these instructions, notes, or advice is intended for general informational purposes only. Users are advised to exercise caution and good judgment when implementing any recommendations, procedures, or suggested actions. The following disclaimer is intended to clarify that the author or provider of these instructions cannot be held responsible for any damage, loss, injury, or adverse consequences that may result from following these instructions. Assumption of Risk: Users assume all risks associated with the implementation of these instructions. These risks may include, but are not limited to, property damage, loss of data, personal injury, or other unforeseen consequences. No Warranty or Guarantee: The manual is provided "as is" without any express or implied warranty or guarantee. The author makes no representations or warranties regarding the accuracy, completeness, or suitability of the instructions for a particular purpose. Individual Responsibility: Users are responsible for evaluating the appropriateness of the instructions for their specific circumstances and for determining the safety and legality of implementing the instructions within their jurisdiction. Limitation of Liability: In no event shall the author or provider of the manual be liable for any direct, indirect, incidental, special, or consequential damages arising out of or in any way related to the use or misuse of the manual. Changes to the instructions: The author reserves the right to change, update or remove the instructions at any time and without prior notice. Users are encouraged to check for the latest version of the instructions. By following the instructions, you acknowledge and agree to the terms of this disclaimer. If you do not agree to these terms, do not follow the instructions. 16/16
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )