Using Tappets During Cam Motion
Introduction to Tappets
The PAC's cam tool has a feature that allows a user to set a Boolean variable true or false when the master reaches a certain position going a certain direction. These points are called tappets. These can be used to perform position-based logic while being easy to read and debug. An example of a tappet graph is shown below in Figure 1.
Â
Figure 1: Example tappet graph.
The tappet graph shows that Tappet Channel 1 should be set to TRUE when the master passes 120 going in the positive direction. It also shows that Tappet Channel 1 should be set to FALSE when the master passes 240 going in the positive direction. Tappet Channel 1 will not be affected in any way when the master is moving in the negative direction. Tappets can also be seen on the tappet table, an example of which is shown below in Figure 2.
Â
Figure 2: Example tappet table.
This table shows the same information as the tappet graph, but in a text-based format. The switch behavior can be altered using a pull-down menu that appears when the user clicks one of the cells.
In order to be able to read a tappet graph, it is important to understand what all of the symbols mean. All of the different tappet symbols and their associated behaviors are shown below in Table 1.Â
Table 1: Tappet symbols and their behavior. Credit CoDeSys.
Tappet symbol | Positive pass | Negative pass | Tappet symbol | Positive pass | Negative pass |
 | none | none |  | switch off | switch off |
 | switch on | none |  | invert | none |
 | switch off | none |  | none | invert |
 | none | switch on |  | switch on | invert |
 | none | switch off |  | invert | switch on |
 | switch on | switch off |  | invert | switch off |
 | switch on | switch off |  | switch off | invert |
 | switch off | switch on |  | invert | invert |
Â
Implementation
At this point, it is a good idea to download the example Parker Automation Manager project archive file for this FAQ. This project has 2 axes (one of which is a Compax3), a cam table with tappets, a motion program and a Web Visualization component that will allow the user to run the demo.
If you do not have a Compax3, you can simply use another virtual axis as the cam slave. To do this, delete the Compax3 from the device tree and create a virtual axis with the name vSlave.
Now that the project is loaded, go to the POUs tab and open up the program called "POU". On the far-right of the Continuous Function Chart, there are two function blocks: MC_CamIn and SMC_GetTappetValue (Figure 3).
Â
Figure 3: MC_CamIn and SMC_GetTappetValue
The MC_CamIn function block is required to put the axes into cam mode, and SMC_GetTappetValue is a useful way to find the state of the tappets in a given cam table. The latter will now be described in more detail.
The reason to use SMC_GetTappetValue instead of simply placing a Selector block on the Tappets output of the MC_CamIn function block is because it offers additional logic functionality and a convenient way to manage it. The table below shows the functionality of the block's inputs and output.
Table 2: Inputs and Output of SMC_GetTappetValue. Credit CoDeSys.
 | Type | Initialization | Description |
VAR_IN_OUT | Â | Â | Â |
Tappets | SMC_TappetData | Â | Tappet signals to be evaluated by MC_GetTappetValue. |
VAR_INPUT | Â | Â | Â |
iID | INT | Â | Group-ID of the tappet to be evaluated. Â This is the value of the relevant tappet channel on the cam table. |
bInitValue | BOOL | Â | Initial value of the tappet to be assigned at first call. |
bSetInitValueAtReset | BOOL | Â | If TRUE, at a restart of the CamIn function block the value of the tappet will be set to bInitValue. If FALSE, the tappet value will be retained at a restart of the CamIn function block. |
VAR_OUTPUT | Â | Â | Â |
bTappet | BOOL | FALSE | Value of the tappet. |
 The value of iID can be changed at any time and multiple SMC_GetTappetValue blocks can be attached to a single Tappets output.
The function block gives the user some additional options in bInitValue and bSetInitValueAtReset. The input bInitValue gives the tappet a starting value while bSetInitValueAtReset tells the function block to set the tappet back to its initialization state if the Execute input on MC_CamIn is cycled.
Â
Application
Here is an example where tappets may be useful. A machine is built to cut extruded aluminum to length. The aluminum is extruded continuously, and is cut by a circular chop saw that moves back and forth on a linear stage so that it can keep pace with the feed rate of the extrusion while it is cutting.
Camming the linear stage to which the chop saw is mounted (the linear stage is the slave while the master is a nip roll encoder running along the side of the extrude) would be a viable way to solve this motion application.
A good way to tell the machine when to actuate the saw downward would be to use tappets. The tappets would be set up such that the tappet channel becomes TRUE when the extrude has reached cutting position (the cut length) and becomes FALSE when the extrude has moved a certain distance past that (the length of the linear stage minus a safety margin).
When first entering cam mode, the linear stage might be at zero velocity. At the same time, the extrude could be at a non-zero velocity. In this case, it would be disastrous if the tappet controlling the actuation of the saw were TRUE when the linear entered cam mode. The saw would descend and immediately be shattered by the force of the moving extrude. To avoid this, the programmer would want bInitValue on SMC_GetTappetValue to be attached to FALSE. This would ensure the saw stays in the rest position until the linear stage and extrude are properly aligned. In addition, the programmer would want to attach bSetInitValueAtReset to TRUE so that the saw cannot actuate accidentally just because MC_CamIn has been reset.
In order to make bidirectional operation more precise, the programmer may want to compensate for backlash. This would not be an issue for the saw application because the extrude is only going in one direction. Packaging applications, however, often involve repetitive bidirectional motion profiles that are cammed to a conveyor line. One way to deal with backlash in a cammed operation is to use the TappetHysteresis input on the MC_CamIn function block.
Assume that the stage being used is a low-precision ballscrew stage with 0.1 mm of backlash. Note that this would not be necessary with a linear encoder because that would have already compensated for any backlash in the system. Assuming their units scale to millimeters, the programmer can attach 0.1 to the TappetHysteresis function block and the axis will travel an additional 0.1 mm before changing the value of the tappet when traveling in the negative direction. This will allow any process (such as label application) that uses the tappet for control logic to operate more repeatably while in bidirectional motion than it otherwise would.
2NOV18 JD- FOUND THE MISSING TAPPETS!