External Switch Actions

When you are lining up a feature under a centering microscope or stepping through a set of hole positions, both of your hands are on the handwheels, and the tablet is often out of easy reach. Using an external switch, such as a foot pedal or a push button wired to the TouchDRO adapter, you can add a sub-datum, step to the next position, capture a measurement point, and so on, without letting go of the handwheels. You can connect up to four switches and choose what each of them does.

What You Need

  • A TouchDRO adapter with a free auxiliary input, running firmware 3.7 or later. If your adapter has an earlier version, TouchDRO will still let you select the switch mode, but the switches will not work until you update the firmware.
  • One or more switches. Any switch with a simple on/off contact will work, including a foot pedal, a push button, or a micro switch. It can be normally open or normally closed.

Each auxiliary input can take two switches. In other words, you can connect four switches to a TDA-420 adapter, which has two auxiliary inputs, and two switches to a TDA-410 adapter, which has one. Note that an auxiliary input does one job at a time. In other words, an input that is set up for switches can't be used for a touch probe or a tachometer.

Wiring the Switches

External switches are supported on the TouchDRO TDA-410 and TDA-420 adapters. On these adapters, each auxiliary input is a Mini-DIN 4 socket, and the adapter comes with a matching male connector for each of them. To connect a switch, you will need to solder its two leads to that connector.

Pin numbering of the female Mini-DIN 4 auxiliary connector, on the left, and the female DB-9 scale connector, on the right, of the TouchDRO TDA-410 and TDA-420 adapters
Fig. 1: Pin numbering of the adapter's input connectors (female connectors). The Mini-DIN 4 auxiliary input is on the left

A switch is wired the same way as a two-wire touch probe. One of its leads goes to the Ground pin (pin 1), and the other goes to one of the two signal pins (pin 3 or pin 4). The signal pin decides which switch it is in TouchDRO, as shown in the table below. It doesn't matter which lead goes to which pin, and the 5V pin (pin 2) is not used.

Switch Auxiliary input Signal pin Ground pin
Switch 1 Aux. 1 (TDA-420) Pin 4 Pin 1
Switch 2 Aux. 1 (TDA-420) Pin 3 Pin 1
Switch 3 Aux. 2 (TDA-420), or the auxiliary input of the TDA-410 Pin 3 Pin 1
Switch 4 Aux. 2 (TDA-420), or the auxiliary input of the TDA-410 Pin 4 Pin 1

Note that the two signal pins of Aux. 1 are in the opposite order from Aux. 2. In other words, the first switch of Aux. 1 is on pin 4, but the first switch of Aux. 2 is on pin 3.

When you connect two switches to one auxiliary input, both of them share the Ground pin. For example, to wire a foot pedal as "Switch 1" and a push button as "Switch 2", solder one lead of each to pin 1 of the Aux. 1 connector. After that, solder the other lead of the pedal to pin 4 and the other lead of the button to pin 3.

The full pin table for the auxiliary inputs, and the timing that the adapter uses to filter out contact bounce, are covered in the "Home Switch and External Switch Wiring" section of the adapter manual.

Setting Up the Switch Inputs

Once the switches are wired and plugged into the adapter, set the input up in TouchDRO as follows:

  1. Open the "DRO Adapter Details" dialog
  2. Find the auxiliary input that the switches are wired to, and set its "Input Mode" to "Binary Switch"
  3. Press the Save button next to the dropdown
  4. Press "Restart Now" and wait for TouchDRO to reconnect to the adapter

Once the adapter restarts, the input will show a line for each of its switches. On "Aux 1" they are "Switch 1" and "Switch 2", and on "Aux 2" they are "Switch 3" and "Switch 4". A TDA-410 adapter has only the second of these inputs, so its switches are "Switch 3" and "Switch 4". At this point, press each switch and check that its line changes from "Released" to "Pressed". If a line reads "Pressed" while the switch is at rest, the switch is normally closed. In that case, change the dropdown on that line from "Normally Open" to "Normally Closed" and press Save. The details are covered in the "External Switch Inputs" section of the "Adapter Details Dialog" page.

Adapter details with Aux 1 in the Binary Switch mode, the Switch 1 line reading Pressed and the Switch 2 line reading Released, both set to Normally Open
Fig. 2: The switch lines on "Aux 1". "Switch 1" is being pressed

Assigning Actions

To choose what each switch does, open the "Settings" screen and tap "Switch Actions". On this screen you will see a list of actions. To assign a switch to an action, tap the action and select "Switch 1", "Switch 2", "Switch 3", or "Switch 4". To take a switch off an action, select "Unassigned". When you first open the screen, all of the actions are unassigned.

The Switch Actions settings screen with the When No Function Is Active group listing Add Sub-Datum (XY), Add Sub-Datum (XYZ), Next Sub-Datum, Previous Sub-Datum, Zero, and Set to Measurement, all reading Unassigned
Fig. 3: The "Switch Actions" screen
The list of choices for the Add Sub-Datum (XY) action, with Unassigned selected and Switch 1 through Switch 4 below it
Fig. 4: Selecting the switch for an action

The actions are split into two groups, and TouchDRO decides which group to use at the moment you press the switch. If a measurement function is active, the switch will run its action from the second group. Otherwise, it will run its action from the first group. As a result, one switch can have two jobs. For example, "Switch 1" can add a sub-datum while you are machining and capture a point while you are measuring.

Within a group, a switch can have only one action. If you select a switch that is already assigned to another action in the same group, TouchDRO will remove it from that action.

The assignments are saved with the machine profile, so each machine can have its own set. They are also included when you export the profile's settings.

When No Function Is Active

  • Add Sub-Datum (XY): adds a sub-datum at the current X and Y position, the same as the "⊕" button in the sub-datum panel.
  • Add Sub-Datum (XYZ): adds a sub-datum at the current position that includes the Z coordinate. On a lathe, both of these actions add a regular X/Z sub-datum.
  • Next Sub-Datum and Previous Sub-Datum: step to the next or the previous sub-datum in the list, the same as the arrow buttons in the sub-datum panel.
  • Zero: sets all of the displayed axes to zero, the same as tapping the "Set Zero" button on the function strip.
  • Set to Measurement: opens the "Set to Measurement" dialog. This action works only on a lathe that has a caliper input set up. On any other machine, you will hear the error beep.

While a Measurement Function Is Active

  • Capture Point: captures the current position as the next point of the active measurement function, the same as tapping the lit slot or the capture button on its card.
  • Finish (Log and Reset): files the result in the inspection log and then clears the function, so it's ready for the next feature. If you have already logged the result, the function is just cleared.
  • Undo Last Point: removes the last point that you captured in the current measurement. Nothing that is already saved is deleted.
  • Log Result: files the result in the inspection log and leaves the captured points in place.
The Switch Actions screen scrolled down to the While a Measurement Function Is Active group, listing Capture Point, Finish (Log and Reset), Undo Last Point, and Log Result
Fig. 5: The actions that are used while a measurement function is active

Using the Switches

The switches work while you are on the main DRO screen or in the Graphical View display. Every time you press a switch, TouchDRO will play a sound. You will hear the regular key beep when the action was done, and the error beep when it wasn't. As a result, you can tell what happened without looking at the screen.

You will hear the error beep in the following cases:

  • The switch has no action assigned in the current group
  • The action can't be done at the moment. For example, there is no next sub-datum to step to, or you pressed "Finish (Log and Reset)" before capturing all of the points
  • You pressed "Add Sub-Datum" a second time without moving the machine. In that case, TouchDRO will not add another sub-datum at the same position
  • The application menu is open

Note that while a dialog or the "Settings" screen is open, the switches are ignored and no sound is played. Furthermore, holding a switch down doesn't repeat the action. To run it again, release the switch and press it once more.

How To Use

Record the Hole Positions of an Existing Part

Let's use an old cover plate to see the workflow. The plate has eight mounting holes, and you need to drill the same pattern in a new housing. The plate is clamped to the table, there is a pointed center finder in the spindle, and a foot pedal is wired to the adapter as "Switch 1". To start, assign the pedal to the action:

  1. Open "Settings" and tap "Switch Actions"
  2. Tap "Add Sub-Datum (XY)" and select "Switch 1"
  3. Go back to the main DRO screen
The Switch Actions screen with Add Sub-Datum (XY) set to Switch 1, Next Sub-Datum set to Switch 2, and Capture Point set to Switch 1
Fig. 6: "Add Sub-Datum (XY)" assigned to "Switch 1"

Now that the pedal is set up, you can record the holes without taking your hands off the handwheels:

  1. Move the table until the point of the center finder is lined up with the first hole
  2. Press the pedal. You will hear the key beep, and the new sub-datum will appear in the list
  3. Repeat the first two steps for the remaining holes

At this point, the workspace has eight sub-datums that you can use to drill the pattern in the new part. If you also assign a second switch to "Next Sub-Datum", you can step from one hole to the next the same way while drilling.

Measure and Log a Row of Bores

In this example, a plate with five bores needs to be checked on the milling machine, using a centering microscope and the "Circle from Points" function. With a microscope, each point is normally captured by tapping the lit slot on the card, which means letting go of the handwheels three times for every bore. Using two switches, you can do the whole job from the handwheels. To start, set the switches up:

  1. Open "Settings" and tap "Switch Actions"
  2. In the "While a Measurement Function Is Active" group, tap "Capture Point" and select "Switch 1"
  3. Tap "Finish (Log and Reset)" and select "Switch 2"
  4. Go back to the Graphical View display

After that, enter measurement mode, select the microscope as the instrument, and tap the "Circle from Points" function. For each bore, do the following:

  1. Line the crosshairs up with the edge of the bore and press "Switch 1"
  2. Repeat this at two more places around the bore. Once the third point is captured, the card will show the center and the diameter
  3. Press "Switch 2". TouchDRO will file the result in the inspection log and clear the function
  4. Move to the next bore

If you press "Switch 2" before the third point is captured, you will hear the error beep and nothing will be logged. When all five bores are done, you can open the inspection log to review or export the results.