Machine Positions

Smart Axis and Join positions plugin.

Calculates Absolute, Relative, and Distance-To-Go values for each axis. Configurable to report actual or commanded positions and values in either machine or program units.

Usage:

Example syntax to use in Widget Rules Editor:

position:abs?string&axis=x        # returns X axis absolute position
position:rel?string&axis=x        # returns X axis relative position
position:dtg?string&axis=x        # returns X axis DTG value

YAML configuration:

This goes in your config.yml file in the data_plugins section.

data_plugins:
  position:
    kwargs:
      # whether to report actual or commanded pos
      report_actual_pos: False
      # whether to report program or machine units
      use_program_units: True
      # format used for metric units
      metric_format: "%9.3f"
      # format used for imperial units
      imperial_format: "%8.4f"

Todo

Add joint positions.

class qtpyvcp.plugins.positions.Position(report_actual_pos=False, use_program_units=True, metric_format='%9.3f', imperial_format='%8.4f')[source]

Positions Plugin

getChannel(url)[source]

Get data channel from URL.

Parameters:

url (str) – The URL of the channel to get.

Returns:

(chan_obj, chan_exp)

Return type:

tuple

rel

The current relative axis positions including all offsets

To get a single axis pass string and the axis letter:

position:rel?string&axis=x

To get a tuple of all the axes pass only string:

position:rel?
Returns:

current relative axis positions including all offsets

Return type:

tuple, str

abs

The current absolute axis positions

To get a single axis pass string and the axis letter:

position:abs?string&axis=x

To get a tuple of all the axes pass only string:

position:abs?
Returns:

current absolute axis positions

Return type:

tuple, str

dtg

The remaining distance-to-go for the current move

To get a single axis pass string and the axis letter:

position:dtg?string&axis=x

To get a tuple of all the axes pass only string:

position:dtg?
Returns:

remaining distance-to-go for the current move

Return type:

tuple, str

Relative

The current relative axis positions including all offsets

To get a single axis pass string and the axis letter:

position:rel?string&axis=x

To get a tuple of all the axes pass only string:

position:rel?
Returns:

current relative axis positions including all offsets

Return type:

tuple, str

Absolute

The current absolute axis positions

To get a single axis pass string and the axis letter:

position:abs?string&axis=x

To get a tuple of all the axes pass only string:

position:abs?
Returns:

current absolute axis positions

Return type:

tuple, str

DistanceToGo

The remaining distance-to-go for the current move

To get a single axis pass string and the axis letter:

position:dtg?string&axis=x

To get a tuple of all the axes pass only string:

position:dtg?
Returns:

remaining distance-to-go for the current move

Return type:

tuple, str

property report_actual_pos

Whether to report the actual position. Default True.

See the YAML configuration.