Datasheet

LM628, LM629
SNVS781C JUNE 1999REVISED MARCH 2013
www.ti.com
The derivative-term sampling interval is also programmable via this command. After writing the command code,
the first two data bytes that are written specify the derivative-term sampling interval and which of the four filter
parameters is/are to be written via any forthcoming data bytes. The first byte written is the more significant. Thus
the two data bytes constitute a filter control word that informs the LM628 as to the nature and number of any
following data bytes. See Table 4.
Table 4. Filter Control word Bit Allocation
Bit Position Function
Bit 15 Derivative Sampling Interval Bit 7
Bit 14 Derivative Sampling Interval Bit 6
Bit 13 Derivative Sampling Interval Bit 5
Bit 12 Derivative Sampling Interval Bit 4
Bit 11 Derivative Sampling Interval Bit 3
Bit 10 Derivative Sampling Interval Bit 2
Bit 9 Derivative Sampling Interval Bit 1
Bit 8 Derivative Sampling Interval Bit 0
Bit 7 Not Used
Bit 6 Not Used
Bit 5 Not Used
Bit 4 Not Used
Bit 3 Loading kp Data
Bit 2 Loading ki Data
Bit 1 Loading kd Data
Bit 0 Loading il Data
Bits 8 through 15 select the derivative-term sampling interval. See Table 5. The user must locally save and
restore these bits during successive writes of the filter control word.
Bits 4 through 7 of the filter control word are not used.
Bits 0 to 3 inform the LM628 as to whether any or all of the filter parameters are about to be written. The user
may choose to update any or all (or none) of the filter parameters. Those chosen for updating are so indicated by
logic one(s) in the corresponding bit position(s) of the filter control word.
The data bytes specified by and immediately following the filter control word are written in pairs to comprise 16-
bit words. The order of sending the data words to the LM628 corresponds to the descending order shown in the
above description of the filter control word; i.e., beginning with kp, then ki, kd and il. The first byte of each word is
the more-significant byte. Prior to writing a word (byte pair) it is necessary to check the busy bit in the status byte
for readiness. The required data is written to the primary buffers of a double-buffered scheme by the above
described operations; it is not transferred to the secondary (working) registers until the UDF command is
executed. This fact can be used advantageously; the user can input numerous data ahead of their actual use.
This simple pipeline effect can relieve potential host computer data communications bottlenecks, and facilitates
easier synchronization of multiple-axis controls.
UDF COMMAND: UPDATE FILTER
Command Code:04 Hex
Data Bytes:None
Executable During Motion:Yes
The UDF command is used to update the filter parameters, the specifics of which have been programmed via the
LFIL command. Any or all parameters (derivative-term sampling interval, kp, ki, kd, and/or il) may be changed by
the appropriate command(s), but command UDF must be executed to affect the change in filter tuning. Filter
updating is synchronized with the calculations to eliminate erratic or spurious behavior.
18 Submit Documentation Feedback Copyright © 1999–2013, Texas Instruments Incorporated
Product Folder Links: LM628 LM629