FANUC Extension for MachineMotion User Manual
Overview
This guide will outline how to use the FANUC Extension for MachineMotion. This plugin allows you to control the Vention ecosystem from the Fanuc pendant, and program in a Parent-Child architecture. The Fanuc controller will be the Parent and the Vention controller will be the child.
This user manual covers Vention’s FANUC Extension for MachineMotion 2 V1.2. For details on previous releases of Vention’s FANUC Extension for MachineMotion, refer to the ‘Documentation for Previous Releases’ section at the bottom of this page.
There are two aspects of this integration:
- Safety—ensuring an E-stop in one system triggers the entire system.
- Communication—sending signals and/or commands back and forth.
Safety
Safety Wiring
Vention’s Robot Safety Module is used to interface safety signals and Ethernet connection to the FANUC controller. Please follow the Automation System Diagram (ASD) made by your Application Engineer, or one of the diagrams in the Robot Safety Module Datasheet.
Safety behaviour
- In case of an E-stop (Vention or FANUC Pendant), or any other device that detects a dangerous situation on the Vention Safety Chain:
- Safe Behaviour:
- MachineMotion axis falls into STO.
- FANUC CRX Falls into STO or SS1, as configured.
- Recovery
- Pressing on the reset (blue) button will give power back to the MachineMotion and activate FANUC CRX safety signals from Robot Safety Module.
- Safe Behaviour:
- In case of a reduced speed situation from the laser area scanner:
- Safe Behaviour:
- FANUC CRX will activate collision detection and slow down to collaborative speed.
- MachineMotion is not influenced by this situation. This needs to be taken into account in the risk assessment. Axis will run at configured speed.
- Recovery:
- If the laser area scanner is not able to detect a human everywhere where there is a danger, but can detect the entry points, then the laser scanner should be configured with manual reset. In this case, pressing the reset button will bring back the FANUC CRX to normal speed.
- If the laser scanner is able to detect a human everywhere where there is a danger, then the laser area scanner can be configured with an Auto-Reset Safety Module (to be determined and confirmed by risk assessment). In this case, if the laser area scanner does not detect a human in the workspace anymore, the FANUC CRX will resume to full speed.
- Safe Behaviour:
MachineMotion V2 setup
- Ensure that all motors are connected to their respective “Drive” ports and all I/O modules are connected to their respective “Control” ports. You can refer to the MachineMotion V2 User guide for more details
- Ensure that all safety devices are correctly connected and commissioned and that a risk assessment is completed and signed.
- Plug the MachineMotion V2 into a power outlet.
- Connect with an ethernet cable a laptop to the machine motion TO PC port, or use your Vention Pendant.
- Open Control Center with a browser (if using a pc) and navigate to http://192.168.7.2.
- Click on the “Machine Configuration” Icon, and configure all your Servo Axis in your system. Refer to the automation system diagram ASD to check your specific axis configuration.
Software installation
Note: The FANUC options KAREL (R632) and User Socket Messaging (R648) are required to run this plugin.
Latest FANUC CRX software
To install the MachineMotion V2 FANUC extension, perform the following steps:
-
Insert the provided USB stick containing the MachineMotion V2 FANUC extension into the FANUC Pendant USB port.
-
A popup will appear, click on : Import files from the USB memory.
-
Click on: Select Folder, to choose the files to import.
-
Click on the Burger Menu on the top left.
-
Select the Vention USB.
-
Select the directory named V.X.X.X
-
Click on use this folder.
-
Click on Allow Tablet TP to access the files.
-
Select Yes on the popup.
-
Upload completed.
Other
In case you would like to use this plugin with a different FANUC robot or an older CRX software, please use the Legacy TP menu and follow these steps :
- Insert the provided USB stick containing the MachineMotion V2 FANUC extensions into the USB port of your FANUC controller.
- In the FILE menu on the FANUC pendant click the FILE sub-menu.
- Press F5 [UTIL]
- Select 1 Set Device
- Select 6 USB DISK (UD1:)
- Press F2 [DIR] to open the directory subset popup.
- Click option 0 – Next until you reach the final page containing option 7. Directories.
- Select option 7. Directories to open the directory browser.
- Double click the directory option titled V.X.X.X (version number) to open the directory.
- Import Vention
.pc
files:- Select option 8 * PC (all Karel p-code).
- Press F2 LOAD to load
VTN_*
programs. - Wait for load to complete.
Communication
TCP communication using the MachineMotion V2 FANUC extension
- Ensure that options R632 – KAREL and R648 – User Socket Messaging are installed on the CRX controller, you can navigate in the legacy menu to : STATUS > Version ID > CONFIG, and scroll until you find the options. Refer to Fanuc documentation for detailed instructions on how to install options, or reach out to Vention’s customer success team.
- The FANUC controller needs to be connected via Ethernet to the Vention MachineMotion. It is recommended to use the Vention Robot Safety module ethernet connection. In the case you prefer using the configurable LAN 1 or LAN 2 ports of the MachineMotion, please follow the Network setup section in the appendix.
-
From the FANUC teach pendant use the Legacy menu and navigate to the SETUP section and select Host Comm.
For additional information: Refer to the FANUC KAREL Reference Manual, section 12, procedure 12.1 for expanded detail on the steps below. This can be accessed via the FANUC Customer Resource Center.
- Select TCP/IP.
- Press DETAIL.
- Configure the FANUC controller’s network settings.
For example, if you used the suggested network configuration with the Robot Safety Module, you should use the following FANUC network configuration:- Port #1 IP addr:: 192.168.5.3
- Subnet Mask: 255.255.255.0
-
Router IP addr: 192.168.5.1
- The FANUC needs to be rebooted for the network configuration changes to take effect, you can do this at the end of this section.
- Configure the Client Tag network parameters (
C1:, C2:, ...
).- From the FANUC teach pendant use the Legacy menu and navigate to the SETUP section and select Host Comm.
- Click SHOW and 2 Clients.
- Press C1:
- Protocol needs to be set to SM
- Enter for Server IP/Hostname Vention MachineMotion IP Address : 192.168.5.2. (static when you are using a Robot Safety Module)
- Remote port needs to be set to 9999
- Current State has to be set to : STARTED. To achieve this, click on ACTION –> UNDEFINE, then ACTION –> DEFINE, finally ACTION –> START.
- Startup State has to be set to : START. To achieve this, double click on Startup State and select UNDEFINE, then double click on Startup State and select DEFINE, finally double click on Startup State and select START.
- For any additional MachineMotion’s, repeat the above steps for the additional connection tags (“C2:”, “C3:”, …).
For additional information on how to re-configure a client tag, see: Important note on FANUC ClientTag configuration.
- To send commands to the MachineMotion V2:
- Create a TP program.
- All MachineMotion commands are sent by using the function block “CALL” and choosing KAREL programs.
- All Vention MachineMotion commands start with
VTN_
- Use the tables below to enter the arguments of each MachineMotion V2 FANUC extension commands.
- All TP programs sending commands to the MachineMotion should start with calling
VTN_OPEN_CONN
and should end withVTN_CLOSE_CONN
.
- Notes on FANUC-Vention communication via TCP/IP:
- The logic lives on the FANUC controller (parent); MachineMotion is the child controller.
- The FANUC controller sends commands to MachineMotion and waits for a response.
- E-Stop Behaviour: If an E-stop is triggered while running a Fanuc TP program calling MachineMotion commands, the last MachineMotion command will not be completed upon restart. It is then recommended to abort the TP program and restart it after recovering from an E-Stop.
MachineMotion V2 FANUC extension commands
The following commands provide an interface to control the MachineMotion V2 from within FANUC TP programs. Errors occurring within these programs will appear with error code 148. For additional help with debugging, see Debugging and viewing
VTN
log messages. For additional information on FANUC ClientTags, see Important note on FANUC ClientTag configuration.
Command name | Description |
---|---|
VTN_OPEN_CONN | This function opens the connection with the Vention MachineMotion. This function must be called before any other actions with a given MachineMotion V2 connection. |
VTN_CLOSE_CONN | This function closes the connection with the MachineMotion V2. Upon successfully closing the connection, all axes will stop. |
VTN_HOME_AXIS | This function is used to home an axis. This function will wait until the homing is completed before exiting. |
VTN_HOME_AXIS_IM | This function is used to home an axis. This function will send the command to the axis and immediately exit. |
VTN_MOVE_ABSOLUTE | This function is used to move the axis to an absolute position. This function will wait until the move is completed before finishing. |
VTN_MOVE_ABSOLUTE_IM | This function is used to move the axis to an absolute position. This function will send the command to the axis and immediately exit. |
VTN_MOVE_ABSOLUTE_COMBINED | This function is used to move multiple the axes to absolute positions simultaneously. This function will wait until the move is completed before finishing. |
VTN_MOVE_ABS_COMB_IM | This function is used to move multiple the axes to absolute positions simultaneously. This function will send the command to the axis and immediately exit. |
VTN_MOVE_RELATIVE | This function is used to move the axis to a relative position. This function will wait until the move is completed before exiting. |
VTN_MOVE_RELATIVE_IM | This function is used to move the axis to a relative position. This function will send the command to the axis and immediately exit. |
VTN_MOVE_RELATIVE_COMBINED | This function is used to move multiple the axes to relative positions simultaneously. This function will wait until the move is completed before exiting. |
VTN_MOVE_REL_COMB_IM | This function is used to move multiple the axes to relative positions simultaneously. This function will send the command to the axis and immediately exit. |
VTN_MOVE_CONTINUOUS | This function is used to move the axis with constant speed. This function will send the command to the axis and immediately exit. |
VTN_STOP_MOVE_CONTINUOUS | This function is used to stop a continuous move. This function will wait until the axis is stopped before exiting. |
VTN_GET_POSITION | This function is used to get the position of a Vention actuator (axis) and place it in a Fanuc numerical register. |
VTN_SET_POSITION | This function is used to set the position of a Vention actuator (axis) to a desired value. |
VTN_READ_DIGITAL_INPUT | This function is used to read the digital value (0 or 1) of a desired Vention input and place it in a Fanuc numerical register. |
VTN_WRITE_DIGITAL_OUTPUT | This function is used to write a digital value (0 or 1) to a desired Vention output. |
VTN_READ_ESTOP_STATUS | This function is used to read the emergency stop status of the MachineMotion controller, if the controller is in estop the return is 1, if the controller is out of estop the return is 0. This function is not safety rated. |
Command name : Argument 1 , Argument 2 , Argument 3 , Argument 4 , Argument 5 , Argument 6 , Argument 7 |
---|
VTN_OPEN_CONN : Connection String Index (1, 2, …) |
VTN_CLOSE_CONN : Connection String Index (1, 2, …) |
VTN_HOME_AXIS : Connection String Index (1, 2, …) , Axis Number (1 to 4) |
VTN_HOME_AXIS_IM : Connection String Index (1, 2, …) , Axis Number (1 to 4) |
VTN_MOVE_ABSOLUTE : Connection String Index (1, 2, …) , Axis Number (1 to 4) , Absolute position [mm] , Speed [mm/s] , Acceleration [mm/s^2] |
VTN_MOVE_ABSOLUTE_IM : Connection String Index (1, 2, …) , Axis Number (1 to 4) , Absolute position [mm] , Speed [mm/s] , Acceleration [mm/s^2] |
VTN_MOVE_ABSOLUTE_COMBINED : Connection String Index (1, 2, …) , Number of axes to sync , Speed [mm/s] , Acceleration [mm/s^2] , Axis Number (1 to 4) , Absolute position [mm] , Add one argument for Axis Number and one for Target position per additional synced axis |
VTN_MOVE_ABS_COMB_IM : Connection String Index (1, 2, …) , Number of axes to sync , Speed [mm/s] , Acceleration [mm/s^2] , Axis Number (1 to 4) , Absolute position [mm] , Add one argument for Axis Number and one for Target position per additional synced axis |
VTN_MOVE_RELATIVE : Connection String Index (1, 2, …) , Axis Number (1 to 4) , Relative position [mm] , Speed [mm/s] , Acceleration [mm/s^2] |
VTN_MOVE_RELATIVE_IM : Connection String Index (1, 2, …) , Axis Number (1 to 4) , Relative position [mm] , Speed [mm/s] , Acceleration [mm/s^2] |
VTN_MOVE_RELATIVE_COMBINED : Connection String Index (1, 2, …) , Number of axes to sync , Speed [mm/s] , Acceleration [mm/s^2] , Axis Number (1 to 4) , Relative position [mm] , Add one argument for Axis Number and one for Target position per additional synced axis |
VTN_MOVE_REL_COMB_IM : Connection String Index (1, 2, …) , Number of axes to sync , Speed [mm/s] , Acceleration [mm/s^2] , Axis Number (1 to 4) , Relative position [mm] , Add one argument for Axis Number and one for Target position per additional synced axis |
VTN_MOVE_CONTINUOUS : Connection String Index (1, 2, …) , Axis Number (1 to 4) , Speed [mm/s] , Acceleration [mm/s^2] |
VTN_STOP_MOVE_CONTINUOUS : Connection String Index (1, 2, …) , Axis Number (1 to 4) , Deceleration [mm/s^2] |
VTN_GET_POSITION : Connection String Index (1, 2, …) , Axis Number (1 to 4) , Register to be populated Fanuc (1 to 200) |
VTN_SET_POSITION : Connection String Index (1, 2, …) , Axis Number (1 to 4) , Value to be set as current axis position [μm] |
VTN_READ_DIGITAL_INPUT : Connection String Index (1, 2, …) , IO Module ID (1 to 8) , Pin Number (0 to 3) , Register to be populated Fanuc (1 to 200) |
VTN_WRITE_DIGITAL_OUTPUT : Connection String Index (1, 2, …) , IO Module ID (1 to 8) , Pin Number (0 to 3) , Pin Value (0 or 1) |
VTN_READ_ESTOP_STATUS : Connection String Index (1, 2, …) , Register to be populated Fanuc (1 to 200) |
Appendix
MachineMotion V2 Network setup using LAN1/LAN2 ethernet ports
If you don’t want to use the Robot Safety Module ethernet connection, you can configure the MachineMotion V2 Network ports to your desired IP address. You will then have to connect an ethernet cable from the FANUC ethernet port to the LAN1 or LAN2 port.
For example, if LAN 1 is connected to the FANUC controller.
- IP: 192.168.1.2
- Netmask: 255.255.255.0
-
Gateway: 192.168.0.1
- You will have to change your Client Tag to 192.168.0.2 in the FANUC Hostcomm menu.
- You will have to change the Fanuc TCP IP address to be on the same subnet, like 192.168.1.3, in the FANUC Hostcomm menu.
Note: You can connect and interface with multiple MachineMotion V2 controllers on a shared subnet using an ethernet router or a ethernet switch.
Important note on FANUC ClientTag configuration
Due to the FANUC controller’s handling of ClientTags, it is possible that when using a re-configured ClientTag the FANUC controller will refer to old network configuration parameters (IP, Port, etc). To resolve this issue refer to the section in the FANUC controller manual titled “Setting up a ClientTag” or follow the procedure below.
Re-configuring a FANUC controller ClientTag
- On the FANUC controller teach pendant, press MENU.
- Select SETUP.
- Press F1, [TYPE].
- Select Host Comm.
- Press F4, [SHOW].
- Select Clients.
- Select the Tag you wish to setup for socket messaging and press F3, [DETAIL].
- Move to the Protocol Name option and press F4, [CHOICE] and select SM (Socket Messaging).
- Move the cursor to the Startup State item:
- Press F4, [CHOICE] and select UNDEFINE
- Press F4, [CHOICE] and select DEFINE
- Move to the Server IP/Hostname option, press Enter and type in the IP address of the MachineMotion V2 controller.
- Perform the following steps. If an error occurs in either step, reboot your FANUC controller and resume from here.
- Press F2, [ACTION] and select STOP.
- Press F2, [ACTION] and select UNDEFINE.
- Move to the Port option, press enter and type in
9999
. - Press F2, [ACTION] and select DEFINE.
- Press F2, [ACTION] and select START.
- Reboot the FANUC controller.
- Upon reboot, the ClientTag should be ready for use.
Debugging and viewing VTN
log messages
In troubleshooting situations it may be useful to examine internal program logs from the VTN_*
KAREL programs. To do so, perform the following procedure to access the FANUC controller USER log area.
- On the FANUC controller teach pendant, press MENU.
- Select User
- A list of log messages from previously run programs will appear.
If the program is erroring at the VTN_OPEN_CONN
block, here are things you can check :
- Is your ethernet communication plugged in? Unplug it and replug it to make sure.
- Are the network settings setup correctly? Make sure you configured the correct Fanuc Ethernet port in the Host Comm menu. If both ports are on the same subnet, it can create conflicts, consider changing the unused one to a different subnet.
- If the previous connection was not closed properly, the communication buffer could be full. Consider playing a
VTN_CLOSE_CONN
block before callingVTN_OPEN_CONN
.