Tag Archives: FOCAS

MTConnect for FANUC Overview

 

 

When first starting developing with MTConnect all of the pieces can be very overwhelming.  I thought it might be helpful to break down the pieces and the connection between them.  Even though the MTConnect Adapter for FANUC and the MTConnect agent are complete from the GitHub repository, when developing client applications or setting up the pieces an overview is helpful.

overview

Click the picture for a larger view

Devices

Setting up MTConnect starts at the FANUC control.  The control must have an Ethernet connection and the optional FOCAS function.  Most modern controls have FOCAS available from the factory via an embedded Ethernet port on the main board of the CNC control.  Check this blog post here to setup the FOCAS connection.

The adapter and agent are best run on a server based on either Linux or Microsoft Windows.  Additionally, running the adapter on a low cost Linux platform located directly in the CNC can help reduce server and network load.

Communication

The FANUC control only speaks FOCAS, a very robust and powerful API that personal computers use to read and write information on the CNC.  The MTConnect adapter does all the heavy lifting and converts FOCAS to an MTConnect data stream.   The adapter streams data to the agent via http protocol which is human readable from Internet Explorer.  Here is the sample output from the FANUC adapter:  http://adapter.ip.address:7878/

2014-07-08T20:45:54.373983Z|system|NORMAL||||
2014-07-08T20:45:54.373983Z|Xtravel|NORMAL||||
2014-07-08T20:45:54.373983Z|Xoverheat|NORMAL||||
2014-07-08T20:45:54.373983Z|Xservo|NORMAL||||
2014-07-08T20:45:54.373983Z|Ytravel|NORMAL||||

Collation

As all of the pieces of MTConnect are based on some type of TCP communication, the devices find each other by knowing the IP Address and port number of the previous device.  The client knows the IP address of the agent, the agent knows the adapter, and the adapter knows the FANUC CNC.

Finally

Ultimately the client will consume XML requested from the agent.  The structure of the XML is determined by the schema specified for each machine.  The agent takes adapter data and matches the schema name‘s with adapter stream labels.  It records the stream into a buffer.  It is that buffer of data that is served when the client requests the XML.

 

FANUC FS0iD FOCAS Setup

Confirm FOCAS is installed

FOCAS is an optional function.  If it is installed, the setting screen will be available.  The screen is located under the system hard key; followed by the continuous menu soft key several times.

system

continuous menu softkey

Keep scrolling through the available softkeys until the [Embed Port] soft key is displayed.  All of the available ethernet interfaces will be shown.

ethernet softkeys

Of the three listed here, [Ether Board] is the best choice.   It is an add on hardware board for Ethernet communication.  Press the [Ether Board] soft key.  If the [FOCAS2] softkey is now displayed, FOCAS is installed !!!  Plug your Ethernet cable into the add on boards RJ45 plug.

focas2 softkey

If you didn’t find the [FOCAS2] softkey, then check to see if it exists under the [Embed Port] softkey.  If it does, then connect your Ethernet cable into the RJ45 plug directly on the mainboard of the FS0iD contol.   Setting FOCAS2 In order to set the FOCAS settings, we first need to be in MDI mode.  Parameter Write Enable (PWE) is then enabled under the <OFS/SET> hard key [SETTING] softkey.

set PWE

Once PWE is set the IP Address of the control is set by <SYSTEM>, [Ethe Board], [COMMON].  The IP address will be a fixed address assigned by the network administrator.

IPAddress Setting

Finally the TCP Port number is set under the [FOCAS2] settings.  This port is typically 8193, however, any valid TCP port number can be used.

TCPPort setting

Confirmation

If everything is set correctly the FANUC FS0iD CNC should be reachable from any computer on the same network.  In Microsoft Windows, start a new command prompt and ping the CNC.

pingsuccess

You are now ready to use FANUC FOCAS to read and write information to the CNC.  Although the FOCAS drivers and libraries is a programming interface for C/C++ or Visual Basic, there are many available options that don’t require programming such as MTConnect and OPC converters to FOCAS.

Good Luck!