Tool Table

Tool Table data plugin.

Exposes all the info available in the tool table. Watches the tool table file for changes and re-loads as needed.

Tool Table YAML configuration:

      # specify the columns that should be read and writen to the
      # tooltable file. To use all columns set to: TPXYZABCUVWDIJQR
      columns: PTDZR
      # specify text to be added before the tool table data
      file_header_template: |
        LinuxCNC Tool Table

        QtPyVCP will preserve comments before the opening semicolon.
class qtpyvcp.plugins.tool_table.ToolTable(columns='TPXYZABCUVWDIJQR', file_header_template=None, remember_tool_in_spindle=True)[source]

Current Tool Info

Available items:

  • T – tool number
  • P – pocket number
  • X – x offset
  • Y – y offset
  • Z – z offset
  • A – a offset
  • B – b offset
  • C – c offset
  • U – u offset
  • V – v offset
  • W – w offset
  • I – front angle
  • J – back angle
  • Q – orientation
  • R – remark

Rules channel syntax:

Parameters:item – the name of the tool data item to get
Returns:dict, int, float, str

Initialize the data plugin.

This method is called after the main event loop has started. Any timers or threads used by the plugin should be started here.


Get a dict of default tool values for a new tool.

saveToolTable(tool_table, columns=None, tool_file=None)[source]

Write tooltable data to file.

  • tool_table (dict) – Dictionary of dictionaries containing the tool data to write to the file.
  • columns (str | list) – A list of data columns to write. If None will use the value of self.columns.
  • tool_file (str) – Path to write the tooltable too. Defaults to self.tool_table_file.

Terminate the data plugin.

This is called right before the main event loop exits. Any cleanup of the plugin should be done here, such as saving persistent data.

static validateColumns(columns)[source]

Validate display column specification.

The user can specify columns in multiple ways, method is used to make sure that that data is validated and converted to a consistent format.

Parameters:columns (str | list) – A string or list of the column IDs that should be shown in the tooltable.
Returns:None if not valid, else a list of uppercase column IDs.
qtpyvcp.plugins.tool_table.merge(a, b)[source]

Shallow merge two dictionaries