TMC 188/40 Motion Control Module
Appendix D: Application Notes
Delta Computer Systems, Inc. 360/254-8688
99
Appendix D: Application Notes
Using the OFFSET and DIRECTION Fields
The TMC 188/40 assumes the zero position is at the transmitting end of the transducer rod and that
position increases as the magnet moves away from the transducer transmitter. However, this may
not be suitable for all applications. For example, the magnet cannot get to the zero position because
it is actually inside the transmitter. Physically it may not be possible to get within eight inches of the
zero position. To make this position indicate 0 inches you must subtract 8000 in the OFFSET field
(assuming a 0.001" position unit). Subtract the OFFSET from 0 (which equals 65536 in 16 bit math)
and use that number as the OFFSET. For this example 65536 - 8000 = 57536. Remember to
subtract 8000 from the EXTEND LIMIT and RETRACT LIMIT.
END OF ROD
42000
- 8000 = 34000
EXTEND LIMIT
35000
- 8000 = 27000
RETRACT LIMIT
8000- 8000 =
0
TRANSMITTER
0 (65536) - 8000 = 57535
OFFSET
0 (65536) - 8000 = 57535
DIRECTION
0 =
0
Here is how these parameters look:
34000 = END OF ROD
27000 = EXTEND LIMIT
0 = RETRACT LIMIT
-8000 or 57535 = TRANSMITTER
DIRECTION = 0
Increasing Actual Position
NOTE:
In this example, positions between the transmitter at -8 inches (57535 in 16-bit math) and the
RETRACT LIMIT at 0 inches will cause the axis to move to the RETRACT LIMIT. Positions
between 27000 and 57535 will cause the axis to move to the EXTEND LIMIT.
Once the parameters have been updated in VINIT V Memory, place a 'P' in the COMMAND
parameter of VWRITE V Memory to tell the TMC 188/40 to accept the new values. Now, if the axis is
told to go to 60 inches, which way will it move? With the 8 inch OFFSET, all numbers between 57535
and 65536 are between the transmitter and the retract limit, so they are negative positions (behind
the retract limit). 60 inches is the same as -5.536 inches (60000 - 65536 = -5536). Therefore the axis
will retract to the RETRACT LIMIT. As you can see, when the OFFSET is set to a value other than
zero, you must consider all values to be both signed and unsigned. In this example, all numbers
between 57535 and 65536 are really negative numbers.
Next, consider the case where the position at the EXTEND LIMIT is zero and the position at the
RETRACT LIMIT is 27 inches. Since we want the position to increase as the axis retracts it is
necessary to set the DIRECTION field to -1 or 65535. When the DIRECTION field changes, the other
positions must change as follows:
END OF ROD
42000: 65536 - 42000 =
23536