FOCAS
This module implements FANUC's FOCAS protocol connectivity, allowing the user to collect different data from a FANUC CNC machine.
This protocol implementation allows the communication to such devices and provides the user the ability to create endpoints for reading and subscribing for changes on the data provided by them.
Below you can see configuration parameters and examples on how to build a commissioning file for this protocol.
FOCAS Methods
Available FOCAS methods. For full details of each method, consult the FOCAS documentation.
Subscribe Methods
All endpoints utilizing these methods have to be defined as endpoints with the subscribe operation. The output will be provided as JSON object.
cnc_exeprgname
cnc_exeprgnameReads the full path name of the program which is currently being executed in CNC.
Example output:
{ "id": 1, "timestamp": 1637339279827, "value": { "name": "SAMPLE", "o_num": 0 } }cnc_rdgcode
cnc_rdgcodeReads the information of CNC about the commanded G code.
Required properties:
typeblocknumGcd
Example output:
cnc_rdopnlsgnl
cnc_rdopnlsgnlReads the output signal image of software operator’s panel.
Required properties:
slctData
Example output:
cnc_rdprgnum
cnc_rdprgnumReads the program number (modal O number) of the program which is currently selected in CNC.
Example output:
cnc_rdspeed
cnc_rdspeedReads the actual feed rate and the actual rotational speed of the main spindle.
Required properties:
dataType
Example output:
cnc_rdspload
cnc_rdsploadReads the load information of the serial spindle.
Required properties:
spindleNumber
Example output:
cnc_statinfo2
cnc_statinfo2Reads the status information of CNC.
Example output:
cnc_sysinfo
cnc_sysinfoReads system information such as kind of CNC system, Machining(M) or Turning(T), series and version of CNC system software and number of the controlled axes.
Example output:
pmc_rdpmcrng
pmc_rdpmcrngReads the PMC data of the specified PMC address/range.
Required properties:
addressTypedataTypeaddressStartaddressEnddataLength
Example output:
Read Methods
You must define all endpoints utilizing these methods as endpoints with the read operation, since they require input to be provided on the request topic (req). The output will be provided as JSON object.
For read endpoints, you can include a correlation id in the payload of the request message to ensure correct identification of responses to specific requests.
program_download
program_downloadDownload the specified NC data to the controller. For this method, you will need to specify a valid G-code program (see e.g. https://en.wikipedia.org/wiki/G-code) in the message payload as string value of the value key and publish it on the endpoint’s request topic (req).
The program code string has to be formatted in a certain way to be processable by the method. To convert the program to this format the following steps have to be applied to the program code:
Insert a leading line break ; all data before that will be ignored
Replace all line breaks with
Remove all space characters
Remove all semicolons
The example code:
would be converted to the string:
The program will be downloaded to the directory which is set as “Background Folder” in the Fanuc controller.
Example output:
Service Commissioning File Example
Last updated
Was this helpful?

