Set up Fanuc Controller¶
This chapter guides you through the installation and configuration of a Fanuc controller for use with a Mikado system.
Prerequisites¶
Robotercontroller:
Fanuc controllers for robot control such as the R-30iB with software version v7 or higher are supported. Contact us if you would like to use different hardware or software.
Reset:
To avoid interactions with other programs or configurations, you should reset the controller to the factory settings before connecting to Mikado if it is no longer in the delivery state. A backup of the controller configuration is also recommended (see your controller manual).
Teach panel:
A teach panel (e.g. the iPendant) is required for the one-off setup and for manual operation.
Install the following options on the Fanuc controller:
R632 - KAREL
R648 - User Socket Messaging
The installed options can be viewed on the teach panel under Menu → NEXT → STATUS → Version ID, there on CONFIG (or F3).
Registers, variables, server tags: The following slots must be kept free on the controller:
Server Tags: 3 - 5
Flags: 1 - 2
Integer Register: 1 - 5
Position register: 1 - 2
Kollisionsgrenzen / Dual Check Safety (DCS):
If you have defined collision limits in the Fanuc controller or use Dual Check Safety, please note that these limits are not taken into account in the collision and path planning of Mikado. Therefore, always select a configuration in which the collision limits of the Fanuc controller are less restrictive than those in the Mikado configuration.
USB stick: It is best to use a USB stick as the installation medium. Alternatively, you can also transfer files via the network (FTP) (see Fanuc manual).
Network configuration¶
First, an Ethernet connection must be established. To do this, connect the Fanuc robot controller from its Ethernet port 1 to the corresponding Mikado controller Ethernet port. A new connection should now be displayed in the Mikado controller in the menu bar at the bottom right. In the case of a direct connection, this must now be set to a fixed IP and subnet mask. How a Mikado controller receives a fixed IP is explained in section Network adapter.
The IP configuration must now also be adapted on the robot controller side. We are working on a detailed description of the network configuration of the Fanuc controller. For the time being, information on the network configuration of the controller can be found in the manufacturer’s user manual.
Warning
Make sure that the IP addresses of the Mikado Controller and Fanuc Controller are in the same address space and that the subnet masks match.
Then enter the IP address of the robot controller in the Mikado Assistant under “Parameters” -> “Robot” in the corresponding field and save the settings.
Installing the Mikado interface¶
Version compatibility has been tested with version v7.70/v8.20/v9.30, the installation file may also be compatible with higher versions.
First copy all the required installation files to a USB stick (FAT formatted). You will find the files on the Mikado controller in the directory
/opt/isys-vision/mikado/robot_programs/fanuc/fanuc_install_packages/fanuc_mikado_driver_VX.XX/or using the corresponding button in the Mikado Assistant (“Parameters” -> “Robot” -> “Open directory”)Insert the USB stick into the teach panel of the robot and navigate to the content (Menu → File → File → All)
Select the installation file
install.cmand execute the installation by pressing the Enter key
Parameterizing the Mikado interface¶
Server Tags:
Use the Teach-Pendant to navigate to Menu → SETUP → Host Comm → [SHOW] → Servers
Set up server tags for day 3 to 5 (select server tag with ENTER):
Protocol: SM
Startup State: Start
Go back to the server list and check the current status of the three tags set up. This should be set to ‘STARTED’. If this is not the case, start with [ACTION] → DEFINE and [ACTION] → START.
Flags and registers:
As mentioned in section “Prerequisites”, some flags and registers are used for communication. Please check that these are not in use and comment on the flag and register descriptions if necessary.
Configure KAREL programs:
Select → [TYPE] → KAREL Progs, then select the KAREL program ROS_STATE
Data → [TYPE] → KAREL Vars
The
cfg_variable should now be visible → ENTERSelect checked with ENTER and set to TRUE
Default configuration values ROS_STATE:
loop_hz: 125s_accpt_dlay: 1000s_tag_nr: 3`s_tcp_nr: 11002`um_clear: true
Now repeat the same for the two other programs ROS_TRAJ and ROS_IO.
Default configuration values ROS_TRAJ:
f_msm_drdy: 2f_msm_rdy: 1loop_hz: 125move_cnt: 50- CNT for the movements (percentage value for the overshoot)pr_move: 1r_move_cnt: 2r_skip_sig: 5
r_tseg_vel: 1s_accpt_dlay: 1000s_tag_nr: 4`s_tcp_nr: 11000`tp_val_trstp: 1trjpt_buf_sz: 6um_clear: false
Default configuration values ROS_IO:
loop_hz: 40s_accpt_dlay: 1000s_tag_nr: 5`s_tcp_nr: 11003`um_clear: false
Enable HTTP access and KCL. This enables the automatic start of the Fanuc programs with Mikado and is required so that native programs can be executed (see “Optional: Execute native robot program”).
Prerequisite: HTTP access is enabled in the settings
Use the Teach-Pendant to navigate to Menu → SETUP → Host Comm → HTTP
Select the line in which Resource: KCL:* is entered
Activate KCL by executing Unprotect
(if possible) Set up the following access data in the corresponding fields: User:
ROS, Password:ROS
Hint
Section “Optional: Execute native robot program” explains what you also need to configure so that native robot programs can be integrated into your Mikado process
Start system¶
The ‘MIKADO’ program starts all the necessary subroutines and thus establishes the connection to Mikado.
Hint
If you want to stop the running Fanuc program, execute ‘ABORT ALL’ twice (to be found under ‘Functions’).
Optional: Gripper control via I/Os¶
If you want to control your gripper via inputs and outputs, you can implement this as standard via digital inputs and outputs (DI and DO). The configuration options for this are listed in the gripper.yaml section.
However, if you want to use the robot I/Os (RI and RO), you must set up a mapping to DIs and DOs as follows:
Create new background logic program (BG Logic)
Example pseudocode:
RO[1] = DO[101] RO[2] = DO[102] DI[101] = RI[1]
In the Mikado configuration, the gripper in this example is controlled via the output signals 101 and 102. Signal input 101 is read from robot input 1.
Optional: Execute native robot program¶
Native programs can be executed on the controller using the “Execute robot program” task.
All you have to do is enter the program name of the Fanuc program in the Mikado task. If variables have been parameterized in the Mikado task, these are passed through to the Fanuc program accordingly. Unfortunately, you cannot set a return value for a Fanuc robot; a 0 is transmitted by default.
To use this task with a Fanuc robot, the following precautions must be taken:
Prerequisite: HTTP access is activated in the settings
Under Menu → System → Setup → Remote/Local Setup: set from
localtoremoteEnable required commands via HTTP access
Menu → System → Variables: Check that
$Karel_ENB = 1is setSelect: Select the
HTTPKCL.VRprogramData → [SHOW] → KAREL Vars → CMDS: The list now displayed contains all blocked commands
Remove
RUN,CONTINUEandABORTfrom the list
Menu → System → Variables: Set the value
$RMT_MASTER = 1(Attention: this setting prevents the start of programs via UOP)(Optional) If your native programs are active for a longer period of time, you should adjust the timeout time (default: maximum 200 seconds). You can find this in your cell directory under
launch/manipulator.launch.xml: Search for the following line in the file and change the value ofvalue(in seconds):<param name="timeout_running_programs" value="200" />
Hint
You can check the configuration for correctness by opening a browser on your Mikado controller and executing a command by calling up a URL:
http://<ROBOTER_IP>/KCL/run%20<PROGRAMMNAME> (z.B. http://192.168.2.42/KCL/run%20ROS_STATE)
If you do not receive an error message, the call was successful.
Hint
If the task “Execute robot program” is called in a Mikado process, the following happens:
Mikado terminates the program on the controller that executes movements for Mikado
Variable values are transmitted for the program to be called up
Native program is started
Mikado waits until the native program has ended
Mikado restarts the program that executes movements for Mikado
Troubleshooting: Verbindung testen¶
Troubleshooting if there is no connection to the robot after configuration and restart. In the Status bar area, you can see whether the connection to the robot has been successfully established.
Check: Robot controller and Mikado controller have the same subnet mask and different fixed IPs in the same address space
Check: The status LED of the network port does not indicate an error
Check: Can the robot be reached via ping under the entered IP
The necessary tools to execute the ping command from the Mikado controller:
A console must be started on the Mikado controller. The ping command to be entered is then, for example:
ping 192.168.1.42
Pinging can be canceled by pressing Ctrl + C. A positive response would look like this:
ping 192.168.1.42
PING 192.168.1.42 (192.168.1.42) 56(84) bytes of data.
64 bytes from 192.168.1.42: icmp_seq=1 ttl=64 time=1.18 ms
64 bytes from 192.168.1.42: icmp_seq=2 ttl=64 time=0.448 ms
^C
--- 192.168.1.42 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.448/0.816/1.185/0.369 ms