Skip to main content

Configuring FOCAS Data Collection

Configuring Data Collection​

Available Data Items​

FANUC FOCAS provides access to a rich set of data:

Status & Mode:

  • Machine status (running, idle, stopped, alarm)
  • Controller mode (AUTO, MDI, EDIT, etc.)
  • Operation mode
  • Emergency stop status

Program Information:

  • Program number
  • Program name
  • Active block/line
  • Sequence number

Production Metrics:

  • Part count (multiple methods)
  • Cycle time
  • Run time / idle time
  • Parts per hour

Machine Parameters:

  • Spindle speed (actual and commanded)
  • Spindle load
  • Feed rate (actual and commanded)
  • Feed override percentage
  • Rapid override percentage

Axis Information:

  • Axis positions (absolute, relative, machine)
  • Axis loads
  • Axis velocities

Alarms & Warnings:

  • Active alarms with codes and messages
  • Alarm history
  • Warning messages

Tool Data:

  • Active tool number
  • Tool life data
  • Tool offsets

Diagnostics:

  • Servo motor temperature
  • Spindle temperature
  • Pulsecoder temperature
  • Many other diagnostic codes (300+)

Custom Data:

  • Macro variables (common variables)
  • PMC (ladder) variables
  • P-codes (tool life management)
  • Custom registers

💡 For adapter script examples using macros, PMC, and P-codes, see Adapter Script Configuration.

Setting Up Part Counting​

Part counting configuration is one of the most important setup steps. See the Part Counting Methods for detailed instructions.

Configuring Macro Variables​

Macro variables (common variables) can be used to access custom data stored by the machine program.

Step 1: Identify Macro Variable

  • Determine which macro variable register contains your data
  • Common example: Register 510 for custom part count

Step 2: Edit Machine Configuration

  1. Go to Assets → Machines
  2. Select your machine
  3. Click Data Collection
  4. Click Edit on the adapter configuration

Step 3: Add Macro Configuration

{
"macros": {
"variable_name": 510
}
}

Replace variable_name with a descriptive name and 510 with your register number.

Step 4: Map the Data

  1. Go to Data Mapping tab
  2. Find the new macro variable data item
  3. Map to appropriate Type and Subtype
  4. Example: Type = "Part Count", Subtype = "Target"

MachineMetrics New Data Item dialog — Path / Path component; Key Name field shows "variable_name" (replace with your macro key); Display Name "Tool Life Macro"; Type = Part Count / Target subtype

Multi-Path Macro Configuration:

{
"macros": {
"path1_macro": 101,
"all_paths_macro": { "addr": 500, "path": [-1] },
"specific_paths_macro": { "addr": 501, "path": [1,3] }
}
}
  • Path -1 = All paths
  • Path [1,3] = Specific paths only

💡 For additional adapter script examples including PMC, P-codes, and tool wear tracking, see Adapter Script Configuration.

Configuring Diagnostics​

FOCAS provides access to hundreds of diagnostic codes for monitoring machine health.

Default Diagnostics (enabled automatically):

  • 308: Servo Motor Temperature
  • 309: Pulsecoder Temperature
  • 403: Spindle Temperature

To add additional diagnostics:

Use descriptive names as keys with diagnostic code numbers as values:

{
"diagnostics": {
"servo_motor_temp": 308,
"pulse_temp": 309,
"sp_temp": 403
}
}
  • Use descriptive names for keys (e.g., servo_motor_temp, coolant_level)
  • Set the diagnostic code number as the value
  • The default diagnostics (308, 309, 403) are included automatically, but you can configure them explicitly to customize names or add additional codes

Data Mapping:

  1. Refresh data items list
  2. Filter for "Diag" prefix or your custom names
  3. Map each diagnostic to appropriate Component and Type
  4. Add descriptive display names
  5. Example: servo_motor_temp → Component "Linear/Z", Type "Sample/Temperature", Name "Z-Axis Servo Temp"

See Diagnostics Configuration for more details.