Tools

Tools Tutorial

Tool Change

_images/tools-01.png

A tool change QPushButton, with a QComboBox to select the tool number to change to, is done with QPushButton named tool_change_pb and a QComboBox named tool_change_cb. The tool change combobox will automatically be populated with all the tools found in the tool table.

Tool Change Controls

Control Function

Object Type

Object Name

Tool Change

QPushButton

tool_change_pb

Tool Selector

QComboBox

tool_change_cb

To add the description of the tools to the tool change combo box add a Dynamic Property named option and set the value to description. See Dynamic Properties

_images/tools-02.png

The description from the tool table will be appended to the tool number.

_images/tools-03.png

If you have limited space you can define the tool prefix by adding a Dynamic Property named prefix and set the value to the prefix you want.

_images/tools-04.png

The tool number will follow the prefix.

_images/tools-05.png

Note

Only one option can be used, if option is found it is used and prefix will be ignored.

Manual Tool Change

All that is needed to add a manual tool change is to add the following to the ini file in the [FLEX] section.

[FLEX]
MANUAL_TOOL_CHANGE = True
_images/tools-06.png

This is without using a theme.

_images/tools-07.png

This is the blue-touch theme.

_images/tools-08.png

This is the dark-touch theme.

Warning

You can’t use the hal_manualtoolchange at the same time as the built in Flex Manual Tool Change, you must comment out all the hal_manualtoolchange lines or remove them.

Manual Tool Change Error

If you get an error that hal_manualtoolchange component exists look in your hal files for the hal_manualtoolchange lines in the Manual Tool Change Option below.

If you’re using a copy of one of the Axis sims the hal_manualtoolchange component can be hard to find. It’s recommended that you start with a simple configuration like the Flex example simple-sim.

Manual Tool Change Option

The HAL Manual Tool Change requires at least the following HAL code in the main hal file if not using the builtin Flex Manual Tool Change above.

# manual tool change
loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

Tool Change Button

Tool change QPushButtons can be used to change tools without a spinbox by adding up to 99 QPushButtons named tool_change_pb_n. With n being the number of the tool you wish to change to using that button

Tool Change Buttons

Control Function

Object Type

Object Name

Tool Change Button

QPushButton

tool_change_pb_(n)

Tool Touchoff

To touch-off a tool to an axis, use a tool-touch-off QPushButton and a QLineEdit to enter the value of the touch off.

Tool Touchoff Controls

Control Function

Object Type

Object Name

Tool Touch Off Value

QLineEdit

tool_touchoff_le

Tool Touch Off

QPushButton

tool_touchoff_(axis letter)

Optionally you can have a QLineEdit for each axis for tool touch off. Add a Dynamic Property named source to the tool touch off button and set the value to the name of the QLineEdit that is the source for that touch off button. See Dynamic Properties

_images/tools-08.png

Tool touch off QLineEdit for each axis.

_images/tools-09.png

Current Tool Status

Current Tool status of the tool loaded in the spindle. All the labels can have a Dynamic Property called precision with the number of digits you wish to show. The tool_id_lb and the tool_orientation_lb are integers.

Tool Table Status Labels

tool_id_lb

tool_xoffset_lb

tool_yoffset_lb

tool_zoffset_lb

tool_aoffset_lb

tool_boffset_lb

tool_coffset_lb

tool_uoffset_lb

tool_voffset_lb

tool_woffset_lb

tool_diameter_lb

tool_frontangle_lb

tool_backangle_lb

tool_orientation_lb